查看文件: header_menu.php
大小: 6.78 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;} } $menu1=isset($_GET['menu'])?$_GET['menu']:'index'; $menu1=str_replace('.html','',$menu1); 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); $rlogo= ilogo_img(); /* if ( $_SERVER['REMOTE_ADDR']=='220.130.43.118'){ for($c=0;$c<2;$c++){ echo $rlogo[$c][0].','.$rlogo[$c][1].','.$rlogo[$c][2]."<br>"; } // echo $_SERVER['REQUEST_URI'].",". $query_Lo1.','.$REQUEST_URI; } */ ?> <!-- Header --> <? // hidden $noheader mysql_select_db($database_BE2, $BE2); $query_Rn =sprintf("SELECT * FROM noheader WHERE nname='%s' AND ncknav='Y'",$menu1 ); $Rn = mysql_query($query_Rn, $BE2) or die(mysql_error()); $row_Rn = mysql_fetch_assoc($Rn); $totalRows_Rn = mysql_num_rows($Rn); mysql_free_result($Rn); //$noheader=array('招商簡報2','雲端商圈全新商業模式',"天空商城互聯網事業書"); // if (! in_array($menu1, $noheader)) { if($totalRows_Rn==0){ ?> <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 --> <? $logo_link='/'; if(isset($_GET['mylogo'])&& ($_GET['mylogo']==198)){ $logo_link='/shopid/198'; } ?> <div style="display:flex;align-items:center;" > <a href="<?= $logo_link ?>"><img src="/logo_img/<?= $rlogo[0][0] ; ?>" title="<?= $rlogo[1][0]; ?>" width="65" height="65"></a> <div> <? $ck_street=(isset($_GET['search2'])&&($_GET['search2']=="實景街圖"))?true:false; ?> <? if(!$ck_street){ ?> <a href="<?= $logo_link ?>"><img src="/logo_img/<?= $rlogo[0][1] ; ?>" title="<?= $rlogo[1][1]; ?>"></a> <br><a href="<?= $logo_link ?>"><img src="/logo_img/<?= $rlogo[0][2] ; ?>" title="<?= $rlogo[1][2]; ?>"></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 --> <? } ?>
保存
取消
返回文件列表