<?php
/**
 * 管理基类
 * @copyright reginx.com
 * $Id: admin.mod.php 7 2013-01-24 00:30:29Z reginx $
 */
class admin_mod extends mod {

    /**
     * 是否为ajax请求
     *
     * @var unknown_type
     */
    public $isajax = false;

    /**
     * 当前登录的用户
     *
     * @var unknown_type
     */
    public $login  = array();

    /**
     * 构造函数
     *
     * @param unknown_type $param
     */
    function __construct(&$param){
        parent::__construct($param);
        $this->settpldir('default');
        $this->opensess($param['sess']);
        $this->isajax = $this->get('isajax' , 'R') === null ? false : true;
        $this->login = $this->sobj->get('admin');
        if(!$this->login){
            $this->redirect('login-index');
        }
        $this->assign('sconf' , $this->conf);
        $this->assign('login' , $this->login);
    }
}
?>