帝国CMS二次开发会员登陆赠送积分
修改步骤1、进入管理会员字段增加如下字段:字段名:LastTime 字段标识:最后登陆时间 字段类型:大数值型(INT)2、打开,e/class/user.php 找到大约1019行 if($set1&&$set2) 这个地方,在 $location=DoingReturnUrl($location,$_PO……
修改步骤
1、进入管理会员字段增加如下字段:
字段名:LastTime 字段标识:最后登陆时间 字段类型:大数值型(INT)
2、打开,e/class/user.php 找到大约1019行 if($set1&&$set2) 这个地方,在 $location=DoingReturnUrl($location,$_POST['ecmsfrom']); 前面增加如下代码
//会员登陆赠送点数$LastTime=time();$useridz=(int)$r[$user_userid];$fenus=2;//赠送积分$LastT=$empire->fetch1("selectLastTimefrom{$dbtbpre}enewsmemberaddwhere`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}enewsmemberset`userfen`=userfen+{$fenus}where`userid`={$useridz}");}else{if($times<$newstime&&$newstime<$times+86400){//今天}else{$empire->query("update{$dbtbpre}enewsmemberset`userfen`=userfen+{$fenus}where`userid`={$useridz}");}}$empire->query("update{$dbtbpre}enewsmemberaddset`LastTime`={$LastTime}where`userid`={$useridz}");//结束
- 上一篇
帝国CMS怎么调用购物车商品数量
帝国cms模板调用购物车商品数量和总价的方法,一起来看看吧: 代码如下:<?php/***根据Cookie值对购物车商品数量和总价格调用*/require("class/connect.php");$totalProducts=0;//购物车商品总数$totalPrice=0.0;//购物
- 下一篇
帝国CMS二次开发列表页、内容页只调用年份
帝国cms列表页只调用年份:问题已解决,带入如下,list.var中记得勾选使用程序代码'.date('Y',strtotime($r[up_date])).'帝国cms内容页只调用年份:试了多种方法,最终成功了<?phpechodate('Y',strtot