-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathstaff.php
261 lines (238 loc) · 14.3 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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
<?php
require "include/bittorrent.php";
dbconn();
require_once(get_langfile_path());
loggedinorreturn(true);
stdhead($lang_staff['head_staff']);
$Cache->new_page('staff_page', 900, true);
if (!$Cache->get_page()) {
$Cache->add_whole_row();
begin_main_frame();
$secs = 900;
$dt = TIMENOW - $secs;
$onlineimg = "<img class=\"button_online\" src=\"pic/trans.gif\" alt=\"online\" title=\"" . $lang_staff['title_online'] . "\" />";
$offlineimg = "<img class=\"button_offline\" src=\"pic/trans.gif\" alt=\"offline\" title=\"" . $lang_staff['title_offline'] . "\" />";
$sendpmimg = "<img class=\"button_pm\" src=\"pic/trans.gif\" alt=\"pm\" />";
//--------------------- FIRST LINE SUPPORT SECTION ---------------------------//
unset($ppl);
$res = sql_query("SELECT * FROM users WHERE users.support='yes' AND users.status='confirmed' ORDER BY users.username") or sqlerr();
while ($arr = mysql_fetch_assoc($res)) {
$countryrow = get_country_row($arr['country']);
if ($arr['id'] == '10') {
$ppl .= "<tr><td class=embedded><font color='#FF00FF'" . get_username($arr['id'], FALSE, FALSE) . "</font></td><td class=embedded><img width=24 height=15 src=\"pic/flag/" . $countryrow['flagpic'] . "\" title=\"" . $countryrow['name'] . "\" style=\"padding-bottom:1px;\"></td>
<td class=embedded> " . (strtotime($arr['last_access']) > $dt ? $onlineimg : $offlineimg) . "</td>" .
"<td class=embedded> </td>" .
"<td class=embedded>" . $arr['supportlang'] . "</td>" .
"<td class=embedded>" . $arr['supportfor'] . "</td></tr>\n";
} else {
$ppl .= "<tr><td class=embedded>" . get_username($arr['id']) . "</td><td class=embedded><img width=24 height=15 src=\"pic/flag/" . $countryrow['flagpic'] . "\" title=\"" . $countryrow['name'] . "\" style=\"padding-bottom:1px;\"></td>
<td class=embedded> " . (strtotime($arr['last_access']) > $dt ? $onlineimg : $offlineimg) . "</td>" .
"<td class=embedded><a href=sendmessage.php?receiver=" . $arr['id'] . " title=\"" . $lang_staff['title_send_pm'] . "\">" . $sendpmimg . "</a></td>" .
"<td class=embedded>" . $arr['supportlang'] . "</td>" .
"<td class=embedded>" . $arr['supportfor'] . "</td></tr>\n";
}
}
begin_frame($lang_staff['text_firstline_support'] . "<font class=small> - [<a class=altlink href=contactstaff.php><b>" . $lang_staff['text_apply_for_it'] . "</b></a>]</font>");
?>
<?php echo $lang_staff['text_firstline_support_note'] ?>
<br/><br/>
<table width=100% cellspacing=0 align=center>
<tr>
<td class=embedded><b><?php echo $lang_staff['text_username'] ?></b></td>
<td class=embedded align=center><b><?php echo $lang_staff['text_country'] ?></b></td>
<td class=embedded align=center><b><?php echo $lang_staff['text_online_or_offline'] ?></b></td>
<td class=embedded align=center><b><?php echo $lang_staff['text_contact'] ?></b></td>
<td class=embedded align=center><b><?php echo $lang_staff['text_language'] ?></b></td>
<td class=embedded><b><?php echo $lang_staff['text_support_for'] ?></b></td>
</tr>
<tr>
<td class=embedded colspan=6>
<hr color="#4040c0">
</td>
</tr>
<?php echo $ppl ?>
</table>
<?php
end_frame();
//--------------------- FIRST LINE SUPPORT SECTION ---------------------------//
/*
//--------------------- film critics section ---------------------------//
unset($ppl);
$res = sql_query("SELECT * FROM users WHERE users.picker='yes' AND users.status='confirmed' ORDER BY users.username") or sqlerr();
while ($arr = mysql_fetch_assoc($res))
{
$countryrow = get_country_row($arr['country']);
$ppl .= "<tr height=15><td class=embedded>". get_username($arr['id']) ."</td><td class=embedded ><img width=24 height=15 src=\"pic/flag/".$countryrow['flagpic']."\" title=\"".$countryrow['name']."\" style=\"padding-bottom:1px;\"></td>
<td class=embedded> ".(strtotime($arr['last_access']) > $dt ? $onlineimg : $offlineimg)."</td>".
"<td class=embedded><a href=sendmessage.php?receiver=".$arr['id']." title=\"".$lang_staff['title_send_pm']."\">".$sendpmimg."</a></td>".
"<td class=embedded>".$arr['pickfor']."</td></tr>\n";
}
begin_frame($lang_staff['text_movie_critics']."<font class=small> - [<a class=altlink href=contactstaff.php><b>".$lang_staff['text_apply_for_it']."</b></a>]</font>");
?>
<?php echo $lang_staff['text_movie_critics_note'] ?>
<br /><br />
<table width=100% cellspacing=0 align=center>
<tr>
<td class=embedded><b><?php echo $lang_staff['text_username'] ?></b></td>
<td class=embedded align=center><b><?php echo $lang_staff['text_country'] ?></b></td>
<td class=embedded align=center><b><?php echo $lang_staff['text_online_or_offline'] ?></b></td>
<td class=embedded align=center><b><?php echo $lang_staff['text_contact'] ?></b></td>
<td class=embedded><b><?php echo $lang_staff['text_responsible_for'] ?></b></td>
</tr>
<tr>
<td class=embedded colspan=5>
<hr color="#4040c0">
</td>
</tr>
<?php echo $ppl?>
</table>
<?php
end_frame();
//--------------------- film critics section ---------------------------//
*/
//--------------------- general staff section ---------------------------//
unset($ppl);
$res = sql_query("SELECT * FROM users WHERE class > " . UC_VIP . " AND status='confirmed' ORDER BY class DESC, username") or sqlerr();
$curr_class = "";
while ($arr = mysql_fetch_assoc($res)) {
if ($curr_class != $arr['class']) {
$curr_class = $arr['class'];
if ($ppl != "")
$ppl .= "<tr height=15><td class=embedded colspan=5 align=right> </td></tr>";
$ppl .= "<tr height=15><td class=embedded colspan=5 align=right>" . get_user_class_name($arr["class"], false, true, true) . "</td></tr>";
$ppl .= "<tr>" .
"<td class=embedded><b>" . $lang_staff['text_username'] . "</b></td>" .
"<td class=embedded align=center><b>" . $lang_staff['text_country'] . "</b></td>" .
"<td class=embedded align=center><b>" . $lang_staff['text_online_or_offline'] . "</b></td>" .
"<td class=embedded align=center><b>" . $lang_staff['text_contact'] . "</b></td>" .
"<td class=embedded><b>" . $lang_staff['text_duties'] . "</b></td>" .
"</tr>";
$ppl .= "<tr height=15><td class=embedded colspan=5><hr color=\"#4040c0\"></td></tr>";
}
$countryrow = get_country_row($arr['country']);
if ($arr ['id'] != 10) {
$ppl .= "<tr><td class=embedded>" . get_username($arr['id']) . "</td><td class=embedded ><img width=24 height=15 src=\"pic/flag/" . $countryrow['flagpic'] . "\" title=\"" . $countryrow['name'] . "\" style=\"padding-bottom:1px;\"></td><td class=embedded> " .
(strtotime($arr['last_access']) > $dt ? $onlineimg : $offlineimg) . "</td>" .
"<td class=embedded><a href=" . ($arr['class'] >= UC_ADMINISTRATOR ? "contactstaff.php" : "sendmessage.php?receiver=" . $arr['id']) . " title=\"" . $lang_staff['title_send_pm'] . "\">" . $sendpmimg . "</a></td>" .
"<td class=embedded>" . $arr['stafffor'] . "</td></tr>\n";
}
}
begin_frame($lang_staff['text_general_staff'] . "<font class=small> - [<a class=altlink href=contactstaff.php><b>" . $lang_staff['text_apply_for_it'] . "</b></a>]</font>");
?>
<?php echo $lang_staff['text_general_staff_note'] ?>
<br/><br/>
<table width=100% cellspacing=0 align=center>
<?php echo $ppl ?>
</table>
<?php
end_frame();
//--------------------- general staff section ---------------------------//
//--------------------- Designer section ---------------------------//
unset($ppl);
$res = sql_query("SELECT * FROM users WHERE designer='yes' ORDER BY designerfor") or sqlerr();
while ($arr = mysql_fetch_assoc($res)) {
$countryrow = get_country_row($arr['country']);
$ppl .= "<tr><td class=embedded>" . get_username($arr['id']) . "</td><td class=embedded><img width=24 height=15 src=\"pic/flag/" . $countryrow['flagpic'] . "\" title=\"" . $countryrow['name'] . "\" style=\"padding-bottom:1px;\"></td>
<td class=embedded> " . (strtotime($arr['last_access']) > $dt ? $onlineimg : $offlineimg) . "</td>" .
"<td class=embedded><a href=sendmessage.php?receiver=" . $arr['id'] . " title=\"" . $lang_staff['title_send_pm'] . "\">" . $sendpmimg . "</a></td>" .
"<td class=embedded>" . $arr['designerfor'] . "</td></tr>\n";
}
begin_frame("美工组" . "<font class=small> - [<a class=altlink href=contactstaff.php><b>" . $lang_staff['text_apply_for_it'] . "</b></a>]</font>"); ?>
<?php echo '本站美工设计' ?>
<br/><br/>
<table width=100% cellspacing=0 align=center>
<tr>
<td class=embedded><b><?php echo $lang_staff['text_username'] ?></b></td>
<td class=embedded><b><?php echo $lang_staff['text_country'] ?></b></td>
<td class=embedded><b><?php echo $lang_staff['text_online_or_offline'] ?></b></td>
<td class=embedded><b><?php echo $lang_staff['text_contact'] ?></b></td>
<td class=embedded width="585px"><b><?php echo $lang_staff['text_duties'] ?></b></td>
</tr>
<tr>
<td class=embedded colspan=5>
<hr color="#4040c0">
</td>
</tr>
<?php echo $ppl ?>
</table>
<?php
end_frame();
//--------------------- Designer section ---------------------------//
//--------------------- forum moderators section ---------------------------//
unset($ppl);
$res = sql_query("SELECT forummods.userid AS userid, users.last_access, users.country FROM forummods LEFT JOIN users ON forummods.userid = users.id GROUP BY userid ORDER BY forummods.forumid, forummods.userid") or sqlerr();
while ($arr = mysql_fetch_assoc($res)) {
$countryrow = get_country_row($arr['country']);
$forums = "";
$forumres = sql_query("SELECT forums.id, forums.name FROM forums LEFT JOIN forummods ON forums.id = forummods.forumid WHERE forummods.userid = " . sqlesc($arr['userid']));
while ($forumrow = mysql_fetch_array($forumres)) {
$forums .= "<a href=forums.php?action=viewforum&forumid=" . $forumrow['id'] . ">" . $forumrow['name'] . "</a>, ";
}
$forums = rtrim(trim($forums), ",");
$ppl .= "<tr height=15><td class=embedded>" . get_username($arr['userid']) . "</td><td class=embedded ><img width=24 height=15 src=\"pic/flag/" . $countryrow['flagpic'] . "\" title=\"" . $countryrow['name'] . "\" style=\"padding-bottom:1px;\"></td>
<td class=embedded> " . (strtotime($arr['last_access']) > $dt ? $onlineimg : $offlineimg) . "</td>" .
"<td class=embedded><a href=sendmessage.php?receiver=" . $arr['userid'] . " title=\"" . $lang_staff['title_send_pm'] . "\">" . $sendpmimg . "</a></td>" .
"<td class=embedded>" . $forums . "</td></tr>\n";
}
begin_frame($lang_staff['text_forum_moderators'] . "<font class=small> - [<a class=altlink href=contactstaff.php><b>" . $lang_staff['text_apply_for_it'] . "</b></a>]</font>");
?>
<?php echo $lang_staff['text_forum_moderators_note'] ?>
<br/><br/>
<table width=100% cellspacing=0 align=center>
<tr>
<td class=embedded><b><?php echo $lang_staff['text_username'] ?></b></td>
<td class=embedded align=center><b><?php echo $lang_staff['text_country'] ?></b></td>
<td class=embedded align=center><b><?php echo $lang_staff['text_online_or_offline'] ?></b></td>
<td class=embedded align=center><b><?php echo $lang_staff['text_contact'] ?></b></td>
<td class=embedded><b><?php echo $lang_staff['text_forums'] ?></b></td>
</tr>
<tr>
<td class=embedded colspan=5>
<hr color="#4040c0">
</td>
</tr>
<?php echo $ppl ?>
</table>
<?php
end_frame();
//--------------------- film critics section ---------------------------//
//--------------------- VIP section ---------------------------//
unset($ppl);
//$res = sql_query("SELECT * FROM users WHERE class=".UC_VIP." AND status='confirmed' ORDER BY username") or sqlerr();
//$res = sql_query("SELECT * FROM users WHERE class=".UC_VIP." AND status='confirmed' AND vip_added='no' ORDER BY id") or sqlerr();
$res = sql_query("SELECT * FROM users WHERE class=" . UC_VIP . " AND status='confirmed' AND designer='no' AND stafffor<>'' ORDER BY stafffor") or sqlerr();
while ($arr = mysql_fetch_assoc($res)) {
$countryrow = get_country_row($arr['country']);
$ppl .= "<tr><td class=embedded>" . get_username($arr['id']) . "</td><td class=embedded><img width=24 height=15 src=\"pic/flag/" . $countryrow['flagpic'] . "\" title=\"" . $countryrow['name'] . "\" style=\"padding-bottom:1px;\"></td>
<td class=embedded> " . (strtotime($arr['last_access']) > $dt ? $onlineimg : $offlineimg) . "</td>" .
"<td class=embedded><a href=sendmessage.php?receiver=" . $arr['id'] . " title=\"" . $lang_staff['title_send_pm'] . "\">" . $sendpmimg . "</a></td>" .
"<td class=embedded>" . $arr['stafffor'] . "</td></tr>\n";
}
begin_frame($lang_staff['text_vip']);
?>
<?php echo $lang_staff['text_vip_note'] ?>
<br/><br/>
<table width=100% cellspacing=0 align=center>
<tr>
<td class=embedded><b><?php echo $lang_staff['text_username'] ?></b></td>
<td class=embedded><b><?php echo $lang_staff['text_country'] ?></b></td>
<td class=embedded><b><?php echo $lang_staff['text_online_or_offline'] ?></b></td>
<td class=embedded><b><?php echo $lang_staff['text_contact'] ?></b></td>
<td class=embedded><b><?php echo $lang_staff['text_reason'] ?></b></td>
</tr>
<tr>
<td class=embedded colspan=5>
<hr color="#4040c0">
</td>
</tr>
<?php echo $ppl ?>
</table>
<?php
end_frame();
//--------------------- VIP section ---------------------------//
end_main_frame();
$Cache->end_whole_row();
$Cache->cache_page();
}
echo $Cache->next_row();
stdfoot();