You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
663 B
28 lines
663 B
<?php
|
|
defined("api_m") or exit;
|
|
|
|
$classid=$api->param('t' , 0 , 'intval');
|
|
$q=$api->get('q','','trim');
|
|
if ($q){
|
|
$sql=$empire->query("select * from {$dbtbpre}enewstags where tagname like '%".$q."%' order by num desc limit 10");
|
|
while($r=$empire->fetch($sql))
|
|
{
|
|
$list.='"'.$r[tagname].'",';
|
|
}
|
|
$rank='false';
|
|
}else{
|
|
$add=ReturnClassAddField($classid,'xiala');
|
|
$pd_record=explode(",",$add);
|
|
for($i=0;$i<count($pd_record);$i++)
|
|
{
|
|
$list.='"'.$pd_record[$i].'",';
|
|
}
|
|
$rank='true';
|
|
}
|
|
$list=substr($list,0,strlen($list)-1);
|
|
|
|
if ($list=='""'){
|
|
echo '{"code":1}';
|
|
}else{
|
|
echo '{"code":0,"data":{"expire":'.time().',"rank":'.$rank.',"list":['.$list.']}}';
|
|
}
|