mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
simple listview-pages now use one shared template (instead of having the same file multiple times) some bug fixing here and there - achievement: faction is no longer out of range (need to reparse the faction :/) - item: quality is prepended to the name again and wont be left out in case of heirlooms (is 0) - general: forgot to change some error()-calls in index - and some more wich i forgot..
51 lines
1.2 KiB
PHP
51 lines
1.2 KiB
PHP
<?php
|
|
|
|
if (!defined('AOWOW_REVISION'))
|
|
die('illegal access');
|
|
|
|
class CurrencyList extends BaseType
|
|
{
|
|
protected $setupQuery = 'SELECT *, id AS ARRAY_KEY FROM ?_currencies WHERE [cond] ORDER BY Id ASC';
|
|
protected $matchQuery = 'SELECT COUNT(1) FROM ?_currencies WHERE [cond]';
|
|
|
|
public function getListviewData()
|
|
{
|
|
$data = [];
|
|
|
|
while ($this->iterate())
|
|
{
|
|
$data[$this->id] = array(
|
|
'id' => $this->id,
|
|
'category' => $this->curTpl['category'],
|
|
'name' => $this->names[$this->id],
|
|
'icon' => $this->curTpl['iconString']
|
|
);
|
|
}
|
|
|
|
return $data;
|
|
}
|
|
|
|
public function addGlobalsToJscript(&$refs)
|
|
{
|
|
if (!isset($refs['gCurrencies']))
|
|
$refs['gCurrencies'] = [];
|
|
|
|
$data = [];
|
|
|
|
while ($this->iterate())
|
|
{
|
|
$refs['gCurrencies'][$this->id] = array(
|
|
'name' => $this->names[$this->id],
|
|
'icon' => $this->curTpl['iconString']
|
|
);
|
|
}
|
|
|
|
return $data;
|
|
}
|
|
|
|
public function addRewardsToJScript(&$ref) { }
|
|
public function renderTooltip() { }
|
|
}
|
|
|
|
?>
|