Merge branch 'bug/issue-52' of github.com:luketainton/FHeD into bug/issue-52
This commit is contained in:
@@ -24,6 +24,16 @@
|
|||||||
return $ticket_result;
|
return $ticket_result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function get_my_open_requests($db) {
|
||||||
|
$ticket_stmt = "SELECT * FROM tickets WHERE created_by=:uuid AND status = 'Closed'";
|
||||||
|
$ticket_sql = $db->prepare($ticket_stmt);
|
||||||
|
$ticket_sql->bindParam(':uuid', $_SESSION['uuid']);
|
||||||
|
$ticket_sql->execute();
|
||||||
|
$ticket_sql->setFetchMode(PDO::FETCH_ASSOC);
|
||||||
|
$ticket_result = $ticket_sql->fetchAll();
|
||||||
|
return $ticket_result;
|
||||||
|
}
|
||||||
|
|
||||||
function get_subscribed_requests($db) {
|
function get_subscribed_requests($db) {
|
||||||
$requests = array();
|
$requests = array();
|
||||||
$sub_tickets_stmt = "SELECT ticket_uuid FROM ticket_subscribers WHERE user_uuid=:uuid";
|
$sub_tickets_stmt = "SELECT ticket_uuid FROM ticket_subscribers WHERE user_uuid=:uuid";
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
<section>
|
<section>
|
||||||
<div class="card mx-auto" style="width: 80%;margin-bottom: 50px;">
|
<div class="card mx-auto" style="width: 80%;margin-bottom: 50px;">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<span class="mdi mdi-ticket-outline"></span> My Open Requests
|
<span class="mdi mdi-ticket-outline"></span> My Requests
|
||||||
</div>
|
</div>
|
||||||
<ul class="list-group list-group-flush">
|
<ul class="list-group list-group-flush">
|
||||||
<?php
|
<?php
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
require_once __DIR__ . "/../includes/header.php";
|
require_once __DIR__ . "/../includes/header.php";
|
||||||
|
|
||||||
if (is_signed_in()) {
|
if (is_signed_in()) {
|
||||||
$requests = get_my_requests($db);
|
$requests = get_my_open_requests($db);
|
||||||
$subscriptions = get_subscribed_requests($db);
|
$subscriptions = get_subscribed_requests($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user