查看文件: header_menu.php
大小: 5.93 KB
类型: application/octet-stream
<?php require_once('../Connections/BE2.php'); ?> <?php function sel($cid){ require('../Connections/BE2.php'); mysql_select_db($database_BE2, $BE2); $query_R2 = "SELECT * FROM jscookmenu WHERE flag='Y' AND cid = '$cid' ORDER BY idx ASC"; $R2 = mysql_query($query_R2, $BE2) or die(mysql_error()); $row_R2 = mysql_fetch_assoc($R2); $totalRows_R2 = mysql_num_rows($R2); $arr1=array(); $i=1; do { $arr1[$i][0]=$row_R2['mid']; $arr1[$i][1]=$row_R2['cid']; $arr1[$i][2]=$row_R2['title']; $arr1[$i][3]=strpos($row_R2['link'],"//")?$row_R2['link']:"/".$row_R2['link']; //$_SERVER["PHP_SELF"]."?id=".$row_R2['mid']; //$row_R2['link']; $arr1[$i][4]=$row_R2['doc'];//"_self";//$row_R2['link_tag']; $arr1[$i][5]=$row_R2['pic'];//"_self";//$row_R2['link_tag']; $arr1[$i][6]=$row_R2['link_tag'];//"_self";//$row_R2['link_tag']; $i++; } while ($row_R2 = mysql_fetch_assoc($R2)); if (count($arr1)<1 ){return 0; }else{return $arr1;} } mysql_select_db($database_BE2, $BE2); $query_R1 = "SELECT * FROM jscookmenu WHERE mid>1 AND cid = 0 AND flag='Y' ORDER BY idx ASC"; $R1 = mysql_query($query_R1, $BE2) or die(mysql_error()); $row_R1 = mysql_fetch_assoc($R1); $totalRows_R1 = mysql_num_rows($R1); // logo data $rlogo= ilogo_img(); ?> <!-- Header --> <header id="js-header" class="u-header u-header--static u-header--show-hide u-header--change-appearance u-header--has-hidden-element" data-header-fix-moment="200" data-header-fix-effect="slide"> <div class="u-header__section u-header__section--light g-bg-white g-transition-0_3 g-py-15" data-header-fix-moment-exclude="g-bg-white g-py-15"> <!--<header id="js-header" class="u-header u-header--static"> <div class="u-header__section u-header__section--light g-bg-white g-transition-0_3 g-py-15">--> <nav class="js-mega-menu navbar navbar-expand-md hs-menu-initialized hs-menu-horizontal"> <div class="container"> <!-- Responsive Toggle Button --> <button class="navbar-toggler navbar-toggler-right btn g-line-height-1 g-brd-none g-pa-0 g-pos-abs g-top-3 g-right-0" type="button" aria-label="Toggle navigation" aria-expanded="false" aria-controls="navBar" data-toggle="collapse" data-target="#navBar"> <span class="hamburger hamburger--slider"> <span class="hamburger-box"> <span class="hamburger-inner"></span> </span> </span> </button> <!-- End Responsive Toggle Button --> <!-- Logo --> <div style="display:flex;align-items:center;"> <a href="/"><img src="/logo_img/<?= $rlogo[0][0];?>" title="<?= $rlogo[1][0];?>"></a> <div> <a href="/shop/<?= $_SESSION['shop_name'];?>.html"><img src="/shop/img/logo_<?= sprintf("%07d",$_SESSION['shop_id'])?>.png" title="<?= $_SESSION['shop_name'];?>"></a> <? $logoimg= '/shop/img/skybni_blank.png' ; $menu=isset($_GET['menu'])?$_GET['menu']:'SKYBNI'; //禾昌國際 if($menu=='7'){ $logoimg= '/shop/ext/HOPE.png' ; } else if($menu=='198'){ $logoimg= '/shop/ext/198.png' ; } ?> <br><a href="/shop/<?= $_SESSION['shop_name'];?>.html"><img src="<?= $logoimg; ?>" title="<?= $_SESSION['shop_name'];?>"></a> </div> </div> <!-- End Logo --> <!-- Navigation --> <? /* <div class="collapse navbar-collapse align-items-center flex-sm-row g-pt-10 g-pt-5--lg g-mr-20--lg" id="navBar"> <ul class="navbar-nav g-pos-rel g-font-weight-600 ml-auto g-font-size-13"> <? $c=1; do { $ilink1=($row_R1['link']=="")?"#":$row_R1['link']; $ilink1=(strpos($ilink1,"//"))?$ilink1:"/".$ilink1; ?> <? $re2=($row_R1['mid']<>"")?sel($row_R1['mid']) :0; $sub=false; if ((count($re2)>0 )&&($re2[1][0]<>"")){ $sub=true; $ilink1="#s".$c;} ?> <li class="nav-item hs-has-sub-menu g-mx-10--lg g-mx-10--xl" data-animation-in="fadeIn" data-animation-out="fadeOut"> <a id="nav-link--features" class="nav-link g-py-7 g-px-0 g-color-indigo" href="<?= $ilink1;?>" aria-haspopup="true" aria-expanded="false" aria-controls="nav-submenu--features"><? echo $row_R1['title'] ?></a> <? if ($sub==true){ ?> <ul class="hs-sub-menu list-unstyled u-shadow-v11 g-brd-top g-brd-primary g-brd-top-2 g-min-width-220 g-mt-18 g-mt-8--lg--scrolling" aria-labelledby="nav-link--features"> <? for($i=1;$i<=count($re2);$i++){ ?> <li class="dropdown-item"> <a class="nav-link" href="<?= $re2[$i][3] ?>"><?= $re2[$i][2] ?></a> </li> <? } ?> </ul> <? } // end $sub ?> </li> <? $c++; } while ($row_R1 = mysql_fetch_assoc($R1)); ?> <li class="list-inline-item mt-1 g-mx-10--lg g-mx-10--xl"> <a href="/<?= $_SESSION['login_memid']==''?'registerform.html':'guest/'; ?>" class="u-tags-v1 g-color-white g-bg-primary g-rounded-10 g-py-4 g-px-10"><?= $_SESSION['login_memid']==''?'註冊會員':'個資管理'; ?></a> </li> <li class="list-inline-item mt-1"> <a href="/<?= $_SESSION['login_memid']==''?'login':'logout'; ?>.html" class="u-tags-v1 g-color-white g-bg-red g-rounded-10 g-py-4 g-px-10">會員登<?= $_SESSION['login_memid']==''?'入':'出'; ?></a> </li> </ul> </div> */ ?> <!-- End Navigation --> <!-- Search --> <? // include "../search_page.php" ;?> <!-- End Search --> </div> </nav> </div> </header> <!-- End Header -->
保存
取消
返回文件列表