initial commit

This commit is contained in:
Luke Ogburn
2019-03-30 22:43:34 -04:00
commit c4a666e3b6
78 changed files with 5332 additions and 0 deletions

21
res/toggleDarkTheme.php Normal file
View File

@@ -0,0 +1,21 @@
<?php
require $_SERVER['DOCUMENT_ROOT']."/globalFuncs.php";
if(getUserInfo($current_user)->dark_theme){
$stmt = $conn->prepare("UPDATE users SET dark_theme = 0 WHERE id = :usr");
$stmt->bindParam(":usr", $current_user);
$stmt->execute();
}else{
$stmt = $conn->prepare("UPDATE users SET dark_theme = 1 WHERE id = :usr");
$stmt->bindParam(":usr", $current_user);
$stmt->execute();
}
if($stmt){
msg("Theme updated.");
}else{
msg("Error updating theme.");
}
header("Location: /user/settings.php");
?>