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.