<header class="header">
	<div class="container clearfix">
		<div class="logo">
			<a style="background-image:url(media/[fh_logo])" href="./" title="[fh_title]"></a>
		</div>
		<ul class="nav-main">

<fh-function>
                $sql="select * from sl_menu where U_hide=0 and U_del=0 and U_sub=0 order by U_order,U_id desc";
                s[[
                  if($type==$row["U_type"] && $id==$row["U_typeid"]){
                    $class="nav-li active";
                  }else{
                    $class="nav-li margin-left-0";
                  }

                  if($row["U_type"]=="link"){
                    $link=$row["U_link"];
                    $target="_blank";
                  }else{
                    $link="?type=".$row["U_type"]."&id=".$row["U_typeid"];
                    $target="_self";
                  }
$U_count=getrs("select count(*) as U_count from sl_menu where U_del=0 and U_sub=".$row["U_id"],"U_count");
            if($U_count>0){

                    $api=$api."<li class=\"mega2 menu-item-has-children\"><a  href=\"".$link."\" target=\"".$target."\" title=\"".$row["U_title"]."\">".$row["U_title"]."</a><ul class=\"sub-menu\">";

                    $sql2="select * from sl_menu where U_hide=0 and U_del=0 and U_sub=".$row["U_id"]." order by U_order,U_id desc";
                    s2[[
                      
                      if($row2["U_type"]=="link"){
                        $link2=$row2["U_link"];
                        $target="_blank";
                      }else{
                        $link2="?type=".$row2["U_type"]."&id=".$row2["U_typeid"];
                        $target="_self";
                      }
                            $api=$api."<li><a href=\"".$link2."\" target=\"".$target."\">".$row2["U_title"]."</a></li>";
                        ]]

$api=$api."</ul></li>";
}else{
  $api=$api."<li><a  href=\"".$link."\" target=\"".$target."\" title=\"".$row["U_title"]."\">".$row["U_title"]."</a></li>";
}


                ]]

              </fh-function>


								</ul>
<script type="text/javascript">
	$(".nav-main a").each(function() {
		if ($(this)[0].href == String(window.location)) {
			$(".nav-main a").removeClass("active");
			$(this).addClass("active");
		}
	});
</script>
		<ul class="nav-right">
			<li class="nav-vip">
				<a href="./?type=vip"><i class="icon icon-vip-s"></i></a>
			</li>
			<li class="nav-search">
				<a href="javascript:;" class="search-loader" title="搜索"><i class="icon icon-search"></i></a>
			</li>

      <fh-function>
      if($_SESSION["M_login"]==""){
        $api="<li class=\"nav-login no\">
        <a href=\"member/login.php?from=".urlencode("../?type=$type&id=$id")."\" class=\"signin-loa1der\"><span>登录</span></a>
        <b class=\"nav-line\"></b>
        <a href=\"member/reg.php?from=".urlencode("../?type=$type&id=$id")."\" class=\"signin-r1eg\"><span>注册</span></a>
      </li>";
      }else{
        $api="<li class=\"nav-login no\">
        <a href=\"member\" class=\"signin-loa1der\"><span>".$_SESSION["M_login"]."</span></a>
        <b class=\"nav-line\"></b>
        <a href=\"member/login.php?action=unlogin\" class=\"signin-r1eg\"><span>退出</span></a>
      </li>";
      }
      </fh-function>

					</ul>
	</div>
</header>

<div class="search-wrap">
  <div class="container">
    <div class="search-form">
      <input autocomplete="off" class="search-input" type="text" id="names1" placeholder="输入搜索关键词回车，多个关键词用空格分开">
      <i class="icon icon-close"></i>
    </div>
  </div>
</div>