<?php
if (!defined('ROOT')) exit('Can\'t Access !');
class mod_member extends module_class{
function main(){
$this->title = "用户中心 - ".config::get("sitename");
$this->xdzs = $this->mysql->counts("select id from {$this->pre}store where cid='{$this->member[uid]}'");
$symoney = $this->mysql->select_one("select sum(symoney) as i from {$this->pre}res where uid='{$this->member[uid]}'");
$money = $this->mysql->select_one("select sum(money) as i from {$this->pre}res where uid='{$this->member[uid]}'");
$txze = $this->mysql->select_one("select sum(lognum) as i from {$this->pre}atmlog where uid='{$this->member[uid]}'");
$tcje = $this->mysql->select_one("select sum(lognum) as i from {$this->pre}reslog where uid='{$this->member[uid]}' and type='2'");
$this->shzs = $this->mysql->counts("select uid from {$this->pre}user where groupid='3' and dls='{$this->member[username]}'");
$this->tcje = fnum($tcje['i']);
$this->txze = fnum($txze['i']);
$this->qbfl = fnum($money['i']);
$this->dfye = fnum($symoney['i']);
$this->ljfl = fnum($this->qbfl - $this->dfye);
}
function password(){
$this->title = "用户中心 - ".config::get("sitename");
$this->type = $_GET['type'] ? $_GET['type'] : "one";
$this->twourl = rewrite::request("?mod=member&act=password&type=two");
if(submit()){
if($this->type == 'one'){
$cpassword = sintrim($_POST['cpassword']);
$oldpassword = sintrim($_POST['oldpassword']);
$arr['password'] = sintrim($_POST['newpassword']);
if($oldpassword=='') $this->message('go_back','对不起,旧密码不能为空');
if($this->user->password($oldpassword,$this->member[salt]) != $this->member[password]) $this->message('go_back','对不起,旧密码不正确');
if($arr['password']=='') $this->message('go_back','对不起,新密码不能为空');
if($arr['password']!=$cpassword) $this->message('go_back','对不起,两次输入密码不一致');
$this->user->update($arr,$this->member[uid]);
$this->user->dropuser();
$this->message('member_login','登录密码已修改,请重新登录');
}
if($this->type == 'two'){
$cpassword = sintrim($_POST['cpassword']);
$oldpassword = sintrim($_POST['oldpassword']);
$arr['repass'] = sintrim($_POST['newpassword']);
if($oldpassword=='') $this->message('go_back','对不起,旧提现密码不能为空');
if($this->user->password($oldpassword,$this->member[salt]) != $this->member[repass]) $this->message('go_back','对不起,旧提现密码不正确');
if($arr['repass']=='') $this->message('go_back','对不起,新提现密码不能为空');
if($arr['repass']!=$cpassword) $this->message('go_back','对不起,两次输入密码不一致');
$this->user->update($arr,$this->member[uid]);
$this->message('member_password','恭喜您,提现密码修改成功');
}
}
}
function auth(){
$this->title = "用户中心 - ".config::get("sitename");
$_GET['type'] = $_GET['type'] ? $_GET['type'] : "email";
$this->type = $_GET['type'];
$this->mobileurl = rewrite::request("?mod=member&act=auth&type=mobile");
$this->realnameurl = rewrite::request("?mod=member&act=auth&type=realname");
if($this->type=='mobile'){
if($_GET['get']=='checkcode'){
$mtime = $this->member['mtime'];
$this->resendtime = 179 - (time()-$mtime);
}
}
if(submit()){
if($this->type=='email'){
if($this->member['echeck']) $this->message('go_back','对不起,你已经完成邮箱认证!');
$arr['email'] = $_POST['email'];
$username = $this->user->authemail($arr['email'],$this->member[uid]);
if($username!='') $this->message('go_back','对不起,该邮箱已被 '.$username.' 注册!');
$salt = $this->user->salt();
$arr['authemail'] = $this->user->password($salt,$this->member['salt']);
$this->mysql->update("{$this->pre}user",$arr,"uid='{$this->member[uid]}'");
$authemailurl = config::get("sitedomain").Purl("?mod=member&act=authemail&uid={$this->member[uid]}&salt={$salt}");
$this->emailurl = 'http://mail.'.substr($arr['email'],strpos($arr['email'],'@')+1);
$subject = config::get('sitename').'邮箱认证';
$body = "<div style='line-height:1.5;font-size:14px;margin-bottom:15px;color:#4d4d4d;'>";
$body .= "<strong style='display:block;margin-bottom:15px;'>";
$body .= "亲爱的会员:{$this->member['username']} 您好!</strong><p>您已于 ".formattime(time())." 进行邮箱认证操作。</p></div>";
$body .= "<div style='margin-bottom:20px;'><strong style='display:block;margin-bottom:20px;font-size:14px;'>";
$body .= "<a target='_blank' style='color:#f60;' href='{$authemailurl}'>点此进行认证</a></strong>";
$body .= "<p style='color:#666;'><small style='display:block;font-size:12px;margin-bottom:5px;'>";
$body .= "如果上述文字点击无效,请把下面网页地址复制到浏览器地址栏中打开: </small><span style='color:#666;'>";
$body .= "<a target='_blank' href='{$authemailurl}'> {$authemailurl} </a></span></p></div>";
sendmail($arr['email'],$subject,$body,$arr['username']);
}
if($this->type=='mobile'){
$checkcode = $_POST['checkcode'];
if($checkcode){
if($this->member['msalt']!=$checkcode) $this->message("go_back",'对不起,你输入的验证码有误。');
$arr['mcheck'] = 1;
$this->user->update($arr,$this->member[uid]);
$this->message("?mod=member&act=auth&type=mobile",'恭喜你,手机认证成功');
}else{
if($this->user->checkuserphone($_POST['userphone'])) $this->message("go_back",'该手机号码已经存在');
if(time()-$this->member['mtime']>180){
$arr['msalt'] = mt_rand(1000,9999);
$arr['mtime'] = time();
$arr['userphone'] = $_POST['userphone'];
$this->user->update($arr,$this->member['uid']);
$mtime = $arr['mtime'];
@sendsms("你获得的手机验证码:".$arr['msalt']."。【".config::get("sitename")."】",$arr['userphone']);
}else{
if($this->member['userphone']!=$_POST['userphone']){
$arr['msalt'] = mt_rand(1000,9999);
$arr['mtime'] = time();
$arr['userphone'] = $_POST['userphone'];
$this->user->update($arr,$this->member['uid']);
$mtime = $arr['mtime'];
@sendsms("你获得的手机验证码:".$arr['msalt']."。【".config::get("sitename")."】",$arr['userphone']);
}
}
location("?mod=member&act=auth&type=mobile&get=checkcode");
}
}
if($this->type=='realname'){
if($_POST['truename']=='') $this->message("go_back",'真实姓名不能为空');
if($_POST['idcard']=='') $this->message("go_back",'身份证号码不能为空');
//if($this->user->checkidcard($_POST['idcard'])) $this->message("go_back",'该身份证号码已经存在');
$this->user->update($_POST,$this->member[uid]);
$this->message("?mod=member&act=auth&type=realname",'恭喜你,实名认证成功');
}
}
}
function authemail(){
$uid = $_GET['uid'];
$salt = $_GET['salt'];
$user = $this->mysql->select_one("select * from {$this->pre}user where uid='{$uid}'");
$this->username = $user['username'];
$authemail = $this->user->password($salt,$user['salt']);
if($authemail!=$user['authemail']||$user['echeck']=='1'){
$this->message("member_auth",'对不起,你的认证地址已经失效');
}
$arr['authemail'] = '';
$arr['echeck'] = 1;
$this->mysql->update("{$this->pre}user",$arr,"uid='{$user[uid]}'");
$this->message('member_auth','恭喜你,邮箱认证成功');
}
function profile(){
$this->title = "用户中心 - ".config::get("sitename");
$this->type = $_GET['type'] ? $_G
没有合适的资源?快使用搜索试试~ 我知道了~
基于PHP的破浪分红权返利系统基础版 php版 v1.0.zip
共865个文件
gif:443个
php:172个
jpg:70个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 13 浏览量
2023-08-26
22:31:32
上传
评论
收藏 2.44MB ZIP 举报
温馨提示
基于PHP的破浪分红权返利系统基础版 php版 v1.0.zip
资源推荐
资源详情
资源评论
收起资源包目录
基于PHP的破浪分红权返利系统基础版 php版 v1.0.zip (865个子文件)
member.css 63KB
style.css 54KB
login.css 23KB
ajax.css 17KB
default.css 16KB
addbank.css 16KB
admin.css 15KB
control.css 9KB
buy.css 8KB
header.css 6KB
style.css 4KB
datepicker.css 4KB
datepicker.css 4KB
login.css 2KB
swfupload.css 2KB
impromptu.css 1KB
file_manager.css 1KB
message.css 1005B
editor.css 855B
css.css 510B
WdatePicker.css 158B
def 282B
qq.gif 35KB
chengnuo.gif 19KB
login_bg.gif 18KB
bg.gif 17KB
ty.gif 16KB
funbtn.gif 15KB
35.gif 13KB
42.gif 13KB
btn.gif 11KB
40.gif 10KB
xiangxi.gif 8KB
txbackground.gif 8KB
18.gif 8KB
19.gif 8KB
11.gif 8KB
default.gif 8KB
index_back.gif 7KB
32.gif 7KB
tenpay.gif 7KB
user-ui2-icon.gif 6KB
49.gif 6KB
logo.gif 6KB
psot_6.gif 6KB
loadingAnimation.gif 6KB
29.gif 6KB
catBg.gif 6KB
duanxin_bg.gif 5KB
97.gif 5KB
65.gif 5KB
31.gif 5KB
46.gif 5KB
57.gif 5KB
45.gif 5KB
8.gif 5KB
use-icon-2.gif 5KB
alipay.gif 4KB
user_tit2b.gif 4KB
tree_bg.gif 4KB
background.gif 4KB
43.gif 4KB
33.gif 4KB
ur_bg.gif 4KB
new_articl_bg.gif 4KB
68.gif 4KB
reg-menu.gif 4KB
NewPro_hr.gif 4KB
26.gif 4KB
14.gif 4KB
funbtn2.gif 4KB
noavatar_middle.gif 4KB
user_tit1.gif 4KB
7.gif 4KB
wa50010250500005.gif 4KB
51.gif 4KB
funbtn1.gif 4KB
10.gif 4KB
47.gif 4KB
72.gif 4KB
user_tit3.gif 4KB
gksp.gif 4KB
funbtn4.gif 3KB
6.gif 3KB
funbtn3.gif 3KB
94.gif 3KB
84.gif 3KB
sentrybox.gif 3KB
gongsheng_20111122.gif 3KB
41.gif 3KB
17.gif 3KB
9.gif 3KB
28.gif 3KB
50.gif 3KB
bnt_ur_reg.gif 3KB
bnt_ur_log.gif 3KB
95.gif 3KB
22.gif 3KB
icon.gif 3KB
bg2.gif 3KB
共 865 条
- 1
- 2
- 3
- 4
- 5
- 6
- 9
资源评论
助力毕业
- 粉丝: 2182
- 资源: 5151
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功