diff --git a/app/includes/header.php b/app/includes/header.php index 8a7d372..bcb77b7 100644 --- a/app/includes/header.php +++ b/app/includes/header.php @@ -33,7 +33,7 @@ New request
diff --git a/app/public/existing.php b/app/public/existing.php new file mode 100644 index 0000000..41b3380 --- /dev/null +++ b/app/public/existing.php @@ -0,0 +1,118 @@ +prepare($user_tickets_stmt); + $user_tickets_sql->bindParam(':uuid', $_SESSION['uuid']); + $user_tickets_sql->execute(); + $user_tickets_sql->setFetchMode(PDO::FETCH_ASSOC); + $user_tickets_result = $user_tickets_sql->fetchAll(); + } catch (PDOException $e) { + echo("Error: " . $e->getMessage()); + } + + // Get user's closed tickets + try { + $closed_tickets_stmt = "SELECT uuid, id, title, description, status FROM tickets WHERE created_by=:uuid AND status='closed'#"; + $closed_tickets_sql = $db->prepare($user_tickets_stmt); + $closed_tickets_sql->bindParam(':uuid', $_SESSION['uuid']); + $closed_tickets_sql->execute(); + $closed_tickets_sql->setFetchMode(PDO::FETCH_ASSOC); + $closed_tickets_result = $user_tickets_sql->fetchAll(); + } catch (PDOException $e) { + echo("Error: " . $e->getMessage()); + } + + } +?> + + + + +
+ +
+
+

Open requests

+

+ Here you can find all of your requests, and other requests that you are subscribed to. +

+
+
+ + +
+
+
+ My Open Requests +
+
    + No open tickets"); + } else { + foreach($user_tickets_result as $tkt) { + ?> +
  • +
    +
    +
    + # +

    +
    + +
    +
    +
  • + +
+
+
+ + +
+
+
+ My Closed Requests +
+
    + No closed tickets"); + } else { + foreach($closed_tickets_result as $tkt) { + ?> +
  • +
    +
    +
    + # +

    +
    + +
    +
    +
  • + +
+
+
+ +
+ + diff --git a/app/public/open.php b/app/public/open.php deleted file mode 100644 index 84f4c86..0000000 --- a/app/public/open.php +++ /dev/null @@ -1,33 +0,0 @@ - - - - - -
- -
-
-

Open requests

-

- Here you can find all of your requests, and other requests that you are subscribed to. -

-
-
- -
-

This page is currently under construction.

-
- -
- -