Merge pull request #843 from twetech/v0.1.2

Update to v0.1.2 of TWETech/ITflow
This commit is contained in:
Johnny
2023-12-23 16:06:29 -05:00
committed by GitHub
8 changed files with 320 additions and 168 deletions

View File

@@ -487,3 +487,7 @@ if (isset($_GET['get_totp_token_via_id'])) {
mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Login', log_action = 'View TOTP', log_description = '$session_name viewed login TOTP code for $name', log_ip = '$session_ip', log_user_agent = '$session_user_agent', log_client_id = $client_id, log_user_id = $session_user_id, log_entity_id = $login_id"); mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Login', log_action = 'View TOTP', log_description = '$session_name viewed login TOTP code for $name', log_ip = '$session_ip', log_user_agent = '$session_user_agent', log_client_id = $client_id, log_user_id = $session_user_id, log_entity_id = $login_id");
} }
} }
if (isset($_GET['get_readable_pass'])) {
echo GenerateReadablePassword(4);
}

View File

@@ -199,17 +199,21 @@
</div> </div>
</div> </div>
<!-- Password Form Group (Initially hidden) -->
<div class="form-group passwordGroup" style="display: none;"> <div class="form-group passwordGroup" style="display: none;">
<label>Password</label> <label>Password</label>
<div class="input-group"> <div class="input-group">
<div class="input-group-prepend"> <div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-key"></i></span> <span class="input-group-text"><i class="fa fa-fw fa-lock"></i></span>
</div> </div>
<input type="password" class="form-control" data-toggle="password" name="contact_password" placeholder="Enter a password" autocomplete="new-password"> <input type="password" class="form-control" data-toggle="password" id="password-add" name="password" placeholder="Password" autocomplete="new-password">
<div class="input-group-append"> <div class="input-group-append">
<span class="input-group-text"><i class="fa fa-fw fa-eye"></i></span> <span class="input-group-text"><i class="fa fa-fw fa-eye"></i></span>
</div> </div>
<div class="input-group-append">
<button type="button" class="btn btn-default" onclick="generatePassword('add')">
<i class="fa fa-fw fa-question"></i>
</button>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -574,6 +574,30 @@ if (isset($_GET['contact_id'])) {
<!-- JavaScript to Show/Hide Password Form Group --> <!-- JavaScript to Show/Hide Password Form Group -->
<script> <script>
function generatePassword(type, id) {
var url = '/ajax.php?get_readable_pass=true';
// Make an AJAX request to the server
var xhr = new XMLHttpRequest();
xhr.open('GET', url, true);
xhr.onreadystatechange = function () {
if (xhr.readyState == 4 && xhr.status == 200) {
var password = xhr.responseText;
// Set the password value based on the type
if (type == "add") {
document.getElementById("password-add").value = password;
} else if (type == "edit") {
console.log("password-edit-"+id.toString());
document.getElementById("password-edit-"+id.toString()).value = password;
}
}
};
xhr.send();
}
$(document).ready(function() { $(document).ready(function() {
$('.authMethod').on('change', function() { $('.authMethod').on('change', function() {
var $form = $(this).closest('.authForm'); var $form = $(this).closest('.authForm');

View File

@@ -49,7 +49,9 @@
<input type="text" class="form-control" name="name" placeholder="Full Name" value="<?php echo $contact_name; ?>" required> <input type="text" class="form-control" name="name" placeholder="Full Name" value="<?php echo $contact_name; ?>" required>
<div class="input-group-append"> <div class="input-group-append">
<div class="input-group-text"> <div class="input-group-text">
<input type="checkbox" name="contact_primary" value="1" <?php if ($contact_primary == 1) { echo "checked"; } ?>> <input type="checkbox" name="contact_primary" value="1" <?php if ($contact_primary == 1) {
echo "checked";
} ?>>
</div> </div>
</div> </div>
</div> </div>
@@ -127,7 +129,9 @@
$location_id_select = intval($row['location_id']); $location_id_select = intval($row['location_id']);
$location_name_select = nullable_htmlentities($row['location_name']); $location_name_select = nullable_htmlentities($row['location_name']);
?> ?>
<option <?php if ($contact_location_id == $location_id_select) { echo "selected"; } ?> value="<?php echo $location_id_select; ?>"><?php echo $location_name_select; ?></option> <option <?php if ($contact_location_id == $location_id_select) {
echo "selected";
} ?> value="<?php echo $location_id_select; ?>"><?php echo $location_name_select; ?></option>
<?php } ?> <?php } ?>
</select> </select>
@@ -139,7 +143,9 @@
<div class="col-md-4"> <div class="col-md-4">
<div class="form-group"> <div class="form-group">
<div class="custom-control custom-checkbox"> <div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="contactImportantCheckbox<?php echo $contact_id; ?>" name="contact_important" value="1" <?php if ($contact_important == 1) { echo "checked"; } ?> > <input type="checkbox" class="custom-control-input" id="contactImportantCheckbox<?php echo $contact_id; ?>" name="contact_important" value="1" <?php if ($contact_important == 1) {
echo "checked";
} ?>>
<label class="custom-control-label" for="contactImportantCheckbox<?php echo $contact_id; ?>">Important</label> <label class="custom-control-label" for="contactImportantCheckbox<?php echo $contact_id; ?>">Important</label>
</div> </div>
</div> </div>
@@ -147,7 +153,9 @@
<div class="col-md-4"> <div class="col-md-4">
<div class="form-group"> <div class="form-group">
<div class="custom-control custom-checkbox"> <div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="contactBillingCheckbox<?php echo $contact_id; ?>" name="contact_billing" value="1" <?php if ($contact_billing == 1) { echo "checked"; } ?> > <input type="checkbox" class="custom-control-input" id="contactBillingCheckbox<?php echo $contact_id; ?>" name="contact_billing" value="1" <?php if ($contact_billing == 1) {
echo "checked";
} ?>>
<label class="custom-control-label" for="contactBillingCheckbox<?php echo $contact_id; ?>">Billing</label> <label class="custom-control-label" for="contactBillingCheckbox<?php echo $contact_id; ?>">Billing</label>
</div> </div>
</div> </div>
@@ -155,7 +163,9 @@
<div class="col-md-4"> <div class="col-md-4">
<div class="form-group"> <div class="form-group">
<div class="custom-control custom-checkbox"> <div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="contactTechnicalCheckbox<?php echo $contact_id; ?>" name="contact_technical" value="1" <?php if ($contact_technical == 1) { echo "checked"; } ?> > <input type="checkbox" class="custom-control-input" id="contactTechnicalCheckbox<?php echo $contact_id; ?>" name="contact_technical" value="1" <?php if ($contact_technical == 1) {
echo "checked";
} ?>>
<label class="custom-control-label" for="contactTechnicalCheckbox<?php echo $contact_id; ?>">Technical</label> <label class="custom-control-label" for="contactTechnicalCheckbox<?php echo $contact_id; ?>">Technical</label>
</div> </div>
</div> </div>
@@ -187,22 +197,30 @@
</div> </div>
<select class="form-control select2 authMethod" name="auth_method"> <select class="form-control select2 authMethod" name="auth_method">
<option value="">- None -</option> <option value="">- None -</option>
<option value="local" <?php if ($auth_method == "local") {echo "selected";} ?>>Local</option> <option value="local" <?php if ($auth_method == "local") {
<option value="azure" <?php if ($auth_method == "azure") {echo "selected";} ?>>Azure</option> echo "selected";
} ?>>Local</option>
<option value="azure" <?php if ($auth_method == "azure") {
echo "selected";
} ?>>Azure</option>
</select> </select>
</div> </div>
</div> </div>
<div class="form-group passwordGroup" style="display: none;"> <div class="form-group passwordGroup" style="display: none;">
<label>Password</label> <label>Password <strong class="text-danger">*</strong></label>
<div class="input-group"> <div class="input-group">
<div class="input-group-prepend"> <div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-key"></i></span> <span class="input-group-text"><i class="fa fa-fw fa-lock"></i></span>
</div> </div>
<input type="password" class="form-control" data-toggle="password" name="contact_password" placeholder="Leave blank for no change" autocomplete="new-password" minlength="8"> <input type="password" class="form-control" data-toggle="password" id="password-edit-<?php echo $contact_id; ?>" name="password" placeholder="Password" required autocomplete="new-password">
<div class="input-group-append"> <div class="input-group-append">
<span class="input-group-text"><i class="fa fa-fw fa-eye"></i></span> <span class="input-group-text"><i class="fa fa-fw fa-eye"></i></span>
</div> </div>
<div class="input-group-append">
<button type="button" class="btn btn-default" onclick="generatePassword('edit', <?php echo $contact_id; ?>)">
<i class="fa fa-fw fa-question"></i>
</button>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -247,6 +247,30 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
<!-- JavaScript to Show/Hide Password Form Group --> <!-- JavaScript to Show/Hide Password Form Group -->
<script> <script>
function generatePassword(type, id) {
var url = '/ajax.php?get_readable_pass=true';
// Make an AJAX request to the server
var xhr = new XMLHttpRequest();
xhr.open('GET', url, true);
xhr.onreadystatechange = function () {
if (xhr.readyState == 4 && xhr.status == 200) {
var password = xhr.responseText;
// Set the password value based on the type
if (type == "add") {
document.getElementById("password-add").value = password;
} else if (type == "edit") {
console.log("password-edit-"+id.toString());
document.getElementById("password-edit-"+id.toString()).value = password;
}
}
};
xhr.send();
}
$(document).ready(function() { $(document).ready(function() {
$('.authMethod').on('change', function() { $('.authMethod').on('change', function() {
var $form = $(this).closest('.authForm'); var $form = $(this).closest('.authForm');
@@ -257,6 +281,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
} }
}); });
$('.authMethod').trigger('change'); $('.authMethod').trigger('change');
}); });
</script> </script>

View File

@@ -50,7 +50,9 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
<div class="col-md-4"> <div class="col-md-4">
<div class="input-group mb-3 mb-md-0"> <div class="input-group mb-3 mb-md-0">
<input type="search" class="form-control" name="q" value="<?php if (isset($q)) { echo stripslashes(nullable_htmlentities($q)); } ?>" placeholder="Search Logins"> <input type="search" class="form-control" name="q" value="<?php if (isset($q)) {
echo stripslashes(nullable_htmlentities($q));
} ?>" placeholder="Search Logins">
<div class="input-group-append"> <div class="input-group-append">
<button class="btn btn-dark"><i class="fa fa-search"></i></button> <button class="btn btn-dark"><i class="fa fa-search"></i></button>
</div> </div>
@@ -67,7 +69,9 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
<hr> <hr>
<div class="table-responsive-sm"> <div class="table-responsive-sm">
<table class="table table-striped table-borderless table-hover"> <table class="table table-striped table-borderless table-hover">
<thead class="text-dark <?php if ($num_rows[0] == 0) { echo "d-none"; } ?>"> <thead class="text-dark <?php if ($num_rows[0] == 0) {
echo "d-none";
} ?>">
<tr> <tr>
<th><a class="text-secondary" href="?<?php echo $url_query_strings_sort; ?>&sort=login_name&order=<?php echo $disp; ?>">Name</a></th> <th><a class="text-secondary" href="?<?php echo $url_query_strings_sort; ?>&sort=login_name&order=<?php echo $disp; ?>">Name</a></th>
<th><a class="text-secondary" href="?<?php echo $url_query_strings_sort; ?>&sort=login_description&order=<?php echo $disp; ?>">Description</a></th> <th><a class="text-secondary" href="?<?php echo $url_query_strings_sort; ?>&sort=login_description&order=<?php echo $disp; ?>">Description</a></th>
@@ -118,7 +122,9 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
$login_software_id = intval($row['login_software_id']); $login_software_id = intval($row['login_software_id']);
?> ?>
<tr class="<?php if(!empty($login_important)) { echo "text-bold"; }?>"> <tr class="<?php if (!empty($login_important)) {
echo "text-bold";
} ?>">
<td> <td>
<i class="fa fa-fw fa-key text-secondary"></i> <i class="fa fa-fw fa-key text-secondary"></i>
<a class="text-dark" href="#" data-toggle="modal" data-target="#editLoginModal<?php echo $login_id; ?>"> <a class="text-dark" href="#" data-toggle="modal" data-target="#editLoginModal<?php echo $login_id; ?>">
@@ -158,7 +164,6 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
<?php <?php
require "client_login_edit_modal.php"; require "client_login_edit_modal.php";
} }
?> ?>
@@ -176,8 +181,10 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
function showOTP(id, secret) { function showOTP(id, secret) {
//Send a GET request to ajax.php as ajax.php?get_totp_token=true&totp_secret=SECRET //Send a GET request to ajax.php as ajax.php?get_totp_token=true&totp_secret=SECRET
jQuery.get( jQuery.get(
"ajax.php", "ajax.php", {
{get_totp_token: 'true', totp_secret: secret}, get_totp_token: 'true',
totp_secret: secret
},
function(data) { function(data) {
//If we get a response from post.php, parse it as JSON //If we get a response from post.php, parse it as JSON
const token = JSON.parse(data); const token = JSON.parse(data);
@@ -191,8 +198,10 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
function showOTPViaLoginID(login_id) { function showOTPViaLoginID(login_id) {
// Send a GET request to ajax.php as ajax.php?get_totp_token_via_id=true&login_id=ID // Send a GET request to ajax.php as ajax.php?get_totp_token_via_id=true&login_id=ID
jQuery.get( jQuery.get(
"ajax.php", "ajax.php", {
{get_totp_token_via_id: 'true', login_id: login_id}, get_totp_token_via_id: 'true',
login_id: login_id
},
function(data) { function(data) {
//If we get a response from post.php, parse it as JSON //If we get a response from post.php, parse it as JSON
const token = JSON.parse(data); const token = JSON.parse(data);
@@ -204,7 +213,24 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
} }
function generatePassword() { function generatePassword() {
document.getElementById("password").value = "<?php echo randomString(); ?>" document.getElementById("password").value = "<?php echo generateReadablePassword(3); ?>"
}
function generatePassword() {
var url = '/ajax.php?get_readable_pass=true';
// Make an AJAX request to the server
var xhr = new XMLHttpRequest();
xhr.open('GET', url, true);
xhr.onreadystatechange = function() {
if (xhr.readyState == 4 && xhr.status == 200) {
var password = xhr.responseText;
document.getElementById("password").value = password;
}
};
xhr.send();
} }
</script> </script>
@@ -219,4 +245,3 @@ require_once "client_login_import_modal.php";
require_once "client_login_export_modal.php"; require_once "client_login_export_modal.php";
require_once "footer.php"; require_once "footer.php";

View File

@@ -15,8 +15,7 @@ use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception; use PHPMailer\PHPMailer\Exception;
// Function to generate both crypto & URL safe random strings // Function to generate both crypto & URL safe random strings
function randomString($length = 16) function randomString($length = 16) {
{
// Generate some cryptographically safe random bytes // Generate some cryptographically safe random bytes
// Generate a little more than requested as we'll lose some later converting // Generate a little more than requested as we'll lose some later converting
$random_bytes = random_bytes($length + 5); $random_bytes = random_bytes($length + 5);
@@ -33,8 +32,7 @@ function randomString($length = 16)
} }
// Older keygen function - only used for TOTP currently // Older keygen function - only used for TOTP currently
function key32gen() function key32gen() {
{
$chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; $chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
$chars .= "234567"; $chars .= "234567";
while (1) { while (1) {
@@ -256,8 +254,7 @@ function setupFirstUserSpecificKey($user_password, $site_encryption_master_key)
* New Users: Requires the admin setting up their account have a Specific/Session key configured * New Users: Requires the admin setting up their account have a Specific/Session key configured
* Password Changes: Will use the current info in the session. * Password Changes: Will use the current info in the session.
*/ */
function encryptUserSpecificKey($user_password) function encryptUserSpecificKey($user_password) {
{
$iv = randomString(); $iv = randomString();
$salt = randomString(); $salt = randomString();
@@ -874,6 +871,57 @@ function calculateAccountBalance($mysqli, $account_id) {
} }
function generateReadablePassword($security_level) {
// Arrays of words
$adjectives = ['Smart', 'Swift', 'Secure', 'Stable', 'Digital', 'Virtual', 'Active', 'Dynamic', 'Innovative', 'Efficient', 'Portable', 'Wireless', 'Rapid', 'Intuitive', 'Automated', 'Robust', 'Reliable', 'Sleek', 'Modern', 'Happy', 'Funny', 'Quick', 'Bright', 'Clever', 'Gentle', 'Brave', 'Calm', 'Eager', 'Fierce', 'Kind', 'Lucky', 'Proud', 'Silly', 'Witty', 'Bold', 'Curious', 'Elated', 'Gracious', 'Honest', 'Jolly', 'Merry', 'Noble', 'Optimistic', 'Playful', 'Quirky', 'Rustic', 'Steady', 'Tranquil', 'Upbeat'];
$nouns = ['Computer', 'Laptop', 'Tablet', 'Server', 'Router', 'Software', 'Hardware', 'Pixel', 'Byte', 'App', 'Network', 'Cloud', 'Firewall', 'Email', 'Database', 'Folder', 'Document', 'Interface', 'Program', 'Gadget', 'Dinosaur', 'Tiger', 'Elephant', 'Kangaroo', 'Monkey', 'Unicorn', 'Dragon', 'Puppy', 'Kitten', 'Parrot', 'Lion', 'Bear', 'Fox', 'Wolf', 'Rabbit', 'Deer', 'Owl', 'Hedgehog', 'Turtle', 'Frog', 'Butterfly', 'Panda', 'Giraffe', 'Zebra', 'Peacock', 'Koala', 'Raccoon', 'Squirrel', 'Hippo', 'Rhino', 'Book', "Monitor"];
$verbs = ['Connects', 'Runs', 'Processes', 'Secures', 'Encrypts', 'Saves', 'Updates', 'Boots', 'Scans', 'Compiles', 'Executes', 'Restores', 'Installs', 'Configures', 'Downloads', 'Streams', 'BacksUp', 'Syncs', 'Browses', 'Navigates', 'Runs', 'Jumps', 'Flies', 'Swims', 'Dances', 'Sings', 'Hops', 'Skips', 'Races', 'Climbs', 'Crawls', 'Glides', 'Twirls', 'Swings', 'Sprints', 'Gallops', 'Trots', 'Wanders', 'Strolls', 'Marches'];
$adverbs = ['Quickly', 'Slowly', 'Gracefully', 'Wildly', 'Loudly', 'Silently', 'Cheerfully', 'Eagerly', 'Gently', 'Happily', 'Jovially', 'Kindly', 'Lazily', 'Merrily', 'Neatly', 'Politely', 'Quietly', 'Rapidly', 'Smoothly', 'Tightly', 'Swiftly', 'Securely', 'Efficiently', 'Rapidly', 'Smoothly', 'Reliably', 'Safely', 'Wirelessly', 'Instantly', 'Silently', 'Automatically', 'Seamlessly', 'Digitally', 'Virtually', 'Continuously', 'Regularly', 'Intelligently', 'Logically'];
// Randomly select words from arrays
$adj = $adjectives[array_rand($adjectives)];
$noun = $nouns[array_rand($nouns)];
$verb = $verbs[array_rand($verbs)];
$adv = $adverbs[array_rand($adverbs)];
// Combine to create a base password
if ($security_level > 2 ) {
$password = "The" . $adj . $noun . $adv . $verb;
} else {
$password = $adj . $noun . $verb;
}
// Mapping of letters to special characters and numbers
$mappings = [
'A' => '@', 'a' => '@',
'E' => '3', 'e' => '3',
'I' => '!', 'i' => '!',
'O' => '0', 'o' => '0',
'S' => '$', 's' => '$'
];
// Replace characters based on mappings
if ($security_level > 4) {
$password = strtr($password, $mappings);
} else {
// Randomly replace characters based on mappings
for ($i = 0; $i < strlen($password); $i++) {
if (array_key_exists($password[$i], $mappings) && rand(0, 1)) {
$password[$i] = $mappings[$password[$i]];
}
}
}
if ($security_level > 3) {
// Add a random number at the end
$password .= rand(0, 99);
}
return $password;
}
function addToMailQueue($mysqli, $data) { function addToMailQueue($mysqli, $data) {
foreach ($data as $email) { foreach ($data as $email) {
@@ -914,4 +962,5 @@ function calculateInvoiceBalance($mysqli, $invoice_id) {
return $balance; return $balance;
} }

View File

@@ -37,9 +37,9 @@ if (isset($_GET['status']) && is_array($_GET['status']) && !empty($_GET['status'
// Ticket assignment status filter // Ticket assignment status filter
if (isset($_GET['assigned']) & !empty($_GET['assigned'])) { if (isset($_GET['assigned']) & !empty($_GET['assigned'])) {
if ($_GET['assigned'] == 'unassigned') { if ($_GET['assigned'] == 'unassigned') {
$ticket_assigned_filter = '0'; $ticket_assigned_filter = 'AND ticket_assigned_to = 0';
} else { } else {
$ticket_assigned_filter = intval($_GET['assigned']); $ticket_assigned_filter = 'AND ticket_assigned_to = '.intval($_GET['assigned']);
} }
} else { } else {
// Default - any // Default - any
@@ -59,8 +59,7 @@ $sql = mysqli_query(
LEFT JOIN assets ON ticket_asset_id = asset_id LEFT JOIN assets ON ticket_asset_id = asset_id
LEFT JOIN locations ON ticket_location_id = location_id LEFT JOIN locations ON ticket_location_id = location_id
LEFT JOIN vendors ON ticket_vendor_id = vendor_id LEFT JOIN vendors ON ticket_vendor_id = vendor_id
WHERE ticket_assigned_to LIKE '%$ticket_assigned_filter%' WHERE $ticket_status_snippet " . $ticket_assigned_filter . "
AND $ticket_status_snippet
AND DATE(ticket_created_at) BETWEEN '$dtf' AND '$dtt' AND DATE(ticket_created_at) BETWEEN '$dtf' AND '$dtt'
AND (CONCAT(ticket_prefix,ticket_number) LIKE '%$q%' OR client_name LIKE '%$q%' OR ticket_subject LIKE '%$q%' OR ticket_status LIKE '%$q%' OR ticket_priority LIKE '%$q%' OR user_name LIKE '%$q%' OR contact_name LIKE '%$q%' OR asset_name LIKE '%$q%' OR vendor_name LIKE '%$q%' OR ticket_vendor_ticket_number LIKE '%q%') AND (CONCAT(ticket_prefix,ticket_number) LIKE '%$q%' OR client_name LIKE '%$q%' OR ticket_subject LIKE '%$q%' OR ticket_status LIKE '%$q%' OR ticket_priority LIKE '%$q%' OR user_name LIKE '%$q%' OR contact_name LIKE '%$q%' OR asset_name LIKE '%$q%' OR vendor_name LIKE '%$q%' OR ticket_vendor_ticket_number LIKE '%q%')
ORDER BY $sort $order LIMIT $record_from, $record_to" ORDER BY $sort $order LIMIT $record_from, $record_to"
@@ -320,6 +319,10 @@ $user_active_assigned_tickets = intval($row['total_tickets_assigned']);
$ticket_status_color = "success"; $ticket_status_color = "success";
} elseif ($ticket_status == "Closed") { } elseif ($ticket_status == "Closed") {
$ticket_status_color = "dark"; $ticket_status_color = "dark";
} elseif ($ticket_status == "Auto Close") {
$ticket_status_color = "dark";
} elseif ($ticket_status == "Client-Replied") {
$ticket_status_color = "warning";
} else{ } else{
$ticket_status_color = "secondary"; $ticket_status_color = "secondary";
} }
@@ -367,7 +370,7 @@ $user_active_assigned_tickets = intval($row['total_tickets_assigned']);
<div class="mt-1"><?php echo $contact_display; ?></div> <div class="mt-1"><?php echo $contact_display; ?></div>
</td> </td>
<?php if ($config_module_enabled_accounting) { <?php if ($config_module_enable_accounting) {
?> ?>
<td class="text-center"> <td class="text-center">
<a href="#" data-toggle="modal" data-target="#editTicketBillableModal<?php echo $ticket_id; ?>"> <a href="#" data-toggle="modal" data-target="#editTicketBillableModal<?php echo $ticket_id; ?>">