-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathonline.php
More file actions
47 lines (38 loc) · 1.18 KB
/
online.php
File metadata and controls
47 lines (38 loc) · 1.18 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
<?php
define("INCLUDED", true); //This is for returning a die message if INCLUDED is not defined on any of the template
$AJAX_PAGE = false;
//################ Required Resources ################
$REQUIRED_RESOURCES = array(
'WoW' => true,
'Realm' => true,
);
//################ Required Files ################
require_once("init.php");
//################ PAGE ACCESS ################
$cms->BannedAccess(false);
eval($cms->SetPageAccess(ACCESS_ALL));
//################ General Variables ################
$page_name[] = array("Online Players"=>"online.php");
WoW::getZonesArray();
//################ Page Functions ################
function FetchOnlinePlayers()
{
global $DB, $REALM;
$query = new Query();
$query->Select("`characters`")->Columns("*")->Where("`online` <> '0'")->Build();
$return = MySQLiFetch($DB->query($query, $REALM[$_GET['rid']]['CH_DB']));
return $return;
}
if(empty($_GET['rid']) || empty($REALM[$_GET['rid']]))
{
$page_name[] = array("Select Realm");
$tplname = "realm_selection";
}
else
{
$page_name[] = array($REALM[$_GET['rid']]['NAME']=>$_SERVER['REQUEST_URI']);
$onlines = FetchOnlinePlayers();
$tplname = "online";
}
eval($templates->Output($tplname));
?>