会员每天登陆赠送积分的代码
2012-03-30 10:24:42 来源:WEB开发网核心提示:04 $fenus=2; //赠送积分 05 $LastT=$empire->fetch1("select LastTime from {$dbtbpre}enewsmemberadd where `userid`={$useridz}"); 06 (int)$newstime=$LastT[
04 $fenus=2; //赠送积分
05 $LastT=$empire->fetch1("select LastTime from {$dbtbpre}enewsmemberadd where `userid`={$useridz}");
06 (int)$newstime=$LastT['LastTime'];//时间
07 (int)$times=mktime(0,0,0,date('m',$LastTime),date('d',$LastTime),date('Y',$LastTime));//当前时间
08 if($newstime==0){$empire->query("update {$dbtbpre}enewsmember set `userfen`=userfen+{$fenus} where `userid`={$useridz}");}else{
09 if($times<$newstime && $newstime<$times+86400){
10 //今天
11 }else{
12 $empire->query("update {$dbtbpre}enewsmember set `userfen`=userfen+{$fenus} where `userid`={$useridz}");
更多精彩
赞助商链接