From 21bd01935e91112608ecf289879056fd8053163a Mon Sep 17 00:00:00 2001 From: "johnny@pittpc.com" Date: Tue, 17 Sep 2019 15:22:57 -0400 Subject: [PATCH] Added Inbound call logging and alerting when phone system is configured for database --- api.php | 4 +++ edit_item_modal.php | 73 +++++++++++++++++++++++++++++++++++++++++++++ invoice.php | 11 +++++-- 3 files changed, 85 insertions(+), 3 deletions(-) create mode 100644 edit_item_modal.php diff --git a/api.php b/api.php index d34d7258..2d4e10f2 100644 --- a/api.php +++ b/api.php @@ -22,6 +22,10 @@ if(isset($_GET['api_key'])){ echo "$name - $cid"; + 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"); + + 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"); + } if(isset($_GET['incoming_call'])){ diff --git a/edit_item_modal.php b/edit_item_modal.php new file mode 100644 index 00000000..24c8aaff --- /dev/null +++ b/edit_item_modal.php @@ -0,0 +1,73 @@ + \ No newline at end of file diff --git a/invoice.php b/invoice.php index 546d6a28..8f9f8a88 100644 --- a/invoice.php +++ b/invoice.php @@ -204,7 +204,10 @@ if(isset($_GET['invoice_id'])){ ?> - + + + + @@ -215,6 +218,8 @@ if(isset($_GET['invoice_id'])){ @@ -228,8 +233,8 @@ if(isset($_GET['invoice_id'])){