麻豆小视频在线观看_中文黄色一级片_久久久成人精品_成片免费观看视频大全_午夜精品久久久久久久99热浪潮_成人一区二区三区四区

首頁 > CMS > 帝國Empire > 正文

帝國cms搜索模板支持調用動態標簽方法

2024-08-28 12:29:23
字體:
來源:轉載
供稿:網友

復制以下代碼到e/search/result/index.php

<?php require('../../class/connect.php');require('../../class/db_sql.php');require('../../class/functions.php');require('../../class/t_functions.php');require('../../data/dbcache/class.php');require "../".LoadLang("pub/fun.php");$editor=1;eCheckCloseMods('search');//關閉模塊 $link=db_connect();$empire=new mysqlquery();$getvar=$_GET['getvar'];if(empty($getvar)) {         $getfrom="history.go(-1)";} else {         $getfrom="../../../search/";}//搜索結果 $searchid=(int)$_GET['searchid'];if(empty($searchid)) {         printerror("SearchNotRecord",$getfrom,1);} $search_r=$empire->fetch1("select searchid,keyboard,result_num,orderby,myorder,tbname,tempid,andsql,trueclassid from {$dbtbpre}enewssearch where searchid='$searchid'");if(empty($search_r['searchid'])||InfoIsInTable($search_r[tbname])) {         printerror("SearchNotRecord",$getfrom,1);} $page=(int)$_GET['page'];$page=RepPIntvar($page);$start=0;$page_line=$public_r['search_pagenum'];//每頁顯示鏈接數 $line=$public_r['search_num'];//每頁顯示記錄數 $offset=$page*$line;//總偏移量 $search="&searchid=".$searchid;$myorder=$search_r[orderby];if(empty($search_r[myorder])) {         $myorder.=" desc";} $add=stripSlashes($search_r['andsql']);$num=$search_r[result_num];$query="select * from {$dbtbpre}ecms_".$search_r[tbname].($add?' where '.substr($add,5):'');$query.=" order by ".$myorder." limit $offset,$line";$sql=$empire->query($query);$listpage=page1($num,$line,$page_line,$start,$page,$search);//取得模板 if($search_r['tempid']) {         $tempr=$empire->fetch1("select temptext,subnews,listvar,rownum,showdate,modid,subtitle,docode from ".GetTemptb("enewssearchtemp")." where tempid='".$search_r['tempid']."' limit 1");} elseif(empty($class_r[$search_r[trueclassid]][searchtempid])) {         $tempr=$empire->fetch1("select temptext,subnews,listvar,rownum,showdate,modid,subtitle,docode from ".GetTemptb("enewssearchtemp")." where isdefault=1 limit 1");} else {         $tempr=$empire->fetch1("select temptext,subnews,listvar,rownum,showdate,modid,subtitle,docode from ".GetTemptb("enewssearchtemp")." where tempid='".$class_r[$search_r[trueclassid]][searchtempid]."' limit 1");} $have_class=1;//頁面支持標簽 $tempr[temptext]=DtNewsBq('listsearch'.$search_r['tempid'],$tempr[temptext],0);//替換公共模板變量 $listtemp=$tempr[temptext];if($public_r['searchtempvar']) { $listtemp=ReplaceTempvar($listtemp);} $search_r[keyboard]=ehtmlspecialchars($search_r[keyboard]);$listtemp=str_replace("[!--show.page--]",$listpage,$listtemp);$listtemp=str_replace("[!--keyboard--]",$search_r[keyboard],$listtemp);$listtemp=str_replace("[!--ecms.num--]",$num,$listtemp);$url="<a href='".ReturnSiteIndexUrl()."'>".$fun_r['index']."</a>&nbsp;>&nbsp;".$fun_r['adsearch'];$pagetitle=$fun_r['adsearch']." ".$search_r[keyboard];$listtemp=ReplaceSvars($listtemp,$url,0,$pagetitle,$pagetitle,$pagetitle,$add,0);$rownum=$tempr[rownum];if(empty($rownum)) { $rownum=1;} $formatdate=$tempr[showdate];$subnews=$tempr[subnews];$subtitle=$tempr[subtitle];$docode=$tempr[docode];$modid=$tempr[modid];$listvar=str_replace('[!--news.url--]',$public_r[newsurl],$tempr[listvar]);//字段 $ret_r=ReturnReplaceListF($tempr[modid]);//取得列表模板 $list_exp="[!--empirenews.listtemp--]";$list_r=explode($list_exp,$listtemp);$listtext=$list_r[1];$no=$offset+1;$changerow=1;while($r=$empire->fetch($sql)) {         //替換列表變量 $repvar=ReplaceListVars($no,$listvar,$subnews,$subtitle,$formatdate,$url,$have_class,$r,$ret_r,$docode);$listtext=str_replace("<!--list.var".$changerow."-->",$repvar,$listtext);$listtext=str_replace($search_r[keyboard],"<font color='red'>$search_r[keyboard]</font>",$listtext);$changerow+=1;//超過行數 if($changerow>$rownum) {$changerow=1;$string.=$listtext;$listtext=$list_r[1];} $no++;} db_close();$empire=null;//多余數據 if($changerow<=$rownum&&$listtext<>$list_r[1]) {         $string.=$listtext;} $string=$list_r[0].$string.$list_r[2];echo stripSlashes($string);?>
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 久色亚洲 | 性爱视频在线免费 | 国产午夜亚洲精品理论片大丰影院 | 黄色成人av在线 | 成人h视频在线 | 操操操日日日干干干 | 涩涩激情网 | 97久久精品一区二区三区观看 | 狠狠操电影 | 激情综合在线 | 日日草夜夜操 | xxxxhd86日本护士hd | 国产91丝袜在线播放 | 黄色片网站免费观看 | 成人午夜a | 日韩精品羞羞答答 | 亚洲小视频在线播放 | 人成久久| 久久精品亚洲一区 | 成人免费视频视频在线观看 免费 | 99这里精品| 成人在线视频免费观看 | 国产91片 | 国产精品久久久久久影院8一贰佰 | 欧美va亚洲| 天堂在线资源av | 欧美成人高清视频 | 成人三级视频网站 | 在线播放污 | 欧洲黄色一级视频 | 国产黄色毛片 | av成人在线电影 | 久久免费精品 | 久久久精品视频国产 | 在线成人一区 | 日本不卡一二三区 | av免费不卡国产观看 | 久久久tv | 黄色毛片免费视频 | 免费毛片观看 | 黄色高清av|