mirror of
https://github.com/itflow-org/itflow
synced 2026-03-01 03:14:52 +00:00
Touch ups
This commit is contained in:
@@ -21,7 +21,7 @@ if (!empty($name) && !empty($email)) {
|
|||||||
//Logging
|
//Logging
|
||||||
mysqli_query($mysqli, "INSERT INTO logs SET log_type = 'Contact', log_action = 'Updated', log_description = '$name via API ($api_key_name)', log_ip = '$ip', log_created_at = NOW(), log_client_id = $client_id, company_id = $company_id");
|
mysqli_query($mysqli, "INSERT INTO logs SET log_type = 'Contact', log_action = 'Updated', log_description = '$name via API ($api_key_name)', log_ip = '$ip', log_created_at = NOW(), log_client_id = $client_id, company_id = $company_id");
|
||||||
mysqli_query($mysqli, "INSERT INTO logs SET log_type = 'API', log_action = 'Success', log_description = 'Updated contact $name via API ($api_key_name)', log_ip = '$ip', log_created_at = NOW(), log_client_id = $client_id, company_id = $company_id");
|
mysqli_query($mysqli, "INSERT INTO logs SET log_type = 'API', log_action = 'Success', log_description = 'Updated contact $name via API ($api_key_name)', log_ip = '$ip', log_created_at = NOW(), log_client_id = $client_id, company_id = $company_id");
|
||||||
} else {var_dump( $update_sql);}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Output
|
// Output
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
if (isset($_GET['contact_id'])) {
|
if (isset($_GET['contact_id'])) {
|
||||||
$contact_id = intval($_GET['contact_id']);
|
$contact_id = intval($_GET['contact_id']);
|
||||||
|
|
||||||
$sql = mysqli_query($mysqli,"SELECT * FROM contacts
|
$sql = mysqli_query($mysqli, "SELECT * FROM contacts
|
||||||
LEFT JOIN locations ON location_id = contact_location_id
|
LEFT JOIN locations ON location_id = contact_location_id
|
||||||
WHERE contact_id = $contact_id
|
WHERE contact_id = $contact_id
|
||||||
");
|
");
|
||||||
@@ -44,20 +44,20 @@ if (isset($_GET['contact_id'])) {
|
|||||||
$auth_method = htmlentities($row['contact_auth_method']);
|
$auth_method = htmlentities($row['contact_auth_method']);
|
||||||
|
|
||||||
// Related Assets Query
|
// Related Assets Query
|
||||||
$sql_related_assets = mysqli_query($mysqli,"SELECT * FROM assets WHERE asset_contact_id = $contact_id AND company_id = $session_company_id ORDER BY asset_name DESC");
|
$sql_related_assets = mysqli_query($mysqli, "SELECT * FROM assets WHERE asset_contact_id = $contact_id AND company_id = $session_company_id ORDER BY asset_name DESC");
|
||||||
|
|
||||||
$asset_count = mysqli_num_rows($sql_related_assets);
|
$asset_count = mysqli_num_rows($sql_related_assets);
|
||||||
|
|
||||||
// Related Logins Query
|
// Related Logins Query
|
||||||
$sql_related_logins = mysqli_query($mysqli,"SELECT * FROM logins WHERE login_contact_id = $contact_id AND company_id = $session_company_id ORDER BY login_name DESC");
|
$sql_related_logins = mysqli_query($mysqli, "SELECT * FROM logins WHERE login_contact_id = $contact_id AND company_id = $session_company_id ORDER BY login_name DESC");
|
||||||
$login_count = mysqli_num_rows($sql_related_logins);
|
$login_count = mysqli_num_rows($sql_related_logins);
|
||||||
|
|
||||||
// Related Software Query
|
// Related Software Query
|
||||||
$sql_related_software = mysqli_query($mysqli,"SELECT * FROM software, software_contacts WHERE software.software_id = software_contacts.software_id AND software_contacts.contact_id = $contact_id AND software.company_id = $session_company_id ORDER BY software.software_id DESC");
|
$sql_related_software = mysqli_query($mysqli, "SELECT * FROM software, software_contacts WHERE software.software_id = software_contacts.software_id AND software_contacts.contact_id = $contact_id AND software.company_id = $session_company_id ORDER BY software.software_id DESC");
|
||||||
$software_count = mysqli_num_rows($sql_related_software);
|
$software_count = mysqli_num_rows($sql_related_software);
|
||||||
|
|
||||||
// Related Tickets Query
|
// Related Tickets Query
|
||||||
$sql_related_tickets = mysqli_query($mysqli,"SELECT * FROM tickets LEFT JOIN users on ticket_assigned_to = user_id WHERE ticket_contact_id = $contact_id AND company_id = $session_company_id ORDER BY ticket_id DESC");
|
$sql_related_tickets = mysqli_query($mysqli, "SELECT * FROM tickets LEFT JOIN users on ticket_assigned_to = user_id WHERE ticket_contact_id = $contact_id AND company_id = $session_company_id ORDER BY ticket_id DESC");
|
||||||
$ticket_count = mysqli_num_rows($sql_related_tickets);
|
$ticket_count = mysqli_num_rows($sql_related_tickets);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -402,7 +402,7 @@ if (isset($_GET['contact_id'])) {
|
|||||||
$seat_count = 0;
|
$seat_count = 0;
|
||||||
|
|
||||||
// Asset Licenses
|
// Asset Licenses
|
||||||
$asset_licenses_sql = mysqli_query($mysqli,"SELECT asset_id FROM software_assets WHERE software_id = $software_id");
|
$asset_licenses_sql = mysqli_query($mysqli, "SELECT asset_id FROM software_assets WHERE software_id = $software_id");
|
||||||
$asset_licenses_array = array();
|
$asset_licenses_array = array();
|
||||||
while ($row = mysqli_fetch_array($asset_licenses_sql)) {
|
while ($row = mysqli_fetch_array($asset_licenses_sql)) {
|
||||||
$asset_licenses_array[] = $row['asset_id'];
|
$asset_licenses_array[] = $row['asset_id'];
|
||||||
@@ -411,7 +411,7 @@ if (isset($_GET['contact_id'])) {
|
|||||||
$asset_licenses = implode(',',$asset_licenses_array);
|
$asset_licenses = implode(',',$asset_licenses_array);
|
||||||
|
|
||||||
// Contact Licenses
|
// Contact Licenses
|
||||||
$contact_licenses_sql = mysqli_query($mysqli,"SELECT contact_id FROM software_contacts WHERE software_id = $software_id");
|
$contact_licenses_sql = mysqli_query($mysqli, "SELECT contact_id FROM software_contacts WHERE software_id = $software_id");
|
||||||
$contact_licenses_array = array();
|
$contact_licenses_array = array();
|
||||||
while ($row = mysqli_fetch_array($contact_licenses_sql)) {
|
while ($row = mysqli_fetch_array($contact_licenses_sql)) {
|
||||||
$contact_licenses_array[] = $row['contact_id'];
|
$contact_licenses_array[] = $row['contact_id'];
|
||||||
|
|||||||
Reference in New Issue
Block a user