<fh-function>
$C=getrs("select * from sl_config");
</fh-function>
<header class="site-header">
      <div class="container">
      <div class="navbar">
      <div class="logo-wrapper">
              <a href="./">
          <img class="logo regular tap-logo" src="media/[fh_logo]" data-dark="" alt="[fh_title]">
        </a>
            </div>
      <div class="sep"></div>
      
      <nav class="main-menu hidden-xs hidden-sm hidden-md">
        
        <ul id="menu-menu-1" class="nav-list u-plain-list">


        	<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="on";
                  }else{
                    $class="";
                  }

                  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){
            $api2=$api2."<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";
                  $result2 = mysqli_query($conn,  $sql2);
                  if (mysqli_num_rows($result2) > 0) {
                  while($row2 = mysqli_fetch_assoc($result2)) {
                      
                      if($row2["U_type"]=="link"){
                        $link2=$row2["U_link"];
                        $target="_blank";
                      }else{
                        $link2="?type=".$row2["U_type"]."&id=".$row2["U_typeid"];
                        $target="_self";
                      }

                      $api2=$api2."<li id=\"menu-item-".$row2["U_id"]."\" class=\"menu-item menu-item-type-taxonomy menu-item-object-category menu-item-145\"><a href=\"".$link2."\" target=\"".$target."\">".$row2["U_title"]."</a></li>";

                      }
                      $class="menu-item-has-children";
                    }else{
                    $class="";
                  }
                    $api2=$api2."</ul>";
          }

                $api=$api."<li id=\"menu-item-".$row["U_id"]."\" class=\"menu-item menu-item-type-taxonomy menu-item-object-category ".$class." menu-item-143\"><a href=\"".$link."\" target=\"".$target."\">".$row["U_title"]."</a>".$api2."</li>";
$api2="";
                ]]

              </fh-function>





</ul>      </nav>
      
      <div class="main-search">
<form  class="search-form inline" action="./?type=search" method="post">
  <input type="search" class="search-field inline-field" placeholder="输入关键词，回车..." autocomplete="off" value="" name="keyword" required="required">
  <input type="hidden" name="type" value="product">
  <button type="submit" class="search-submit"><i class="mdi mdi-magnify"></i></button>
</form>

        <div class="search-close navbar-button"><i class="mdi mdi-close"></i></div>
      </div>

      <div class="actions">
<fh-function>
			if($_SESSION["M_login"]==""){
				$api="<a href=\"member\" class=\"login-btn navbar-button\"><i class=\"mdi mdi-account\"></i> 登录</a>";
			}else{

$sql="Select * from sl_member where M_id=".intval($_SESSION["M_id"])." and M_del=0 and M_stop=0";
  $result = mysqli_query($conn, $sql);
  if (mysqli_num_rows($result) > 0) {
    $row = mysqli_fetch_assoc($result);
    $M_head=$row["M_head"];
    $M_viptime=$row["M_viptime"];
    $M_viplong=$row["M_viplong"];
    $M_login=$row["M_login"];
    $M_money=$row["M_money"];
    $M_fen=$row["M_fen"];

    if($M_viplong-(time()-strtotime($M_viptime))/86400>0){
      $M_vip=1;
      $M_viptitle="VIP会员";
      if($M_viplong>30000){
        $M_vipend="永久";
      }else{
        $M_vipend=date('Y-m-d', strtotime ("+".$M_viplong." day", strtotime($M_viptime)));
      }
      $class="badge-warning";
      $info="续费";
    }else{
      $M_vip=0;
      $M_viptitle="普通会员";
      $M_vipend="未开通VIP";
      $class="badge-secondary";
      $info="开通";
    }
}


				$api='
                      <div class="header-dropdown header__group header__group_user header__style_user">

  <div class="header__cat">
      <a class="user-pbtn" href="member"><img alt="" data-src="'.pic($M_head).'" class="lazyload avatar avatar-96 photo" height="96" width="96" />      <span>'.$M_login.'</span>      </a>
  </div>

  <div class="header__dropdown">
    <div class="header-box">
      <div class="refresh-header-top">
        <div class="header-top">
          <img alt="" data-src="'.pic($M_head).'" class="lazyload avatar avatar-96 photo " height="96" width="96" />            <div class="">
              <span>
                <a class="user-names" href="member">'.$M_login.'</a>
                   <i class="wp wp-VIP"> '.$M_viptitle.' </i>                   <i class="group-name"> '.$M_vipend.'</i>               </span>
              <p id="buy-vip" rel-vipid="3">
                加入SVIP，享受折扣下载全站资源，享受VIP特权。              </p>
            </div>
            <a href="member/login.php?action=unlogin" class="logout">退出</a>
          </div>
      </div>

      <div class="header-center">
        <div class="md-l">
          <span class="md-tit">我的钱包</span>
          <span class="jinbi" title="现有余额：'.$M_money.'"><i></i>现有余额：'.$M_money.' </span>
          <span class="dou" title="我的积分：'.$M_fen.'"><i></i>我的积分：'.$M_fen.'</span>
          <a href="member/pay.php" class="pay-credit" >充值</a>
        </div>
        <div class="md-r">
        <div class="md-t">
        <span>SVIP会员</span>
        <p>开通会员享受折扣优惠</p><a href="member/vip.php" class="pay-vip">开通</a>      </div>
      <div class="md-b">
        <span>永久SVIP会员</span>
        <p>限时开放，尊享永久</p><a href="member/vip.php" class="pay-vip">升级</a>
        
      </div>
    </div>
  </div>
       
      <div class="header-bottom">
        <ul>
          <li><a href="member/collection.php?type=0"><i class="ico_1"></i>我的收藏</a></li>
          <li><a href="member/product_sell.php"><i class="ico_2"></i>我的文章</a></li>
          <li><a href="member/edit.php"><i class="ico_3"></i>安全中心</a></li>
          <li><a href="member/product.php"><i class="ico_4"></i>我的订单</a></li>
          <li><a href="member/fx.php"><i class="ico_5"></i>邀请好友</a></li>
                  </ul>
      </div>
        </div>
  </div>
</div>            
                          ';
      }
			</fh-function>


        <div class="search-open navbar-button"><i class="mdi mdi-magnify"></i></div>
                <div class="tap-dark navbar-button"><i class="mdi mdi-brightness-4"></i></div>
                <div class="burger"></div>
      </div>
    </div>
      </div>
  </header>