diff --git a/api.php b/api.php index 8383398e..a5ef6c29 100644 --- a/api.php +++ b/api.php @@ -9,7 +9,7 @@ $ip = strip_tags(mysqli_real_escape_string($mysqli,get_ip())); $user_agent = strip_tags(mysqli_real_escape_string($mysqli,$_SERVER['HTTP_USER_AGENT'])); // Check API key is provided in GET request as 'api_key' -if(!isset($_GET['api_key']) OR empty($_GET['api_key'])) { +if(!isset($_GET['api_key']) || empty($_GET['api_key'])) { // Missing key header("HTTP/1.1 401 Unauthorized"); mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'API', log_action = 'Failed', log_description = 'No API Key specified', log_ip = '$ip', log_user_agent = '$user_agent', log_created_at = NOW()"); diff --git a/client_asset_edit_modal.php b/client_asset_edit_modal.php index a834b4d4..71816502 100644 --- a/client_asset_edit_modal.php +++ b/client_asset_edit_modal.php @@ -95,7 +95,7 @@ - +
@@ -135,7 +135,7 @@
- +
diff --git a/client_assets.php b/client_assets.php index abf0e202..ea76d271 100644 --- a/client_assets.php +++ b/client_assets.php @@ -123,7 +123,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
- All Assets + All Assets 0){ ?> Workstations @@ -167,7 +167,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()")); "> Name - + Type @@ -176,11 +176,11 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()")); Serial Number - + Operating System Install Date - + Assigned To Location @@ -241,7 +241,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()")); $device_icon = "print"; }elseif($asset_type == 'Camera'){ $device_icon = "video"; - }elseif($asset_type == 'Switch' or $asset_type == 'Firewall/Router'){ + }elseif($asset_type == 'Switch' || $asset_type == 'Firewall/Router'){ $device_icon = "network-wired"; }elseif($asset_type == 'Access Point'){ $device_icon = "wifi"; @@ -322,7 +322,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()")); ?> - + @@ -331,11 +331,11 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()")); - + - + diff --git a/client_files.php b/client_files.php index 6db97833..5f870e39 100644 --- a/client_files.php +++ b/client_files.php @@ -73,15 +73,15 @@ $num_of_files = mysqli_num_rows($sql_files_images) + mysqli_num_rows($sql_files_ $file_ext = $row['file_ext']; if($file_ext == 'pdf'){ $file_icon = "file-pdf"; - }elseif($file_ext == 'gz' or $file_ext == 'tar' or $file_ext == 'zip' or $file_ext == '7z' or $file_ext == 'rar'){ + }elseif($file_ext == 'gz' || $file_ext == 'tar' || $file_ext == 'zip' || $file_ext == '7z' || $file_ext == 'rar'){ $file_icon = "file-archive"; }elseif($file_ext == 'txt'){ $file_icon = "file-alt"; - }elseif($file_ext == 'doc' or $file_ext == 'docx'){ + }elseif($file_ext == 'doc' || $file_ext == 'docx'){ $file_icon = "file-word"; - }elseif($file_ext == 'xls' or $file_ext == 'xlsx' or $file_ext == 'ods'){ + }elseif($file_ext == 'xls' || $file_ext == 'xlsx' || $file_ext == 'ods'){ $file_icon = "file-excel"; - }elseif($file_ext == 'mp3' or $file_ext == 'wav' or $file_ext == 'ogg'){ + }elseif($file_ext == 'mp3' || $file_ext == 'wav' || $file_ext == 'ogg'){ $file_icon = "file-audio"; }else{ $file_icon = "file"; diff --git a/client_invoices.php b/client_invoices.php index dc9e94e1..01bd405a 100644 --- a/client_invoices.php +++ b/client_invoices.php @@ -117,7 +117,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()")); $category_name = $row['category_name']; $now = time(); - if(($invoice_status == "Sent" or $invoice_status == "Partial" or $invoice_status == "Viewed") and strtotime($invoice_due) < $now ){ + if(($invoice_status == "Sent" || $invoice_status == "Partial" || $invoice_status == "Viewed") && strtotime($invoice_due) < $now ){ $overdue_color = "text-danger font-weight-bold"; }else{ $overdue_color = ""; diff --git a/client_routes.php b/client_routes.php index bd26b408..7a969f5a 100644 --- a/client_routes.php +++ b/client_routes.php @@ -57,27 +57,27 @@ if(isset($_GET['tab'])){ } } elseif($_GET['tab'] == "invoices"){ - if($session_user_role == 1 OR $session_user_role == 3) { + if($session_user_role == 1 || $session_user_role == 3) { include("client_invoices.php"); } } elseif($_GET['tab'] == "recurring_invoices"){ - if($session_user_role == 1 OR $session_user_role == 3) { + if($session_user_role == 1 || $session_user_role == 3) { include("client_recurring_invoices.php"); } } elseif($_GET['tab'] == "payments"){ - if($session_user_role == 1 OR $session_user_role == 3) { + if($session_user_role == 1 || $session_user_role == 3) { include("client_payments.php"); } } elseif($_GET['tab'] == "quotes"){ - if($session_user_role == 1 OR $session_user_role == 3) { + if($session_user_role == 1 || $session_user_role == 3) { include("client_quotes.php"); } } elseif($_GET['tab'] == "trips"){ - if($session_user_role == 1 OR $session_user_role == 3) { + if($session_user_role == 1 || $session_user_role == 3) { include("client_trips.php"); } } diff --git a/client_service_view_modal.php b/client_service_view_modal.php index 4864560e..5f5bfee9 100644 --- a/client_service_view_modal.php +++ b/client_service_view_modal.php @@ -208,7 +208,7 @@ 0 OR mysqli_num_rows($sql_logins) > 0){ ?> + if(mysqli_num_rows($sql_assets) > 0 || mysqli_num_rows($sql_logins) > 0){ ?>
Logins
    + if($sql_logins || $sql_assets){ ?>
    URLs
      - 2){ ?> + 2){ ?> diff --git a/clients.php b/clients.php index 47fbf741..dd0d4cad 100644 --- a/clients.php +++ b/clients.php @@ -54,7 +54,7 @@ if(empty($_GET['canned_date'])) { } //Date Filter -if($_GET['canned_date'] == "custom" AND !empty($_GET['date_from'])){ +if($_GET['canned_date'] == "custom" && !empty($_GET['date_from'])){ $date_from = mysqli_real_escape_string($mysqli,$_GET['date_from']); $date_to = mysqli_real_escape_string($mysqli,$_GET['date_to']); }elseif($_GET['canned_date'] == "today"){ @@ -167,7 +167,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()")); Name Address Contact - Billing + Billing Action @@ -184,7 +184,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()")); $location_city = $row['location_city']; $location_state = $row['location_state']; $location_zip = $row['location_zip']; - if(empty($location_address) AND empty($location_city) AND empty($location_state) AND empty($location_zip)){ + if(empty($location_address) && empty($location_city) && empty($location_state) && empty($location_zip)){ $location_address_display = "-"; }else{ $location_address_display = "$location_address
      $location_city $location_state $location_zip"; @@ -270,7 +270,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()")); @@ -310,7 +310,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()")); - + Balance
      diff --git a/dashboard_financial.php b/dashboard_financial.php index 8ea68e62..55e985c2 100644 --- a/dashboard_financial.php +++ b/dashboard_financial.php @@ -493,7 +493,7 @@ var myLineChart = new Chart(ctx, { $income_for_month = $payments_for_month + $revenues_for_month; - if($income_for_month > 0 AND $income_for_month > $largest_income_month){ + if($income_for_month > 0 && $income_for_month > $largest_income_month){ $largest_income_month = $income_for_month; } @@ -532,7 +532,7 @@ var myLineChart = new Chart(ctx, { $income_for_month = $payments_for_month + $revenues_for_month; - if($income_for_month > 0 AND $income_for_month > $largest_income_month){ + if($income_for_month > 0 && $income_for_month > $largest_income_month){ $largest_income_month = $income_for_month; } @@ -568,7 +568,7 @@ var myLineChart = new Chart(ctx, { $row = mysqli_fetch_array($sql_projected); $invoice_for_month = $row['invoice_amount_for_month']; - if($invoice_for_month > 0 AND $invoice_for_month > $largest_invoice_month){ + if($invoice_for_month > 0 && $invoice_for_month > $largest_invoice_month){ $largest_invoice_month = $invoice_for_month; } @@ -604,7 +604,7 @@ var myLineChart = new Chart(ctx, { $row = mysqli_fetch_array($sql_expenses); $expenses_for_month = $row['expense_amount_for_month']; - if($expenses_for_month > 0 AND $expenses_for_month > $largest_expense_month){ + if($expenses_for_month > 0 && $expenses_for_month > $largest_expense_month){ $largest_expense_month = $expenses_for_month; } @@ -681,7 +681,7 @@ var myLineChart = new Chart(ctx, { $trip_miles_for_month = $row['trip_miles_for_month']; $largest_trip_miles_month = 0; - if($trip_miles_for_month > 0 AND $trip_miles_for_month > $largest_trip_miles_month){ + if($trip_miles_for_month > 0 && $trip_miles_for_month > $largest_trip_miles_month){ $largest_trip_miles_month = $trip_miles_for_month; } diff --git a/expenses.php b/expenses.php index 45dd8d20..a98fb242 100644 --- a/expenses.php +++ b/expenses.php @@ -43,7 +43,7 @@ if(empty($_GET['canned_date'])){ } //Date Filter -if($_GET['canned_date'] == "custom" AND !empty($_GET['dtf'])){ +if($_GET['canned_date'] == "custom" && !empty($_GET['dtf'])){ $dtf = mysqli_real_escape_string($mysqli,$_GET['dtf']); $dtt = mysqli_real_escape_string($mysqli,$_GET['dtt']); }elseif($_GET['canned_date'] == "today"){ diff --git a/functions.php b/functions.php index 03774fb2..94f8a7b5 100644 --- a/functions.php +++ b/functions.php @@ -134,7 +134,7 @@ function get_device(){ if (preg_match('/(up.browser|up.link|mmp|symbian|smartphone|midp|wap|phone|android|iemobile)/i', strtolower($_SERVER['HTTP_USER_AGENT']))) { $mobile_browser++; } - if ((strpos(strtolower($_SERVER['HTTP_ACCEPT']),'application/vnd.wap.xhtml+xml') > 0) or ((isset($_SERVER['HTTP_X_WAP_PROFILE']) or isset($_SERVER['HTTP_PROFILE'])))) { + if ((strpos(strtolower($_SERVER['HTTP_ACCEPT']),'application/vnd.wap.xhtml+xml') > 0) || ((isset($_SERVER['HTTP_X_WAP_PROFILE']) || isset($_SERVER['HTTP_PROFILE'])))) { $mobile_browser++; } $mobile_ua = strtolower(substr(get_user_agent(), 0, 4)); diff --git a/get_credential.php b/get_credential.php index ba71b562..0de76a53 100644 --- a/get_credential.php +++ b/get_credential.php @@ -5,7 +5,7 @@ $chrome_id = "chrome-extension://afgpakhonllnmnomchjhidealcpmnegc"; $firefox_id = "moz-extension://857479e9-3992-4e99-9a5e-b514d2ad0a82"; if (isset($_SERVER['HTTP_ORIGIN'])) { - if($_SERVER['HTTP_ORIGIN'] == $chrome_id OR $_SERVER['HTTP_ORIGIN'] == $firefox_id){ + if($_SERVER['HTTP_ORIGIN'] == $chrome_id || $_SERVER['HTTP_ORIGIN'] == $firefox_id){ header("Access-Control-Allow-Origin: {$_SERVER['HTTP_ORIGIN']}"); header('Access-Control-Allow-Credentials: true'); } @@ -37,7 +37,7 @@ if(!isset($_COOKIE['user_extension_key'])){ $user_extension_key = $_COOKIE['user_extension_key']; // Check the key isn't empty, less than 17 characters or the word "disabled". -if(empty($user_extension_key) OR strlen($user_extension_key) < 16 OR strtolower($user_extension_key) == "disabled"){ +if(empty($user_extension_key) || strlen($user_extension_key) < 16 || strtolower($user_extension_key) == "disabled"){ $data['found'] = "FALSE"; $data['message'] = "ITFlow - You are not logged into ITFlow, do not have, or did not send the correct extension key cookie."; echo(json_encode($data)); @@ -55,7 +55,7 @@ $auth_user = mysqli_query($mysqli, "SELECT * FROM users LEFT JOIN user_settings $row = mysqli_fetch_array($auth_user); // Check SQL query state -if(mysqli_num_rows($auth_user) < 1 OR !$auth_user){ +if(mysqli_num_rows($auth_user) < 1 || !$auth_user){ $data['found'] = "FALSE"; $data['message'] = "ITFlow - You are not logged into ITFlow, do not have, or did not send the correct extension key cookie."; echo(json_encode($data)); diff --git a/guest_download_file.php b/guest_download_file.php index 06e7a039..b3d8c253 100644 --- a/guest_download_file.php +++ b/guest_download_file.php @@ -5,7 +5,7 @@ include("functions.php"); $ip = trim(strip_tags(mysqli_real_escape_string($mysqli,get_ip()))); $user_agent = strip_tags(mysqli_real_escape_string($mysqli,$_SERVER['HTTP_USER_AGENT'])); -if(isset($_GET['id']) AND isset($_GET['key'])){ +if(isset($_GET['id']) && isset($_GET['key'])){ $item_id = intval($_GET['id']); $item_key = trim(strip_tags(mysqli_real_escape_string($mysqli,$_GET['key']))); @@ -13,7 +13,7 @@ if(isset($_GET['id']) AND isset($_GET['key'])){ $row = mysqli_fetch_array($sql); // Check result - if(mysqli_num_rows($sql) !== 1 OR !$row){ + if(mysqli_num_rows($sql) !== 1 || !$row){ exit("No file."); } @@ -23,7 +23,7 @@ if(isset($_GET['id']) AND isset($_GET['key'])){ } // Check item share is active & hasn't been viewed too many times - if($row['item_active'] !== "1" OR $row['item_views'] >= $row['item_view_limit']){ + if($row['item_active'] !== "1" || $row['item_views'] >= $row['item_view_limit']){ exit("Item cannot be viewed at this time."); } @@ -40,7 +40,7 @@ if(isset($_GET['id']) AND isset($_GET['key'])){ $file_sql = mysqli_query($mysqli, "SELECT * FROM files WHERE file_id = '$item_related_id' AND file_client_id = '$client_id' LIMIT 1"); $file_row = mysqli_fetch_array($file_sql); - if(mysqli_num_rows($file_sql) !== 1 OR !$file_row){ + if(mysqli_num_rows($file_sql) !== 1 || !$file_row){ exit("No file."); } diff --git a/guest_view_invoice.php b/guest_view_invoice.php index f8b2ebc8..08a5919e 100644 --- a/guest_view_invoice.php +++ b/guest_view_invoice.php @@ -108,7 +108,7 @@ if(isset($_GET['invoice_id'], $_GET['url_key'])){ $balance = $invoice_amount - $amount_paid; //check to see if overdue - if($invoice_status !== "Paid" AND $invoice_status !== "Draft" AND $invoice_status !== "Cancelled"){ + if($invoice_status !== "Paid" && $invoice_status !== "Draft" && $invoice_status !== "Cancelled"){ $unixtime_invoice_due = strtotime($invoice_due) + 86400; if($unixtime_invoice_due < time()){ $invoice_color = "text-danger"; @@ -124,7 +124,7 @@ if(isset($_GET['invoice_id'], $_GET['url_key'])){ Print ');"> Download
      Incorrect URL.
"; include("guest_footer.php"); exit(); @@ -23,14 +23,14 @@ $sql = mysqli_query($mysqli, "SELECT * FROM shared_items WHERE item_id = '$item_ $row = mysqli_fetch_array($sql); // Check we got a result -if(mysqli_num_rows($sql) !== 1 OR !$row){ +if(mysqli_num_rows($sql) !== 1 || !$row){ echo "
No item to view. Check with the person that sent you this link to ensure it is correct and has not expired.
"; include("guest_footer.php"); exit(); } // Check item share is active & hasn't been viewed too many times -if($row['item_active'] !== "1" OR $row['item_views'] >= $row['item_view_limit']){ +if($row['item_active'] !== "1" || $row['item_views'] >= $row['item_view_limit']){ echo "
Item cannot be viewed at this time. Check with the person that sent you this link to ensure it is correct and has not expired.
"; include("guest_footer.php"); exit(); @@ -53,7 +53,7 @@ if($item_type == "Document"){ $doc_sql = mysqli_query($mysqli, "SELECT * FROM documents WHERE document_id = '$item_related_id' AND document_client_id = '$client_id' LIMIT 1"); $doc_row = mysqli_fetch_array($doc_sql); - if(mysqli_num_rows($doc_sql) !== 1 OR !$doc_row){ + if(mysqli_num_rows($doc_sql) !== 1 || !$doc_row){ echo "
Error retrieving document to view.
"; include("guest_footer.php"); exit(); @@ -81,7 +81,7 @@ elseif($item_type == "File"){ $file_sql = mysqli_query($mysqli, "SELECT * FROM files WHERE file_id = '$item_related_id' AND file_client_id = '$client_id' LIMIT 1"); $file_row = mysqli_fetch_array($file_sql); - if(mysqli_num_rows($file_sql) !== 1 OR !$file_row){ + if(mysqli_num_rows($file_sql) !== 1 || !$file_row){ echo "
Error retrieving file.
"; include("guest_footer.php"); exit(); @@ -102,7 +102,7 @@ elseif($item_type == "Login"){ $login_sql = mysqli_query($mysqli, "SELECT * FROM logins WHERE login_id = '$item_related_id' AND login_client_id = '$client_id' LIMIT 1"); $login_row = mysqli_fetch_array($login_sql); - if(mysqli_num_rows($login_sql) !== 1 OR !$login_row){ + if(mysqli_num_rows($login_sql) !== 1 || !$login_row){ echo "
Error retrieving login.
"; include("guest_footer.php"); exit(); diff --git a/guest_view_quote.php b/guest_view_quote.php index c873c050..d5d31f84 100644 --- a/guest_view_quote.php +++ b/guest_view_quote.php @@ -86,7 +86,7 @@ if(isset($_GET['quote_id'], $_GET['url_key'])){
Accept Decline diff --git a/invoice.php b/invoice.php index 5dd6f7cd..df6c3a36 100644 --- a/invoice.php +++ b/invoice.php @@ -74,7 +74,7 @@ if(isset($_GET['invoice_id'])){ $balance = $invoice_amount - $amount_paid; //check to see if overdue - if($invoice_status !== "Paid" AND $invoice_status !== "Draft" AND $invoice_status !== "Cancelled"){ + if($invoice_status !== "Paid" && $invoice_status !== "Draft" && $invoice_status !== "Cancelled"){ $unixtime_invoice_due = strtotime($invoice_due) + 86400; if($unixtime_invoice_due < time()){ $invoice_overdue = "Overdue"; @@ -133,7 +133,7 @@ if(isset($_GET['invoice_id'])){ Send - + Add Payment
@@ -159,11 +159,11 @@ if(isset($_GET['invoice_id'])){ Print ');">Download PDF - + Send Email ">Guest URL - + Cancel diff --git a/invoice_payment_add_modal.php b/invoice_payment_add_modal.php index f65e4121..a9494d62 100644 --- a/invoice_payment_add_modal.php +++ b/invoice_payment_add_modal.php @@ -117,7 +117,7 @@
- +
diff --git a/logs.php b/logs.php index a67df20c..1803d974 100644 --- a/logs.php +++ b/logs.php @@ -43,7 +43,7 @@ if(empty($_GET['canned_date'])){ } //Date Filter -if($_GET['canned_date'] == "custom" AND !empty($_GET['dtf'])){ +if($_GET['canned_date'] == "custom" && !empty($_GET['dtf'])){ $dtf = mysqli_real_escape_string($mysqli,$_GET['dtf']); $dtt = mysqli_real_escape_string($mysqli,$_GET['dtt']); }elseif($_GET['canned_date'] == "today"){ diff --git a/pagination.php b/pagination.php index 2f2894e4..2db854ae 100644 --- a/pagination.php +++ b/pagination.php @@ -35,10 +35,10 @@ if ($total_found_rows > 10) { if($total_pages <= 100){ $pages_split = 10; } - if(($total_pages <= 1000) AND ($total_pages > 100)){ + if(($total_pages <= 1000) && ($total_pages > 100)){ $pages_split = 100; } - if(($total_pages <= 10000) AND ($total_pages > 1000)){ + if(($total_pages <= 10000) && ($total_pages > 1000)){ $pages_split = 1000; } if($p > 1){ @@ -61,7 +61,7 @@ if ($total_found_rows > 10) { while($i < $total_pages){ $i++; - if(($i == 1) OR (($p <= 3) AND ($i <= 6)) OR (($i > $total_pages - 6) AND ($p > $total_pages - 3 )) OR (is_int($i / $pages_split)) OR (($p > 3) AND ($i >= $p - 2) AND ($i <= $p + 3)) OR ($i == $total_pages)){ + if(($i == 1) || (($p <= 3) && ($i <= 6)) || (($i > $total_pages - 6) && ($p > $total_pages - 3 )) || (is_int($i / $pages_split)) || (($p > 3) && ($i >= $p - 2) && ($i <= $p + 3)) || ($i == $total_pages)){ if($p == $i ) { $page_class = "active"; }else{ diff --git a/payments.php b/payments.php index 39c90ae6..83e52428 100644 --- a/payments.php +++ b/payments.php @@ -43,7 +43,7 @@ if(empty($_GET['canned_date'])){ } //Date Filter -if($_GET['canned_date'] == "custom" AND !empty($_GET['dtf'])){ +if($_GET['canned_date'] == "custom" && !empty($_GET['dtf'])){ $dtf = mysqli_real_escape_string($mysqli,$_GET['dtf']); $dtt = mysqli_real_escape_string($mysqli,$_GET['dtt']); }elseif($_GET['canned_date'] == "today"){ diff --git a/post.php b/post.php index 61b3652e..2d1de423 100644 --- a/post.php +++ b/post.php @@ -1360,7 +1360,7 @@ if(isset($_POST['add_client'])){ } //Add Location - if(!empty($location_phone) OR !empty($address) OR !empty($city) OR !empty($state) OR !empty($zip)){ + if(!empty($location_phone) || !empty($address) || !empty($city) || !empty($state) || !empty($zip)){ mysqli_query($mysqli,"INSERT INTO locations SET location_name = 'Primary', location_address = '$address', location_city = '$city', location_state = '$state', location_zip = '$zip', location_phone = '$location_phone', location_country = '$country', location_created_at = NOW(), location_client_id = $client_id, company_id = $session_company_id"); //Update Primay location in clients @@ -1373,7 +1373,7 @@ if(isset($_POST['add_client'])){ //Add Contact - if(!empty($contact) OR !empty($title) OR !empty($contact_phone) OR !empty($contact_mobile) OR !empty($contact_email)){ + if(!empty($contact) || !empty($title) || !empty($contact_phone) || !empty($contact_mobile) || !empty($contact_email)){ mysqli_query($mysqli,"INSERT INTO contacts SET contact_name = '$contact', contact_title = '$title', contact_phone = '$contact_phone', contact_extension = '$contact_extension', contact_mobile = '$contact_mobile', contact_email = '$contact_email', contact_created_at = NOW(), contact_client_id = $client_id, company_id = $session_company_id"); //Update Primay contact in clients @@ -2710,7 +2710,7 @@ if(isset($_GET['delete_expense'])){ if(isset($_POST['export_expenses_csv'])){ $date_from = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['date_from']))); $date_to = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['date_to']))); - if(!empty($date_from) AND !empty($date_to)){ + if(!empty($date_from) && !empty($date_to)){ $date_query = "AND DATE(expense_date) BETWEEN '$date_from' AND '$date_to'"; $file_name_date = "$date_from-to-$date_to"; }else{ @@ -5939,7 +5939,7 @@ if(isset($_POST['add_ticket'])){ $details = trim(mysqli_real_escape_string($mysqli,$purifier->purify(html_entity_decode($_POST['details'])))); $asset_id = intval($_POST['asset']); - if($client_id > 0 AND $contact == 0){ + if($client_id > 0 && $contact == 0){ $sql = mysqli_query($mysqli,"SELECT primary_contact FROM clients WHERE client_id = $client_id AND company_id = $session_company_id"); $row = mysqli_fetch_array($sql); $contact = $row['primary_contact']; @@ -5985,7 +5985,7 @@ if(isset($_POST['add_scheduled_ticket'])){ $frequency = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['frequency']))); $start_date = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['start_date']))); - if($client_id > 0 AND $contact == 0){ + if($client_id > 0 && $contact == 0){ $sql = mysqli_query($mysqli,"SELECT primary_contact FROM clients WHERE client_id = $client_id AND company_id = $session_company_id"); $row = mysqli_fetch_array($sql); $contact = $row['primary_contact']; @@ -7236,7 +7236,7 @@ if(isset($_GET['force_recurring'])){ if(isset($_POST['export_trips_csv'])){ $date_from = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['date_from']))); $date_to = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['date_to']))); - if(!empty($date_from) AND !empty($date_to)){ + if(!empty($date_from) && !empty($date_to)){ $date_query = "AND DATE(trip_date) BETWEEN '$date_from' AND '$date_to'"; $file_name_date = "$date_from-to-$date_to"; }else{ diff --git a/quote.php b/quote.php index 31b06c1f..c7fda824 100644 --- a/quote.php +++ b/quote.php @@ -109,7 +109,7 @@ if(isset($_GET['quote_id'])){ Send - + Accept Decline @@ -139,7 +139,7 @@ if(isset($_GET['quote_id'])){ Print ');">Download PDF - + Send Email ">Guest URL diff --git a/quotes.php b/quotes.php index f8407ffc..fc16a0f7 100644 --- a/quotes.php +++ b/quotes.php @@ -45,7 +45,7 @@ if(empty($_GET['canned_date'])){ } //Date Filter -if($_GET['canned_date'] == "custom" AND !empty($_GET['dtf'])){ +if($_GET['canned_date'] == "custom" && !empty($_GET['dtf'])){ $dtf = mysqli_real_escape_string($mysqli,$_GET['dtf']); $dtt = mysqli_real_escape_string($mysqli,$_GET['dtt']); }elseif($_GET['canned_date'] == "today"){ diff --git a/recurring_invoices.php b/recurring_invoices.php index c4983d41..e3205867 100644 --- a/recurring_invoices.php +++ b/recurring_invoices.php @@ -43,7 +43,7 @@ if(empty($_GET['canned_date'])) { } //Date Filter -if($_GET['canned_date'] == "custom" AND !empty($_GET['dtf'])){ +if($_GET['canned_date'] == "custom" && !empty($_GET['dtf'])){ $dtf = mysqli_real_escape_string($mysqli,$_GET['dtf']); $dtt = mysqli_real_escape_string($mysqli,$_GET['dtt']); }elseif($_GET['canned_date'] == "today"){ diff --git a/report_expense_summary.php b/report_expense_summary.php index 4b59a6b6..eae252e1 100644 --- a/report_expense_summary.php +++ b/report_expense_summary.php @@ -170,7 +170,7 @@ var myLineChart = new Chart(ctx, { $row = mysqli_fetch_array($sql_expenses); $expenses_for_month = $row['expense_amount_for_month']; - if($expenses_for_month > 0 AND $expenses_for_month > $largest_expense_month){ + if($expenses_for_month > 0 && $expenses_for_month > $largest_expense_month){ $largest_expense_month = $expenses_for_month; } diff --git a/report_income_summary.php b/report_income_summary.php index b1042800..0950b470 100644 --- a/report_income_summary.php +++ b/report_income_summary.php @@ -189,7 +189,7 @@ var myLineChart = new Chart(ctx, { $income_for_month = $payments_for_month + $revenues_for_month; - if($income_for_month > 0 AND $income_for_month > $largest_income_month){ + if($income_for_month > 0 && $income_for_month > $largest_income_month){ $largest_income_month = $income_for_month; } diff --git a/revenues.php b/revenues.php index 407b9be1..fd1ce975 100644 --- a/revenues.php +++ b/revenues.php @@ -43,7 +43,7 @@ if(empty($_GET['canned_date'])){ } //Date Filter -if($_GET['canned_date'] == "custom" AND !empty($_GET['dtf'])){ +if($_GET['canned_date'] == "custom" && !empty($_GET['dtf'])){ $dtf = mysqli_real_escape_string($mysqli,$_GET['dtf']); $dtt = mysqli_real_escape_string($mysqli,$_GET['dtt']); }elseif($_GET['canned_date'] == "today"){ diff --git a/settings-mail.php b/settings-mail.php index 31eef052..462976a4 100644 --- a/settings-mail.php +++ b/settings-mail.php @@ -92,7 +92,7 @@
- +
diff --git a/side_nav.php b/side_nav.php index 0cf373fb..40e5f061 100644 --- a/side_nav.php +++ b/side_nav.php @@ -78,7 +78,7 @@
- +