<?php

/**
 *--------------------------------------
 * 首页
 *--------------------------------------
 * @project		: uwa
 * @author		: cblee
 * @created		: 2012-09-28
 * @copyright	: (c)2012 AsThis
 *--------------------------------------
 */

class IndexCtrlr extends Ctrlr
{
	public function __construct()
	{
		parent::__construct();

		if(!file_exists(CFG_PATH.D_S.'install.lock.php'))
		{
			redirect(__APP__.'/install/');
		}

		/* 站点信息 */
		$_SITE = M('Option')->get_option('site');
		unset($_SITE['theme']);
		$this->assign('_SITE', $_SITE);

		/* 设置 */
		$_G = M('Option')->get_option();
		unset($_G['site']); unset($_G['core']); unset($_G['image']);
		$this->assign('_G', $_G);
	}

	public function index()
	{
		$this->assign('TASK', 'update_html_index');

		$this->display('home/index');
	}
}
?>