Bez popisu
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

header.htm 5.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <header class="header">
  2. <div class="h-fix">
  3. <div class="container">
  4. <h1 class="logo"> <a href="https://www.zc10000.com" title="">
  5. <img id="light-logo" src="{eyou:global name='web_attr_31' /}" alt="职称E家LOGO" title="职称E家LOGO">
  6. <img id="dark-logo" src="{eyou:global name='web_attr_32' /}" alt="职称E家LOGO" title="职称E家LOGO">
  7. </a> </h1>
  8. <div id="m-btn" class="m-btn"><i class="fa fa-bars"></i></div>
  9. <div class="search"> <i class="s-btn off fa fa-search"></i>
  10. <div class="s-form"> <i class="arrow fa fa-caret-up"></i>
  11. {eyou:searchform type='sonself'}
  12. <form name="formsearch" method="get" action="{$field.action}" class="sform">
  13. <input class="sinput" name="keywords" type="text" placeholder="请输入搜索词">
  14. <button><i class="fa fa-search"></i></button>
  15. <!-- <input type="submit" value='点击搜索' />--->
  16. {$field.hidden}
  17. </form>
  18. {/eyou:searchform}
  19. </div>
  20. </div>
  21. <div class="darkmode"> <a href="javascript:switchNightMode()" target="_self" class=""><i class="fa fa-moon-o"></i></a> </div>
  22. <nav class="nav-bar" id="nav-box" data-type="index" data-infoid="">
  23. <ul class="nav">
  24. {eyou:php}
  25. $catid = $_GET['tid']?$_GET['tid']:0;
  26. if((int)$catid === 56){
  27. $catid = $_GET['catids']?$_GET['catids']:0;
  28. }
  29. {/eyou:php}
  30. {eyou:assign name='rowNum' value='0' /}
  31. {eyou:navigation position_id='1' currentclass=''}
  32. <?php
  33. //$class = 'active';
  34. //$page
  35. //$rowNum
  36. //var_dump($rowNum);
  37. //var_dump($catid);
  38. $class = '';
  39. if((int)$catid === 1231 && (int)$rowNum === 1){
  40. $class = 'active';
  41. }else if((int)$catid === 1232 && (int)$rowNum === 2){
  42. $class = 'active';
  43. }else if((int)$catid === 1233 && (int)$rowNum === 3){
  44. $class = 'active';
  45. }else if((int)$catid === 1234 && (int)$rowNum === 4){
  46. $class = 'active';
  47. }else{
  48. if((int)$rowNum === 0 && (int)$catid === 0){
  49. $class = 'active';
  50. }else{
  51. $class = '';
  52. }
  53. }
  54. //var_dump($class);
  55. ?>
  56. {eyou:if condition='((int)$rowNum === 0)'}
  57. <!--nvabar-item-index-->
  58. <li id="" class="{$class}"><a href="https://www.zc10000.com">首页</a></li>
  59. {eyou:else /}
  60. {eyou:notempty name='$field1.children'}
  61. <li id="navbar-category-3" class="li-cate-3 {$class}">
  62. <a href="">{$field.nav_name}</a>
  63. <ul class="sub-menu">
  64. {eyou:navigation name='$field1.children' id='field2'}
  65. <li id="navbar-category-8" class="li-cate-8">
  66. <a href='{:get_tid_url_2($field2["nav_url"])}'>{$field2.nav_name}</a>
  67. </li>
  68. {/eyou:navigation} // 第二级菜单循环结束
  69. </ul>
  70. </li>
  71. {eyou:else /}
  72. <li id="navbar-category-3" class="li-cate-3 {$class}">
  73. <a href="{:get_tid_url_2($field["nav_url"])}">
  74. {$field.en_name}
  75. </a>
  76. </li>
  77. {/eyou:notempty}
  78. {/eyou:if}
  79. {eyou:php}
  80. $rowNum++;
  81. {/eyou:php}
  82. {/eyou:navigation}
  83. </ul>
  84. </nav>
  85. <div style="float: right;">
  86. {eyou:if condition='($is_mobile === false)'}
  87. {eyou:user type='userinfo'}
  88. <div id="{$field.htmlid}" style="float: left;">
  89. <div class="submit fr">
  90. <a target="_blank" href="https://www.zc10000.com{$field.loginurl}" class="a transition" rel="nofollow">
  91. <i class="fa fa-heart"></i>登录
  92. </a>
  93. </div>
  94. <div class="submit fr">
  95. <a target="_blank" href="https://www.zc10000.com{$field.regurl}" class="a transition" rel="nofollow">
  96. <i class="fa fa-heart"></i>注册
  97. </a>
  98. </div>
  99. </div>
  100. {$field.hidden}
  101. {/eyou:user}
  102. {/eyou:if}
  103. </div>
  104. </div>
  105. </div>
  106. </header>