Use a layout for the dashboard
This commit is contained in:
1 parent
ec0391a150
commit
ed2d5d0b13
9 files changed
+168
-322
No files matched your search
@@ -23,53 +23,20 @@ $stmt->bind_result($uid, $username, $email, $api_key, $discord_id, $role, $avata
|
||||
$stmt->fetch();
|
||||
$stmt->close();
|
||||
|
||||
$conn->close();
|
||||
|
||||
checkDiscordLink($discord_id);
|
||||
|
||||
$role_format = $role == 1 ? "Owner" : ($role == 2 ? "Admin" : ($role == 0 ? "User" : "Unknown"));
|
||||
|
||||
ob_start();
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Xytriza's Uploading Service - Account Management</title>
|
||||
<link rel="icon" href="/assets/logo.png" type="image/png">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Lexend:wght@400&display=swap">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
|
||||
<link rel="stylesheet" href="/dashboard/assets/main.css?v=<?php echo filemtime('/var/www/xus/webroot/dashboard/assets/main.css'); ?>">
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
||||
<script src="/dashboard/assets/main.js?v=<?php echo filemtime('/var/www/xus/webroot/dashboard/assets/main.js'); ?>"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="sidebar">
|
||||
<a href="/" class="logo"><img class="sidebar-item" src="/assets/logo.png" alt="Xytriza's Uploading Service" height="40vw" width="40vw"></a>
|
||||
<a href="/dashboard/"><i class="fas fa-home sidebar-item"></i></a>
|
||||
<a href="/dashboard/gallery.php"><i class="fas fa-file-alt sidebar-item" style="margin-left: 20%;"></i></a>
|
||||
<a href="/dashboard/upload.php"><i class="fas fa-upload sidebar-item"></i></a>
|
||||
<a href="/dashboard/settings.php"><i class="fas fa-cog sidebar-item"></i></a>
|
||||
<a href="/dashboard/account.php" style="margin-top: auto;"><i class="fas fa-user-cog sidebar-item"></i></a>
|
||||
<?php
|
||||
if ($role === 1 || $role === 2) {
|
||||
echo '<a href="/dashboard/admin" class="sidebar-item"><i class="fas fa-user-shield"></i></a>';
|
||||
}
|
||||
?>
|
||||
<a href="javascript:logout()"><i class="fas fa-sign-out-alt sidebar-item"></i></a>
|
||||
</div>
|
||||
|
||||
<div id="notification-container"></div>
|
||||
|
||||
<div id="container" style="max-width: 48%;">
|
||||
<div id="container" style="max-width: 48%;">
|
||||
<div id="account-information" class="section">
|
||||
<h2>Account Information</h2>
|
||||
<p id="username"><strong>Username:</strong> <?php echo $username;?></p>
|
||||
<p><strong>UID:</strong> <?php echo $uid;?></p>
|
||||
<p><strong>Discord ID:</strong> <?php echo $discord_id;?></p>
|
||||
<p><strong>Email:</strong> <em class="blur-on-hover"><?php echo $email;?></em></p>
|
||||
<p><strong>Role:</strong> <?php echo $role_format;?></p>
|
||||
<p id="username"><strong>Username:</strong> <?php echo $username; ?></p>
|
||||
<p><strong>UID:</strong> <?php echo $uid; ?></p>
|
||||
<p><strong>Discord ID:</strong> <?php echo $discord_id; ?></p>
|
||||
<p><strong>Email:</strong> <em class="blur-on-hover"><?php echo $email; ?></em></p>
|
||||
<p><strong>Role:</strong> <?php echo $role_format; ?></p>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
@@ -86,7 +53,7 @@ $role_format = $role == 1 ? "Owner" : ($role == 2 ? "Admin" : ($role == 0 ? "Use
|
||||
<input type="password" id="oldPassword" placeholder="Old Password">
|
||||
<input type="password" id="newPassword" placeholder="New Password">
|
||||
<input type="password" id="confirmPassword" placeholder="Confirm New Password">
|
||||
<input type="hidden" id="username" value="<?php echo $username;?>">
|
||||
<input type="hidden" id="username" value="<?php echo $username; ?>">
|
||||
<button type="submit">Change Password</button>
|
||||
</form>
|
||||
</div>
|
||||
@@ -110,7 +77,9 @@ $role_format = $role == 1 ? "Owner" : ($role == 2 ? "Admin" : ($role == 0 ? "Use
|
||||
<button onclick="generateAPIKey();">Generate new API Key</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</div>
|
||||
<?php
|
||||
$content = ob_get_clean();
|
||||
$title = 'Account Management';
|
||||
include 'layout.php';
|
||||
?>
|
||||
@@ -84,70 +84,33 @@ $result = $conn->query($sql);
|
||||
$row = $result->fetch_assoc();
|
||||
$uploads = $row['COUNT(*)'];
|
||||
|
||||
$conn->close();
|
||||
|
||||
$size = formatUnitSize($totalSize);
|
||||
|
||||
ob_start();
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Xytriza's Uploading Service - Dashboard</title>
|
||||
<link rel="icon" href="/assets/logo.png" type="image/png">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Lexend:wght@400&display=swap">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
|
||||
<link rel="stylesheet" href="/dashboard/assets/main.css?v=<?php echo filemtime('/var/www/xus/webroot/dashboard/assets/main.css'); ?>">
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
||||
<script src="/dashboard/assets/main.js?v=<?php echo filemtime('/var/www/xus/webroot/dashboard/assets/main.js'); ?>"></script>
|
||||
<style>
|
||||
textarea {
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="sidebar">
|
||||
<a href="/" class="logo"><img class="sidebar-item" src="/assets/logo.png" alt="Xytriza's Uploading Service" height="40vw" width="40vw"></a>
|
||||
<a href="/dashboard/"><i class="fas fa-home sidebar-item"></i></a>
|
||||
<a href="/dashboard/gallery.php"><i class="fas fa-file-alt sidebar-item" style="margin-left: 20%;"></i></a>
|
||||
<a href="/dashboard/upload.php"><i class="fas fa-upload sidebar-item"></i></a>
|
||||
<a href="/dashboard/settings.php"><i class="fas fa-cog sidebar-item"></i></a>
|
||||
<a href="/dashboard/account.php" style="margin-top: auto;"><i class="fas fa-user-cog sidebar-item"></i></a>
|
||||
<?php
|
||||
if ($role === 1 || $role === 2) {
|
||||
echo '<a href="/dashboard/admin" class="sidebar-item"><i class="fas fa-user-shield"></i></a>';
|
||||
}
|
||||
?>
|
||||
<a href="javascript:logout()"><i class="fas fa-sign-out-alt sidebar-item"></i></a>
|
||||
</div>
|
||||
|
||||
<div id="notification-container"></div>
|
||||
|
||||
<div id="container">
|
||||
<div id="container">
|
||||
<div class="info-group">
|
||||
<div class="info-box">
|
||||
<p class="big"><strong>Total Storage Used</strong></p>
|
||||
<p><?php echo $size;?></p>
|
||||
<p><?php echo $size; ?></p>
|
||||
</div>
|
||||
<div class="info-box">
|
||||
<p class="big"><strong>Total Uploads</strong></p>
|
||||
<p><?php echo $uploads;?></p>
|
||||
<p><?php echo $uploads; ?></p>
|
||||
</div>
|
||||
<div class="info-box">
|
||||
<p class="big"><strong>Total Users</strong></p>
|
||||
<p><?php echo $users;?></p>
|
||||
<p><?php echo $users; ?></p>
|
||||
</div>
|
||||
<div class="info-box">
|
||||
<p class="big"><strong>Total Logins</strong></p>
|
||||
<p><?php echo $logins;?></p>
|
||||
<p><?php echo $logins; ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<p>Dynamic placeholders like %discord% (Discord link), %username% (user's name), %uploads% (user's upload count), %role% (user's role), %uid% (user ID), %storage% (user's storage usage), and date details (%year%, %month%, %monthformat%, %day%, %dayformat%, %date%) are automatically replaced with specific user or system information for personalized messages.</p>
|
||||
<p>Dynamic placeholders like %discord% (Discord link), %username% (user's name), %uploads% (user's upload count),
|
||||
%role% (user's role), %uid% (user ID), %storage% (user's storage usage), and date details (%year%, %month%,
|
||||
%monthformat%, %day%, %dayformat%, %date%) are automatically replaced with specific user or system information
|
||||
for personalized messages.</p>
|
||||
<form method="POST">
|
||||
<p>News</p>
|
||||
<textarea name="news"><?php echo $news; ?></textarea>
|
||||
@@ -155,6 +118,9 @@ $size = formatUnitSize($totalSize);
|
||||
<textarea name="motd"><?php echo $motd; ?></textarea>
|
||||
<button type="submit">Update</button>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</div>
|
||||
<?php
|
||||
$content = ob_get_clean();
|
||||
$title = 'Admin Settings';
|
||||
include __DIR__ . '/../layout.php'; //this is the only way it wanted to work?
|
||||
?>
|
||||
@@ -233,6 +233,7 @@ body.tint::before {
|
||||
.sidebar-item {
|
||||
margin-bottom: 1.56vw;
|
||||
font-size: 1.56vw;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#upload {
|
||||
|
||||
@@ -13,6 +13,7 @@ if (!checkUserSession($conn)) {
|
||||
header('Location: /dashboard/login.php');
|
||||
die();
|
||||
}
|
||||
$checkedSession = true;
|
||||
|
||||
$session = htmlspecialchars($_COOKIE['session']);
|
||||
|
||||
@@ -29,42 +30,9 @@ $sql = "SELECT id, delete_key, size, original_name, filetype, password FROM uplo
|
||||
$result = $conn->query($sql);
|
||||
$row = $result->fetch_assoc();
|
||||
|
||||
$conn->close();
|
||||
ob_start();
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Xytriza's Uploading Service - Gallery</title>
|
||||
<link rel="icon" href="/assets/logo.png" type="image/png">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Lexend:wght@400&display=swap">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
|
||||
<link rel="stylesheet" href="/dashboard/assets/main.css?v=<?php echo filemtime('/var/www/xus/webroot/dashboard/assets/main.css'); ?>">
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
||||
<script src="/dashboard/assets/main.js?v=<?php echo filemtime('/var/www/xus/webroot/dashboard/assets/main.js'); ?>"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="sidebar">
|
||||
<a href="/" class="logo"><img class="sidebar-item" src="/assets/logo.png" alt="Xytriza's Uploading Service" height="40vw" width="40vw"></a>
|
||||
<a href="/dashboard/"><i class="fas fa-home sidebar-item"></i></a>
|
||||
<a href="/dashboard/gallery.php"><i class="fas fa-file-alt sidebar-item" style="margin-left: 20%;"></i></a>
|
||||
<a href="/dashboard/upload.php"><i class="fas fa-upload sidebar-item"></i></a>
|
||||
<a href="/dashboard/settings.php"><i class="fas fa-cog sidebar-item"></i></a>
|
||||
<a href="/dashboard/account.php" style="margin-top: auto;"><i class="fas fa-user-cog sidebar-item"></i></a>
|
||||
<?php
|
||||
if ($role === 1 || $role === 2) {
|
||||
echo '<a href="/dashboard/admin" class="sidebar-item"><i class="fas fa-user-shield"></i></a>';
|
||||
}
|
||||
?>
|
||||
<a href="javascript:logout()"><i class="fas fa-sign-out-alt sidebar-item"></i></a>
|
||||
</div>
|
||||
|
||||
<div id="notification-container"></div>
|
||||
|
||||
<div id="main-content">
|
||||
<div id="main-content">
|
||||
<div id="gallery">
|
||||
<?php
|
||||
if ($result->num_rows > 0) {
|
||||
@@ -107,13 +75,16 @@ $conn->close();
|
||||
echo '</div>';
|
||||
$row = $result->fetch_assoc();
|
||||
} while ($row);
|
||||
} else {
|
||||
echo '<h1 style="text-align: center; margin-top: 10%;">No files uploaded!</h1>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h1 id="loading">Loading files... <a href="javascript:skipload();" style="color: #fff; text-decoration: underline;">Show anyway</a></h1>
|
||||
<div id="file-settings" style="position: fixed; z-index: 99999; display: none; top: 50%; left: 50%; transform: translate(-50%, -50%);">
|
||||
<h1 id="loading">Loading files...</h1>
|
||||
<div id="file-settings"
|
||||
style="position: fixed; z-index: 99999; display: none; top: 50%; left: 50%; transform: translate(-50%, -50%);">
|
||||
<div id="file-settings-container">
|
||||
<div id="file-settings-content">
|
||||
<h1 style="text-align: center; margin-bottom: 5px;">File Settings</h1>
|
||||
@@ -127,19 +98,16 @@ $conn->close();
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function skipload() {
|
||||
document.getElementById("loading").style.display = "none";
|
||||
document.getElementById("gallery").style.display = "flex";
|
||||
}
|
||||
|
||||
window.onload = function() {
|
||||
<script>
|
||||
window.onload = function () {
|
||||
document.getElementById("loading").style.display = "none";
|
||||
document.getElementById("gallery").style.display = "flex";
|
||||
};
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</script>
|
||||
<?php
|
||||
$content = ob_get_clean();
|
||||
$title = 'Gallery';
|
||||
include 'layout.php';
|
||||
?>
|
||||
+17
-46
@@ -13,6 +13,7 @@ if (!checkUserSession($conn)) {
|
||||
header('Location: /dashboard/login.php');
|
||||
die();
|
||||
}
|
||||
$checkedSession = true;
|
||||
|
||||
$session = htmlspecialchars($_COOKIE['session']);
|
||||
|
||||
@@ -106,8 +107,6 @@ if ($result->num_rows > 0) {
|
||||
}
|
||||
}
|
||||
|
||||
$conn->close();
|
||||
|
||||
$size = formatUnitSize($totalSize);
|
||||
|
||||
$uploadStatsData = json_encode(array_reverse(array_values($uploadsByDay)));
|
||||
@@ -156,65 +155,34 @@ $news = str_ireplace('%dateformat%', date('F jS, Y'), $news);
|
||||
|
||||
$motd = str_ireplace('%storage%', $size, $motd);
|
||||
$news = str_ireplace('%storage%', $size, $news);
|
||||
|
||||
ob_start();
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Xytriza's Uploading Service - Dashboard</title>
|
||||
<link rel="icon" href="/assets/logo.png" type="image/png">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Lexend:wght@400&display=swap">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
|
||||
<link rel="stylesheet" href="/dashboard/assets/main.css?v=<?php echo filemtime('/var/www/xus/webroot/dashboard/assets/main.css'); ?>">
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
||||
<script src="/dashboard/assets/main.js?v=<?php echo filemtime('/var/www/xus/webroot/dashboard/assets/main.js'); ?>"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="sidebar">
|
||||
<a href="/" class="logo"><img class="sidebar-item" src="/assets/logo.png" alt="Xytriza's Uploading Service" height="40vw" width="40vw"></a>
|
||||
<a href="/dashboard/"><i class="fas fa-home sidebar-item"></i></a>
|
||||
<a href="/dashboard/gallery.php"><i class="fas fa-file-alt sidebar-item" style="margin-left: 20%;"></i></a>
|
||||
<a href="/dashboard/upload.php"><i class="fas fa-upload sidebar-item"></i></a>
|
||||
<a href="/dashboard/settings.php"><i class="fas fa-cog sidebar-item"></i></a>
|
||||
<a href="/dashboard/account.php" style="margin-top: auto;"><i class="fas fa-user-cog sidebar-item"></i></a>
|
||||
<?php
|
||||
if ($role === 1 || $role === 2) {
|
||||
echo '<a href="/dashboard/admin" class="sidebar-item"><i class="fas fa-user-shield"></i></a>';
|
||||
}
|
||||
?>
|
||||
<a href="javascript:logout()"><i class="fas fa-sign-out-alt sidebar-item"></i></a>
|
||||
</div>
|
||||
|
||||
<div id="notification-container"></div>
|
||||
|
||||
<div id="container">
|
||||
<div id="container">
|
||||
<div class="info-group">
|
||||
<h1 style="font-weight: bold;">Hello, <?php echo $username; ?> 👋</h1>
|
||||
|
||||
<div class="info-box">
|
||||
<p class="big"><strong>Storage Used</strong></p>
|
||||
<p><?php echo $size;?>/2.5 GB</p>
|
||||
<p><?php echo $size; ?>/2.5 GB</p>
|
||||
</div>
|
||||
<div class="info-box">
|
||||
<p class="big"><strong>Uploads</strong></p>
|
||||
<p><?php echo $uploadCount;?></p>
|
||||
<p><?php echo $uploadCount; ?></p>
|
||||
</div>
|
||||
<div class="info-box">
|
||||
<p class="big"><strong>User ID</strong></p>
|
||||
<p><?php echo $uid;?></p>
|
||||
<p><?php echo $uid; ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="info-box" style="display: inline-block; width: 100%; min-height: 20vh;">
|
||||
<p class="big"><strong>Recent News</strong></p>
|
||||
<p><?php echo $news;?></p>
|
||||
<p><?php echo $news; ?></p>
|
||||
</div>
|
||||
<div class="info-box" style="display: inline-block; width: 100%; min-height: 20vh;">
|
||||
<p class="big"><strong>MOTD</strong></p>
|
||||
<p><?php echo $motd;?></p>
|
||||
<p><?php echo $motd; ?></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -228,9 +196,9 @@ $news = str_ireplace('%storage%', $size, $news);
|
||||
<canvas id="loginStats"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<script>
|
||||
const formattedLabels = formatAllDates(<?php echo $uploadStatsLabels; ?>);
|
||||
|
||||
const uploadStatsData = {
|
||||
@@ -364,6 +332,9 @@ $news = str_ireplace('%storage%', $size, $news);
|
||||
new Chart(uploadStatsCanvas, uploadStatsConfig);
|
||||
const loginStatsCanvas = document.getElementById('loginStats').getContext('2d');
|
||||
new Chart(loginStatsCanvas, loginStatsConfig);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
</script>
|
||||
<?php
|
||||
$content = ob_get_clean();
|
||||
$title = 'Dashboard';
|
||||
include 'layout.php';
|
||||
?>
|
||||
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
if (!isset($dbservername)) include '../config/config.php';
|
||||
if (!function_exists("checkUserSession")) include '../incl/main.php';
|
||||
|
||||
if (!isset($conn)) {
|
||||
$conn = new mysqli($dbservername, $dbusername, $dbpassword, $dbname);
|
||||
|
||||
if ($conn->connect_error) {
|
||||
die('Unable to access the database, please try again later');
|
||||
}
|
||||
}
|
||||
|
||||
if (!isset($checkedSession)) {
|
||||
if (!checkUserSession($conn)) {
|
||||
setcookie('session', '', time(), "/", "", true, true);
|
||||
header('Location: /dashboard/login.php');
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
||||
if (!isset($session)) $session = htmlspecialchars($_COOKIE['session']);
|
||||
|
||||
if (isset($role)) {
|
||||
$stmt = $conn->prepare("SELECT role FROM users WHERE session = ?");
|
||||
$stmt->bind_param("s", $session);
|
||||
$stmt->execute();
|
||||
$stmt->bind_result($role);
|
||||
$stmt->fetch();
|
||||
$stmt->close();
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Xytriza's Uploading Service - <?= $title ?></title>
|
||||
<link rel="icon" href="/assets/logo.png" type="image/png">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Lexend:wght@400&display=swap">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
|
||||
<link rel="stylesheet" href="/dashboard/assets/main.css?v=<?php echo filemtime(__DIR__ . '/assets/main.css'); ?>">
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
||||
<script src="/dashboard/assets/main.js?v=<?php echo filemtime(__DIR__ . '/assets/main.js'); ?>"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="sidebar">
|
||||
<a href="/" class="logo"><img class="sidebar-item" src="/assets/logo.png" alt="Xytriza's Uploading Service" height="40vw" width="40vw"></a>
|
||||
<a href="/dashboard/"><i class="fas fa-home sidebar-item"></i></a>
|
||||
<a href="/dashboard/gallery.php"><i class="fas fa-file-alt sidebar-item" style="margin-left: 20%;"></i></a>
|
||||
<a href="/dashboard/upload.php"><i class="fas fa-upload sidebar-item"></i></a>
|
||||
<a href="/dashboard/settings.php"><i class="fas fa-cog sidebar-item"></i></a>
|
||||
<a href="/dashboard/account.php" style="margin-top: auto;"><i class="fas fa-user-cog sidebar-item"></i></a>
|
||||
<?php
|
||||
if ($role === 1 || $role === 2) {
|
||||
echo '<a href="/dashboard/admin" class="sidebar-item"><i class="fas fa-user-shield"></i></a>';
|
||||
}
|
||||
?>
|
||||
<i onclick="logout()" class="fas fa-sign-out-alt sidebar-item"></i>
|
||||
</div>
|
||||
<div id="notification-container"></div>
|
||||
<?= $content ?>
|
||||
</body>
|
||||
</html>
|
||||
@@ -13,6 +13,7 @@ if (!checkUserSession($conn)) {
|
||||
header('Location: /dashboard/login.php');
|
||||
die();
|
||||
}
|
||||
$checkedSession = true;
|
||||
|
||||
$session = htmlspecialchars($_COOKIE['session']);
|
||||
|
||||
@@ -25,43 +26,9 @@ $stmt->close();
|
||||
|
||||
checkDiscordLink($discord_id);
|
||||
|
||||
$conn->close();
|
||||
|
||||
ob_start();
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Xytriza's Uploading Service - Account Management</title>
|
||||
<link rel="icon" href="/assets/logo.png" type="image/png">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Lexend:wght@400&display=swap">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
|
||||
<link rel="stylesheet" href="/dashboard/assets/main.css?v=<?php echo filemtime('/var/www/xus/webroot/dashboard/assets/main.css'); ?>">
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
||||
<script src="/dashboard/assets/main.js?v=<?php echo filemtime('/var/www/xus/webroot/dashboard/assets/main.js'); ?>"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="sidebar">
|
||||
<a href="/" class="logo"><img class="sidebar-item" src="/assets/logo.png" alt="Xytriza's Uploading Service" height="40vw" width="40vw"></a>
|
||||
<a href="/dashboard/"><i class="fas fa-home sidebar-item"></i></a>
|
||||
<a href="/dashboard/gallery.php"><i class="fas fa-file-alt sidebar-item" style="margin-left: 20%;"></i></a>
|
||||
<a href="/dashboard/upload.php"><i class="fas fa-upload sidebar-item"></i></a>
|
||||
<a href="/dashboard/settings.php"><i class="fas fa-cog sidebar-item"></i></a>
|
||||
<a href="/dashboard/account.php" style="margin-top: auto;"><i class="fas fa-user-cog sidebar-item"></i></a>
|
||||
<?php
|
||||
if ($role === 1 || $role === 2) {
|
||||
echo '<a href="/dashboard/admin" class="sidebar-item"><i class="fas fa-user-shield"></i></a>';
|
||||
}
|
||||
?>
|
||||
<a href="javascript:logout()"><i class="fas fa-sign-out-alt sidebar-item"></i></a>
|
||||
</div>
|
||||
|
||||
<div id="notification-container"></div>
|
||||
|
||||
<div id="container">
|
||||
<div id="container">
|
||||
<h1>Upload Tools</h1>
|
||||
<div class="upload-tools">
|
||||
<div class="tool-box">
|
||||
@@ -96,9 +63,9 @@ $conn->close();
|
||||
</div>
|
||||
</div>
|
||||
<button onclick="downloadConfig()" style="margin-top: 8px;">Download ShareX Config</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="container">
|
||||
<div id="container">
|
||||
<h1>Time Settings</h1>
|
||||
<div class="settings-group">
|
||||
<label for="country" style="color: #fff;">Country:</label>
|
||||
@@ -167,8 +134,10 @@ $conn->close();
|
||||
</div>
|
||||
|
||||
<button onclick="saveTimeSettings()" style="margin-top: 8px;">Save Settings</button>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
$content = ob_get_clean();
|
||||
$title = 'Settings';
|
||||
include 'layout.php';
|
||||
?>
|
||||
@@ -13,6 +13,7 @@ if (!checkUserSession($conn)) {
|
||||
header('Location: /dashboard/login.php');
|
||||
die();
|
||||
}
|
||||
$checkedSession = true;
|
||||
|
||||
$session = htmlspecialchars($_COOKIE['session']);
|
||||
|
||||
@@ -23,48 +24,14 @@ $stmt->bind_result($api_key, $role, $discord_id);
|
||||
$stmt->fetch();
|
||||
$stmt->close();
|
||||
|
||||
$conn->close();
|
||||
|
||||
checkDiscordLink($discord_id);
|
||||
|
||||
ob_start();
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Xytriza's Uploading Service - Upload Tools</title>
|
||||
<link rel="icon" href="/assets/logo.png" type="image/png">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Lexend:wght@400&display=swap">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
|
||||
<link rel="stylesheet" href="/dashboard/assets/main.css?v=<?php echo filemtime('/var/www/xus/webroot/dashboard/assets/main.css'); ?>">
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
||||
<script src="/dashboard/assets/main.js?v=<?php echo filemtime('/var/www/xus/webroot/dashboard/assets/main.js'); ?>"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="sidebar">
|
||||
<a href="/" class="logo"><img class="sidebar-item" src="/assets/logo.png" alt="Xytriza's Uploading Service" height="40vw" width="40vw"></a>
|
||||
<a href="/dashboard/"><i class="fas fa-home sidebar-item"></i></a>
|
||||
<a href="/dashboard/gallery.php"><i class="fas fa-file-alt sidebar-item" style="margin-left: 20%;"></i></a>
|
||||
<a href="/dashboard/upload.php"><i class="fas fa-upload sidebar-item"></i></a>
|
||||
<a href="/dashboard/settings.php"><i class="fas fa-cog sidebar-item"></i></a>
|
||||
<a href="/dashboard/account.php" style="margin-top: auto;"><i class="fas fa-user-cog sidebar-item"></i></a>
|
||||
<?php
|
||||
if ($role === 1 || $role === 2) {
|
||||
echo '<a href="/dashboard/admin" class="sidebar-item"><i class="fas fa-user-shield"></i></a>';
|
||||
}
|
||||
?>
|
||||
<a href="javascript:logout()"><i class="fas fa-sign-out-alt sidebar-item"></i></a>
|
||||
</div>
|
||||
|
||||
<div id="notification-container"></div>
|
||||
|
||||
<div id="container">
|
||||
<h1>Upload Tools</h1>
|
||||
<?php
|
||||
if (isset($_GET['type'])) {
|
||||
<div id="container">
|
||||
<h1>Upload Tools</h1>
|
||||
<?php
|
||||
if (isset($_GET['type'])) {
|
||||
if ($_GET['type'] === 'windows') {
|
||||
echo '<h3>Windows - Upload Configuration</h3>
|
||||
<p>Download ShareX here: <a href="https://getsharex.com/" style="text-decoration: underline;" target="_blank">https://getsharex.com/</a></p>
|
||||
@@ -79,13 +46,15 @@ checkDiscordLink($discord_id);
|
||||
<p>Paste your API Key then click "Add Shortcut"
|
||||
<p>Optionally add the shortcut to a wiget on your home screen to easily upload files and run the shortcut</p>';
|
||||
} else {
|
||||
echo '<h3>Other Platform support coming soon!</h3>';
|
||||
echo '<h3>This platform will be supported soon!</h3>';
|
||||
}
|
||||
} else {
|
||||
} else {
|
||||
header('Location: /dashboard/settings.php');
|
||||
}
|
||||
echo '<button onclick="window.location.href=\'/dashboard/settings.php\'">Back</button>';
|
||||
?>
|
||||
</body>
|
||||
}
|
||||
echo '<button onclick="window.location.href=\'/dashboard/settings.php\'">Back</button>';
|
||||
echo '</div>';
|
||||
|
||||
</html>
|
||||
$content = ob_get_clean();
|
||||
$title = 'Upload Tools';
|
||||
include 'layout.php';
|
||||
?>
|
||||
@@ -25,43 +25,9 @@ $stmt->close();
|
||||
|
||||
checkDiscordLink($discord_id);
|
||||
|
||||
$conn->close();
|
||||
|
||||
ob_start();
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Xytriza's Uploading Service - Upload a file</title>
|
||||
<link rel="icon" href="/assets/logo.png" type="image/png">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Lexend:wght@400&display=swap">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
|
||||
<link rel="stylesheet" href="/dashboard/assets/main.css?v=<?php echo filemtime('/var/www/xus/webroot/dashboard/assets/main.css'); ?>">
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
||||
<script src="/dashboard/assets/main.js?v=<?php echo filemtime('/var/www/xus/webroot/dashboard/assets/main.js'); ?>"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="sidebar">
|
||||
<a href="/" class="logo"><img class="sidebar-item" src="/assets/logo.png" alt="Xytriza's Uploading Service" height="40vw" width="40vw"></a>
|
||||
<a href="/dashboard/"><i class="fas fa-home sidebar-item"></i></a>
|
||||
<a href="/dashboard/gallery.php"><i class="fas fa-file-alt sidebar-item" style="margin-left: 20%;"></i></a>
|
||||
<a href="/dashboard/upload.php"><i class="fas fa-upload sidebar-item"></i></a>
|
||||
<a href="/dashboard/settings.php"><i class="fas fa-cog sidebar-item"></i></a>
|
||||
<a href="/dashboard/account.php" style="margin-top: auto;"><i class="fas fa-user-cog sidebar-item"></i></a>
|
||||
<?php
|
||||
if ($role === 1 || $role === 2) {
|
||||
echo '<a href="/dashboard/admin" class="sidebar-item"><i class="fas fa-user-shield"></i></a>';
|
||||
}
|
||||
?>
|
||||
<a href="javascript:logout()"><i class="fas fa-sign-out-alt sidebar-item"></i></a>
|
||||
</div>
|
||||
|
||||
<div id="notification-container"></div>
|
||||
|
||||
<div id="upload">
|
||||
<div id="upload">
|
||||
<div id="dropZone">
|
||||
<p>Drag and drop a file here or click to upload</p>
|
||||
</div>
|
||||
@@ -73,7 +39,9 @@ $conn->close();
|
||||
<button onclick="handleUrlUpload()" style="display: block; margin-left: auto; margin-right: auto;">Upload</button>
|
||||
</div>
|
||||
<div id="progressText" class="progressText" style="display: none; font-weight: bold;">0%</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</div>
|
||||
<?php
|
||||
$content = ob_get_clean();
|
||||
$title = 'Upload a file';
|
||||
include 'layout.php';
|
||||
?>
|
||||
Reference in new issue
Block a user