日日操夜夜添-日日操影院-日日草夜夜操-日日干干-精品一区二区三区波多野结衣-精品一区二区三区高清免费不卡

公告:魔扣目錄網(wǎng)為廣大站長(zhǎng)提供免費(fèi)收錄網(wǎng)站服務(wù),提交前請(qǐng)做好本站友鏈:【 網(wǎng)站目錄:http://www.ylptlb.cn 】, 免友鏈快審服務(wù)(50元/站),

點(diǎn)擊這里在線咨詢客服
新站提交
  • 網(wǎng)站:51998
  • 待審:31
  • 小程序:12
  • 文章:1030137
  • 會(huì)員:747

這篇文章主要為大家分享下帝國(guó)cms相關(guān)鏈接無(wú)內(nèi)容時(shí)調(diào)用當(dāng)前欄目最熱信息的方法,需要的朋友可以參考下

帝國(guó)cms相關(guān)鏈接,這里以帝國(guó)cms 7.0為例具體代碼 在/e/class/functions.php

$keyboardtext='<?=GetKeyboard($ecms_gr[keyboard],$ecms_gr[keyid],$ecms_gr[classid],$ecms_gr[id],$class_r[$ecms_gr[classid]][link_num])?>’;可以看到相關(guān)鏈接的信息是通過(guò)GetKeyboard得到,找到 GetKeyboard修改一下就可以了,也是在/e/class/functions.php

代碼如下:

//取得相關(guān)鏈接

function GetKeyboard($keyboard,$keyid,$classid,$id,$link_num){
global $empire,$public_r,$class_r,$fun_r,$dbtbpre;

if($keyid&&$link_num)

{

$add=”id in (“.$keyid.”)”;

$tr=$empire->fetch1(“select otherlinktemp,otherlinktempsub,otherlinktempdate from “.GetTemptb(“enewspubtemp”).” limit 1″);//取得相關(guān)鏈接模板

$temp_r=explode(“[!–empirenews.listtemp–]”,$tr[otherlinktemp]);

$key_sql=$empire->query(“select id,newstime,title,isurl,titleurl,classid,titlepic,lastvolume from {$dbtbpre}ecms_”.$class_r[$classid][tbname].” where “.$add.” order by newstime desc limit $link_num”);

while($link_r=$empire->fetch($key_sql))

{

$text=RepOtherTemp($temp_r[1],$link_r,$tr);

$text=str_replace(‘[!–no–]’,$i,$text);

$text=str_replace(‘[!–state–]’,$link_r[state],$text);

$text=str_replace(‘[!–lastvolume–]’,$link_r[lastvolume],$text);

$keyboardtext.=$text;

//$keyboardtext.=RepOtherTemp($temp_r[1],$link_r,$tr);

}

$keyboardtext=$temp_r[0].$keyboardtext.$temp_r[2];

}

else

{

$keyid=GetKeyid($keyboard,$classid,0,$link_num);
if($keyid)

{

$fsql=$empire->query(“update {$dbtbpre}ecms_”.$class_r[$classid][tbname].”_data_1 set keyid=’$keyid’ where id=’$id'”);

$add=”id in (“.$keyid.”)”;

$tr=$empire->fetch1(“select otherlinktemp,otherlinktempsub,otherlinktempdate from “.GetTemptb(“enewspubtemp”).” limit 1″);//取得相關(guān)鏈接模板

$temp_r=explode(“[!–empirenews.listtemp–]”,$tr[otherlinktemp]);

$key_sql=$empire->query(“select id,newstime,title,isurl,titleurl,classid,titlepic,lastvolume from {$dbtbpre}ecms_”.$class_r[$classid][tbname].” where “.$add.” order by newstime desc limit $link_num”);

while($link_r=$empire->fetch($key_sql))

{

$text=RepOtherTemp($temp_r[1],$link_r,$tr);

$text=str_replace(‘[!–no–]’,$i,$text);

$text=str_replace(‘[!–state–]’,$link_r[state],$text);

$text=str_replace(‘[!–lastvolume–]’,$link_r[lastvolume],$text);

$keyboardtext.=$text;

//$keyboardtext.=RepOtherTemp($temp_r[1],$link_r,$tr);

}

$keyboardtext=$temp_r[0].$keyboardtext.$temp_r[2];

}

else

{

$add=””;

$tr=$empire->fetch1(“select otherlinktemp,otherlinktempsub,otherlinktempdate from “.GetTemptb(“enewspubtemp”).” limit 1″);//取得相關(guān)鏈接模板

$temp_r=explode(“[!–empirenews.listtemp–]”,$tr[otherlinktemp]);

$key_sql=$empire->query(“select id,newstime,title,isurl,titleurl,classid,titlepic,lastvolume from {$dbtbpre}ecms_”.$class_r[$classid][tbname].” where order by onclick desc limit $link_num”);

while($link_r=$empire->fetch($key_sql))

{

$text=RepOtherTemp($temp_r[1],$link_r,$tr);

$text=str_replace(‘[!–no–]’,$i,$text);

$text=str_replace(‘[!–state–]’,$link_r[state],$text);

$text=str_replace(‘[!–lastvolume–]’,$link_r[lastvolume],$text);

$keyboardtext.=$text;

//$keyboardtext.=RepOtherTemp($temp_r[1],$link_r,$tr);

}

$keyboardtext=$temp_r[0].$keyboardtext.$temp_r[2];

}

//———————————————————————————————-

//$keyboardtext=$fun_r[‘NotLinkNews’];

}

return $keyboardtext;

}

原來(lái)的官方代碼

在沒(méi)有關(guān)鍵字的時(shí)候直接就給出

$keyboardtext=$fun_r[‘NotLinkNews’];

這顯示無(wú)相關(guān)信息

我做了一個(gè)無(wú)keyid的時(shí)候再去獲取一次keyid,

$keyid=GetKeyid($keyboard,$classid,0,$link_num);

確實(shí)沒(méi)有關(guān)鍵字的時(shí)候讀取人氣最高的幾條信息

$key_sql=$empire->query(“select id,newstime,title,isurl,titleurl,classid,titlepic,lastvolume from {$dbtbpre}ecms_”.$class_r[$classid][tbname].” where order by onclick desc limit $link_num”);

?

?

分享到:
標(biāo)簽:帝國(guó)CMS
用戶無(wú)頭像

網(wǎng)友整理

注冊(cè)時(shí)間:

網(wǎng)站:5 個(gè)   小程序:0 個(gè)  文章:12 篇

  • 51998

    網(wǎng)站

  • 12

    小程序

  • 1030137

    文章

  • 747

    會(huì)員

趕快注冊(cè)賬號(hào),推廣您的網(wǎng)站吧!
最新入駐小程序

數(shù)獨(dú)大挑戰(zhàn)2018-06-03

數(shù)獨(dú)一種數(shù)學(xué)游戲,玩家需要根據(jù)9

答題星2018-06-03

您可以通過(guò)答題星輕松地創(chuàng)建試卷

全階人生考試2018-06-03

各種考試題,題庫(kù),初中,高中,大學(xué)四六

運(yùn)動(dòng)步數(shù)有氧達(dá)人2018-06-03

記錄運(yùn)動(dòng)步數(shù),積累氧氣值。還可偷

每日養(yǎng)生app2018-06-03

每日養(yǎng)生,天天健康

體育訓(xùn)練成績(jī)?cè)u(píng)定2018-06-03

通用課目體育訓(xùn)練成績(jī)?cè)u(píng)定