function Login() { $tmpl = new Template('empty.tpl'); $this->reponse->setTitle('ورود کاربران'); $tmpl->loadPage('login'); $ret = base64_decode($this->input->getString('ret')); if (!$ret) { $ret = ResponseRegistery::getInstance()->baseURL . "/dashboard/template/show"; } $tmpl->assign("ret", $ret); $this->reponse->setTemplate($tmpl); }
function FirstPage() { $query = "SELECT arts.id,arts.title FROM wb_articles AS arts\n JOIN wb_weblogs AS blogs ON(arts.weblog_id= blogs.id)\n\t\t JOIN ge_subdomains as sub\n\t\t\t ON(sub.site_id=blogs.site_id)\n WHERE sub.sub_domain='{$this->newsSub}'\n LIMIT 0,10"; $newsPosts = $this->db->query($query)->fetchAll(); $tmpl = new Template('frontPage.tpl'); $query = "SELECT\n\t\t blogs.title,\n\t\t\tsub.sub_domain\n\t\t FROM wb_articles AS arts\n JOIN wb_weblogs AS blogs\n\t\t\tON(arts.weblog_id= blogs.id)\n\t\t JOIN ge_subdomains as sub\n\t\t\tON(sub.site_id=blogs.site_id)\n\t\t GROUP BY\n\t\t\tblogs.id\n\t\t ORDER BY\n\t\t\tarts.`date` DESC\n\t\t LIMIT 0,10"; $newArt = $this->db->query($query)->fetchAll(); $tmpl->assign('news', $newsPosts); $tmpl->assign('updates', $newArt); $tmpl->assign('subdomain', $this->newsSub); $tmpl->loadPage('firstPage'); $this->reponse->setTemplate($tmpl); }