+
+ +
+diff --git a/app/public/index.php b/app/public/index.php index 461defe..89b1008 100644 --- a/app/public/index.php +++ b/app/public/index.php @@ -30,6 +30,36 @@ $user_tickets_sub = 0; // Force 'no subbed tickets' msg until the code works } + + function get_sub_ticket($db, $ticket_uuid) { + try { + $stmt = "SELECT * FROM tickets WHERE uuid=:uuid"; + $sql = $db->prepare($stmt); + $sql->bindParam(':uuid', $ticket_uuid); + $sql->execute(); + $sql->setFetchMode(PDO::FETCH_ASSOC); + $result = $sql->fetchAll(); + $tkt = $result[0]; + } catch (PDOException $e) { + echo("Error: " . $e->getMessage()); + } + return $tkt; + } + + function get_user_name($db, $user_uuid) { + try { + $stmt = "SELECT given_name, family_name FROM users WHERE uuid=:uuid"; + $sql = $db->prepare($stmt); + $sql->bindParam(':uuid', $user_uuid); + $sql->execute(); + $sql->setFetchMode(PDO::FETCH_ASSOC); + $result = $sql->fetchAll(); + $usr = $result[0]['given_name'] . " " . $result[0]['family_name']; + } catch (PDOException $e) { + echo("Error: " . $e->getMessage()); + } + return $usr; + } ?> @@ -99,17 +129,19 @@
+
+ +
+