广告

您的位置:首页 >> 资讯中心

Webmeng分类导航标签,模板

Webmeng分类导航标签,模板



  public function _list($id)
  {
         preg_match("/^list\_(\d+).html$/i",$id,$url);
         $catid =  isset($url[1])?$url[1]:0;
       
$catIdList = $this->db->fetch("select cat_id from ".WEBMENG_CONMENG."category_inews where sort_path like '%,".$catid.",%'");
         
         $catListOR = array();
         foreach ($catIdList as $catId) {
           $catListOR[] = " catid = ". $catId['cat_id']." ";
         }
      //   var_dump($catListOR);
         $sql = "select * from ".WEBMENG_CONMENG."inews where status>'0'  and (".implode("or", $catListOR).") order by id desc";
      //   var_dump($sql);
         $result = page_for_db_extend($sql); 

         $data['info_reslut'] = $result['data'];
         $data['showpage'] = $result['page'];
     
       //  $sql = "select * from ".WEBMENG_CONMENG."goods where  lid='cn' and  catid='".$catid."' and  status>'0' ";
       //  $result = page_for_db_extend($sql); 
      //   $data['info_reslut'] = $result['data'];
      //   $data['showpage'] = $result['page'];

$sort_path = $this->db->fetch("select sort_path from ".WEBMENG_CONMENG."category_inews where cat_id = ".$catid,true);
        // var_dump($sort_path);
     //    var_dump(rtrim($sort_path['sort_path'],","));
         $catNavigationList = $this->db->fetch("select cat_id,cat_name from ".WEBMENG_CONMENG."category_inews where cat_id in (".rtrim($sort_path['sort_path'],",").")");
        // var_dump($catNavigation);
         $data['catNavigation'] = $catNavigationList;

// var_dump($sort_path);
// var_dump($catNavigationList);
// exit;

  $data['category_name'] = $this->db->fetch("select a.*,b.* from ".WEBMENG_CONMENG."inews a left join ".WEBMENG_CONMENG."category_inews b on a.catid=b.cat_id  where a.catid='".$catid."' ",true);
 
 
 
 
$data['info_comment'] = $this->get_info_comment();
$data['notice'] = $this->get_notice();   
$data['news_recommend'] = $this->get_news_recommend();
$data['inews_recommend'] = $this->get_inews_recommend();

$data['inews_new'] = $this->get_inews_new();
$data['news_new'] = $this->get_news_new(); 
$data['photo_new'] = $this->get_photo_new();   
$data['news_hit'] = $this->get_news_hit(); 
$data['inews_hit'] = $this->get_inews_hit();
$data['photo_hit'] = $this->get_photo_hit();
       $data['inews_images'] = $inews_images;
   
$this->display('cn/inews/list.html',$data); 

  }



/////分类标签,模板


<div class="con_dqwz">您的当前位置:<a href="/">首页</a> &gt;&gt; <a href="/goods/">产品中心</a>

{webmeng:foreach from=$catNavigation  item=v/}  
 
                                
  &gt;&gt; <a href="/goods/list_{webmeng:$v.cat_id/}.html">{webmeng:$v.cat_name/}
  </a>
                            
                         
{webmeng:/foreach/}


来自:官网分享   作者:来自网络
特别提醒 & 免责声明:
本网信息来自于互联网,发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,目的在于传递更多信息,并不代表本网赞同其观点。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,并请自行核实相关内容。本站不承担此类作品侵权行为的直接责任及连带责任。如若本网有任何内容侵犯您的权益,请及时联系我们(QQ:39813880;邮箱:39813880@qq.com),本站将会在24小时内处理完毕。本站原创内容未经允许不得转载,或转载时需注明出处:nssa.vip 航天联盟

作者: 来自网络

为您推荐

发表评论

admin

联系我们

联系我们

+86 755-23229102

在线咨询: QQ交谈

邮箱: service#sws.soufind.com

关注微信
微信扫一扫关注我们

微信扫一扫关注我们