$dsql->SetQuery("SELECT * FROM `tagindex` $addsql ORDER BY $orderby LIMIT 0,$num"); $dsql->Execute(); $ctp = new DedeTagParse(); $ctp->SetNameSpace('field','[',']'); $ctp->LoadSource($InnerText); while($row = $dsql->GetArray()) { $row['keyword'] = $row['tag']; $row['tag'] = dede_htmlspecialchars($row['tag']); $row['link'] = $cfg_cmsurl."/tags.php?/".urlencode($row['keyword'])."/"; $row['highlight'] = 0; if($row['monthcc']>1000 || $row['weekcc']>300 ) { $row['highlight'] = mt_rand(3,4); } else if($row['count']>3000) { $row['highlight'] = mt_rand(5,6); } else { $row['highlight'] = mt_rand(1,2); } foreach($ctp->CTags as $tagid=>$ctag) { if(isset($row[$ctag->GetName()])) { $ctp->Assign($tagid,$row[$ctag->GetName()]); } } $revalue .= $ctp->GetResult(); } |
$dsql->SetQuery("SELECT * FROM `tagindex` $addsql ORDER BY $orderby LIMIT 0,$num"); $dsql->Execute(); $GLOBALS['autoindex'] = 0; $ctp = new DedeTagParse(); $ctp->SetNameSpace('field','[',']'); $ctp->LoadSource($InnerText); while( $row = $dsql->GetArray()) { $row['keyword'] = $row['tag']; $row['tag'] = dede_htmlspecialchars($row['tag']); $row['link'] = $cfg_cmsurl."/tags.php?/".urlencode($row['keyword'])."/"; $row['highlight'] = 0; if($row['monthcc']>1000 || $row['weekcc']>300 ) { $row['highlight'] = mt_rand(3,4); } else if($row['count']>3000) { $row['highlight'] = mt_rand(5,6); } else { $row['highlight'] = mt_rand(1,2); } foreach($ctp->CTags as $tagid=>$ctag) { if(isset($row[$ctag->GetName()])) { $ctp->Assign($tagid,$row[$ctag->GetName()]); } } $revalue .= $ctp->GetResult(); $GLOBALS['autoindex']++; } |