//根据tag获取相关信息

function user_OtherLink($num,$classid=0,$mid=0){

global $dbtbpre,$empire,$navinfor,$class_r;

if(empty($navinfor['infotags'])){

return '暂无相关信息';

if($mid&&$classid&&$class_r[$classid]['modid']!=$mid){

return '暂无相关信息';

$tr=$empire->fetch1("select otherlinktemp,otherlinktempsub,otherlinktempdate from ".GetTemptb("enewspubtemp")." limit 1");

$temp_r=explode("[!--empirenews.listtemp--]",$tr['otherlinktemp']);

$str='';

$tagsql=$empire->query("select * from {$dbtbpre}enewstagsdata where id='$navinfor[id]' and classid='$navinfor[classid]'");

$i=0;

$isprint=array();

while($tagr=$empire->fetch($tagsql)){

if($i>=$num){

break;

$gsql=$empire->query("select * from {$dbtbpre}enewstagsdata where tagid='$tagr[tagid]'");

while($gr=$empire->fetch($gsql)){

$myprint='id'.$gr['id'].'class'.$gr['classid'];

if(array_search($myprint,$isprint)!==false){

continue;

$isprint[]=$myprint;

if($classid&&$classid!=$gr['classid']){

continue;

if($mid&&$mid!=$gr['mid']){

continue;

if($gr['id']==$navinfor['id']&&$gr['classid']==$navinfor['classid']){

continue;

$tbname=$class_r[$gr['classid']]['tbname'];

if(!$tbname||InfoIsInTable($tbname)){

continue;

$r=$empire->fetch1("select * from {$dbtbpre}ecms_".$tbname." where id='$gr[id]' limit 1");

if(!$r['id']){

continue;

$str.=RepOtherTemp($temp_r[1],$r,$tr);

$i+=1;

if($i>=$num){

break;

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

if($str){

return $keyboardtext;

}else{

return '暂无相关信息';

原文链接:https://blog.csdn.net/weixin_42376671/article/details/116125266?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522166669233216800182714361%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fblog.%2522%257D&request_id=166669233216800182714361&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~blog~first_rank_ecpm_v1~times_rank-25-116125266-null-null.article_score_rank_blog&utm_term=%E5%B8%9D%E5%9B%BDcms

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注