實現(xiàn)功能:會員每天登陸實現(xiàn)贈送積分~每天一次。
修改步驟:
1、進入管理會員字段增加如下字段:
字段名:LastTime字段標識:最后登陸時間字段類型:大數(shù)值型(INT)
2、打開,e/class/user.php 找到大約1019行if($set1&&$set2) 這個地方,在$location=DoingReturnUrl($location,$_POST['ecmsfrom']); 前面增加如下代碼
//會員登陸贈送點數(shù)??
????????$LastTime=time();??
????????$useridz=(int)$r[$user_userid];??
????????$fenus=2; ?//贈送積分
????????$LastT=$empire->fetch1("select?LastTime?from?{$dbtbpre}enewsmemberadd?where?`userid`={$useridz}");??
????????(int)$newstime=$LastT['LastTime'];//時間??
????????(int)$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}");}else{??
?????????????if($times<$newstime?&&?$newstime<$times+86400){??
?????????????????//今天??
?????????????}else{??
????????????????$empire->query("update?{$dbtbpre}enewsmember?set?`userfen`=userfen+{$fenus}?where?`userid`={$useridz}");??
?????????????}??
????????}??
????????$empire->query("update?{$dbtbpre}enewsmemberadd?set?`LastTime`={$LastTime}?where?`userid`={$useridz}");??
????????//結(jié)束??