-
Notifications
You must be signed in to change notification settings - Fork 0
/
arenateam.php
420 lines (393 loc) · 21.2 KB
/
arenateam.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
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
<?php
require_once("header.php");
require_once("libs/char_lib.php");
valid_login($action_permission['read']);
//########################################################################################################################
// BROWSE ARENA TEAMS
//########################################################################################################################
function browse_teams()
{
global $lang_arenateam, $lang_global, $output, $realm_db, $characters_db, $realm_id, $itemperpage, $action_permission, $user_lvl, $user_id;
$sqlc = new SQL;
$sqlc->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']);
//==========================$_GET and SECURE=================================
$start = (isset($_GET['start'])) ? $sqlc->quote_smart($_GET['start']) : 0;
if (is_numeric($start)); else $start=0;
$order_by = (isset($_GET['order_by'])) ? $sqlc->quote_smart($_GET['order_by']) : "atid";
if (!preg_match("/^[_[:lower:]]{1,17}$/", $order_by)) $order_by="atid";
$dir = (isset($_GET['dir'])) ? $sqlc->quote_smart($_GET['dir']) : 1;
if (!preg_match("/^[01]{1}$/", $dir)) $dir=1;
$order_dir = ($dir) ? "ASC" : "DESC";
$dir = ($dir) ? 0 : 1;
//==========================$_GET and SECURE end=============================
//==========================Browse/Search CHECK==============================
$search_by ='';
$search_value = '';
if(isset($_GET['search_value']) && isset($_GET['search_by']))
{
$search_value = $sqlc->quote_smart($_GET['search_value']);
$search_by = $sqlc->quote_smart($_GET['search_by']);
$search_menu = array('atname', 'leadername', 'atid');
if (!in_array($search_by, $search_menu)) $search_by = 'atid';
switch($search_by)
{
case "atname":
$query = $sqlc->query("SELECT arena_team.arenateamid AS atid, arena_team.name AS atname, arena_team.captainguid AS lguid, arena_team.type AS attype, (SELECT name FROM `characters` WHERE guid = lguid) AS lname,(SELECT COUNT(*) FROM arena_team_member WHERE arenateamid = atid) AS tot_chars, rating AS atrating, games as atgames, wins as atwins FROM arena_team, arena_team_stats WHERE arena_team.arenateamid = arena_team_stats.arenateamid AND arena_team.name LIKE '%$search_value%' ORDER BY $order_by $order_dir LIMIT $start, $itemperpage");
$query_1 = $sqlc->query("SELECT count(*) FROM arena_team WHERE arena_team.name LIKE '%$search_value%'");
break;
case "leadername":
$query = $sqlc->query("SELECT arena_team.arenateamid AS atid, arena_team.name AS atname, arena_team.captainguid AS lguid, arena_team.type AS attype, (SELECT name FROM `characters` WHERE guid = lguid) AS lname,(SELECT COUNT(*) FROM arena_team_member WHERE arenateamid = atid) AS tot_chars, rating AS atrating, games as atgames, wins as atwins FROM arena_team, arena_team_stats WHERE arena_team.arenateamid = arena_team_stats.arenateamid AND arena_team.captainguid in (SELECT guid from characters where name like '%$search_value%') ORDER BY $order_by $order_dir LIMIT $start, $itemperpage");
$query_1 = $sqlc->query("SELECT count(*) FROM arena_team WHERE arena_team.captainguid in (SELECT guid from characters where name like '%$search_value%')");
break;
case "atid":
$query = $sqlc->query("SELECT arena_team.arenateamid AS atid, arena_team.name AS atname, arena_team.captainguid AS lguid, arena_team.type AS attype, (SELECT name FROM `characters` WHERE guid = lguid) AS lname,(SELECT COUNT(*) FROM arena_team_member WHERE arenateamid = atid) AS tot_chars, rating AS atrating, games as atgames, wins as atwins FROM arena_team, arena_team_stats WHERE arena_team.arenateamid = arena_team_stats.arenateamid AND arena_team.arenateamid ='$search_value' ORDER BY $order_by $order_dir LIMIT $start, $itemperpage");
$query_1 = $sqlc->query("SELECT count(*) FROM arena_team arena_team.arenateamid ='$search_value'");
break;
}
}
else
{
$query = $sqlc->query("SELECT arena_team.arenateamid AS atid, arena_team.name AS atname, arena_team.captainguid AS lguid, arena_team.type AS attype, (SELECT name FROM `characters` WHERE guid = lguid) AS lname,(SELECT COUNT(*) FROM arena_team_member WHERE arenateamid = atid) AS tot_chars, rating AS atrating, games as atgames, wins as atwins, (SELECT count(*) AS GCNT FROM `arena_team_member`, `characters`, `arena_team` WHERE arena_team.arenateamid = atid AND arena_team_member.arenateamid = arena_team.arenateamid AND arena_team_member.guid = characters.guid AND characters.online = 1) as arenateam_online FROM arena_team, arena_team_stats WHERE arena_team.arenateamid = arena_team_stats.arenateamid ORDER BY $order_by $order_dir LIMIT $start, $itemperpage");
$query_1 = $sqlc->query("SELECT count(*) FROM arena_team");
}
$all_record = $sqlc->result($query_1,0);
unset($query_1);
$this_page = $sqlc->num_rows($query);
//==========================top page navigation starts here====================
$output .="
<center>
<table class=\"top_hidden\">
<tr>
<td>";
makebutton($lang_global['back'], "javascript:window.history.back()", 130);
($search_by && $search_value) ? makebutton($lang_arenateam['arenateams'], "arenateam.php", 130) : $output .= "";
$output .= "
</td>
</tr>
<tr>
<td>
<table class=\"hidden\">
<tr>
<td>
<form action=\"arenateam.php\" method=\"get\" name=\"form\">
<input type=\"hidden\" name=\"error\" value=\"4\" />
<input type=\"text\" size=\"24\" name=\"search_value\" value=\"{$search_value}\"/>
<select name=\"search_by\">
<option value=\"atname\"".($search_by == 'atname' ? " selected=\"selected\"" : "").">{$lang_arenateam['by_name']}</option>
<option value=\"leadername\"".($search_by == 'leadername' ? " selected=\"selected\"" : "").">{$lang_arenateam['by_team_leader']}</option>
<option value=\"atid\"".($search_by == 'atid' ? " selected=\"selected\"" : "").">{$lang_arenateam['by_id']}</option>
</select>
</form>
</td>
<td>";
makebutton($lang_global['search'], "javascript:do_submit()",80);
$output .= "
</td>
</tr>
</table>
</td>
<td align=\"right\">";
$output .= generate_pagination("arenateam.php?order_by=$order_by".( $search_value && $search_by ? "&search_by=$search_by&search_value=$search_value" : "" )."&dir=".!$dir, $all_record, $itemperpage, $start);
$output .= "
</td>
</tr>
</table>";
//==========================top page navigation ENDS here =====================
$output .= "
<table class=\"lined\">
<tr>
<th width=\"1%\"><a href=\"arenateam.php?order_by=atid&start=$start".( $search_value && $search_by ? "&search_by=$search_by&search_value=$search_value" : "" )."&dir=$dir\">".($order_by=='atid' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_arenateam['id']}</a></th>
<th width=\"1%\"><a href=\"arenateam.php?order_by=atname&start=$start".( $search_value && $search_by ? "&search_by=$search_by&search_value=$search_value" : "" )."&dir=$dir\">".($order_by=='atname' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_arenateam['arenateam_name']}</a></th>
<th width=\"1%\"><a href=\"arenateam.php?order_by=lname&start=$start".( $search_value && $search_by ? "&search_by=$search_by&search_value=$search_value" : "" )."&dir=$dir\">".($order_by=='lname' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_arenateam['captain']}</a></th>
<th width=\"1%\"><a href=\"arenateam.php?order_by=attype&start=$start".( $search_value && $search_by ? "&search_by=$search_by&search_value=$search_value" : "" )."&dir=$dir\">".($order_by=='attype' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_arenateam['type']}</a></th>
<th width=\"1%\"><a href=\"arenateam.php?order_by=tot_chars&start=$start".( $search_value && $search_by ? "&search_by=$search_by&search_value=$search_value" : "" )."&dir=$dir\">".($order_by=='tot_chars' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_arenateam['members']}</a></th>
<th width=\"1%\"><a href=\"arenateam.php?order_by=arenateam_online&start=$start".( $search_value && $search_by ? "&search_by=$search_by&search_value=$search_value" : "" )."&dir=$dir\">".($order_by=='arenateam_online' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_arenateam['arenateam_online']}</a></th>
<th width=\"1%\"><a href=\"arenateam.php?order_by=rating&start=$start".( $search_value && $search_by ? "&search_by=$search_by&search_value=$search_value" : "" )."&dir=$dir\">".($order_by=='rating' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_arenateam['rating']}</a></th>
<th width=\"1%\"><a href=\"arenateam.php?order_by=games&start=$start".( $search_value && $search_by ? "&search_by=$search_by&search_value=$search_value" : "" )."&dir=$dir\">".($order_by=='games' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_arenateam['games']}</a></th>
<th width=\"1%\"><a href=\"arenateam.php?order_by=wins&start=$start".( $search_value && $search_by ? "&search_by=$search_by&search_value=$search_value" : "" )."&dir=$dir\">".($order_by=='wins' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_arenateam['wins']}</a></th>
</tr>";
while ($data = $sqlc->fetch_row($query))
{
$gonline = $sqlc->query("SELECT count(*) AS GCNT FROM `arena_team_member`, `characters`, `arena_team` WHERE arena_team.arenateamid = ".$data[0]." AND arena_team_member.arenateamid = arena_team.arenateamid AND arena_team_member.guid = characters.guid AND characters.online = 1;");
$arenateam_online = $sqlc->result($gonline,"GCNT");
$output .= "
<tr>
<td>$data[0]</td>
<td><a href=\"arenateam.php?action=view_team&error=3&id=$data[0]\">".htmlentities($data[1])."</a></td>
<td><a href=\"char.php?id=$data[2]\">".htmlentities($data[4])."</a></td>
<td>{$lang_arenateam[$data[3]]}</td>
<td>$data[5]</td>
<td>$arenateam_online</td>
<td>$data[6]</td>
<td>$data[7]</td>
<td>$data[8]</td>
</tr>";
}
$output .= "
<tr><td colspan=\"9\" class=\"hidden\" align=\"right\">{$lang_arenateam['tot_teams']} : $all_record</td></tr>
</table>
</center>";
}
function count_days( $a, $b ) {
$gd_a = getdate( $a );
$gd_b = getdate( $b );
$a_new = mktime( 12, 0, 0, $gd_a['mon'], $gd_a['mday'], $gd_a['year'] );
$b_new = mktime( 12, 0, 0, $gd_b['mon'], $gd_b['mday'], $gd_b['year'] );
return round( abs( $a_new - $b_new ) / 86400 );
}
//########################################################################################################################
// VIEW ARENA TEAM
//########################################################################################################################
function view_team()
{
global $lang_arenateam, $lang_global, $output, $characters_db, $realm_id, $realm_db, $mmfpm_db, $action_permission, $user_lvl, $user_id, $showcountryflag;
if(!isset($_GET['id'])) redirect("arenateam.php?error=1");
$sqlc = new SQL;
$sqlc->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']);
$arenateam_id = $sqlc->quote_smart($_GET['id']);
$query = $sqlc->query("SELECT arenateamid, name, type FROM arena_team WHERE arenateamid = '$arenateam_id'");
$arenateam_data = $sqlc->fetch_row($query);
$query = $sqlc->query("SELECT arenateamid, rating, games, wins, played, wins2, rank FROM arena_team_stats WHERE arenateamid = '$arenateam_id'");
$arenateamstats_data = $sqlc->fetch_row($query);
$rating_offset = 1550;
if ($arenateam_data[2] == 3)
$rating_offset += 6;
else if ($arenateam_data[2] == 5)
$rating_offset += 12;
$members = $sqlc->query("SELECT arena_team_member.guid,`characters`.name, SUBSTRING_INDEX(SUBSTRING_INDEX(`characters`.`data`, ' ', $rating_offset), ' ', -1) AS personal_rating, level, arena_team_member.played_week, arena_team_member.wons_week, arena_team_member.played_season, arena_team_member.wons_season, `characters`.race, `characters`.class, `characters`.online, `characters`.account, `characters`.logout_time, gender, account FROM arena_team_member,`characters` LEFT JOIN arena_team_member k1 ON k1.`guid`=`characters`.`guid` AND k1.`arenateamid`='$arenateam_id' WHERE arena_team_member.arenateamid = '$arenateam_id' AND arena_team_member.guid=`characters`.guid ORDER BY `characters`.`name`");
$total_members = $sqlc->num_rows($members);
$losses_week = $arenateamstats_data[2]-$arenateamstats_data[3];
if($arenateamstats_data[2])
$winperc_week = round((10000 * $arenateamstats_data[3]) / $arenateamstats_data[2]) / 100;
else
$winperc_week = $arenateamstats_data[2];
$losses_season = $arenateamstats_data[4]-$arenateamstats_data[5];
if($arenateamstats_data[4])
$winperc_season = round((10000 * $arenateamstats_data[5]) / $arenateamstats_data[4]) / 100;
else
$winperc_season = $arenateamstats_data[4];
$output .= "
<script type=\"text/javascript\">
answerbox.btn_ok='{$lang_global['yes_low']}';
answerbox.btn_cancel='{$lang_global['no']}';
</script>
<center>
<fieldset>
<legend>{$lang_arenateam['arenateam']} ({$arenateam_data[2]}v{$arenateam_data[2]})</legend>
<table class=\"lined\" style=\"width: 100%;\">
<tr class=\"bold\">
<td colspan=\"".($showcountryflag ? 14 : 13 )."\">".htmlentities($arenateam_data[1])."</td>
</tr>
<tr>
<td colspan=\"".($showcountryflag ? 14 : 13 )."\">{$lang_arenateam['tot_members']}: $total_members</td>
</tr>
<tr>
<td colspan=\"4\">{$lang_arenateam['this_week']}</td>
<td colspan=\"2\">{$lang_arenateam['games_played']} : $arenateamstats_data[2]</td>
<td colspan=\"2\">{$lang_arenateam['games_won']} : $arenateamstats_data[3]</td>
<td colspan=\"2\">{$lang_arenateam['games_lost']} : $losses_week</td>
<td colspan=\"".($showcountryflag ? 4 : 3 )."\">{$lang_arenateam['ratio']} : $winperc_week %</td>
</tr>
<tr>
<td colspan=\"4\">{$lang_arenateam['this_season']}</td>
<td colspan=\"2\">{$lang_arenateam['games_played']} : $arenateamstats_data[4]</td>
<td colspan=\"2\">{$lang_arenateam['games_won']} : $arenateamstats_data[5]</td>
<td colspan=\"2\">{$lang_arenateam['games_lost']} : $losses_season</td>
<td colspan=\"".($showcountryflag ? 4 : 3 )."\">{$lang_arenateam['ratio']} : $winperc_season %</td>
</tr>
<tr>
<td colspan=\"".($showcountryflag ? 14 : 13 )."\">{$lang_arenateam['standings']} {$arenateamstats_data[6]} ({$arenateamstats_data[1]})</td>
</tr>
<tr>
<th width=\"1%\">{$lang_arenateam['remove']}</th>
<th width=\"1%\">{$lang_arenateam['name']}</th>
<th width=\"1%\">Race</th>
<th width=\"1%\">Class</th>
<th width=\"1%\">Personal Rating</th>
<th width=\"1%\">Last Login (Days)</th>
<th width=\"1%\">Online</th>
<th width=\"1%\">{$lang_arenateam['played_week']}</th>
<th width=\"1%\">{$lang_arenateam['wons_week']}</th>
<th width=\"1%\">Win %</th>
<th width=\"1%\">{$lang_arenateam['played_season']}</th>
<th width=\"1%\">{$lang_arenateam['wons_season']}</th>
<th width=\"1%\">Win %</th>";
if ($showcountryflag)
{
require_once 'libs/misc_lib.php';
$sqlr = new SQL;
$sqlr->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);
$sqlm = new SQL;
$sqlm->connect($mmfpm_db['addr'], $mmfpm_db['user'], $mmfpm_db['pass'], $mmfpm_db['name']);
$output .="
<th width=\"1%\">{$lang_global['country']}</th>";
}
$output .="
</tr>";
while ($member = $sqlc->fetch_row($members))
{
$accid = $member[11];
$output .= "
<tr>";
if($user_lvl >= $action_permission['delete'] || $accid == $user_id)
$output .= "
<td><img src=\"img/aff_cross.png\" alt=\"\" onclick=\"answerBox('{$lang_global['delete']}: <font color=white>{$member[1]}</font><br />{$lang_global['are_you_sure']}', 'arenateam.php?action=rem_char_from_team&id=$member[0]&arenateam_id=$arenateam_id');\" style=\"cursor:pointer;\" /></td>";
else
$output .= "
<td>
</td>";
if($member[4])
$ww_pct = round((10000 * $member[5]) / $member[4]) / 100;
else
$ww_pct = $member[4];
if($member[6])
$ws_pct = round((10000 * $member[7]) / $member[6]) / 100;
else
$ws_pct = $member[6];
$output .= "
<td><a href=\"char.php?id=$member[0]\">".htmlentities($member[1])."</a></td>
<td><img src='img/c_icons/{$member[8]}-{$member[13]}.gif' onmousemove='toolTip(\"".char_get_race_name($member[8])."\",\"item_tooltip\")' onmouseout='toolTip()' /></td>
<td><img src='img/c_icons/{$member[9]}.gif' onmousemove='toolTip(\"".char_get_class_name($member[9])."\",\"item_tooltip\")' onmouseout='toolTip()' /></td>
<td>$member[2]</td>
<td>".get_days_with_color($member[12])."</td>
<td>".(($member[10]) ? "<img src=\"img/up.gif\" alt=\"\" />" : "-")."</td>
<td>$member[4]</td>
<td>$member[5]</td>
<td>$ww_pct %</td>
<td>$member[6]</td>
<td>$member[7]</td>
<td>$ws_pct %</td>";
if ($showcountryflag)
{
$country = misc_get_country_by_account($member[14], $sqlr, $sqlm);
$output .="
<td>".(($country['code']) ? "<img src='img/flags/".$country['code'].".png' onmousemove='toolTip(\"".($country['country'])."\",\"item_tooltip\")' onmouseout='toolTip()' alt=\"\" />" : "-")."</td>";
}
$output .="
</tr>";
}
$output .= "
</table>
<br />
<table class=\"hidden\">
<tr>
<td>";
if($user_lvl >= $action_permission['delete'])
{
makebutton($lang_arenateam['del_team'], "arenateam.php?action=del_team&id=$arenateam_id\" type=\"wrn", 180);
$output .= "
</td>
<td>";
makebutton($lang_arenateam['arenateams'], "arenateam.php\" type=\"def", 130);
$output .= "
</td>
</tr>
<tr>
</tr>";
}
else
{
makebutton($lang_arenateam['arenateams'], "arenateam.php", 130);
$output .= "
</td>
</tr>";
}
$output .= "
</table>
</fieldset>
</center>
";
}
//########################################################################################################################
// ARE YOU SURE YOU WOULD LIKE TO OPEN YOUR AIRBAG?
//########################################################################################################################
function del_team()
{
global $lang_arenateam, $lang_global, $output;
if(isset($_GET['id'])) $id = $_GET['id'];
else redirect("arenateam.php?error=1");
$output .= "
<center>
<h1><font class=\"error\">{$lang_global['are_you_sure']}</font></h1>
<br />
<font class=\"bold\">{$lang_arenateam['arenateam_id']}: $id {$lang_global['will_be_erased']}</font><br /><br />
<form action=\"cleanup.php?action=docleanup\" method=\"post\" name=\"form\">
<input type=\"hidden\" name=\"type\" value=\"arenateam\" />
<input type=\"hidden\" name=\"check\" value=\"-$id\" />
<table class=\"hidden\">
<tr>
<td>";
makebutton($lang_global['yes'], "javascript:do_submit()",130);
makebutton($lang_global['no'], "arenateam.php?action=view_team&id=$id",130);
$output .= "
</td>
</tr>
</table>
</form>
<br />
</center>
";
}
//##########################################################################################
//REMOVE CHAR FROM TEAM
//##########################################################################################
function rem_char_from_team()
{
global $characters_db, $realm_id, $user_lvl;
if(isset($_GET['id'])) $guid = $_GET['id'];
else redirect("arenateam.php?error=1");
if(isset($_GET['arenateam_id'])) $arenateam_id = $_GET['arenateam_id'];
else redirect("arenateam.php?error=1");
$sqlc = new SQL;
$sqlc->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']);
// must be checked that this user can delete it
//$sql->query("DELETE FROM arena_team_member WHERE guid = '$guid'");
redirect("arenateam.php?action=view_team&id=$arenateam_id");
}
//########################################################################################################################
// MAIN
//########################################################################################################################
$err = (isset($_GET['error'])) ? $_GET['error'] : NULL;
$output .= "
<div class=\"top\">";
switch ($err)
{
case 1:
$output .= "
<h1><font class=\"error\">{$lang_global['empty_fields']}</font></h1>";
break;
case 2:
$output .= "
<h1><font class=\"error\">{$lang_global['err_no_search_passed']}</font></h1>";
break;
case 3:
$output .= "
<h1><font class=\"error\">{$lang_arenateam['arenateam']}</font></h1>";
break;
case 4:
$output .= "
<h1>{$lang_arenateam ['team_search_result']}:</h1>";
break;
default: //no error
$output .= "
<h1>{$lang_arenateam ['browse_teams']}</h1>";
}
$output .= "
</div>";
$action = (isset($_GET['action'])) ? $_GET['action'] : NULL;
switch ($action)
{
case "view_team":
view_team();
break;
case "del_team":
del_team();
break;
case "rem_char_from_team":
rem_char_from_team();
break;
default:
browse_teams();
}
require_once("footer.php");
?>