<div class="full_background"></div>
<div class="init_loading"><div><img src="<?php echo STATIC_PATH;?>images/common/loading_simple.gif"/></div></div>
<div class="topbar">
	<div class="content">
		<div class="top_left">
			<a href="./" class="topbar_menu title">
			<?php
				if(substr($L['kod_name'],0,4) == '<img'){
					echo $L['kod_name'];
				}else{
					echo '<i class="icon-cloud"></i>'.$L['kod_name'];
				}
			?>
			</a>
		<?php 
			foreach ($config['setting_system']['menu'] as $key=>$value) {
				if ($value['use']!='1') continue;
				$has = ST==$value['name']?'this':'';

				$target = " target='".$value['target']."'" ;
				if ($value['type'] == 'system') {					
					$value['name'] = "<i class='font-icon menu-".$value['name']."'></i>".$L['ui_'.$value['name']];
				}
				echo "<a class='topbar_menu ".$has."' href='".urldecode($value['url'])."'"
					.$target.">".urldecode($value['name'])."</a>";
			}
		?>
		</div>
		<div class="top_right">
			<?php if(!isset($config['settings']['language'])){ ?>
			<div class="menu_group">
				<a id='topbar_language' data-toggle="dropdown" href="#" class="topbar_menu">
				<i class='font-icon icon-flag'></i>&nbsp;<b class="caret"></b>
				</a>
				<ul class="dropdown-menu topbar_language pull-right animated menuShow" role="menu" aria-labelledby="topbar_language">
				  	<?php 
				  		$tpl = "";
				  		foreach ($config['setting_all']['language'] as $key => $value) {
				  			$name = $value[0];
				  			$select = LANGUAGE_TYPE == $key ? "this":"";
				  			$tpl .= "<li><a href='javascript:core.language(\"{$key}\");' title=\"{$key}/{$value[1]}/{$value[2]}\" class='{$select}'><i class='lang-flag flag-{$key}'></i>{$name}</a></li>";
				  		}
						echo $tpl;
					?>
				</ul>
			</div>
			<?php } ?>
			<!-- 全局设置语言则不再显示 -->
			
			<div class="menu_group">
				<a href="#" id='topbar_user' data-toggle="dropdown" class="topbar_menu"><i class="font-icon icon-user"></i><?php echo $_SESSION['kod_user']['name'];?>&nbsp;<b class="caret"></b></a>
				<ul class="dropdown-menu menu-topbar_user pull-right animated menuShow" role="menu" aria-labelledby="topbar_user">
					<li class="menu_system_setting"><a href="javascript:core.setting('system');"><i class="font-icon icon-cog"></i><?php echo $L['system_setting'];?></a></li>
					<li class="menu_system_group"><a href="javascript:core.setting('member');"><i class="font-icon icon-group"></i><?php echo $L['setting_member'];?></a></li>
					<li class="menu_system_user"><a href="javascript:core.setting('user');"><i class="font-icon icon-user"></i><?php echo $L['setting_user'];?></a></li>
					<li class="menu_system_theme"><a href="javascript:core.setting('theme');"><i class="font-icon icon-dashboard"></i><?php echo $L['setting_theme'];?></a></li>
					<li class="menu_system_full"><a href="javascript:core.fullScreen();"><i class="font-icon icon-fullscreen"></i><?php echo $L['full_screen'];?></a></li>
					<li class="menu_system_help"><a href="javascript:core.setting('help');"><i class="font-icon icon-question"></i><?php echo $L['setting_help'];?></a></li>
					<li class="menu_system_about"><a href="javascript:core.setting('about');"><i class="font-icon icon-info-sign"></i><?php echo $L['setting_about'];?></a></li>
					<li role="presentation" class="divider"></li>
					<li class="menu_system_logout"><a href="./index.php?user/logout"><i class="font-icon icon-signout"></i><?php echo $L['ui_logout'];?></a></li>
				</ul>
			</div>
		</div>
		<div style="clear:both"></div>
	</div>
</div>
