<div class="full-background"></div>
<div class="init-loading">
	<div><img src="<?php echo STATIC_PATH;?>images/common/loading_simple.gif?v=<?php echo KOD_VERSION;?>"/></div>
</div>
<div class="topbar aero">
	<div class="content">
		<button class="btn btn-wap-menu hidden"
			data-toggle="collapse" data-target="#top-menu-left" 
		><i class="font-icon icon-reorder"></i></button>

		<div class="top-left collapse" id="top-menu-left">
			<?php 
				$config = $GLOBALS['config'];
				$html = '<a href="./" class="topbar-menu title">';
				$subMenu = '';
				$isWap = is_wap();
				if(substr(LNG('kod_name'),0,4) == '<img'){
					$html .= LNG('kod_name').'</a>';
				}else{
					$html .= '<i class="icon-cloud"></i>'.LNG('kod_name').'</a>';
				}
				foreach ($config['settingSystem']['menu'] as $key=>$value) {
					if ($value['use']!='1') continue;
					$has = ST==$value['name']?'this':'';
					$target = " target='_self'" ;
					if($value['target']=='1' || $value['target'] == '_blank'){
						$target = " target='_blank'" ;
					}
					$name = rawurldecode($value['name']);
					if(LNG('ui_'.$name) != 'ui_'.$name){
						$name = "<i class='font-icon menu-".$name."'></i><span>".LNG('ui_'.$name).'</span>';
					}else if($value['icon']){
						$name = $value['icon'].'<span>'.LNG($name).'</span>';
					}else if(!strstr($name,'<') && $value['subMenu']){
						$name = "<i class='font-icon words'><em>".$name."</em></i><span>".LNG($name).'</span>';
					}
					if($value['subMenu'] && !$isWap){
						$subMenu .= "<li><a class='topbar-menu-sub ".$has."' href='".urldecode($value['url'])."'"
								 .$target.">".urldecode($name)."</a></li>";
					}else{
						$html .= "<a class='topbar-menu ".$has."' href='".urldecode($value['url'])."'"
							  .$target.">".urldecode($name)."</a>";
					}
				}
				echo $html;
			?>

			<?php if($subMenu){?>
			<div class="menu-group fl">
				<a class="topbar-menu" id="topbar-submenu" 
					data-toggle="dropdown" href="#" title="<?php echo LNG('menu_sub_menu');?>">
					<i class="icon-th-large"></i>
				</a>
				<ul class="dropdown-menu topbar-submenu pull-left animated menuShow" role="menu" aria-labelledby="topbar-submenu">
					<?php echo $subMenu;?>
				</ul>
			</div>
			<?php } ?>
		</div>
		<div style="clear:both"></div>
	</div>
</div>
