new step
This commit is contained in:
parent
fb50fc21f7
commit
b766baf17b
@ -7,7 +7,7 @@ class CHAR_STATS extends \SYSTEM\DB\QQ {
|
||||
//pg
|
||||
'',
|
||||
//mys
|
||||
'SELECT count(*) as count FROM characters WHERE race=1',
|
||||
'SELECT race,COUNT(*) FROM characters group by race;',
|
||||
new \DBD\mangos_chars()
|
||||
);}}
|
||||
|
||||
|
||||
@ -0,0 +1 @@
|
||||
${race}
|
||||
@ -2,11 +2,37 @@
|
||||
|
||||
class user_start extends SYSTEM\PAGE\Page {
|
||||
|
||||
private function get_race($race){
|
||||
switch($race){
|
||||
case 1:
|
||||
return 'human';
|
||||
case 2:
|
||||
return 'label label-danger';
|
||||
case 3:
|
||||
return 'label label-info';
|
||||
case 4:
|
||||
return 'label label-warning';
|
||||
case 5:
|
||||
return 'label label-success';
|
||||
case 6:
|
||||
return 'label label-success';
|
||||
case 7:
|
||||
return 'label label-success';
|
||||
case 8:
|
||||
return 'label label-success';
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
$chars = \DBD\CHAR_STATS::QQ(array());
|
||||
foreach($chars as $char){
|
||||
$vars['race'] = $this->get_race($char['race']);
|
||||
$vars['count'] = $char['count'];
|
||||
$result .= SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'user_start/char_stats_realm.tpl'), $vars);
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
@ -13,4 +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}
|
||||
<div style="background: white; height: 10px; width: 10px; float: left">${char_stats}</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user