This repository has been archived on 2024-07-18. You can view files and clone it, but cannot push or open issues or pull requests.
lwb5/scripts/site/beta5/handlers/universe.inc

31 lines
672 B
PHP

<?php
class page_handler {
public $needsAuth = true;
public $ajax = array(
'func' => array('getInformation'),
'init' => 'initPage();'
);
public function getInformation() {
$universe = $this->game->action('getUniverseOverview',
$_SESSION[game::sessName()]['player'], getLanguage()
);
$ticks = array();
foreach ($universe['ticks'] as $tick) {
array_push($ticks, join('#', $tick));
}
$main = array(join('#', $universe['summary']), join('#', $universe['rankings']), time());
return join("\n", array_merge($main, $ticks));
}
public function handle($input) {
$this->data = $this->getInformation();
$this->output = "universe";
}
}
?>