api, so nich ne xD

This commit is contained in:
Tobi 2014-11-03 11:06:45 +01:00
parent 2be5138691
commit 73da518521
5 changed files with 55 additions and 1 deletions

View File

@ -0,0 +1,29 @@
<?php
/**
* Description of population_statistics
*
* @author Nael
*/
class population_statistics {
public static function race_to_race(){
$count = \DBD\CHAR_STATS::Q1();
return $count;
}
public static function race_to_gender(){
$count = \DBD\PLAYER_ONLINE::Q1()['count'];
return $count;
}
public static function race_to_class(){
$count = \DBD\PLAYER_ONLINE::Q1()['count'];
return $count;
}
public static function class_to_gender(){
$count = \DBD\PLAYER_ONLINE::Q1()['count'];
return $count;
}
public static function gender_to_gender(){
$count = \DBD\PLAYER_ONLINE::Q1()['count'];
return $count;
}
}

View File

@ -0,0 +1,13 @@
<?php
namespace DBD;
class CHAR_STATS extends \SYSTEM\DB\QQ {
protected static function query(){
return new \SYSTEM\DB\QQuery(get_class(),
//pg
'',
//mys
'SELECT count(*) as count FROM characters WHERE race=1',
new \DBD\mangos_chars()
);}}

View File

@ -1,8 +1,19 @@
<?php
class user_start extends SYSTEM\PAGE\Page {
public static function get_char_statistics(){
$result = '';
$chars = \DBD\CHAR_STATS::QA();
$vars['']
$result = SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'user_start/char_stats_realm.tpl'), $vars);
return $result;
}
public function html(){
$vars = array();
$vars['char_stats'] = $this->get_char_statistics();
$vars['realm_status'] = realm::status();
$vars['world_status'] = world::status();
$vars['player_online'] = database::player_online();

View File

@ -13,3 +13,4 @@
<p><a href="${url_realmlistwtf}" target="_blank">Download realmlist.wtf</a></p>
<p><a href="${url_wowclient}" target="_blank">Download WoW 1.12</a></p>
</div>
${char_stats}