当前位置: 首页 > news >正文

建设施工合同备案在哪个网站/上海关键词排名优化怎样

建设施工合同备案在哪个网站,上海关键词排名优化怎样,mysql数据库建设网站,长沙装修公司咨询1.在page_header.lbi对应的位置&#xff08;你想显示导航的位置&#xff09;插入 (注意下面的"themes/模板名称/util.php"中的"模板名称"改成你模板文件夹的名称) <?php require_once("themes/模板名称/util.php"); ?> <div c…
1.在page_header.lbi对应的位置(你想显示导航的位置)插入

  (注意下面的
"themes/模板名称/util.php"中的"模板名称"改成你模板文件夹的名称)

 

  1. <?php 
  2.     require_once("themes/模板名称/util.php"); 
  3. ?> 
  4. <div class="header-menu">  
  5.              <p {if $navigator_list.config.index eq 1} class="cur" {/if}><a href="../index.php">{$lang.home}</a></p>   
  6.                 <ul>                   
  7.                   <!-- {foreach name=nav_middle_list from=$navigator_list.middle item=nav} --> 
  8.                    <li onMouseOver="sw_nav(this,1);" onMouseOut="sw_nav(this,0);" {if $nav.active eq 1} class="curs"{/if}> 
  9.                    <a href="{$nav.url}" {if $nav.opennew eq 1}target="_blank" {/if}>{$nav.name}</a> 
  10.                   <?php  
  11.                                   $subcates = get_subcate_byurl($GLOBALS['smarty']->_var['nav']['url']); 
  12.                              if($subcates!=false) 
  13.                         { 
  14.                                 if(count($subcates)>0) 
  15.                             { 
  16.                                     echo "<div class='sub_nav'>"; 
  17.                                  
  18.                                 if($subcates) 
  19.                                 { 
  20.                                 foreach($subcates as $cate) 
  21.                                 { 
  22.                                         echo "<a href='".$cate['url']."' class='level_1'>".$cate['name']."</a>"; 
  23.                                     
  24.                                 } 
  25.                                 }                                 
  26.                                 echo "</div><iframe frameborder='0' scrolling='no' class='nomask'></iframe>"; 
  27.                             } 
  28.                         } 
  29.                              ?> 
  30.                    </li> 
  31.                  <!-- {/foreach} --> 
  32.             </ul> 
  33.       <script type="text/javascript"> 
  34.       //初始化主菜单 
  35.                 function sw_nav(obj,tag) 
  36.                 { 
  37.  
  38.                         var subdivs = obj.getElementsByTagName("DIV"); 
  39.                         var ifs = obj.getElementsByTagName("IFRAME"); 
  40.                          
  41.                         if(subdivs.length>0) 
  42.                         { 
  43.  
  44.                                 if(tag==1) 
  45.                                 { 
  46.                                         subdivs[0].style.display = "block"
  47.                                         ifs[0].style.display = "block"
  48.                                 } 
  49.                                 else 
  50.                                 { 
  51.                                         subdivs[0].style.display = "none";         
  52.                                         ifs[0].style.display = "none"
  53.                                 } 
  54.                                  
  55.                         } 
  56.                 } 
  57.  
  58.       </script>  
  59. </div> 

 

2.在CSS文件中插入

 

  1. .header-menu p{ float:left;padding:1px 12px 1px 0;margin-top:-2px;} 
  2. .header-menu  ul li{float:left;padding:1px 12px 1px 12px;margin-top:-2px;} 
  3. .header-menu ul li a,.header-menu p a{color: #333;display:block;} 
  4. .header-menu ul li a:hover,.header-menu p a:hover{color:#888;} 
  5. .header-menu ul li.curs{background:#999;} 
  6. .header-menu ul li.curs a{color:#fff;} 
  7.  
  8. .sub_nav{ background:#999;width:110px; position:absolute; z-index:5003; display:none;margin-left:-12px;} 
  9. .nomask{ background:#fff; width:110px; height:50px; position:absolute; z-index:5002;display:none;margin-left:-12px;} 
  10. .sub_nav a.level_1{ display:block;color:#fff;padding:6px 6px 6px 13px;font:11px Tahoma,Verdana,PMingLiU,Arial;border-bottom:1px dotted #D1D1D1;*border-bottom:1px dotted #D1D1D1 !important;*border-bottom:1px solid #A8A8A8;} 
  11. .sub_nav a.level_1:hover{color:#fff;background:#55B46C;text-decoration:none;} 

3.把以下代码编辑成(util.php)解压出来拷贝到模板目录

 

  1.  <?php 
  2. /** 
  3.  * 通过传入参数的url判断是否为目录分类,从而获取子菜单 
  4.  * 
  5.  * @param string $url 
  6.  */ 
  7. function get_subcate_byurl($url) 
  8.     $rs = strpos($url,"category"); 
  9.     if($rs!==false) 
  10.     { 
  11.         preg_match("/\d+/i",$url,$matches); 
  12.         $cid = $matches[0]; 
  13.         $cat_arr = array(); 
  14.         $sql = "select * from ".$GLOBALS['ecs']->table('category')." where parent_id=".$cid." and is_show=1"; 
  15.         $res = $GLOBALS['db']->getAll($sql); 
  16.          
  17.         foreach($res as $idx => $row) 
  18.         { 
  19.             $cat_arr[$idx]['id']   = $row['cat_id']; 
  20.             $cat_arr[$idx]['name'] = $row['cat_name']; 
  21.             $cat_arr[$idx]['url']  = build_uri('category', array('cid' => $row['cat_id']), $row['cat_name']); 
  22.             $cat_arr[$idx]['children'] = get_clild_list($row['cat_id']); 
  23.         } 
  24.  
  25.         return $cat_arr; 
  26.     } 
  27.     else  
  28.     { 
  29.         return false; 
  30.     } 
  31.  
  32. function get_clild_list($pid) 
  33.    //开始获取子分类 
  34.     $sql_sub = "select * from ".$GLOBALS['ecs']->table('category')." where parent_id=".$pid." and is_show=1"; 
  35.  
  36.     $subres = $GLOBALS['db']->getAll($sql_sub); 
  37.     if($subres) 
  38.     { 
  39.         foreach ($subres as $sidx => $subrow) 
  40.         { 
  41.             $children[$sidx]['id']=$subrow['cat_id']; 
  42.             $children[$sidx]['name']=$subrow['cat_name']; 
  43.             $children[$sidx]['url']=build_uri('category', array('cid' => $subrow['cat_id']), $subrow['cat_name']); 
  44.         } 
  45.     } 
  46.     else  
  47.     { 
  48.         $children = null
  49.     } 
  50.              
  51.     return $children; 
  52.  
  53. ?> 
http://www.jmfq.cn/news/4955959.html

相关文章:

  • 湟中县公司网站建设/网页设计期末作业模板
  • wordpress 后台颜色/seo视频教程
  • 怎么做网站效果图/seo建站工具
  • 珠海网站营销/站长工具爱站
  • 大连牛人网络推广有限公司/百度关键词seo外包
  • 怎么做刷题网站/品牌推广软文案例
  • 青海高端网站建设多少钱/推广普通话ppt课件
  • 网站隐藏php后缀/网站模板怎么建站
  • wap手机网站开发/口碑营销经典案例
  • 个人求职网站如何做/东莞seo排名扣费
  • 同性男做的视频网站/企业危机公关
  • 什么是b2b网站/seo流量
  • 怎么做买东西的网站/seo外链要做些什么
  • 东莞网站建设网页推广/小程序开发多少钱
  • 自己买域名可以做网站吗/浏览器里面信息是真是假
  • 外贸网站建设收款通道/semi认证
  • wordpress 多站点 404/论坛营销
  • 网站开发服务器配置/东莞疫情最新消息今天
  • 义乌网站设计制作价格/磁力帝
  • 备案网站制作/易推广
  • 做网站买域名/网络营销包括几个部分
  • 东单网站建设/企业网站设计
  • 肇庆网站上排名/搜狗收录入口
  • html5标准网站建设/自己做的网站怎么推广
  • 网站建设一般需要多少钱/推广普通话的内容简短
  • 汉堡云虚拟主机/关键词优化和seo
  • 影视传媒广告公司网站模板/整合网络营销是什么
  • 建立一个b2b网站费用/长沙网站推广公司排名
  • 商贸有限公司章程范本/徐州seo招聘
  • 北京建设公司网站建设/肇庆seo排名外包