-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgallery.php
22 lines (19 loc) · 1.24 KB
/
gallery.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php
// Das was wir wirklich brauchen
require "load.php";
// Hier dann alles andere wie SQL-Queries und so
require "lib/PHPCache/refresh.php";
if (!file_exists("cache/{$usertheme}/latest.html") || (file_exists("cache/{$usertheme}/latest.html") && time() - $config["cachetime"] > filemtime("cache/{$usertheme}/latest.html"))) {
$latest = $conn->orderBy("id", "DESC")->where("hidden", false)->get("avatars", $config["default"]["latest"]);
}
if (!file_exists("cache/{$usertheme}/index.html") || (file_exists("cache/{$usertheme}/index.html") && time() - $config["cachetime"] > filemtime("cache/{$usertheme}/index.html"))) {
$examples = $conn->orderBy("RAND ()")->where("hidden", false)->get("avatars", $config["default"]["random"]);
}
if (!file_exists("cache/{$usertheme}/users.html") || (file_exists("cache/{$usertheme}/users.html") && time() - $config["cachetime"] > filemtime("cache/{$usertheme}/users.html"))) {
$users = $conn->orderBy("username", "ASC")->get("user");
}
// Nun bauen wir die Seite nach dem Thema
include "lib/Core/themes/{$usertheme}/part.header.php";
include "lib/Core/themes/{$usertheme}/part.menu.php";
include "lib/Core/themes/{$usertheme}/page.gallery.php";
include "lib/Core/themes/{$usertheme}/part.footer.php";