Heim >Backend-Entwicklung >PHP-Tutorial >php问题,跪求各位大牛指点迷津
<?phpif(!defined('IN_DISCUZ')) { exit('Access Denied');}class plugin_qdkzcj { function global_qdadd(){ global $_G; $tablepre=$_G['config']['db']['1']['tablepre']; @extract($_G['cache']['plugin']['qdkzcj']); $_G['isqd']=$_G['qdday']=0; $_G['todayq'] = DB::result_first("SELECT `todayq` FROM `{$tablepre}dsu_paulsignset` WHERE `id` ='1' "); if(!$_G['uid']) return ''; $qiandaodb = DB::fetch_first("SELECT time FROM ".DB::table('dsu_paulsign')." WHERE uid='$_G[uid]'"); $htime = dgmdate($_G['timestamp'], 'H',$var['tos']); $tdtime=strtotime(date('Y-m-d')); if($qiandaodb['time']<$tdtime){ $_G['isqd']=0; }else{ $_G['isqd']=1; } $_G['qdday']=DB::result_first("SELECT `lasted` FROM `{$tablepre}dsu_paulsign` WHERE `uid` ='{$_G['uid']}' LIMIT 0 , 1"); $_G['qmday']=DB::result_first("SELECT `mdays` FROM `{$tablepre}dsu_paulsign` WHERE `uid` ='{$_G['uid']}' LIMIT 0 , 1"); $_G['qtime']=DB::result_first("SELECT `time` FROM `{$tablepre}dsu_paulsign` WHERE `uid` ='{$_G['uid']}' LIMIT 0 , 1"); $_G['qqtime']=date('ymd',$_G['qtime'])==date('ymd',$_G['timestamp'])?date('H:i',$_G['qtime']):date('m-d',$_G['qtime']); }}function qdbyuid($uid){ return DB::result_first("SELECT `lasted` FROM ".DB::table("dsu_paulsign")." WHERE `uid` ='{$uid}' LIMIT 0 , 1");}function qdbyuser($user){ $user=addslashes($user); $uid=DB::result_first("select uid from ".DB::table("common_member")." where username='$user' limit 1"); return DB::result_first("SELECT `lasted` FROM ".DB::table("dsu_paulsign")." WHERE `uid` ='{$uid}' LIMIT 0 , 1");}?>
搞不懂你在说啥