[WIP] Subscription management (#63)

* Basic UI

@luketainton please edit lines 120-140 on the editsub and managesub files

*  Add subscription management

Signed-off-by: Luke Tainton <luke@tainton.uk>

*  Add subscription management

Signed-off-by: Luke Tainton <luke@tainton.uk>

* 🐛 Fix incorrect POST variable and add foreach()

Signed-off-by: Luke Tainton <luke@tainton.uk>

* 🎨 Fix file names and add link on view.php

Signed-off-by: Luke Tainton <luke@tainton.uk>

Co-authored-by: Alexander Davis <alex@adcm.uk>
This commit was merged in pull request #63.
This commit is contained in:
2020-08-10 16:12:57 +01:00
committed by GitHub
parent b89cf56ce9
commit cf61b081c0
6 changed files with 391 additions and 2 deletions

View File

@@ -1,4 +1,17 @@
<?php
function get_all_users($db) {
try {
$stmt = "SELECT * FROM users";
$sql = $db->prepare($stmt);
$sql->execute();
$sql->setFetchMode(PDO::FETCH_ASSOC);
$result = $sql->fetchAll();
} catch (PDOException $e) {
echo("Error: " . $e->getMessage());
}
return $result;
}
function get_user_name($db, $user_uuid) {
try {
$stmt = "SELECT given_name, family_name FROM users WHERE uuid=:uuid";