diff --git a/api.php b/api.php
index 2d4e10f2..d4cab378 100644
--- a/api.php
+++ b/api.php
@@ -21,9 +21,9 @@ if(isset($_GET['api_key'])){
$name = $row['name'];
echo "$name - $cid";
-
+ //Alert whern call comes through
mysqli_query($mysqli,"INSERT INTO alerts SET alert_type = 'Inbound Call', alert_message = 'Inbound call from $name - $cid', alert_date = NOW(), company_id = $company_id");
-
+ //Log When call comes through
mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Call', log_action = 'Inbound', log_description = 'Inbound call from $name - $cid', log_created_at = NOW(), company_id = $company_id");
}
@@ -45,6 +45,9 @@ if(isset($_GET['api_key'])){
echo "$client_name - $client_phone
";
}
+ //Log
+ mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'API', log_action = 'Client Numbers', log_description = 'Client Phone Numbers were pulled', log_created_at = NOW(), company_id = $company_id");
+
}
if(isset($_GET['phonebook'])){
@@ -117,6 +120,10 @@ if(isset($_GET['api_key'])){
echo '';
+ //Log
+ mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'API', log_action = 'Phonebook', log_description = 'XML Phonebook Downloaded', log_created_at = NOW(), company_id = $company_id");
+
+
}
if(isset($_GET['client_emails'])){
@@ -130,6 +137,10 @@ if(isset($_GET['api_key'])){
echo "$client_name - $client_email
";
}
+ //Log
+ mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'API', log_action = 'Client Emails', log_description = 'Client Emails were pulled', log_created_at = NOW(), company_id = $company_id");
+
+
}
if(isset($_GET['account_balance'])){
@@ -151,14 +162,22 @@ if(isset($_GET['api_key'])){
echo $balance;
+ //Log
+ mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'API', log_action = 'Account Balance', log_description = 'Client $client_id checked their balance which had a balance of $balance', log_created_at = NOW(), company_id = $company_id");
+
+
}
}else{
echo "Incorrect API Key";
+
+ mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'API', log_action = 'Incorrect Key', log_description = 'Failed', log_created_at = NOW()");
}
}else{
echo "Missing the API Key";
+
+ mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'API', log_action = 'No Key', log_description = 'No API Key specified', log_created_at = NOW()");
}
?>
\ No newline at end of file
diff --git a/client_recurring.php b/client_recurring.php
index f6e960a6..0c7508ed 100644
--- a/client_recurring.php
+++ b/client_recurring.php
@@ -73,6 +73,7 @@ $total_pages = ceil($total_found_rows / 10);
">
| Frequency |
+ Amount |
Last Sent |
Next Date |
Category |
@@ -92,6 +93,7 @@ $total_pages = ceil($total_found_rows / 10);
$recurring_last_sent = "-";
}
$recurring_next_date = $row['recurring_next_date'];
+ $recurring_amount = $row['recurring_amount'];
$category_id = $row['category_id'];
$category_name = $row['category_name'];
if($recurring_status == 1){
@@ -106,6 +108,7 @@ $total_pages = ceil($total_found_rows / 10);
| ly |
+ $ |
|
|
|
diff --git a/post.php b/post.php
index 36cd763c..9cab6d42 100644
--- a/post.php
+++ b/post.php
@@ -479,7 +479,7 @@ if(isset($_POST['add_client'])){
mkdir("uploads/clients/$session_company_id/$client_id");
//Logging
- mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Client', log_action = 'Created', log_description = '$name', log_created_at = NOW(), company_id = $session_company_id, user_id = $session_user_id");
+ mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Client', log_action = 'Created', log_description = '$name', log_created_at = NOW(), client_id = $client_id, company_id = $session_company_id, user_id = $session_user_id");
$_SESSION['alert_message'] = "Client added";
@@ -509,7 +509,7 @@ if(isset($_POST['edit_client'])){
mysqli_query($mysqli,"UPDATE clients SET client_name = '$name', client_type = '$type', client_address = '$address', client_city = '$city', client_state = '$state', client_zip = '$zip', client_contact = '$contact', client_phone = '$phone', client_mobile = '$mobile', client_email = '$email', client_website = '$website', client_net_terms = $net_terms, client_hours = '$hours', client_updated_at = NOW() WHERE client_id = $client_id AND company_id = $session_company_id");
//Logging
- mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Client', log_action = 'Modified', log_description = '$name', log_created_at = NOW(), company_id = $session_company_id, user_id = $session_user_id");
+ mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Client', log_action = 'Modified', log_description = '$name', log_created_at = NOW(), client_id = $client_id, company_id = $session_company_id, user_id = $session_user_id");
$_SESSION['alert_message'] = "Client $name updated";
@@ -598,11 +598,11 @@ if(isset($_POST['add_event'])){
}
//Logging of email sent
- mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Calendar Event', log_action = 'Emailed', log_description = 'Emailed $client_name to email $client_email - $title', log_created_at = NOW(), company_id = $session_company_id, user_id = $session_user_id");
+ mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Calendar Event', log_action = 'Emailed', log_description = 'Emailed $client_name to email $client_email - $title', log_created_at = NOW(), client_id = $client, company_id = $session_company_id, user_id = $session_user_id");
}
//Logging
- mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Calendar Event', log_action = 'Created', log_description = '$title', log_created_at = NOW(), company_id = $session_company_id, user_id = $session_user_id");
+ mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Calendar Event', log_action = 'Created', log_description = '$title', log_created_at = NOW(), client_id = $client, company_id = $session_company_id, user_id = $session_user_id");
$_SESSION['alert_message'] = "Event added to the calendar";
@@ -662,11 +662,11 @@ if(isset($_POST['edit_event'])){
}
//Logging of email sent
- mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Calendar Event', log_action = 'Emailed', log_description = 'Emailed $client_name to email $client_email - $title', log_created_at = NOW(), company_id = $session_company_id, user_id = $session_user_id");
+ mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Calendar Event', log_action = 'Emailed', log_description = 'Emailed $client_name to email $client_email - $title', log_created_at = NOW(), client_id = $client, company_id = $session_company_id, user_id = $session_user_id");
}
//Logging
- mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Calendar', log_action = 'Modified', log_description = '$title', log_created_at = NOW(), company_id = $session_company_id, user_id = $session_user_id");
+ mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Calendar', log_action = 'Modified', log_description = '$title', log_created_at = NOW(), client_id = $client, company_id = $session_company_id, user_id = $session_user_id");
$_SESSION['alert_message'] = "Event modified on the calendar";
@@ -702,7 +702,7 @@ if(isset($_POST['add_ticket'])){
mysqli_query($mysqli,"INSERT INTO tickets SET ticket_number = $ticket_number, ticket_subject = '$subject', ticket_details = '$details', ticket_status = 'Open', ticket_created_at = NOW(), ticket_created_by = $session_user_id, client_id = $client_id, company_id = $session_company_id");
//Logging
- mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Ticket', log_action = 'Created', log_description = '$subject', log_created_at = NOW(), company_id = $session_company_id, user_id = $session_user_id");
+ mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Ticket', log_action = 'Created', log_description = '$subject', log_created_at = NOW(), client_id = $client_id, company_id = $session_company_id, user_id = $session_user_id");
$_SESSION['alert_message'] = "Ticket created";
diff --git a/recurring.php b/recurring.php
index 389af3b2..5c9d7910 100644
--- a/recurring.php
+++ b/recurring.php
@@ -73,6 +73,7 @@
| Frequency |
Client |
+ Amount |
Last Sent |
Next Date |
Category |
@@ -92,6 +93,7 @@
$recurring_last_sent = "-";
}
$recurring_next_date = $row['recurring_next_date'];
+ $recurring_amount = $row['recurring_amount'];
$client_id = $row['client_id'];
$client_name = $row['client_name'];
$category_id = $row['category_id'];
@@ -109,6 +111,7 @@
| ly |
|
+ $ |
|
|
|