-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathusercp.php
34 lines (26 loc) · 1010 Bytes
/
usercp.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
require_once("global.php");
$template->Header();
$core->Output("<div id=\"box\" class=\"box\">", 3);
$template->Menu();
if($user->LoggedOn()) {
$core->Output("<div id=\"box_content\"><h1>User Control Panel</h1>");
$file_result = $db->executeQuery("SELECT * FROM files WHERE user_id = " . $user->Data("id") . " ORDER BY id DESC LIMIT 10");
if($db->numRows($file_result) > 0) {
$core->Output("<div id=\"small_box\"><p><b>Latest 10 uploads</b><br /><br />");
while($file = $db->executeFetch($file_result)) {
$core->Output("<a href=\"" . HOST . CORE_ROOT . $file['location'] . "\">{$file['original_name']}</a><br />");
}
$core->Output("</p></div>");
} else {
$core->Output("<div id=\"small_box\">");
$core->Output("<p><b>You haven't uploaded any files yet!</b></p>");
$core->Output("</div>");
}
$core->Output("</div>");
} else {
Header("Location: " . HOST . CORE_ROOT . "index.php");
}
$core->Output("</div>", 3);
$template->Footer();
?>