


Summarize how to implement bonus points when logging in to Imperial CMS members
The example in this article describes how to implement bonus points when logging in to Imperial CMS members. Share it with everyone for your reference. The specific implementation method is as follows:
Modification steps:
1. Enter the management member field and add the following fields:
Field name: LastTime Field identification: Last login time Field type: Large Numeric type (INT)
2. Open e/class/user.php and find about line 1019 if ($set1&&$set2). At this place, find:
The code is as follows:
$location=DoingReturnUrl($location,$_POST['ecmsfrom']);
recommends learning "Empire cms tutorial"
Add the following code in front.
The code is as follows:
//会员登陆赠送点数 $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}"); //结束
After modification, save it .
I hope this article will be helpful to everyone’s Imperial CMS website building.
The above is the detailed content of Summarize how to implement bonus points when logging in to Imperial CMS members. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Zend Studio 13.0.1
Powerful PHP integrated development environment

SublimeText3 Linux new version
SublimeText3 Linux latest version

Atom editor mac version download
The most popular open source editor

SublimeText3 Mac version
God-level code editing software (SublimeText3)

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft