<?php require substr(dirname(__FILE__), 0, -6) . '/init.inc.php'; global $_tpl; Validate::checkSession(); global $_tpl; $_main = new MainAction($_tpl); //入口 $_main->_action(); $_tpl->display('main.tpl');
$tmp->assign('siteName', $site_name); $tmp->assign('loginArr', $loginArr); $tmp->output(); } else { $tmp = template("index.html"); $tmp->cache_lifetime = $cache_lifetime; $tmp->use_cache(); $tmp->assign('codeName', $code_name); $tmp->assign('codeVersion', $code_version); $tmp->assign('siteName', $site_name); $tmp->assign('siteDomain', $site_domain); $tmp->assign('siteCatalog', $site_catalog); $tmp->assign('siteIcp', $site_icp); $tmp->assign('loginArr', $loginArr); $DB->connect($mysql_host, $mysql_user, $mysql_pass, $mysql_dbname); $category = MainAction::getCategory(); $tmp->assign('category', $category); $hotTopic = MainAction::getTopic("replies"); $tmp->assign('hotTopic', $hotTopic); $newTopic = MainAction::getTopic("tid"); $tmp->assign('newTopic', $newTopic); $topForum = MainAction::getForum(); $tmp->assign('topForum', $topForum); $topMember = MainAction::getMember(); $tmp->assign('topMember', $topMember); $DB->close(); $friendLink = unserialize(substr(file_get_contents("./database/db.links.php"), 13)); $tmp->assign('friendLink', $friendLink); $tmp->output(); } ob_end_flush();
echo "0 数据库繁忙,请稍候再试!"; } } } $DB->close(); } } } } else { if (isset($_GET['name']) && !empty($_GET['name'])) { $searchWord = trim(filterHTML($_GET['name'], false)); } else { $searchWord = ""; } $DB->connect($mysql_host, $mysql_user, $mysql_pass, $mysql_dbname); $category = MainAction::getCategory(); $DB->close(); unset($DB, $TB); $tmp = template("create.html"); $tmp->assign('codeName', $code_name); $tmp->assign('codeVersion', $code_version); $tmp->assign('siteName', $site_name); $tmp->assign('siteDomain', $site_domain); $tmp->assign('siteCatalog', $site_catalog); $tmp->assign('siteIcp', $site_icp); $tmp->assign('createAllow', $create_allow); $tmp->assign('loginArr', $loginArr); $tmp->assign('searchWord', $searchWord); $tmp->assign('searchType', "1"); $tmp->assign('category', $category); $tmp->output();