Creation of File list

@luketainton needs to look at line 123 to work out what should be displayed and how to click to download the file.

This should be done in view.php

Creation of get_files script in prereqs.php
This commit is contained in:
2020-08-09 18:20:18 +01:00
committed by Luke Tainton
parent f8a7b72190
commit c39a07b2d3
2 changed files with 39 additions and 12 deletions

View File

@@ -126,6 +126,16 @@ function get_updates($db, $request) {
return $updates_result;
}
function get_files($db, $request) {
$updates_stmt = "SELECT * FROM ticket_uploads WHERE ticket=:uuid";
$updates_sql = $db->prepare($updates_stmt);
$updates_sql->bindParam(':uuid', $request['uuid']);
$updates_sql->execute();
$updates_sql->setFetchMode(PDO::FETCH_ASSOC);
$updates_result = $updates_sql->fetchAll();
return $updates_result;
}
function get_subscribers($db, $request) {
$subs = array();
$users_stmt = "SELECT user_uuid FROM ticket_subscribers WHERE ticket_uuid=:uuid";