mirror of
https://github.com/itflow-org/itflow
synced 2026-03-06 05:44:52 +00:00
Add logging if creating a referral via create client
This commit is contained in:
@@ -30,6 +30,8 @@ if (isset($_POST['add_client'])) {
|
|||||||
$sql = mysqli_query($mysqli, "SELECT category_name FROM categories WHERE category_type = 'Referral' AND category_archived_at IS NULL AND category_name = '$referral'");
|
$sql = mysqli_query($mysqli, "SELECT category_name FROM categories WHERE category_type = 'Referral' AND category_archived_at IS NULL AND category_name = '$referral'");
|
||||||
if(mysqli_num_rows($sql) == 0) {
|
if(mysqli_num_rows($sql) == 0) {
|
||||||
mysqli_query($mysqli, "INSERT INTO categories SET category_name = '$referral', category_type = 'Referral'");
|
mysqli_query($mysqli, "INSERT INTO categories SET category_name = '$referral', category_type = 'Referral'");
|
||||||
|
// Logging
|
||||||
|
mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Category', log_action = 'Create', log_description = '$name', log_ip = '$session_ip', log_user_agent = '$session_user_agent', log_user_id = $session_user_id");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create client
|
// Create client
|
||||||
|
|||||||
Reference in New Issue
Block a user