From 8ca2b833e63186f02dc9ef9c78a42462b8c8f5ab Mon Sep 17 00:00:00 2001 From: "johnny@pittpc.com" Date: Sat, 20 Jul 2019 16:20:19 -0400 Subject: [PATCH] Invalid Get var in API redirect back to login Instead of showing error --- api.php | 2 +- client.php | 2 +- client_contacts.php | 4 ++-- client_files.php | 2 +- post.php | 2 +- uploads/expenses/test.txt | 1 + 6 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 uploads/expenses/test.txt diff --git a/api.php b/api.php index 8759740c..e0767b79 100644 --- a/api.php +++ b/api.php @@ -135,7 +135,7 @@ if($_GET['api_key'] == $config_api_key){ } }else{ - echo "

Ma!! You've been BAAAAADDDDD!!

"; + header("Location: login.php"); } ?> \ No newline at end of file diff --git a/client.php b/client.php index 87c2fbff..46d69177 100644 --- a/client.php +++ b/client.php @@ -90,7 +90,7 @@ if(isset($_GET['client_id'])){
-
+

Address

diff --git a/client_contacts.php b/client_contacts.php index 680f5e7b..5a801b0c 100644 --- a/client_contacts.php +++ b/client_contacts.php @@ -50,8 +50,8 @@ $total_pages = ceil($total_found_rows / 10);
-
Contacts
- +
Contacts
+
diff --git a/client_files.php b/client_files.php index 67181b01..47cea191 100644 --- a/client_files.php +++ b/client_files.php @@ -4,7 +4,7 @@
-
Uploaded Files
+
Files
diff --git a/post.php b/post.php index 8ee8205b..9b972b2c 100644 --- a/post.php +++ b/post.php @@ -1399,7 +1399,7 @@ if(isset($_GET['email_quote'])){ $client_phone = substr($row['client_phone'],0,3)."-".substr($row['client_phone'],3,3)."-".substr($row['client_phone'],6,4); } $client_website = $row['client_website']; - $base_url = $_SERVER['HTTP_HOST'] . dirname($_SERVER['REQUEST_URI']); + $base_url = $_SERVER['HTTP_HOST']; $mail = new PHPMailer(true); diff --git a/uploads/expenses/test.txt b/uploads/expenses/test.txt new file mode 100644 index 00000000..9daeafb9 --- /dev/null +++ b/uploads/expenses/test.txt @@ -0,0 +1 @@ +test