diff --git a/accounts.php b/accounts.php index 6b6413e8..c73e7fe6 100644 --- a/accounts.php +++ b/accounts.php @@ -9,11 +9,14 @@ if (!empty($_GET['sb'])) { } //Rebuild URL -$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o))); +$url_query_strings_sb = http_build_query(array_merge($_GET, array('sb' => $sb, 'o' => $o))); -$sql = mysqli_query($mysqli, "SELECT SQL_CALC_FOUND_ROWS * FROM accounts - WHERE account_name LIKE '%$q%' AND company_id = $session_company_id - ORDER BY $sb $o LIMIT $record_from, $record_to"); +$sql = mysqli_query( + $mysqli, + "SELECT SQL_CALC_FOUND_ROWS * FROM accounts + WHERE account_name LIKE '%$q%' AND company_id = $session_company_id + ORDER BY $sb $o LIMIT $record_from, $record_to" +); $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); diff --git a/ajax.php b/ajax.php index 3902a37b..2e8610c0 100644 --- a/ajax.php +++ b/ajax.php @@ -141,7 +141,9 @@ if (isset($_GET['network_get_json_details'])) { } // Lookup all client locations, as networks can be associated with any client location - $locations_sql = mysqli_query($mysqli, "SELECT location_id, location_name FROM locations + $locations_sql = mysqli_query( + $mysqli, + "SELECT location_id, location_name FROM locations WHERE location_client_id = '$client_id' AND company_id = '$session_company_id'" ); while ($row = mysqli_fetch_array($locations_sql)) { @@ -226,11 +228,11 @@ if (isset($_GET['share_generate_link'])) { $item_encrypted_credential = ''; // Default empty $client_id = intval($_GET['client_id']); - $item_type = trim(strip_tags(mysqli_real_escape_string($mysqli,$_GET['type']))); + $item_type = trim(strip_tags(mysqli_real_escape_string($mysqli, $_GET['type']))); $item_id = intval($_GET['id']); - $item_note = trim(strip_tags(mysqli_real_escape_string($mysqli,$_GET['note']))); + $item_note = trim(strip_tags(mysqli_real_escape_string($mysqli, $_GET['note']))); $item_view_limit = intval($_GET['views']); - $item_expires = trim(strip_tags(mysqli_real_escape_string($mysqli,$_GET['expires']))); + $item_expires = trim(strip_tags(mysqli_real_escape_string($mysqli, $_GET['expires']))); $item_key = randomString(156); if ($item_type == "Document") { diff --git a/api/v1/contacts/create.php b/api/v1/contacts/create.php index 6919b013..d9941433 100644 --- a/api/v1/contacts/create.php +++ b/api/v1/contacts/create.php @@ -7,7 +7,7 @@ require_once('../require_post_method.php'); require_once('contact_model.php'); // Default -$insert_id = FALSE; +$insert_id = false; if (!empty($name) && !empty($email) && !empty($client_id)) { diff --git a/api/v1/contacts/delete.php b/api/v1/contacts/delete.php index 9fd17cba..541efb33 100644 --- a/api/v1/contacts/delete.php +++ b/api/v1/contacts/delete.php @@ -7,7 +7,7 @@ require_once('../require_post_method.php'); $contact_id = intval($_POST['contact_id']); // Default -$delete_count = FALSE; +$delete_count = false; if (!empty($contact_id)) { $row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT * FROM contacts WHERE contact_id = $contact_id AND contact_client_id = $client_id AND company_id = '$company_id' LIMIT 1")); diff --git a/api/v1/contacts/update.php b/api/v1/contacts/update.php index d19d9521..69169021 100644 --- a/api/v1/contacts/update.php +++ b/api/v1/contacts/update.php @@ -7,7 +7,7 @@ require_once('../require_post_method.php'); $contact_id = intval($_POST['contact_id']); // Default -$update_count = FALSE; +$update_count = false; if (!empty($contact_id)) { diff --git a/api/v1/validate_api_key.php b/api/v1/validate_api_key.php index e2f29590..3eeb02c5 100644 --- a/api/v1/validate_api_key.php +++ b/api/v1/validate_api_key.php @@ -7,7 +7,7 @@ */ // Includes -require_once( __DIR__ . '../../../functions.php'); +require_once(__DIR__ . '../../../functions.php'); require_once(__DIR__ . "../../../config.php"); // JSON header diff --git a/base32static.php b/base32static.php index 980a89c4..a59feaff 100644 --- a/base32static.php +++ b/base32static.php @@ -44,7 +44,7 @@ class Base32Static { $i=0; while($i < count($fiveBitBinaryArray)) { - $base32 .= self::$map[base_convert(str_pad($fiveBitBinaryArray[$i], 5,'0'), 2, 10)]; + $base32 .= self::$map[base_convert(str_pad($fiveBitBinaryArray[$i], 5, '0'), 2, 10)]; $i++; } @@ -71,7 +71,7 @@ class Base32Static { substr($input, -($allowedValues[$i])) != str_repeat(self::$map[32], $allowedValues[$i])) return false; } - $input = str_replace('=','', $input); + $input = str_replace('=', '', $input); $input = str_split($input); $binaryString = ""; @@ -87,7 +87,7 @@ class Base32Static { $eightBits = str_split($x, 8); for ($z = 0; $z < count($eightBits); $z++) { - $binaryString .= ( ($y = chr(base_convert($eightBits[$z], 2, 10))) || ord($y) == 48 ) ? $y:""; + $binaryString .= (($y = chr(base_convert($eightBits[$z], 2, 10))) || ord($y) == 48) ? $y:""; } } diff --git a/calendar_event_add_modal.php b/calendar_event_add_modal.php index a3428a52..40a8be28 100644 --- a/calendar_event_add_modal.php +++ b/calendar_event_add_modal.php @@ -48,7 +48,7 @@ - Client - - Client - $sb, 'o' => $o))); +$url_query_strings_sb = http_build_query(array_merge($_GET, array('sb' => $sb, 'o' => $o))); -$sql = mysqli_query($mysqli,"SELECT SQL_CALC_FOUND_ROWS * FROM categories - WHERE category_name LIKE '%$q%' - AND category_type = '$category' - AND category_archived_at IS NULL - AND company_id = $session_company_id - ORDER BY $sb $o LIMIT $record_from, $record_to" +$sql = mysqli_query( + $mysqli, + "SELECT SQL_CALC_FOUND_ROWS * FROM categories + WHERE category_name LIKE '%$q%' + AND category_type = '$category' + AND category_archived_at IS NULL + AND company_id = $session_company_id + ORDER BY $sb $o LIMIT $record_from, $record_to" ); -$num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()")); +$num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); //Colors Used -$sql_colors_used = mysqli_query($mysqli,"SELECT category_color FROM categories - WHERE category_type = '$category' - AND category_archived_at IS NULL - AND company_id = $session_company_id" +$sql_colors_used = mysqli_query( + $mysqli, + "SELECT category_color FROM categories + WHERE category_type = '$category' + AND category_archived_at IS NULL + AND company_id = $session_company_id" ); while ($color_used_row = mysqli_fetch_array($sql_colors_used)) { diff --git a/client_add_modal.php b/client_add_modal.php index c1db4453..b3515ea7 100644 --- a/client_add_modal.php +++ b/client_add_modal.php @@ -64,7 +64,7 @@ @@ -271,7 +271,7 @@ + + + +

No Results

"; + echo "

No Results

"; } ?> diff --git a/pagination_head.php b/pagination_head.php index 881d1508..cd2b9fc8 100644 --- a/pagination_head.php +++ b/pagination_head.php @@ -9,32 +9,32 @@ // Paging if (isset($_GET['p'])) { - $p = intval($_GET['p']); - $record_from = (($p)-1)*$_SESSION['records_per_page']; - $record_to = $_SESSION['records_per_page']; -}else{ - $record_from = 0; - $record_to = $_SESSION['records_per_page']; - $p = 1; + $p = intval($_GET['p']); + $record_from = (($p)-1)*$_SESSION['records_per_page']; + $record_to = $_SESSION['records_per_page']; +} else { + $record_from = 0; + $record_to = $_SESSION['records_per_page']; + $p = 1; } // Order if (isset($_GET['o'])) { - if ($_GET['o'] == 'ASC') { + if ($_GET['o'] == 'ASC') { + $o = "ASC"; + $disp = "DESC"; + } else { + $o = "DESC"; + $disp = "ASC"; + } +} else { $o = "ASC"; $disp = "DESC"; - }else{ - $o = "DESC"; - $disp = "ASC"; - } -}else{ - $o = "ASC"; - $disp = "DESC"; } // Search if (isset($_GET['q'])) { - $q = strip_tags(mysqli_real_escape_string($mysqli,trim($_GET['q']))); -}else{ - $q = ""; -} \ No newline at end of file + $q = strip_tags(mysqli_real_escape_string($mysqli, trim($_GET['q']))); +} else { + $q = ""; +} diff --git a/payments.php b/payments.php index e9d6067b..360cebd0 100644 --- a/payments.php +++ b/payments.php @@ -1,186 +1,185 @@ - $sb, 'o' => $o))); +$url_query_strings_sb = http_build_query(array_merge($_GET, array('sb' => $sb, 'o' => $o))); -$sql = mysqli_query($mysqli,"SELECT SQL_CALC_FOUND_ROWS * FROM payments - LEFT JOIN invoices ON payment_invoice_id = invoice_id - LEFT JOIN clients ON invoice_client_id = client_id - LEFT JOIN accounts ON payment_account_id = account_id - WHERE payments.company_id = $session_company_id - AND DATE(payment_date) BETWEEN '$dtf' AND '$dtt' - AND (CONCAT(invoice_prefix,invoice_number) LIKE '%$q%' OR client_name LIKE '%$q%' OR account_name LIKE '%$q%' OR payment_method LIKE '%$q%' OR payment_reference LIKE '%$q%') - ORDER BY $sb $o LIMIT $record_from, $record_to" +$sql = mysqli_query( + $mysqli, + "SELECT SQL_CALC_FOUND_ROWS * FROM payments + LEFT JOIN invoices ON payment_invoice_id = invoice_id + LEFT JOIN clients ON invoice_client_id = client_id + LEFT JOIN accounts ON payment_account_id = account_id + WHERE payments.company_id = $session_company_id + AND DATE(payment_date) BETWEEN '$dtf' AND '$dtt' + AND (CONCAT(invoice_prefix,invoice_number) LIKE '%$q%' OR client_name LIKE '%$q%' OR account_name LIKE '%$q%' OR payment_method LIKE '%$q%' OR payment_reference LIKE '%$q%') + ORDER BY $sb $o LIMIT $record_from, $record_to" ); -$num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()")); +$num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?> -
-
-

Payments

-
- -
-
-
-
-
- -
- - -
-
+
+
+

Payments

-
-
" id="advancedFilter"> -
-
-
- - + +
+ +
+
+
+ +
+ + +
+
+
+
+
" id="advancedFilter"> +
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ +
+
+ + "> + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Payment DateInvoice DateInvoiceClientAmountPayment MethodReferenceAccount
-
-
-
- - -
-
-
-
- - -
-
-
-
- -
-
- - "> - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Payment DateInvoice DateInvoiceClientAmountPayment MethodReferenceAccount
+ +
- -
-
- \ No newline at end of file + diff --git a/portal/inc_portal.php b/portal/inc_portal.php index 36f5f3ee..8b77da7e 100644 --- a/portal/inc_portal.php +++ b/portal/inc_portal.php @@ -11,10 +11,10 @@ require_once('portal_functions.php'); if (!isset($_SESSION)) { // HTTP Only cookies - ini_set("session.cookie_httponly", True); + ini_set("session.cookie_httponly", true); if ($config_https_only) { // Tell client to only send cookie(s) over HTTPS - ini_set("session.cookie_secure", True); + ini_set("session.cookie_secure", true); } session_start(); } diff --git a/portal/invoices.php b/portal/invoices.php index 8ca7bbf6..d509662f 100644 --- a/portal/invoices.php +++ b/portal/invoices.php @@ -18,9 +18,7 @@ $invoices_sql = mysqli_query($mysqli, "SELECT * FROM invoices WHERE invoice_clie
" alt="..." height="50" width="50" class="img-circle img-responsive"> - - @@ -73,7 +71,7 @@ $invoices_sql = mysqli_query($mysqli, "SELECT * FROM invoices WHERE invoice_clie } $now = time(); - if (($invoice_status == "Sent" || $invoice_status == "Partial" || $invoice_status == "Viewed") && strtotime($invoice_due) + 86400 < $now ) { + if (($invoice_status == "Sent" || $invoice_status == "Partial" || $invoice_status == "Viewed") && strtotime($invoice_due) + 86400 < $now) { $overdue_color = "text-danger font-weight-bold"; } else { $overdue_color = ""; @@ -107,9 +105,8 @@ $invoices_sql = mysqli_query($mysqli, "SELECT * FROM invoices WHERE invoice_clie - + + diff --git a/portal/login.php b/portal/login.php index 0dce1e80..cac9aba4 100644 --- a/portal/login.php +++ b/portal/login.php @@ -46,7 +46,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['login'])) { if ($row['contact_auth_method'] == 'local') { if (password_verify($password, $row['contact_password_hash'])) { - $_SESSION['client_logged_in'] = TRUE; + $_SESSION['client_logged_in'] = true; $_SESSION['client_id'] = $row['contact_client_id']; $_SESSION['contact_id'] = $row['contact_id']; $_SESSION['company_id'] = $row['company_id']; diff --git a/portal/login_microsoft.php b/portal/login_microsoft.php index 629a8529..4ab12928 100644 --- a/portal/login_microsoft.php +++ b/portal/login_microsoft.php @@ -60,9 +60,12 @@ if (isset($_POST['code']) && $_POST['state'] == session_id()) { // Send request via CURL (server side) so user cannot see the client secret $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $token_grant_url); - curl_setopt($ch, CURLOPT_POST, 1); - curl_setopt($ch, CURLOPT_POSTFIELDS, - http_build_query($params)); + curl_setopt($ch, CURLOPT_POST, 1); + curl_setopt( + $ch, + CURLOPT_POSTFIELDS, + http_build_query($params) + ); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); #curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); // DEBUG ONLY - WAMP @@ -95,7 +98,7 @@ if (isset($_POST['code']) && $_POST['state'] == session_id()) { $row = mysqli_fetch_array($sql); if ($row['contact_auth_method'] == 'azure') { - $_SESSION['client_logged_in'] = TRUE; + $_SESSION['client_logged_in'] = true; $_SESSION['client_id'] = $row['contact_client_id']; $_SESSION['contact_id'] = $row['contact_id']; $_SESSION['company_id'] = $row['company_id']; diff --git a/portal/login_reset.php b/portal/login_reset.php index 2b179d14..c772df0e 100644 --- a/portal/login_reset.php +++ b/portal/login_reset.php @@ -24,7 +24,7 @@ if (!isset($_SESSION)) { session_start(); } -$ip = strip_tags(mysqli_real_escape_string($mysqli,getIP())); +$ip = strip_tags(mysqli_real_escape_string($mysqli, getIP())); $user_agent = strip_tags(mysqli_real_escape_string($mysqli, $_SERVER['HTTP_USER_AGENT'])); $company_sql = mysqli_query($mysqli, "SELECT company_name FROM companies WHERE company_id = '1'"); @@ -61,10 +61,19 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") { $subject = "Password reset for $company_name ITFlow Portal"; $body = "Hello, $name

Someone (probably you) has requested a new password for your account on $company_name's ITFlow Client Portal.

Please click here to reset your password.

Alternatively, copy and paste this URL into your browser:
$url

If you didn't request this change, you can safely ignore this email.

~
$company_name
Support Department
$config_mail_from_email"; - $mail = sendSingleEmail($config_smtp_host, $config_smtp_username, $config_smtp_password, $config_smtp_encryption, $config_smtp_port, - $config_mail_from_email, $config_mail_from_name, - $email, $name, - $subject, $body); + $mail = sendSingleEmail( + $config_smtp_host, + $config_smtp_username, + $config_smtp_password, + $config_smtp_encryption, + $config_smtp_port, + $config_mail_from_email, + $config_mail_from_name, + $email, + $name, + $subject, + $body + ); // Error handling if ($mail !== true) { @@ -112,10 +121,19 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") { $body = "Hello, $name

Your password for your account on $company_name's ITFlow Client Portal was successfully reset. You should be all set!

If you didn't reset your password, please get in touch ASAP.

~
$company_name
Support Department
$config_mail_from_email"; - $mail = sendSingleEmail($config_smtp_host, $config_smtp_username, $config_smtp_password, $config_smtp_encryption, $config_smtp_port, - $config_mail_from_email, $config_mail_from_name, - $email, $name, - $subject, $body); + $mail = sendSingleEmail( + $config_smtp_host, + $config_smtp_username, + $config_smtp_password, + $config_smtp_encryption, + $config_smtp_port, + $config_mail_from_email, + $config_mail_from_name, + $email, + $name, + $subject, + $body + ); // Error handling if ($mail !== true) { diff --git a/post.php b/post.php index 37a4c11b..485eaf13 100644 --- a/post.php +++ b/post.php @@ -284,7 +284,7 @@ if(isset($_POST['edit_profile'])){ $email = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['email']))); $new_password = trim($_POST['new_password']); $existing_file_name = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['existing_file_name']))); - $logout = FALSE; + $logout = false; $extended_log_description = ''; // Email notification when password or email is changed @@ -367,7 +367,7 @@ if(isset($_POST['edit_profile'])){ mysqli_query($mysqli,"UPDATE users SET user_password = '$new_password', user_specific_encryption_ciphertext = '$user_specific_encryption_ciphertext' WHERE user_id = $user_id"); $extended_log_description .= ", password changed"; - $logout = TRUE; + $logout = true; } // Enable extension access, only if it isn't already setup (user doesn't have cookie) @@ -377,7 +377,7 @@ if(isset($_POST['edit_profile'])){ mysqli_query($mysqli, "UPDATE users SET user_extension_key = '$extension_key' WHERE user_id = $user_id"); $extended_log_description .= ", extension access enabled"; - $logout = TRUE; + $logout = true; } } @@ -4788,19 +4788,19 @@ if(isset($_POST["import_client_contacts_csv"])){ $client_id = intval($_POST['client_id']); $file_name = $_FILES["file"]["tmp_name"]; - $error = FALSE; + $error = false; //Check file is CSV $file_extension = strtolower(end(explode('.',$_FILES['file']['name']))); $allowed_file_extensions = array('csv'); if(in_array($file_extension,$allowed_file_extensions) === false){ - $error = TRUE; + $error = true; $_SESSION['alert_message'] = "Bad file extension"; } //Check file isn't empty elseif($_FILES["file"]["size"] < 1){ - $error = TRUE; + $error = true; $_SESSION['alert_message'] = "Bad file size (empty?)"; } @@ -4808,7 +4808,7 @@ if(isset($_POST["import_client_contacts_csv"])){ $f = fopen($file_name, "r"); $f_columns = fgetcsv($f, 1000, ","); if(!$error & count($f_columns) != 8) { - $error = TRUE; + $error = true; $_SESSION['alert_message'] = "Bad column count."; } @@ -4818,7 +4818,7 @@ if(isset($_POST["import_client_contacts_csv"])){ fgetcsv($file, 1000, ","); // Skip first line $row_count = 0; $duplicate_count = 0; - while(($column = fgetcsv($file, 1000, ",")) !== FALSE){ + while(($column = fgetcsv($file, 1000, ",")) !== false){ $duplicate_detect = 0; if(isset($column[0])){ $name = trim(strip_tags(mysqli_real_escape_string($mysqli, $column[0]))); @@ -5209,19 +5209,19 @@ if(isset($_POST["import_client_locations_csv"])){ $client_id = intval($_POST['client_id']); $file_name = $_FILES["file"]["tmp_name"]; - $error = FALSE; + $error = false; //Check file is CSV $file_extension = strtolower(end(explode('.',$_FILES['file']['name']))); $allowed_file_extensions = array('csv'); if(in_array($file_extension,$allowed_file_extensions) === false){ - $error = TRUE; + $error = true; $_SESSION['alert_message'] = "Bad file extension"; } //Check file isn't empty elseif($_FILES["file"]["size"] < 1){ - $error = TRUE; + $error = true; $_SESSION['alert_message'] = "Bad file size (empty?)"; } @@ -5229,7 +5229,7 @@ if(isset($_POST["import_client_locations_csv"])){ $f = fopen($file_name, "r"); $f_columns = fgetcsv($f, 1000, ","); if(!$error & count($f_columns) != 7) { - $error = TRUE; + $error = true; $_SESSION['alert_message'] = "Bad column count."; } @@ -5239,7 +5239,7 @@ if(isset($_POST["import_client_locations_csv"])){ fgetcsv($file, 1000, ","); // Skip first line $row_count = 0; $duplicate_count = 0; - while(($column = fgetcsv($file, 1000, ",")) !== FALSE){ + while(($column = fgetcsv($file, 1000, ",")) !== false){ $duplicate_detect = 0; if(isset($column[0])){ $name = trim(strip_tags(mysqli_real_escape_string($mysqli, $column[0]))); @@ -5519,19 +5519,19 @@ if(isset($_POST["import_client_assets_csv"])){ $client_id = intval($_POST['client_id']); $file_name = $_FILES["file"]["tmp_name"]; - $error = FALSE; + $error = false; //Check file is CSV $file_extension = strtolower(end(explode('.',$_FILES['file']['name']))); $allowed_file_extensions = array('csv'); if(in_array($file_extension,$allowed_file_extensions) === false){ - $error = TRUE; + $error = true; $_SESSION['alert_message'] = "Bad file extension"; } //Check file isn't empty elseif($_FILES["file"]["size"] < 1){ - $error = TRUE; + $error = true; $_SESSION['alert_message'] = "Bad file size (empty?)"; } @@ -5539,7 +5539,7 @@ if(isset($_POST["import_client_assets_csv"])){ $f = fopen($file_name, "r"); $f_columns = fgetcsv($f, 1000, ","); if(!$error & count($f_columns) != 8) { - $error = TRUE; + $error = true; $_SESSION['alert_message'] = "Bad column count."; } @@ -5549,7 +5549,7 @@ if(isset($_POST["import_client_assets_csv"])){ fgetcsv($file, 1000, ","); // Skip first line $row_count = 0; $duplicate_count = 0; - while(($column = fgetcsv($file, 1000, ",")) !== FALSE){ + while(($column = fgetcsv($file, 1000, ",")) !== false){ $duplicate_detect = 0; if(isset($column[0])){ $name = trim(strip_tags(mysqli_real_escape_string($mysqli, $column[0]))); @@ -6163,19 +6163,19 @@ if(isset($_POST["import_client_logins_csv"])){ $client_id = intval($_POST['client_id']); $file_name = $_FILES["file"]["tmp_name"]; - $error = FALSE; + $error = false; //Check file is CSV $file_extension = strtolower(end(explode('.',$_FILES['file']['name']))); $allowed_file_extensions = array('csv'); if(in_array($file_extension,$allowed_file_extensions) === false){ - $error = TRUE; + $error = true; $_SESSION['alert_message'] = "Bad file extension"; } //Check file isn't empty elseif($_FILES["file"]["size"] < 1){ - $error = TRUE; + $error = true; $_SESSION['alert_message'] = "Bad file size (empty?)"; } @@ -6183,7 +6183,7 @@ if(isset($_POST["import_client_logins_csv"])){ $f = fopen($file_name, "r"); $f_columns = fgetcsv($f, 1000, ","); if(!$error & count($f_columns) != 4) { - $error = TRUE; + $error = true; $_SESSION['alert_message'] = "Bad column count."; } @@ -6193,7 +6193,7 @@ if(isset($_POST["import_client_logins_csv"])){ fgetcsv($file, 1000, ","); // Skip first line $row_count = 0; $duplicate_count = 0; - while(($column = fgetcsv($file, 1000, ",")) !== FALSE){ + while(($column = fgetcsv($file, 1000, ",")) !== false){ $duplicate_detect = 0; if(isset($column[0])){ $name = trim(strip_tags(mysqli_real_escape_string($mysqli, $column[0]))); diff --git a/product_add_modal.php b/product_add_modal.php index 13f0a5cf..90998021 100644 --- a/product_add_modal.php +++ b/product_add_modal.php @@ -1,106 +1,106 @@