e/member/class/member_loginfun.php
大约69行
//IP
$lastip=egetip();
$lastipport=egetipport();
$usql=$empire->query("update ".eReturnMemberTable()." set ".egetmf('rnd')."='$rnd',".egetmf('groupid')."='$r[groupid]' where ".egetmf('userid')."='$r[userid]'");
在以上代码下方添加:
//帝国cms7.5实现会员每天登录赠送积分点数功能开始
$LastTime=time();
$useridz=(int)$r['userid'];
$fenus=$public_r['add_daylogin_fen']; //赠送积分 (“$public_r['add_daylogin_fen']”修改成你要赠送的值,例:$fenus=5;)
$LastT=$empire->fetch1("select lasttime from {$dbtbpre}enewsmemberadd where `userid`={$useridz}");
$newstime=$LastT['lasttime'];//时间
$times=mktime(0,0,0,date('m',$LastTime),date('d',$LastTime),date('Y',$LastTime));
//当前时间
if($newstime==0){
$empire->query("update {$dbtbpre}enewsmember set `userfen`=userfen+{$fenus} where `userid`={$useridz}");
$empire->query("insert into {$dbtbpre}bangbang_userfenlog(userid,username,title,userfen,userdate,type) values('$r[userid]','$username','每日登录 ','$fenus','".time()."','1');");
}else{
if($times<$newstime && $times>($newstime-86400)){
//今天
}else{
$empire->query("update {$dbtbpre}enewsmember set `userfen`=userfen+{$fenus} where `userid`={$useridz}");
//记录积分日志
}
}
//帝国cms7.5实现会员每天登录赠送积分点数功能结束