From fddad195e176ae7e6393d8fd9ed3f1ccd122a616 Mon Sep 17 00:00:00 2001 From: Jared Vititoe Date: Fri, 5 Sep 2025 13:14:32 -0400 Subject: [PATCH] Deleted unreferenced files --- dashboard.php | 158 ------------------------------ new_ticket.php | 104 -------------------- ticket.php | 209 ---------------------------------------- views/DashboardView.php | 3 +- 4 files changed, 1 insertion(+), 473 deletions(-) delete mode 100644 dashboard.php delete mode 100644 new_ticket.php delete mode 100644 ticket.php diff --git a/dashboard.php b/dashboard.php deleted file mode 100644 index b11fdeb..0000000 --- a/dashboard.php +++ /dev/null @@ -1,158 +0,0 @@ -connect_error) { - die("Connection failed: " . $conn->connect_error); -} - -// Pagination settings from localStorage or defaults -$page = isset($_GET['page']) ? (int)$_GET['page'] : 1; -$limit = isset($_COOKIE['ticketsPerPage']) ? (int)$_COOKIE['ticketsPerPage'] : 15; -$defaultSortColumn = isset($_COOKIE['defaultSortColumn']) ? $_COOKIE['defaultSortColumn'] : 'ticket_id'; -$sortDirection = isset($_COOKIE['sortDirection']) ? $_COOKIE['sortDirection'] : 'desc'; -$offset = ($page - 1) * $limit; - -// Get total number of tickets based on current filter -$status = isset($_GET['status']) ? $_GET['status'] : 'Open'; -$statuses = explode(',', $status); -$whereClause = ""; -if (isset($_GET['status'])) { - $statuses = explode(',', $_GET['status']); - $whereClause = "WHERE status IN ('" . implode("','", $statuses) . "')"; -} else { - $whereClause = "WHERE status = 'Open'"; -} -$totalTicketsQuery = "SELECT COUNT(*) as total FROM tickets $whereClause"; -$totalTicketsResult = $conn->query($totalTicketsQuery); -$totalTickets = $totalTicketsResult->fetch_assoc()['total']; -$totalPages = ceil($totalTickets / $limit); - -// Modify SQL to use these settings and filter -$sql = "SELECT * FROM tickets $whereClause ORDER BY $defaultSortColumn $sortDirection LIMIT $limit OFFSET $offset"; -$result = $conn->query($sql); -?> - - - - - - - Ticket Dashboard - - - - - -
-

Tinker Tickets

- -
- -
-
- Total Tickets: -
-
- -
- - - - -
-
-
- - - - - - - - - - - - - - - - num_rows > 0) { - while($row = $result->fetch_assoc()) { - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - } - } else { - echo ""; - } - ?> - -
Ticket IDPriorityTitleCategoryTypeStatusCreatedUpdated
{$row['ticket_id']}{$row['priority']}{$row['title']}{$row['category']}{$row['type']}{$row['status']}" . date('Y-m-d H:i', strtotime($row['created_at'])) . "" . date('Y-m-d H:i', strtotime($row['updated_at'])) . "
No tickets found
- - close(); ?> - - - - diff --git a/new_ticket.php b/new_ticket.php deleted file mode 100644 index 3f5ef8d..0000000 --- a/new_ticket.php +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - Create New Ticket - - - - - - -
-
-

Create New Ticket

-
- -
-
- - -
- -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
- - -
- -
- - -
-
-
- - - - diff --git a/ticket.php b/ticket.php deleted file mode 100644 index 89a0ffe..0000000 --- a/ticket.php +++ /dev/null @@ -1,209 +0,0 @@ -prepare($sql); -$stmt->bind_param("i", $ticket_id); -$stmt->execute(); -$result = $stmt->get_result(); -$ticket = $result->fetch_assoc(); -?> - - - - - - - Ticket #<?php echo $ticket_id; ?> - - - - - - - - - -
"> -
-

" data-field="title" disabled>

-
-
UUID
-
-
- "> - ">P -
- -
-
-
-
- -
- - -
- -
-
- - -
-
- -
-
-

Comments

-
- -
-
-
- - Enable Markdown -
-
- - Preview Markdown -
-
- -
- -
-
-
- prepare($commentsSql); - $stmt->bind_param("s", $ticket_id); - $stmt->execute(); - $comments = $stmt->get_result(); - - while($comment = $comments->fetch_assoc()) { - echo "
"; - echo "
"; - echo "{$comment['user_name']}"; - echo "" . date('M d, Y H:i', strtotime($comment['created_at'])) . ""; - echo "
"; - echo "
"; - if ($comment['markdown_enabled']) { - echo ""; - } else { - echo htmlspecialchars($comment['comment_text']); - } - echo "
"; - echo "
"; - } - ?> -
-
-
- -
- - diff --git a/views/DashboardView.php b/views/DashboardView.php index f24a4ea..406bf9b 100644 --- a/views/DashboardView.php +++ b/views/DashboardView.php @@ -15,8 +15,7 @@

Tinker Tickets

- -
+