mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 10:54:52 +00:00
BREAKING CHANGES: Major Backend Code Changes Updated Foreign keys to prepend their table names ex invoice_client_id, switched most queries over to JOIN instead of = Combined contacts and location into client removed client email, phone etc fields, tons of small bug fixes, and other small UI changes all across the board
This commit is contained in:
19
tickets.php
19
tickets.php
@@ -17,12 +17,6 @@
|
||||
$q = "";
|
||||
}
|
||||
|
||||
if(isset($_GET['status'])){
|
||||
$status = mysqli_real_escape_string($mysqli,$_GET['status']);
|
||||
}else{
|
||||
$status = "Open";
|
||||
}
|
||||
|
||||
if(!empty($_GET['sb'])){
|
||||
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
||||
}else{
|
||||
@@ -79,12 +73,11 @@
|
||||
|
||||
$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 tickets, clients
|
||||
WHERE tickets.client_id = clients.client_id
|
||||
AND tickets.company_id = $session_company_id
|
||||
$sql = mysqli_query($mysqli,"SELECT SQL_CALC_FOUND_ROWS * FROM tickets LEFT JOIN clients ON ticket_client_id = client_id LEFT JOIN users ON ticket_assigned_to = user_id
|
||||
WHERE tickets.company_id = $session_company_id
|
||||
AND ticket_status LIKE '%$status%'
|
||||
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_priority LIKE '%$q%')
|
||||
AND (CONCAT(ticket_prefix,ticket_number) LIKE '%$q%' OR client_name LIKE '%$q%' OR ticket_subject LIKE '%$q%' OR ticket_priority LIKE '%$q%' OR user_name LIKE '%$q%')
|
||||
ORDER BY $sb $o LIMIT $record_from, $record_to");
|
||||
|
||||
$num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
|
||||
@@ -162,7 +155,7 @@
|
||||
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=ticket_status&o=<?php echo $disp; ?>">Status</a>
|
||||
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=ticket_subject&o=<?php echo $disp; ?>">Subject</a></th>
|
||||
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=client_name&o=<?php echo $disp; ?>">Client</a></th>
|
||||
<th>Assigned</th>
|
||||
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=user_name&o=<?php echo $disp; ?>">Assigned</a></th>
|
||||
<th>Last Response</th>
|
||||
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=ticket_created_at&o=<?php echo $disp; ?>">Created</a></th>
|
||||
|
||||
@@ -212,9 +205,7 @@
|
||||
if(empty($ticket_assigned_to)){
|
||||
$ticket_assigned_to_display = "<p class='text-danger'>Not Assigned</p>";
|
||||
}else{
|
||||
$sql_assigned_to = mysqli_query($mysqli,"SELECT * FROM users WHERE user_id = $ticket_assigned_to");
|
||||
$row = mysqli_fetch_array($sql_assigned_to);
|
||||
$ticket_assigned_to_display = $row['name'];
|
||||
$ticket_assigned_to_display = $row['user_name'];
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user