-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstaff.php
199 lines (168 loc) · 8.15 KB
/
staff.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
<?php
/**
**************************
** FreeTSP Version: 1.0 **
**************************
** http://www.freetsp.info
** https://github.com/Krypto/FreeTSP
** Licence Info: GPL
** Copyright (C) 2010 FreeTSP v1.0
** A bittorrent tracker source based on TBDev.net/tbsource/bytemonsoon.
** Project Leaders: Krypto, Fireknight.
**/
require_once(dirname(__FILE__).DIRECTORY_SEPARATOR.'functions'.DIRECTORY_SEPARATOR.'function_main.php');
require_once(FUNC_DIR.'function_user.php');
require_once(FUNC_DIR.'function_vfunctions.php');
require_once(FUNC_DIR.'function_bbcode.php');
db_connect();
logged_in();
site_header("Staff", false);
//-- Get Current Datetime --//
$dt = gmtime() - 60;
$dt = sqlesc(get_date_time($dt));
//-- Search User Database For Moderators And Above And Display In Alphabetical Order --//
$res = sql_query("SELECT id, username, class, last_access
FROM users
WHERE class>=".UC_UPLOADER."
ORDER BY username") or sqlerr();
while ($arr = mysql_fetch_assoc($res))
{
$staff_class[$arr['class']] = $staff_class[$arr['class']]."
<tr>
<td class='std' align='center' width='33%'>
<a class='altlink' href='userdetails.php?id=".$arr['id']."'>".$arr['username']."</a>
</td>
<td class='std' align='center' width='33%'> ".("'".$arr['last_access']."'" > $dt ? "
<img src='".$image_dir."online.png' width='32' height='32' border='0' alt='Online' title='Online' />" : "
<img src='".$image_dir."offline.png' width='32' height='32' border='0' alt='Offline' title='Offline' />")."
</td>"."
<td class='std' align='center' width='33%'>
<a href='sendmessage.php?receiver=".$arr['id']."'><input type='submit' class='btn' value='PM' /></a>
</td>
</tr>";
}
$support_msg = ("General Support Questions should be directed to these users first.<br />
Note that they are Volunteers, giving away their time and effort to help you.<br />
Treat them accordingly. (Languages listed are those besides English.)<br /><br />");
?>
<div align='center'>
<span style='text-align:center; font-size: small;'>
Welcome to the Staff Members here at <span style='font-weight:bold;'><?php echo $site_name?>.</span><br />
Please direct your questions to the correct member of Staff.<br />
Any questions that are already covered in the F.A.Q.<br />
Will be Ignored.
</span>
</div>
<div id='featured' align='center'>
<br />
<ul>
<li><a href='#fragment-0'></a></li>
<li><a class='btn' href='#fragment-1'>First Line Support</a></li>
<li><a class='btn' href='#fragment-2'>Uploaders</a></li>
<li><a class='btn' href='#fragment-3'>Moderators</a></li>
<li><a class='btn' href='#fragment-4'>Administrators</a></li>
<li><a class='btn' href='#fragment-5'>Sysop</a></li>
<li><a class='btn' href='#fragment-6'>Manager</a></li>
</ul>
<div class='ui-tabs-panel' id='fragment-1'>
<table class='coltable' width='81%'>
<tr>
<td class='std' align='center' colspan='3'><h2>First Line Of Support</h2><?php echo $support_msg?></td>
</tr>
</table>
<?php
$dt = gmtime() - 60;
$dt = sqlesc(get_date_time($dt));
$firstline = '';
$q = sql_query("SELECT users.id, username, email, last_access, country, status, support, supportfor, countries.flagpic, countries.name, support_lang
FROM users
LEFT JOIN countries ON countries.id = users.country
WHERE support='yes'
AND status='confirmed'
ORDER BY username
LIMIT 20") or sqlerr();
while ($a = mysql_fetch_assoc($q))
{
$country = "<img src='{$image_dir}flag/{$a[flagpic]}' width='32' height='20' border='0' alt='".htmlspecialchars($a[name])."' title='".htmlspecialchars($a[name])."' style='margin-left: 8pt' />";
$firstline .= "<tr>
<td class='rowhead'>
<a class='altlink' href='userdetails.php?id=".$a['id']."'> ".$a['username']."</a>
</td>
<td class='rowhead' align='center'>
".("'".$a['last_access']."'" > $dt ? "
<img src='".$image_dir."online.png' width='32' height='32' border='0' alt='Online' title='Online' />" : "
<img src='".$image_dir."offline.png' width='32' height='32' border='0' alt='Offline' title='Offline' />")."
</td>
<td class='rowhead' align='center'>
<a href='sendmessage.php?receiver=".$a['id']."'>"."<input type='submit' class='btn' value='PM' /></a>
</td>
<td class='rowhead'> ".$a['support_lang']."</td>
<td class='rowhead' align='center'>".$country."</td>
<td class='rowhead'> ".$a['supportfor']."</td>
</tr>";
}
echo("<table cellspacing='0' width='81%'>
<tr>
<td class='colhead' width='30'> <b>Username</b></td>
<td class='colhead' width='5' align='center'><b>Status</b></td>
<td class='colhead' width='5' align='center'><b>Contact</b></td>
<td class='colhead' width='85'> <b>Language</b></td>
<td class='colhead' width='40' align='center'><b>Country</b></td>
<td class='colhead' width='200'> <b>Support for</b></td>
</tr>
".$firstline."
</table>");
?>
</div>
<div class='ui-tabs-panel' id='fragment-2'>
<table class='coltable' width='81%'>
<tr>
<td class='std' align='center' colspan='3'><h2>Uploaders</h2></td>
</tr>
<?php echo $staff_class[UC_UPLOADER]?>
</table>
</div>
<div class='ui-tabs-panel' id='fragment-3'>
<table class='coltable' width='81%'>
<tr>
<td class='std' align='center' colspan='3'><h2>Moderators</h2></td>
</tr>
<?php echo $staff_class[UC_MODERATOR]?>
</table>
</div>
<div class='ui-tabs-panel' id='fragment-4'>
<table class='coltable' width='81%'>
<tr>
<td class='std' align='center' colspan='3'><h2>Admin</h2></td>
</tr>
<?php echo $staff_class[UC_ADMINISTRATOR]?>
</table>
</div>
<div class='ui-tabs-panel' id='fragment-5'>
<table class='coltable' width='81%'>
<tr>
<td class='std' align='center' colspan='3'><h2>Sysop</h2></td>
</tr>
<?php echo $staff_class[UC_SYSOP]?>
</table>
</div>
<div class='ui-tabs-panel' id='fragment-6'>
<table class='coltable' width='81%'>
<tr>
<td class='std' align='center' colspan='3'><h2>Manager</h2></td>
</tr>
<?php echo $staff_class[UC_MANAGER]?>
</table>
</div>
</div>
<script type="text/javascript" src="js/jquery-1.8.2.js" ></script>
<script type="text/javascript" src="js/jquery-ui-1.9.0.custom.min.js" ></script>
<script type="text/javascript">
$(document).ready(function()
{
$("#featured").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 5000, true);
});
</script>
<?php
site_footer();
?>