Fix some formatting and additonal white space before contact name in Ticket Details

This commit is contained in:
johnnyq
2023-06-22 10:57:14 -04:00
parent 682407ad64
commit 6ccbe67b59
3 changed files with 19 additions and 23 deletions
+3 -3
View File
@@ -19,8 +19,8 @@ if(isset($_POST['add_user'])){
validateAdminRole(); validateAdminRole();
validateCSRFToken($_POST['csrf_token']); validateCSRFToken($_POST['csrf_token']);
$password = password_hash($_POST['password'], PASSWORD_DEFAULT); $password = password_hash(trim($_POST['password']), PASSWORD_DEFAULT);
$user_specific_encryption_ciphertext = encryptUserSpecificKey($_POST['password']); $user_specific_encryption_ciphertext = encryptUserSpecificKey(trim($_POST['password']));
mysqli_query($mysqli,"INSERT INTO users SET user_name = '$name', user_email = '$email', user_password = '$password', user_specific_encryption_ciphertext = '$user_specific_encryption_ciphertext'"); mysqli_query($mysqli,"INSERT INTO users SET user_name = '$name', user_email = '$email', user_password = '$password', user_specific_encryption_ciphertext = '$user_specific_encryption_ciphertext'");
@@ -134,7 +134,7 @@ if(isset($_POST['edit_user'])){
if(!empty($new_password)){ if(!empty($new_password)){
$new_password = password_hash($new_password, PASSWORD_DEFAULT); $new_password = password_hash($new_password, PASSWORD_DEFAULT);
$user_specific_encryption_ciphertext = encryptUserSpecificKey($_POST['new_password']); $user_specific_encryption_ciphertext = encryptUserSpecificKey(trim($_POST['new_password']));
mysqli_query($mysqli,"UPDATE users SET user_password = '$new_password', user_specific_encryption_ciphertext = '$user_specific_encryption_ciphertext' WHERE user_id = $user_id"); mysqli_query($mysqli,"UPDATE users SET user_password = '$new_password', user_specific_encryption_ciphertext = '$user_specific_encryption_ciphertext' WHERE user_id = $user_id");
//Extended Logging //Extended Logging
$extended_log_description .= ", password changed"; $extended_log_description .= ", password changed";
+6 -6
View File
@@ -776,10 +776,10 @@ if (isset($_POST['add_database'])) {
exit; exit;
} }
$host = $_POST['host']; $host = trim($_POST['host']);
$database = $_POST['database']; $database = trim($_POST['database']);
$username = $_POST['username']; $username = trim($_POST['username']);
$password = $_POST['password']; $password = trim($_POST['password']);
$config_base_url = $_SERVER['HTTP_HOST'] . dirname($_SERVER['REQUEST_URI']); $config_base_url = $_SERVER['HTTP_HOST'] . dirname($_SERVER['REQUEST_URI']);
$installation_id = randomString(32); $installation_id = randomString(32);
@@ -854,13 +854,13 @@ if (isset($_POST['add_user'])) {
$name = sanitizeInput($_POST['name']); $name = sanitizeInput($_POST['name']);
$email = sanitizeInput($_POST['email']); $email = sanitizeInput($_POST['email']);
$password = password_hash($_POST['password'], PASSWORD_DEFAULT); $password = password_hash(trim($_POST['password']), PASSWORD_DEFAULT);
//Generate master encryption key //Generate master encryption key
$site_encryption_master_key = randomString(); $site_encryption_master_key = randomString();
//Generate user specific key //Generate user specific key
$user_specific_encryption_ciphertext = setupFirstUserSpecificKey($_POST['password'], $site_encryption_master_key); $user_specific_encryption_ciphertext = setupFirstUserSpecificKey(trim($_POST['password']), $site_encryption_master_key);
mysqli_query($mysqli,"INSERT INTO users SET user_name = '$name', user_email = '$email', user_password = '$password', user_specific_encryption_ciphertext = '$user_specific_encryption_ciphertext'"); mysqli_query($mysqli,"INSERT INTO users SET user_name = '$name', user_email = '$email', user_password = '$password', user_specific_encryption_ciphertext = '$user_specific_encryption_ciphertext'");
+10 -14
View File
@@ -464,26 +464,22 @@ if (isset($_GET['ticket_id'])) {
<div> <div>
<h4 class="text-secondary">Contact</h4> <h4 class="text-secondary">Contact</h4>
<span class=""> <span class="">
<i class="fa fa-fw fa-user text-secondary ml-1 mr-2 mb-2"></i> <i class="fa fa-fw fa-user text-secondary ml-1 mr-2 mb-2"></i>
<a href="client_contact_details.php?client_id=<?php echo $client_id; ?>&contact_id=<?php echo $contact_id; ?>" class="text-dark"> <a href="client_contact_details.php?client_id=<?php echo $client_id; ?>&contact_id=<?php echo $contact_id; ?>" class="text-dark">
<strong><?php echo strtoupper($contact_name); ?></strong> <strong><?php echo strtoupper($contact_name); ?></strong>
</a> </a>
</span> </span>
<span class="ml-1"> <span class="ml-1">
<a href="#" tabindex="0" role="button" data-toggle="popover" title="Related Tickets" data-html="true" data-content=" <a href="#" tabindex="0" role="button" data-toggle="popover" title="Related Tickets" data-html="true"
Open tickets: <strong><a href='tickets.php?contact_id=<?php echo $contact_id; ?>&status=Open'><?php echo $ticket_related_open; ?></a></strong><br> data-content = "Open tickets: <strong><a href='tickets.php?contact_id=<?php echo $contact_id; ?>&status=Open'><?php echo $ticket_related_open; ?></a></strong><br>
Closed tickets: <strong><a href='tickets.php?contact_id=<?php echo $contact_id; ?>&status=Closed'><?php echo $ticket_related_closed; ?></a></strong> Closed tickets: <strong><a href='tickets.php?contact_id=<?php echo $contact_id; ?>&status=Closed'><?php echo $ticket_related_closed; ?></a></strong>">
"> <!-- <span class="badge bg-secondary">--><?php //echo $ticket_related_total; ?><!--</span>-->
<!-- <span class="badge bg-secondary">--><?php //echo $ticket_related_total; ?><!--</span>--> </a>
</a> </span>
</span>
<br> <br>
<?php <?php
if (!empty($location_name)) { ?> if (!empty($location_name)) { ?>