+
-
diff --git a/post/user/contact_model.php b/post/user/contact_model.php
index 40bcb127..9228f224 100644
--- a/post/user/contact_model.php
+++ b/post/user/contact_model.php
@@ -5,7 +5,7 @@ $client_id = intval($_POST['client_id']);
$name = sanitizeInput($_POST['name']);
$title = sanitizeInput($_POST['title']);
$department = sanitizeInput($_POST['department']);
-$phone = preg_replace("/[^0-9]/", '', $_POST['phone']);
+$phone = sanitizeInput($_POST['phone']);
$extension = preg_replace("/[^0-9]/", '', $_POST['extension']);
$mobile = preg_replace("/[^0-9]/", '', $_POST['mobile']);
$email = sanitizeInput($_POST['email']);
diff --git a/post/user/location.php b/post/user/location.php
index a30958ec..b4d150bc 100644
--- a/post/user/location.php
+++ b/post/user/location.php
@@ -17,7 +17,7 @@ if(isset($_POST['add_location'])){
mkdir("uploads/clients/$client_id");
}
- mysqli_query($mysqli,"INSERT INTO locations SET location_name = '$name', location_description = '$description', location_country = '$country', location_address = '$address', location_city = '$city', location_state = '$state', location_zip = '$zip', location_phone = '$phone', location_fax = '$fax', location_hours = '$hours', location_notes = '$notes', location_contact_id = $contact, location_client_id = $client_id");
+ mysqli_query($mysqli,"INSERT INTO locations SET location_name = '$name', location_description = '$description', location_country = '$country', location_address = '$address', location_city = '$city', location_state = '$state', location_zip = '$zip', location_phone = '$phone', location_phone_extension = '$extension', location_fax = '$fax', location_hours = '$hours', location_notes = '$notes', location_contact_id = $contact, location_client_id = $client_id");
$location_id = mysqli_insert_id($mysqli);
@@ -79,7 +79,7 @@ if(isset($_POST['edit_location'])){
mkdir("uploads/clients/$client_id");
}
- mysqli_query($mysqli,"UPDATE locations SET location_name = '$name', location_description = '$description', location_country = '$country', location_address = '$address', location_city = '$city', location_state = '$state', location_zip = '$zip', location_phone = '$phone', location_fax = '$fax', location_hours = '$hours', location_notes = '$notes', location_contact_id = $contact WHERE location_id = $location_id");
+ mysqli_query($mysqli,"UPDATE locations SET location_name = '$name', location_description = '$description', location_country = '$country', location_address = '$address', location_city = '$city', location_state = '$state', location_zip = '$zip', location_phone = '$phone', location_phone_extension = '$extension', location_fax = '$fax', location_hours = '$hours', location_notes = '$notes', location_contact_id = $contact WHERE location_id = $location_id");
// Update Primay location in clients if primary location is checked
if ($location_primary == 1) {
diff --git a/post/user/location_model.php b/post/user/location_model.php
index 35788818..6b33250c 100644
--- a/post/user/location_model.php
+++ b/post/user/location_model.php
@@ -10,6 +10,7 @@ $city = sanitizeInput($_POST['city']);
$state = sanitizeInput($_POST['state']);
$zip = sanitizeInput($_POST['zip']);
$phone = preg_replace("/[^0-9]/", '',$_POST['phone']);
+$extension = preg_replace("/[^0-9]/", '',$_POST['extension']);
$fax = preg_replace("/[^0-9]/", '',$_POST['fax']);
$hours = sanitizeInput($_POST['hours']);
$notes = sanitizeInput($_POST['notes']);
diff --git a/post/user/profile.php b/post/user/profile.php
index 94138779..0d15b64d 100644
--- a/post/user/profile.php
+++ b/post/user/profile.php
@@ -13,6 +13,7 @@ if (isset($_POST['edit_your_user_details'])) {
$name = sanitizeInput($_POST['name']);
$email = sanitizeInput($_POST['email']);
+ $signature = sanitizeInput($_POST['signature']);
$sql = mysqli_query($mysqli,"SELECT user_avatar FROM users WHERE user_id = $session_user_id");
$row = mysqli_fetch_array($sql);
@@ -75,6 +76,8 @@ if (isset($_POST['edit_your_user_details'])) {
mysqli_query($mysqli,"UPDATE users SET user_name = '$name', user_email = '$email' WHERE user_id = $session_user_id");
+ mysqli_query($mysqli,"UPDATE user_settings SET user_config_signature = '$signature' WHERE user_id = $session_user_id");
+
//Logging
logAction("User Account", "Edit", "$session_name edited their account $extended_log_description");
diff --git a/ticket.php b/ticket.php
index 73331cec..0979c706 100644
--- a/ticket.php
+++ b/ticket.php
@@ -663,7 +663,11 @@ if (isset($_GET['ticket_id'])) {
diff --git a/user_details.php b/user_details.php
index 5483da47..2108d1c1 100644
--- a/user_details.php
+++ b/user_details.php
@@ -55,6 +55,16 @@ require_once "includes/inc_all_user.php";