function sys_eShowTags($cid,$num=0,$line=0,$order='',$isgood='',$isgoodshow='',$showjg='',$shownum=0,$cs='',$vartype=''){ global $empire,$dbtbpre,$public_r,$navinfor; $str=''; if(empty($showjg)) { $showjg=' '; } $ln=0; if($cid=='selfinfo') { if(empty($navinfor['infotags'])) { return ''; } $jg=''; $r=explode(',',$navinfor['infotags']); $count=count($r); for($i=0;$i<$count;$i++) { $ln++; $br=''; if($line) { if($ln%$line==0) { $br='<br>'; } } if(empty($cs)) { $rewriter=eReturnRewriteTagsUrl(0,$r[$i],1); $tagsurl=$rewriter['pageurl']; } else { $tagsurl=$public_r[newsurl].'e/tags/?tagname='.urlencode($r[$i]).$cs; } $str.=$jg.'<a href="'.$tagsurl.'" target="_blank">'.$r[$i].'</a>'.$br; $jg=$br?'':$showjg; } } else { $and=''; $where=''; if($cid) { $where=strstr($cid,',')?"cid in ($cid)":"cid='$cid'"; $and=' and '; } if($isgood) { $where.=$and.'isgood=1'; } if($where) { $where=' where '.$where; } $order=$order?' '.$order:' tagid desc'; $limit=''; if($num) { $limit=' limit '.$num; } //推荐标红 $gfont1=''; $gfont2=''; if($isgoodshow) { if(strstr($isgoodshow,'r')) { $gfont1='<font color="red">'; $gfont2='</font>'; } if(strstr($isgoodshow,'s')) { $gfont1=$gfont1.'<b>'; $gfont2='</b>'.$gfont2; } } $jg=''; $snum=''; $sql=$empire->query("select tagid,tagname,num,isgood from {$dbtbpre}enewstags".$where." order by".$order.$limit); while($r=$empire->fetch($sql)) { if($shownum) { $snum='('.$r[num].')'; } $font1=''; $font2=''; if($isgoodshow&&$r[isgood]) { $font1=$gfont1; $font2=$gfont2; } $ln++; $br=''; if($line) { if($ln%$line==0) { $br='<br>'; } } if(empty($cs)&&$vartype<>'tagid') { $rewriter=eReturnRewriteTagsUrl($r['tagid'],$r['tagname'],1); $tagsurl=$rewriter['pageurl']; } else { $tagsurl=$public_r[newsurl].'e/tags/?'.($vartype=='tagid'?'tagid='.$r[tagid]:'tagname='.urlencode($r[tagname])).$cs; } $str.=$jg.'<a href="'.$tagsurl.'" target="_blank">'.$font1.$r[tagname].$snum.$font2.'</a>'.$br; $jg=$br?'':$showjg; } } echo $str; }
if (!empty($add)) { $totalnum = (int) $_GET['totalnum']; if ($totalnum < 1) { $totalquery = "select count(*) as total from {$dbtbpre}enewstagsdata where tagid='{$tagid}'" . $add; $num = $empire->gettotal($totalquery); } else { $num = $totalnum; } $search .= '&totalnum=' . $num; } $query = "select classid,id from {$dbtbpre}enewstagsdata where tagid='{$tagid}'" . $add; $query .= " order by newstime desc limit {$offset},{$line}"; $sql = $empire->query($query); if ($tagr['tagid'] && empty($add) && $search == '&tagname=' . $tagname . '&line=' . $public_r['tagslistnum'] . '&tempid=' . $public_r['tagstempid']) { //伪静态 $pagefunr = eReturnRewriteTagsUrl($tagid, $tagname, 0); $pagefunr['repagenum'] = 0; //分页 if ($pagefunr['rewrite'] == 1) { $listpage = InfoUsePage($num, $line, $page_line, $start, $page, $search, $pagefunr); } else { $listpage = page1($num, $line, $page_line, $start, $page, $search); } } else { $listpage = page1($num, $line, $page_line, $start, $page, $search); //分页 } //页面支持标签 if ($public_r['dtcanbq']) { $tempr[temptext] = DtNewsBq('list' . $tempid, $tempr[temptext], 0); } else {
function eReturnRewriteLink($type, $classid, $id) { if ($type == 'infopage') { $url = eReturnRewriteInfoUrl($classid, $id); } elseif ($type == 'ttpage') { $url = eReturnRewriteTitleTypeUrl($classid); } elseif ($type == 'tagspage') { $url = eReturnRewriteTagsUrl($classid, $id); } else { $url = eReturnRewriteClassUrl($classid); } return $url; }