<?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");}?>
搞不懂你在说啥
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号