<?php
/**
 * @copyright ICZ Corporation (http://www.icz.co.jp/)
* @license See the LICENCE file
* @author <sencha@icz.co.jp>
* @version $Id$
*/
//メンテナンス画面、IPホスト禁止画面

class ErrorsController extends AppController {

	var  $name = "Errors";
	var  $uses = array("User");
	var  $layout = 'login_layout';
	var  $components = array('Session','Auth');


	function beforeFilter(){
		$this->Auth->autoRedirect = false;
		$this->Auth->allow('index','sorry');
	}

	function index($params){
		if($params == 'mainte'){
			$this->set('title', Configure::read('MAINTE_Title'));
			$this->set('message', Configure::read('MAINTE_Massage'));
			$this->Render('index');
		}
		elseif($params == 'iphost'){
			$this->set('title', Configure::read('IPHOST_Title'));
			$this->set('message', Configure::read('IPHOST_Massage'));
			$this->Render('sorry');
		}

	}

}
