Merge pull request #404 from jlcfly/master

Just a few minor fixes
This commit is contained in:
Johnny 2022-03-22 17:32:43 -04:00 committed by GitHub
commit 7874acaa65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 3 deletions

View File

@ -23,7 +23,7 @@ if(isset($_GET['query'])){
}
}else{
$query = "";
$number_query = "";
$phone_query = "";
}
//Column Filter

View File

@ -39,6 +39,10 @@ function initials($str) {
}
function removeDirectory($path) {
if (!file_exists($path)) {
return;
}
$files = glob($path . '/*');
foreach ($files as $file) {
is_dir($file) ? removeDirectory($file) : unlink($file);
@ -396,4 +400,4 @@ function encryptUpgradeLoginEntry($login_password_cleartext, $site_encryption_ma
return $login_password_ciphertext;
}
?>
?>

View File

@ -133,6 +133,7 @@ if(isset($_POST['edit_user'])){
$default_company = intval($_POST['default_company']);
$role = intval($_POST['role']);
$existing_file_name = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['existing_file_name'])));
$extended_log_description = '';
if(!file_exists("uploads/users/$user_id/")) {
mkdir("uploads/users/$user_id");
@ -216,6 +217,7 @@ if(isset($_POST['edit_profile'])){
$new_password = trim($_POST['new_password']);
$existing_file_name = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['existing_file_name'])));
$logout = FALSE;
$extended_log_description = '';
//Check to see if a file is attached
if($_FILES['file']['tmp_name'] != ''){
@ -1137,6 +1139,7 @@ if(isset($_POST['add_client'])){
$currency_code = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['currency_code'])));
$net_terms = intval($_POST['net_terms']);
$notes = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['notes'])));
$extended_log_description = '';
mysqli_query($mysqli,"INSERT INTO clients SET client_name = '$name', client_type = '$type', client_website = '$website', client_referral = '$referral', client_currency_code = '$currency_code', client_net_terms = $net_terms, client_notes = '$notes', client_created_at = NOW(), client_accessed_at = NOW(), company_id = $session_company_id");
@ -8005,4 +8008,4 @@ if(isset($_GET['logout'])){
header('Location: login.php');
}
?>
?>