/** * поиск персонажа али чара */ public function action_search() { if (!empty($_POST["typesearch"]) && !empty($_POST["charoracc"])) { $type = (int) $_POST["typesearch"]; if ($type == 1) { $charInfo = $this->model->getChar($_POST["charoracc"]); if (!empty($charInfo)) { if ($charInfo["ConnectStat"] < 1) { $charInfo["ConnectStat"] = "<b style='color:red'>Offline</b>"; $charInfo["ServerName"] .= " " . date_::transDate($charInfo["DisConnectTM"], true); } else { $charInfo["ConnectStat"] = "<b style='color:green'>Online</b>"; $charInfo["ServerName"] .= " " . date_::transDate($charInfo["ConnectTM"], true); } $this->view->add_dict($charInfo)->set("classlist", html_::select($this->model->class, 'Class', $charInfo['Class'], "style='width:100px;'"))->out("character", "editchars"); } } else { $account = $this->model->getAccIfo($_POST["charoracc"]); if (!empty($account["Characters"])) { $chars = ""; foreach ($account["Characters"] as $names) { if (!empty($chars)) { $chars .= ", "; } $chars .= "<span style='cursor: pointer;' onclick=\"document.getElementById('charoracc').value='{$names}';document.getElementById('typesearch').selectedIndex = 0;searchObject();\">{$names}</span>"; } $account["Characters"] = $chars; } $this->view->add_dict($account)->out("account", "editchars"); } } else { echo " 0o?"; } }
public function action_bglist() { $allnews = $this->model->getList(); $iter = new ArrayIterator($allnews); foreach ($iter as $news) { $news["indate"] = date_::transDate($news["indate"]); $this->view->set($news)->out("main_c", get_class($this)); //сохраняем результат по каждой строке с шаблоном main_c.html с папки anews } }
public function action_index() { $this->view->replace("title", "keywords"); $this->view->replace("title", "description"); $nar = $this->model->getNewsList($this->configs["cntPerPage"]); //выборка новостей if (count($nar) > 0) { $ai = new ArrayIterator($nar); foreach ($ai as $i_ => $values) { $values["indate"] = date_::transDate($values["indate"]); $values["news"] = Tools::unhtmlentities($values["news"]); $this->view->add_dict($values)->out("center", "news"); } } $this->view->setFContainer("newscontent", 1)->out("main", "news"); }
/** * контент логов из базы */ public function action_getlist() { $top = !empty($_POST["topst"]) ? (int) $_POST["topst"] : 100; $event = !empty($_POST["eventnum"]) ? (int) $_POST["eventnum"] : NULL; $file = !empty($_POST["lilesc"]) && $_POST["lilesc"] != "-1" ? $_POST["lilesc"] : 0; $msg = !empty($_POST["inevmsg"]) ? $_POST["inevmsg"] : NULL; if (!empty($_POST["dbegin"]) && !empty($_POST["dend"])) { $begin = date_::intransDate($_POST["dbegin"]); $end = date_::intransDate($_POST["dend"]); if ($begin == "-/-" || $end == "-/-") { return; } } else { return; } $logs = $this->model->showLogsArr($top, $event, $file, $begin, $end, $msg); $ai = new ArrayIterator($logs); foreach ($ai as $id => $val) { $val["col_createTime"] = date_::transDate($val["col_createTime"], true); $this->view->add_dict($val)->set("id", $id + 1)->out("center", "logs"); } }