<?php

//载入全局配置和函数包
require("../../../include/global.php");

require(VI_ROOT."/module/function.php");
require(VI_ROOT."/module/member/config.php");

//载入分析和通行证模块
require(VI_ROOT."/module/passport/function.php");
require(VI_ROOT."/module/analytic/function.php");

$action = GetQuery("action");
$do = GetQuery("do");
$fid = GetNumber("id",0);
?>
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $Project["charset"];?>" />
<title><?php echo $Modules[$appid]["name"];?> - <?php echo $Global["site"];?> - Powered By VeryIDE</title>
<?php 
	echo $Global["meta"];
	
	//查看皮肤是否存在
	$skin = !empty($_GET["skin"]) ? $_GET["skin"] : $VICACHE["mod.forms"]["skin"];
	if( !file_exists("theme/".$skin) ){
		$skin = "default";
	}

	echo loader_style(array("style/style.css"),"utf-8",$Project["version"]);

	echo loader_script(array(VI_BASE."js/core.js",VI_BASE."js/library.js",VI_BASE."js/ajax.js",VI_BASE."js/effect.js",VI_BASE."js/form.js",VI_BASE."js/verify.js",VI_BASE."module/passport/js/function.js"),$Project["charset"],$Project["version"]);

	//背景图片
	if( !empty($config["PAGE_BG"]) ){
		$bg = "background:url(".$config["PAGE_BG"].") ".$config["PAGE_BG_REPEAT"]." ".$config["PAGE_BG_ATTACHMENT"]." ".$config["PAGE_BG_X"]." ".$config["PAGE_BG_Y"]."";
	}
	
	//主体透明
	if( !empty($config["PAGE_BG_OPACITY"]) ){
		$op = "filter:alpha(opacity=".$config["PAGE_BG_OPACITY"].");opacity:".($config["PAGE_BG_OPACITY"]/100).";";
	}
	
	//背景音乐
	if( !empty($config["PAGE_SOUND"]) && !$action ){
		$bs = '<bgsound src="'.$config["PAGE_SOUND"].'" autostart="true" loop="'.$config["PAGE_SOUND-LOOP"].'" />';
		echo $bs;
	}
?>

</head>
<body style="<?php echo $bg;?>">

	<?php
	//全局导航
	require("../../passport/include.header.php");
	?>

	<div id="main" style="<?php echo $op;?>">
    
        <div id="header">
        
        	<div id="logo">
            	<img />
            </div>
            
            <div id="set">
            	<a href="?">王磊</a>
                <a href="?action=profile">设置</a>
                <a href="?action=auth">实名认证</a>
                <a href="?action=setting">邀请</a>
                <a href="?action=setting">公告</a>
                <a href="?action=setting">帮助</a>
                <a href="?action=exit">退出</a>
            </div>
            
            <div id="nav">
            	<a href="?action=home">我的主页</a>
                <a href="?action=public">活动大厅</a>
                <a href="?action=me">我参加的</a>
            </div>
        </div>
        
        <div id="content">
        
            <a name="top"></a>
            
            <?php
            
			//左侧
            $verify = (!empty($config['USER_BASE']) || !empty($config['USER_ADVANCED']) || !empty($config['USER_CAREER']) || !empty($config['USER_TASTE']) || !empty($config['FORM_NUMBER']) );
            
            $active = array(''=>'include.view.php','post'=>'include.post.php','result'=>'include.result.php','auth'=>'include.auth.php','status'=>'include.status.php','login'=>VI_ROOT.'module/passport/include.login.php','profile'=>'include.profile.php','home'=>'include.home.php');
            
            if(array_key_exists($action,$active)){                
                require($active[$action]);
			}
            
            //var_dump($Global);
			
			//右侧
			 require("include.minor.php");
			
            ?>
            
        </div>
        
		<?php
        //全局页尾
        require("../../passport/include.footer.php");
        ?>
    
    </div>
	
</body>
</html>