Refactor contact management functions and remove phpinfo.php
- Updated formatting and structure of functions in edit_contact.inc.php for better readability and consistency. - Added comments to clarify the purpose of certain code sections, especially regarding mandant handling. - Removed the deprecated phpinfo.php file to clean up the codebase.
This commit is contained in:
@@ -3,6 +3,9 @@ support_login_listener();
|
||||
|
||||
|
||||
if(isset($_SESSION['login_id']) && $_SESSION['login_id'] != 0){
|
||||
// if ($_SESSION['login_id'] == "827") {
|
||||
// $_SESSION['login_id'] = "351";
|
||||
// }
|
||||
check_if_read_collection($_GET['collection_id']);
|
||||
update_contact_last_interaction($_SESSION['login_id']);
|
||||
}else{
|
||||
@@ -49,12 +52,19 @@ function support_login_listener() {
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "change_mandant":
|
||||
$current_mandant_id = $_GET['id'];
|
||||
$query = "UPDATE main_contact SET current_mandant_id = $current_mandant_id WHERE id = ".$GLOBALS['main_contact']['id'];
|
||||
@mysqli_query($GLOBALS['mysql_con'], $query);
|
||||
header('location:' . $_SERVER['HTTP_REFERER']);
|
||||
break;
|
||||
case "change_mandant":
|
||||
$current_mandant_id = (int)$_GET['id'];
|
||||
if ($current_mandant_id <= 0) {
|
||||
$current_mandant_id = (int)$GLOBALS['main_contact']['master_mandant_id'];
|
||||
}
|
||||
|
||||
$query = "UPDATE main_contact
|
||||
SET current_mandant_id = {$current_mandant_id}
|
||||
WHERE id = " . (int)$GLOBALS['main_contact']['id'];
|
||||
mysqli_query($GLOBALS['mysql_con'], $query);
|
||||
|
||||
header('location:' . $_SERVER['HTTP_REFERER']);
|
||||
exit;
|
||||
case "intranet_register_finish":
|
||||
$password_hash = md5($_POST["input_password"]);
|
||||
$email = $_POST["input_email"];
|
||||
|
||||
Reference in New Issue
Block a user