Example #1
0
File: view.php Project: bekoys/blog
 public static function getView($template, $ext = '.php')
 {
     if (!is_dir(TEMPLATE_PATH)) {
         fyMsg('当前使用的模板已被删除或损坏,请登录后台更换其他模板。', SITE_PATH . 'admin/themes.php');
     }
     return TEMPLATE_PATH . $template . $ext;
 }
Example #2
0
 /**
  * 发送查询语句
  *
  */
 function query($sql)
 {
     $this->result = @mysql_query($sql, $this->conn);
     $this->queryCount++;
     if (!$this->result) {
         fyMsg("SQL语句执行错误:{$sql} <br />" . $this->geterror());
     } else {
         return $this->result;
     }
 }
Example #3
0
/**
 * 显示404错误页面
 * 
 */
function show_404_page()
{
    if (is_file(TEMPLATE_PATH . '404.php')) {
        header("HTTP/1.1 404 Not Found");
        include View::getView('404');
        exit;
    } else {
        fyMsg('404', BLOG_URL);
    }
}