<?php
class mogvs_mod extends mod{
	
    /**
     * 架构函数
     *
     * @param unknown_type $p
     */
    public function __construct(&$p = array()){
        parent::__construct($p);
		if(!is_file(DATA_PATH . 'install.lock')){
            $this->redirect('@install' , 1);
        }
        if(isset($this->conf['close']) && $this->conf['close']){
        	$this->showmsg('网站维护中...');
        }
        // 导航数据
        $this->assign('nav', api_lib::getnav());
        // 导航数据
        $this->assign('snav', api_lib::getnav(1));
        // 站点配置信息
        $this->assign('sconf', $this->conf);
        // 今日更新数
        $this->assign('updates', api_lib::getupdates());
        // 站点广告
        $this->assign('ads', api_lib::getads());
        if($this->conf['randlink'] != '0' && $this->mod == 'index'){
	        $this->assign('randlink' , api_lib::getrand($this->conf['randlink']));
        }
    }
}
?>