More logAction function updates to client portal login amd cleaned up the client login portal for better presentation of vars

This commit is contained in:
johnnyq
2024-11-15 12:21:55 -05:00
parent 577d97b471
commit 412462a4c0
2 changed files with 122 additions and 101 deletions

View File

@@ -139,7 +139,8 @@ if ($item_type == "Document") {
// Logging
$name = mysqli_real_escape_string($mysqli, $doc_title);
mysqli_query($mysqli, "INSERT INTO logs SET log_type = 'Sharing', log_action = 'View', log_description = 'Viewed shared $item_type $doc_title_escaped via link', log_client_id = $client_id, log_ip = '$ip', log_user_agent = '$user_agent'");
logAction("Share", "View", "Viewed shared $item_type $doc_title_escaped via link", $client_id);
} elseif ($item_type == "File") {
$file_sql = mysqli_query($mysqli, "SELECT * FROM files WHERE file_id = $item_related_id AND file_client_id = $client_id LIMIT 1");
@@ -254,7 +255,7 @@ if ($item_type == "Document") {
// Logging
$name = sanitizeInput($login_row['login_name']);
mysqli_query($mysqli, "INSERT INTO logs SET log_type = 'Sharing', log_action = 'View', log_description = 'Viewed shared $item_type $name via link', log_client_id = $client_id, log_ip = '$ip', log_user_agent = '$user_agent'");
logAction("Share", "View", "Viewed shared $item_type $name via link", $client_id);
}