forked from TheGamesDB/TheGamesDB
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tab_artistbannersadmin.php
75 lines (72 loc) · 2.8 KB
/
tab_artistbannersadmin.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?php
if ($adminuserlevel == 'ADMINISTRATOR') {
## Get this user's information
$id = mysql_real_escape_string($id);
$query = "SELECT * FROM users WHERE id=$id";
$result = mysql_query($query) or die('Query failed: ' . mysql_error());
$db = mysql_fetch_object($result);
?>
<div class="section">
<h1>100 Most Recent Series Banners by <?=$db->username?></h1>
<div style="text-align: center">
<?php ## Display all banners by this user
$bannercount = 0;
$query = "SELECT * FROM banners WHERE keytype='series' AND userid=$id ORDER BY dateadded DESC LIMIT 100";
$result = mysql_query($query) or die('Query failed: ' . mysql_error());
while ($banner = mysql_fetch_object($result)) {
print "<a href=\"/?tab=series&id=$banner->keyvalue\"><img src=\"/banners/$banner->filename\" class=\"banner\" border=\"0\"></a><br>\n";
print "<div id=\"bannerauthor\">You can <a href=\"$fullurl&function=Delete+Banner&bannerid=$banner->id\">delete it</a>.</div><br>\n";
$bannercount++;
}
if ($bannercount == 0) {
print "There are no series banners by this user\n";
}
?>
</div>
</div>
<div class="section">
<h1>100 Most Recent Season Banners by <?=$db->username?></h1>
<div style="text-align: center">
<?php ## Display all banners by this user
$bannercount = 0;
$query = "SELECT * FROM banners WHERE keytype='season' AND userid=$id ORDER BY dateadded DESC LIMIT 100";
$result = mysql_query($query) or die('Query failed: ' . mysql_error());
while ($banner = mysql_fetch_object($result)) {
print "<a href=\"/?tab=series&id=$banner->keyvalue\"><img src=\"/banners/$banner->filename\" class=\"banner\" border=\"0\"></a><br>\n";
print "<div id=\"bannerauthor\">You can <a href=\"$fullurl&function=Delete+Banner&bannerid=$banner->id\">delete it</a>.</div><br>\n";
$bannercount++;
}
if ($bannercount == 0) {
print "There are no season banners by this user\n";
}
?>
</div>
</div>
<div class="section">
<h1>100 Most Recent Wide Season Banners by <?=$db->username?></h1>
<div style="text-align: center">
<?php ## Display all banners by this user
$bannercount = 0;
$query = "SELECT * FROM banners WHERE keytype='seasonwide' AND userid=$id ORDER BY dateadded DESC LIMIT 100";
$result = mysql_query($query) or die('Query failed: ' . mysql_error());
while ($banner = mysql_fetch_object($result)) {
print "<a href=\"/?tab=series&id=$banner->keyvalue\"><img src=\"/banners/$banner->filename\" class=\"banner\" border=\"0\"></a><br>\n";
print "<div id=\"bannerauthor\">You can <a href=\"$fullurl&function=Delete+Banner&bannerid=$banner->id\">delete it</a>.</div><br>\n";
$bannercount++;
}
if ($bannercount == 0) {
print "There are no season banners by this user\n";
}
?>
</div>
</div>
<?php
} //
else {
?>
<div class="section">
<h1>Administrators Only</h1>
</div>
<?php
}
?>