Файл: DARK WARS/dark_war/class/document.class.php
Строк: 60
<?php
function tutorial() {
$cnt = mysql_fetch_assoc(mysql_query("SELECT COUNT(*) FROM `dark_war_training`"));
$rand = rand(1,$cnt['COUNT(*)']);
$training = mysql_fetch_assoc(mysql_query("SELECT * FROM `dark_war_training` WHERE id = '$rand'"));
return $training;
}
class document extends design {
private $title = 'DarkWar онлайн игра';
private $error = array();
private $msg = array();
private $ret = array();
private $act = array();
function __construct() {
parent::__construct();
ob_start();
}
function title($title) {
$this->title = $title;
}
function err($err) {
$this->error[] = $err;
}
function msg($msg) {
$this->msg[] = $msg;
}
function ret($link, $ret) {
$this->ret[] = array('link' => $link, 'ret' => $ret);
}
function act($link, $act) {
$this->act[] = array('link' => $link, 'ret' => $act);
}
function ser() {
$this->assign('title', $this->title);
$this->assign('err', $this->error);
$this->assign('msg', $this->msg);
$this->assign('ret', $this->ret);
$this->assign('act', $this->act);
$this->assign('content', @ob_get_clean());
list($msec, $sec) = explode(chr(32), microtime());
$this->assign('document_generation_time', round($msec + $sec - TIME_START, 3));
$this->display('document.tpl');
}
function __destruct() {
$this->ser();
}
}
?>