-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.php
34 lines (24 loc) · 997 Bytes
/
index.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
<?php
$pagetitle = 'Home';
require 'common.php';
$accounts = webcp_db_fetchall('SELECT COUNT(1) as count FROM accounts');
$accounts = $accounts[0]['count'];
$characters = webcp_db_fetchall('SELECT COUNT(1) as count FROM characters');
$characters = $characters[0]['count'];
$staffcharacters = webcp_db_fetchall('SELECT COUNT(1) as count FROM characters WHERE admin > 0');
$staffcharacters = $staffcharacters[0]['count'];
$guilds = webcp_db_fetchall('SELECT COUNT(1) as count FROM guilds');
$guilds = $guilds[0]['count'];
if ((isset($showbankgold) && $showbankgold)
|| (!isset($showbankgold) && $characters < 10000))
{
$bank = webcp_db_fetchall('SELECT SUM(goldbank) as gold FROM characters');
$bank = $bank[0]['gold'];
}
$tpl->accounts = number_format($accounts);
$tpl->characters = number_format($characters);
$tpl->staffcharacters = number_format($staffcharacters);
$tpl->guilds = number_format($guilds);
if (isset($bank))
$tpl->bank = number_format($bank);
$tpl->Execute('index');