<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); 

/**
 * 前台控制器
 */
class MY_Controller extends CI_Controller{
	public function __construct(){
		parent::__construct();
		$this->load->database();
		$this->data['theme_url'] = base_url('themes/emailsystem');
		$this->load->set_theme('emailsystem');
		//关闭站点
		$this->load->model('setting_m');
		$webconfig = $this->setting_m->get();
		if($webconfig['close']){
			//关闭网站
			header('Content-Type:text/html; charset=utf-8');
			echo '<div style="text-align:center;">';
			echo "<h1>网站临时关闭</h1>";
			echo "<h3>关闭原因</h3><span>{$webconfig['closeq']}</span>";
			echo '</div>';
			exit;
		}
	}
}
/**
 * 后台控制器
 */
class Admin_Controller extends CI_Controller{
	public function __construct(){
		parent::__construct();
		$this->load->database();
		$this->data['theme_url'] = base_url('themes/admin');
		$this->load->set_theme('admin');
	}
}









