<?php
if (!defined('IN_CONTEXT')) die('access violation error!');
?>
<!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=utf-8" />
<title>管理后台</title>
<link rel="stylesheet" type="text/css" href="<?php echo P_TPL_WEB; ?>/css/style1.css" />
<!-- 23/03/2010 Jane Add >> -->
<?php include_once(P_INC.'/global_js.php'); ?>
<script language="javascript">
<!--
	function siteGuid() 
    {
        show_iframe_win('index.php?<?php echo Html::xuriquery('mod_wizard', 'admin_index'); ?>', '', 732, 503);
	}
//-->
</script>
<!-- 23/03/2010 Jane Add << -->
</head>
<body>
	<div id="top">
		<a target="_blank" href="http://mxgsf88.72web.cn"><img style="border:none;" width="192" height="53" src="<?php echo P_TPL_WEB;?>/images/top_logo.jpg"/></a>
		<ul>
        	<li><a href="index.php"><?php echo __('Dashboard');?></a>&nbsp;&nbsp;|&nbsp;&nbsp;</li>
            <?php 
            	if(DEFAULT_LOCALE == 'zh_CN') {
            ?>	
           <li><a href="#" onclick="siteGuid()"><?php _e('Guide');?></a>&nbsp;&nbsp;|&nbsp;&nbsp;</li>
            <?php }?>	
                
           <li><a href="#" onclick="show_iframe_win('index.php?<?php echo Html::xuriquery('mod_about', 'admin_index'); ?>', '', 395, 225)"><?php _e("About");?></a>&nbsp;&nbsp;|&nbsp;&nbsp;</li>
            	
           <li><a class="exit" href="<?php echo Html::uriquery('frontpage', 'dologout');?>" title="Logout"><?php _e('Logout');?></a></li>
    	</ul>   
    </div>
	<div id="menu">
    	<div id="menu_l"><span class="icon1">
    	<?php 
    	$o_locale = new Parameter();
    	$locale_items = $o_locale->findAll("`key` = 'DEFAULT_LOCALE'");
    	$_user = SessionHolder::get('user/login');
    	if($locale_items[0]->val == 'zh_CN') {
    		$showMsg = '您好尊敬的'.$_user.'会员';
    	} elseif($locale_items[0]->val == 'en') {
    		$showMsg = 'Hello,'.$_user;
    	}
    	echo $showMsg;
    	?>
    	
    	</span></div>        <ul>
        <?php 
        $o_admin_menu_category = new AdminMenuCategory();
        $admin_menu_category_items = $o_admin_menu_category->findAll();
        foreach($admin_menu_category_items as $v){
        	if($v->module == 'mod_modules' && $v->action == 'index') {
        		$str .= '<li class="lii"><a href="'.Html::uriquery('mod_modules', 'index').'" target="_blank">'.__('Layouts').'</a></li>';
        		$flag = true;
        	}
        	
        	if($v->module == 'mod_authorization' && $v->action == 'admin_list'){
        		$str .= '<li class="lii"><a style="color:#F30;background:none;" href="http://mxgsf88.72web.cn/" target="_blank">软件授权</a></li>';
        		$flag = true;
        	}
        	if(!$flag) {
        		$str .= '<li class="lii"><a href="'.Html::uriquery($v->module, $v->action).'">'.__($v->category_name).'</a></li>';
        	}
        	$flag = false;
        }
		                     
		     $str .= '</ul>
		        <div id="menu_r"> <a href="../?_v=preview" target=_blank>'.__('Preview Home').'</a></div>
		    </div>';
		     
		echo $str;
        ?>    
    </div>
 	<div id="header">
        <?php include_once($_content_);?>
    </div>
    <?php 
		include_once(P_TPL_WEB."/layout/footer.php");
	?>
</body>
</html>
