$result=$db->query("SELECT * FROM {$gtablepre}winners WHERE gid='$gnum' LIMIT 1");
$result=$db->query("SELECT * FROM {$gtablepre}winners WHERE gid='$gnum' LIMIT 1");
...
@@ -23,50 +22,148 @@ if($command == 'info') {
...
@@ -23,50 +22,148 @@ if($command == 'info') {
$hnewsinfo=readover($hnewsfile);
$hnewsinfo=readover($hnewsfile);
}
}
}else{
}else{
$download_button=[];
$max_gamenum=0;
$result=$db->query("SELECT gid FROM {$gtablepre}winners ORDER BY gid DESC LIMIT 1");
if($db->num_rows($result)){
$tmp_rst=$db->fetch_array($result);
$max_gamenum=$tmp_rst['gid'];
}
//$start预处理
if(!isset($start)||!$start){
if(!isset($start)||!$start){
$result=$db->query("SELECT gid,name,nick,icon,gd,wep,wmode,teamID,teamMate,teamIcon,getime,motto,hdp,hdmg,hkp,hkill FROM {$gtablepre}winners ORDER BY gid desc LIMIT $winlimit");
$start=0;
}else{
}else{
$result=$db->query("SELECT gid,name,nick,icon,gd,wep,wmode,teamID,teamMate,teamIcon,getime,motto,hdp,hdmg,hkp,hkill FROM {$gtablepre}winners WHERE gid<='$start' ORDER BY gid desc LIMIT $winlimit");
$query_where.=(!empty($query_where)&&!empty($query_wmode)?' AND ':'').$query_wmode;
$query_where.=(!empty($query_where)&&!empty($query_gtype)?' AND ':'').$query_gtype;
$query_where.=(!empty($query_where)&&!empty($query_winner)?' AND ':'').$query_winner;
$query_where='WHERE '.$query_where;
}
}
else
$query_limit="SELECT gid,name,nick,icon,gd,wep,wmode,teamID,teamMate,teamIcon,getime,motto,hdp,hdmg,hkp,hkill FROM {$gtablepre}winners $query_where ORDER BY gid DESC LIMIT $winlimit";