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"];
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
require_once("../../mysyde/common/version_comment.inc.php");
|
||||
require_once("intranet_functions.inc.php");
|
||||
|
||||
|
||||
if (isset($_POST["fgztiknxbhhk"])) {
|
||||
$_SESSION['login_id'] = $_POST["fgztiknxbhhk"];
|
||||
header('location:/');
|
||||
|
||||
@@ -263,7 +263,7 @@ function getList($current_mandant) {
|
||||
echo '<tr class="contact_row">';
|
||||
echo '<td class="contact_img_new">';
|
||||
if ($value_users['image'] == "") {
|
||||
echo "<img class='img-fluid' src='/userdata/intranet/contact/platzhalter-mann-compressor.jpg'>";
|
||||
echo "<img class='img-fluid' src='/userdata/intranet/contact/platzhalter.png'>";
|
||||
} else {
|
||||
echo "<a data-fslightbox=" . $value_users['id'] . " href='/userdata/intranet/contact/" . $value_users['image'] . "'><img class='img-fluid' src='/userdata/intranet/contact/" . $value_users['image'] . "'></a>";
|
||||
}
|
||||
@@ -276,7 +276,7 @@ function getList($current_mandant) {
|
||||
echo '<td>
|
||||
<div style="cursor:pointer; width:16px; height:16px;"
|
||||
onclick="open_modal_visitcard(\'' .
|
||||
($value_users['image'] != "" ? $value_users['image'] : "platzhalter-mann-compressor.jpg") . '\', \'' .
|
||||
($value_users['image'] != "" ? $value_users['image'] : "platzhalter.png") . '\', \'' .
|
||||
$value_users['name'] . '\', \'' .
|
||||
$value_users['email'] . '\', \'' .
|
||||
$value_users['cost_center'] . '\', \'' .
|
||||
|
||||
BIN
module/intranet/login_pic/Hamburg.jpg
Normal file
BIN
module/intranet/login_pic/Hamburg.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 114 KiB |
@@ -27,7 +27,7 @@ function get_ceo($mandant_id){
|
||||
function get_contact($image, $name, $email, $phone_no, $role_name) {
|
||||
echo "<div class='group_container'>";
|
||||
if($image == ""){
|
||||
echo "<div class='img_container'><img class='img-fluid' src='/userdata/intranet/contact/platzhalter-mann-compressor.jpg'></div>";
|
||||
echo "<div class='img_container'><img class='img-fluid' src='/userdata/intranet/contact/platzhalter.png'></div>";
|
||||
}else {
|
||||
echo "<div class='img_container'><img class='img-fluid' src='/userdata/intranet/contact/".$image."'></div>";
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ WHERE
|
||||
<div class="visitenkarte_kopf">
|
||||
<a href="/awo/de/profil/">
|
||||
<?php
|
||||
$profile_image = 'platzhalter-mann-compressor.jpg';
|
||||
$profile_image = 'platzhalter.png';
|
||||
if($contact['image'] != ""){
|
||||
$profile_image = $contact['image'];
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ if (!$result) {
|
||||
}
|
||||
$contact = mysqli_fetch_array($result);
|
||||
|
||||
$contact_image = "platzhalter-mann-compressor.jpg";
|
||||
$contact_image = "platzhalter.png";
|
||||
if (!empty($contact['image'])) {
|
||||
$contact_image = $contact['image'];
|
||||
}
|
||||
|
||||
@@ -51,7 +51,8 @@ function count_knowledgecenter(){
|
||||
$opened = 0;
|
||||
$closed = 0;
|
||||
$read = 0;
|
||||
$query = "SELECT DISTINCT main_collection.* FROM main_collection LEFT JOIN knowledgecenter_collection_link ON main_collection.id = knowledgecenter_collection_link.main_collection_id LEFT JOIN main_collection_mandant_link ON main_collection.id = main_collection_mandant_link.main_collection_id WHERE ((main_collection_mandant_link.main_collection_id IS NOT NULL AND main_mandant_id = ".$GLOBALS['main_contact']['current_mandant_id'].") OR main_collection_mandant_link.main_collection_id IS NULL) AND main_collection_setup_id = 3;";
|
||||
$count = 0;
|
||||
$query = "SELECT DISTINCT main_collection.* FROM main_collection LEFT JOIN knowledgecenter_collection_link ON main_collection.id = knowledgecenter_collection_link.main_collection_id LEFT JOIN main_collection_mandant_link ON main_collection.id = main_collection_mandant_link.main_collection_id WHERE ((main_collection_mandant_link.main_collection_id IS NOT NULL AND main_mandant_id = ".$GLOBALS['main_contact']['current_mandant_id'].") OR main_collection_mandant_link.main_collection_id IS NULL) AND main_collection_setup_id = 3 AND (main_collection.is_archived = 0 OR main_collection.is_archived IS NULL);";
|
||||
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
|
||||
while($posts = @mysqli_fetch_array($result)) {
|
||||
$query2 = "SELECT * FROM main_collection_read WHERE main_collection_id = ".$posts['id']. " AND main_contact_id = ".$GLOBALS['main_contact']['id'];
|
||||
|
||||
Reference in New Issue
Block a user