forked from bluethrust/cs4
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmedals.php
More file actions
91 lines (64 loc) · 1.97 KB
/
medals.php
File metadata and controls
91 lines (64 loc) · 1.97 KB
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<?php
/*
* Bluethrust Clan Scripts v4
* Copyright 2014
*
* Author: Bluethrust Web Development
* E-mail: support@bluethrust.com
* Website: http://www.bluethrust.com
*
* License: http://www.bluethrust.com/license.php
*
*/
// Config File
$prevFolder = "";
include($prevFolder."_setup.php");
include($prevFolder."classes/member.php");
include_once($prevFolder."classes/medal.php");
// Classes needed for index.php
$ipbanObj = new Basic($mysqli, "ipban", "ipaddress");
if($ipbanObj->select($IP_ADDRESS, false)) {
$ipbanInfo = $ipbanObj->get_info();
if(time() < $ipbanInfo['exptime'] OR $ipbanInfo['exptime'] == 0) {
die("<script type='text/javascript'>window.location = '".$MAIN_ROOT."banned.php';</script>");
}
else {
$ipbanObj->delete();
}
}
// Start Page
$PAGE_NAME = "Medals - ";
include($prevFolder."themes/".$THEME."/_header.php");
$member = new Member($mysqli);
$medalObj = new Medal($mysqli);
$breadcrumbObj->setTitle("Medals");
$breadcrumbObj->addCrumb("Home", $MAIN_ROOT);
$breadcrumbObj->addCrumb("Medals");
include($prevFolder."include/breadcrumb.php");
?>
<table class='formTable' style='width: 75%; margin-left: auto; margin-right: auto'>
<tr>
<td class='formTitle' style='width: 40%'>Medal:</td>
<td class='formTitle' style='width: 60%'>Description:</td>
</tr>
<?php
$result = $mysqli->query("SELECT medal_id FROM ".$dbprefix."medals ORDER BY ordernum DESC");
while($row = $result->fetch_assoc()) {
$medalObj->select($row['medal_id']);
$medalObj->refreshImageSize();
$medalInfo = $medalObj->get_info_filtered();
echo "
<tr>
<td class='main' align='center' valign='top'>
<img src='".$medalInfo['imageurl']."' width='".$medalInfo['imagewidth']."' height='".$medalInfo['imageheight']."'>
</td>
<td class='main' valign='top'>
<b>".$medalInfo['name']."</b><br>
".nl2br($medalInfo['description'])."
</td>
</tr>
<tr><td colspan='2'><br></td></tr>
";
}
echo "</table>";
include($prevFolder."themes/".$THEME."/_footer.php"); ?>