diff --git a/invoice.php b/invoice.php
index 80a9e7ea..108fce99 100644
--- a/invoice.php
+++ b/invoice.php
@@ -155,6 +155,9 @@ if (isset($_GET['invoice_id'])) {
Invoices
+
+
+
diff --git a/post/admin/admin_settings_theme.php b/post/admin/admin_settings_theme.php
index 08f49589..6fed2d55 100644
--- a/post/admin/admin_settings_theme.php
+++ b/post/admin/admin_settings_theme.php
@@ -21,7 +21,7 @@ if (isset($_POST['edit_favicon_settings'])) {
validateCSRFToken($_POST['csrf_token']);
// Check to see if a file is attached
- if ($_FILES['file']['tmp_name'] != '') {
+ if (isset($_FILES['file']['tmp_name'])) {
if ($new_file_name = checkFileUpload($_FILES['file'], array('ico'))) {
$file_tmp_path = $_FILES['file']['tmp_name'];
diff --git a/quote.php b/quote.php
index 48c2bf46..c87e32ba 100644
--- a/quote.php
+++ b/quote.php
@@ -118,6 +118,9 @@ if (isset($_GET['quote_id'])) {
Quotes
+
+
+
diff --git a/recurring_invoice.php b/recurring_invoice.php
index 213221e8..25f2dcb2 100644
--- a/recurring_invoice.php
+++ b/recurring_invoice.php
@@ -101,6 +101,9 @@ if (isset($_GET['recurring_id'])) {
Recurring Invoices
+
+
+
diff --git a/ticket.php b/ticket.php
index 90527662..240423ff 100644
--- a/ticket.php
+++ b/ticket.php
@@ -259,7 +259,7 @@ if (isset($_GET['ticket_id'])) {
}
- // Get all ticket replies
+ // Get ticket replies
$sql_ticket_replies = mysqli_query($mysqli, "SELECT * FROM ticket_replies
LEFT JOIN users ON ticket_reply_by = user_id
LEFT JOIN contacts ON ticket_reply_by = contact_id
@@ -268,17 +268,15 @@ if (isset($_GET['ticket_id'])) {
ORDER BY ticket_reply_id DESC"
);
- // Get all Events
- $sql_ticket_events = mysqli_query($mysqli, "SELECT * FROM logs
- LEFT JOIN users ON log_user_id = user_id
- WHERE log_type = 'Ticket'
- AND log_entity_id = $ticket_id
- ORDER BY log_id DESC"
+ // Get ticket Events
+ $sql_ticket_events = mysqli_query($mysqli, "SELECT * FROM ticket_history
+ WHERE ticket_history_ticket_id = $ticket_id
+ ORDER BY ticket_history_id DESC"
);
- // Get other tickets for this asset
- if (!empty($asset_id)) {
+ // Get past tickets for selected asset
+ if ($asset_id) {
$sql_asset_tickets = mysqli_query($mysqli, "SELECT * FROM tickets WHERE ticket_asset_id = $asset_id ORDER BY ticket_number DESC");
$ticket_asset_count = mysqli_num_rows($sql_asset_tickets);
}
@@ -290,6 +288,7 @@ if (isset($_GET['ticket_id'])) {
"SELECT users.user_id, user_name FROM users
LEFT JOIN user_settings on users.user_id = user_settings.user_id
WHERE user_role > 1
+ AND user_type = 1
AND user_status = 1
AND user_archived_at IS NULL
ORDER BY user_name ASC"
@@ -355,6 +354,9 @@ if (isset($_GET['ticket_id'])) {
Tickets
+
+
+