<?php if ($navinfor['keyboard']) { $c_key=explode(',',$navinfor['keyboard']); $count=count($c_key); for($i=0;$i<$count;$i++) { if($i==0) { $or=''; } else { $or=' or '; } $repadd.=$or."keyboard like '%".$c_key[$i]."%'"; } $r=$empire->fetch1("select * from {$dbtbpre}ecms_news where id<>".$navinfor['id']." and ".$repadd." order by newstime desc limit 1"); if($r[title]) { $mesql=$empire->query("select titleurl,title,titlepic,newstime from {$dbtbpre}ecms_news where id<>".$navinfor['id']." and ".$repadd." order by newstime desc limit 12"); while($or=$empire->fetch($mesql)) { $newstime=date('Y-m-d',$or[newstime]); ?> <li><a href="<?=$or[titleurl]?>"><img data-src="<?=$or[titlepic]?>" alt="<?=$or[title]?>" src="https://www.1004619.com/wp-content/themes/dux/img/thumbnail.png" class="thumb"></a><a href="<?=$or[titleurl]?>"><?=$or[title]?></a></li> <? } } else { $mesql2=$empire->query("select * from {$dbtbpre}ecms_news where id<>".$navinfor['id']." order by rand() desc limit 12"); while($r2=$empire->fetch($mesql2)) { $newstime=date('Y-m-d',$o2[newstime]); ?> <li><a href="<?=$or[titleurl]?>"><img data-src="<?=$or[titlepic]?>" alt="<?=$or[title]?>" src="https://www.1004619.com/wp-content/themes/dux/img/thumbnail.png" class="thumb"></a><a href="<?=$or[titleurl]?>"><?=$or[title]?></a></li> <? } } } else { $mesql2=$empire->query("select titleurl,titlepic,title,newstime from {$dbtbpre}ecms_news order by rand() desc limit 12"); while($r2=$empire->fetch($mesql2)) { $newstime=date('Y-m-d',$r2[newstime]); ?> <li><a href="<?=$or[titleurl]?>"><img data-src="<?=$or[titlepic]?>" alt="<?=$or[title]?>" src="https://www.1004619.com/wp-content/themes/dux/img/thumbnail.png" class="thumb"></a><a href="<?=$or[titleurl]?>"><?=$or[title]?></a></li> <? } } ?>