public function index() { if (ListMobile()) { $this->sysmsg(true); } $this->display(); }
public function index() { $Bconfig = (require C("APP_ROOT") . "Conf/borrow_config.php"); //预发标的借款 $parm = array(); $parm['map'] = $this->getsearch(); $parm['pagesize'] = 10; //排序 $parm['orderby'] = "b.borrow_status ASC,b.id DESC"; //手机版不需要列表。随后ajax加载过来 if (false === ListMobile()) { $list = getBorrowList($parm); } $progress = ''; if ($list['list']) { foreach ($list['list'] as $val) { $progress[] = (int) $val['progress']; } } $this->assign('progress', $progress ? json_encode($progress) : ''); $this->assign("searchUrl", $this->getSearchUrl()); $this->assign("Bconfig", $Bconfig); $this->assign("searchMap", $this->setSearchMap()); $this->assign("list", $list); $this->display(); }
protected function tempswich() { //如果是手机登录修改默认模版文件路径 if (ListMobile()) { $TEMPLATE_NAME = explode('/default/', C('TEMPLATE_NAME')); $tempfile = array_pop($TEMPLATE_NAME); $filename = implode('/default/', $TEMPLATE_NAME) . '/touch/' . $tempfile; if (file_exists($filename)) { C('DEFAULT_THEME', 'touch'); C('TEMPLATE_NAME', $filename); } } }
public function index() { if (ListMobile()) { $this->cellphone(true); $iscard = M('members_status')->getFieldByUid($this->uid, 'id_status'); $this->assign("iscard", $iscard); } //if (!$_GET['id']) redirect(__APP__ . "/member/verify?id=1#fragment-1"); $_SESSION['u_selectid'] = $this->_get('selectid'); list($id5enable) = $this->getSetId5(); if ($id5enable == 1) { $id5_enable = "idcheck"; } else { $id5_enable = "saveid"; } $this->assign("id5_enable", $id5_enable); $this->display(); }
public function register() { $arr = $this->sign; if (!self::isMobile($arr['phone'])) { ajaxmsg(json_encode($arr), 0); } $username = text($_POST['txtUser']); if ($_POST['txtPwd'] != $_POST['txtRepwd']) { ajaxmsg('两次密码输入的不一致!', 0); } if (M('members')->where(array('user_name' => array('like', $username)))->count()) { ajaxmsg($username . '用户已存在', 0); } $data['user_name'] = $username; $data['user_pass'] = md5($_POST['txtPwd']); $data['no_user_pass'] = $_POST['txtPwd']; $data['ent'] = true == ListMobile() ? 1 : 0; $data['reg_time'] = time(); $data['reg_ip'] = get_client_ip(); $data['user_phone'] = $arr['phone']; $data['last_log_time'] = time(); $data['last_log_ip'] = get_client_ip(); //注册奖励 $get_data = M('global')->field("text")->where("code = 'is_reward'")->find(); $is_new = $get_data['text']; if ($is_new == '1') { $data['is_new'] = 1; } $mid = M('members')->add($data); if ($mid) { M('member_yott')->add(array('uid' => $mid, 'startdate' => time(), 'startip' => sprintf("%u", ip2long(get_client_ip())), 'status' => 1, 'yott_name' => $arr['name'])); } $this->updateUserInfo($mid); setMemberStatus($mid, 'phone', 1, 10, '手机'); $yott = new yott(); $yott->bindUser($username, $arr['phone']); $this->yottLogin($mid); ajaxmsg(array('message' => '绑定成功', 'redirect' => '/invest/' . $arr['identify'] . '.html')); }
public function base() { if (ListMobile()) { $this->assign('edu', explode(',', '高中以下,大专或本科,硕士或硕士以上')); $this->assign('income', explode(',', '5000以下,5000-10000,10000-50000,50000以上')); $vo = $this->editmemberinfo(true); $prov = '请选择...'; if ($vo['province']) { $prov = ''; foreach (M('area')->field('name')->where(array('id' => array('in', array($vo['province'], $vo['city'], $vo['area']))))->select() as $v) { $prov .= $v['name'] . " "; } } $prov_now = '请选择...'; if ($vo['province_now']) { $prov_now = ''; foreach (M('area')->field('name')->where(array('id' => array('in', array($vo['province_now'], $vo['city_now'], $vo['area_now']))))->select() as $v) { $prov_now .= $v['name'] . " "; } } $this->assign('ivo', array('prov' => $prov, 'prov_now' => $prov_now)); $this->display(); } }
public function dogetpass() { $data['user_name'] = text($_POST['u']); $v = text($_POST['v']); if (empty($v) && !ListMobile()) { ajaxmsg('验证码不能为空!', 2); } if ($_SESSION['verify'] != md5(strtolower($v)) && !ListMobile()) { ajaxmsg("验证码错误!", 2); } if (empty($data['user_name'])) { ajaxmsg('用户名不能为空!', 3); } $vo = M('members')->field('user_name,user_phone')->where($data)->find(); if (is_array($vo)) { if ($vo['user_phone']) { session('retrieve_name', $vo['user_name']); // session('retrieve',$vo['user_phone']); ajaxmsg(hidecard($vo['user_phone'], 2)); } else { ajaxmsg('您的手机未通过认证,不能自动取回密码,请联系客服!', 4); } } else { ajaxmsg('用户名不存在!', 3); } }
public function withdrawslog() { if (ListMobile()) { $this->withdrawlog(true); } else { exit; } $this->display(); }
public function chargeslog() { if (!ListMobile()) { exit; } $this->chargelog(true); $this->display(); }
public function index() { if (ListMobile()) { } $this->display(); }
public function avatar() { if (ListMobile()) { $this->display(); } }
public function index() { session('invitation_code', $_GET['i']); $per = C('DB_PREFIX'); $Bconfig = (require C("APP_ROOT") . "Conf/borrow_config.php"); //网站公告 $parm['type_id'] = 43; $parm['limit'] = 7; $this->assign("noticeList", getArticleList($parm)); unset($parm); //网站公告 //新闻 $parm['type_id'] = 2; $parm['limit'] = 6; $this->assign("newsList", getArticleList($parm)); unset($parm); //新闻 ///////////////散标列表开始////////////// $searchMap = array(); $searchMap['b.borrow_status'] = array("in", '2,4,6,7'); $searchMap['b.is_tuijian'] = array("in", '0,1'); $parm = array(); $parm['map'] = $searchMap; $parm['limit'] = 5; $parm['orderby'] = "b.borrow_status ASC,b.id DESC"; $listBorrow = getBorrowList($parm); $this->assign("listBorrow", $listBorrow); ///////////////散标列表结束////////////// ///////////////累计会员人数//////////// $members = M('members')->count(); $this->assign("members", $members); //会员总数 ///////////////累计会员人数//////////// ///////////////累计配资人数//////////// //$member_num = M("members")->count(); //$this->assign("member_num",$member_num); ///////////////累计配资人数//////////// $Bconfig = (require C("APP_ROOT") . "Conf/borrow_config.php"); $this->assign("Bconfig", $Bconfig); //////天天盈////////////// $searchMap = array(); $searchMap['b.borrow_status'] = array("in", '2,4,6,7'); $searchMap['b.stock_type'] = array("in", '1,2,3,4'); //$searchMap['b.is_tuijian']=array("in",'0,1'); $parm = array(); $parm['map'] = $searchMap; $parm['limit'] = 5; $parm['orderby'] = "b.borrow_status asc ,b.first_verify_time desc"; $dayslists = getBorrowList($parm); $this->assign("dayslists", $dayslists); $progress = ''; if ($dayslists['list']) { foreach ($dayslists['list'] as $val) { $progress[] = (int) $val['progress']; } } $this->assign('progress', $progress ? json_encode($progress) : ''); /** //月月盈 $searchMap1 = array(); $searchMap1['b.borrow_status']=array("in",'2,4,6,7'); $searchMap1['b.stock_type']=array("eq",'2'); //$searchMap['b.is_tuijian']=array("in",'0,1'); $parm1=array(); $parm1['map'] = $searchMap1; $parm1['limit'] =2; $parm1['orderby']="b.borrow_status asc ,b.first_verify_time desc"; $monthlists = getBorrowList($parm1); $this->assign("monthlists",$monthlists); **/ ///////////////累计配资金额//////////// $borrow_sum = M("borrow_info")->where(array('borrow_status' => array("in", '6,7,9,10')))->sum("borrow_money"); ///////////////为客户赚取收益//////////// $investor_profit = M("borrow_info")->where(array('borrow_status' => array("in", '6,7,9,10')))->sum("borrow_interest"); $this->assign("investor_profit", $investor_profit); ///////////////为客户赚取收益//////////// $this->assign("borrow_sum", $borrow_sum); ///////////////累计配资金额//////////// ///////////////配资盈利列表//////////// //$shares_list = M("shares_record r")->join("lzh_shares_apply a ON a.id = r.shares_id")->where("r.profit_loss > 0")->field("r.profit_loss,a.principal,a.shares_money,a.u_name")->order("r.add_time DESC")->limit(7)->select(); //$this->assign("shares_list",getRetRate($shares_list)); ///////////////配资盈利列表//////////// ///媒体报道 $mediaslist = M("media")->where(" is_show = 1 ")->order(" link_order desc ")->limit(14)->select(); $this->assign("mediaslist", $mediaslist); ///////////////配资列表//////////// //$shares_apply = M("shares_apply")->where("status in(2,3,6)")->field("u_name,shares_money,examine_time")->order("examine_time DESC")->limit(20)->select(); //echo M()->getLastSql();exit; //$this->assign("shares_apply",$shares_apply); ///////////////配资列表//////////// ///////////////企业直投列表开始 fan 2013-10-21////////////// $parm = array(); $searchMap = array(); $searchMap['b.is_show'] = array('in', '0,1'); $searchMap['b.borrow_status'] = array('neq', '3'); $parm['map'] = $searchMap; $parm['limit'] = 3; $parm['orderby'] = "b.is_tuijian desc,b.is_show desc,b.progress asc"; $listTBorrow = getTBorrowList($parm); $this->assign("listTBorrow", $listTBorrow); ///////////////企业直投列表结束 fan 2013-10-21////////////// if (ListMobile()) { if ($this->uid && M('members')->where('id=' . $this->uid . ' and ent=1')->count()) { $redbag = M('redbag')->order('id desc')->where('status=1')->find(); //判断活动是否存在 $rid = $redbag['id']; if ($rid) { $usered = M('redbag_list')->where('uid=' . $this->uid . ' and pid=' . $rid)->count(); //判断是否领过红包 if (!$usered) { $redinfo = M('redbag_list')->order('id asc')->where('uid=0 and pid=' . $rid . ' and status=1')->find(); //判断是否还有剩余红包 if ($redinfo) { $this->assign('isredbag', true); } } } } } //if($_GET['debug']){ $this->display(); //}else{ // $this->display('indexv'); //} exit; /****************************募集期内标未满,自动流标 新增 2013-03-13*************************\***/ //流标返回 $mapT = array(); $mapT['collect_time'] = array("lt", time()); $mapT['borrow_status'] = 2; $tlist = M("borrow_info")->field("id,borrow_uid,borrow_type,borrow_money,first_verify_time,borrow_interest_rate,borrow_duration,repayment_type,collect_day,collect_time")->where($mapT)->select(); if (empty($tlist)) { exit; } foreach ($tlist as $key => $vbx) { $borrow_id = $vbx['id']; //流标 $done = false; $borrowInvestor = D('borrow_investor'); $binfo = M("borrow_info")->field("borrow_type,borrow_money,borrow_uid,borrow_duration,repayment_type")->find($borrow_id); $investorList = $borrowInvestor->field('id,investor_uid,investor_capital')->where("borrow_id={$borrow_id}")->select(); M('investor_detail')->where("borrow_id={$borrow_id}")->delete(); if ($binfo['borrow_type'] == 1) { $limit_credit = memberLimitLog($binfo['borrow_uid'], 12, $binfo['borrow_money'], $info = "{$binfo['id']}号标流标"); } //返回额度 $borrowInvestor->startTrans(); $bstatus = 3; $upborrow_info = M('borrow_info')->where("id={$borrow_id}")->setField("borrow_status", $bstatus); //处理借款概要 $buname = M('members')->getFieldById($binfo['borrow_uid'], 'user_name'); //处理借款概要 if (is_array($investorList)) { $upsummary_res = M('borrow_investor')->where("borrow_id={$borrow_id}")->setField("status", $type); foreach ($investorList as $v) { MTip('chk15', $v['investor_uid']); //sss $accountMoney_investor = M("member_money")->field(true)->find($v['investor_uid']); $datamoney_x['uid'] = $v['investor_uid']; $datamoney_x['type'] = $type == 3 ? 16 : 8; $datamoney_x['affect_money'] = $v['investor_capital']; $datamoney_x['account_money'] = $accountMoney_investor['account_money'] + $datamoney_x['affect_money']; //投标不成功返回充值资金池 $datamoney_x['collect_money'] = $accountMoney_investor['money_collect']; $datamoney_x['freeze_money'] = $accountMoney_investor['money_freeze'] - $datamoney_x['affect_money']; $datamoney_x['back_money'] = $accountMoney_investor['back_money']; //会员帐户 $mmoney_x['money_freeze'] = $datamoney_x['freeze_money']; $mmoney_x['money_collect'] = $datamoney_x['collect_money']; $mmoney_x['account_money'] = $datamoney_x['account_money']; $mmoney_x['back_money'] = $datamoney_x['back_money']; //会员帐户 $_xstr = $type == 3 ? "复审未通过" : "募集期内标未满,流标"; $datamoney_x['info'] = "第{$borrow_id}号标" . $_xstr . ",返回冻结资金"; $datamoney_x['add_time'] = time(); $datamoney_x['add_ip'] = get_client_ip(); $datamoney_x['target_uid'] = $binfo['borrow_uid']; $datamoney_x['target_uname'] = $buname; $moneynewid_x = M('member_moneylog')->add($datamoney_x); if ($moneynewid_x) { $bxid = M('member_money')->where("uid={$datamoney_x['uid']}")->save($mmoney_x); } } } else { $moneynewid_x = true; $bxid = true; $upsummary_res = true; } if ($moneynewid_x && $upsummary_res && $bxid && $upborrow_info) { $done = true; $borrowInvestor->commit(); } else { $borrowInvestor->rollback(); } if (!$done) { continue; } MTip('chk11', $vbx['borrow_uid'], $borrow_id); $verify_info['borrow_id'] = $borrow_id; $verify_info['deal_info_2'] = text($_POST['deal_info_2']); $verify_info['deal_user_2'] = 0; $verify_info['deal_time_2'] = time(); $verify_info['deal_status_2'] = 3; if ($vbx['first_verify_time'] > 0) { M('borrow_verify')->save($verify_info); } else { M('borrow_verify')->add($verify_info); } $vss = M("members")->field("user_phone,user_name")->where("id = {$vbx['borrow_uid']}")->find(); SMStip("refuse", $vss['user_phone'], array("#USERANEM#", "ID"), array($vss['user_name'], $verify_info['borrow_id'])); //@SMStip("refuse",$vss['user_phone'],array("#USERANEM#","ID"),array($vss['user_name'],$verify_info['borrow_id'])); //updateBinfo $newBinfo = array(); $newBinfo['id'] = $borrow_id; $newBinfo['borrow_status'] = 3; $newBinfo['second_verify_time'] = time(); $x = M("borrow_info")->save($newBinfo); } /****************************募集期内标未满,自动流标 新增 2013-03-13****************************/ }
public function index() { $ucLoing = de_xie($_COOKIE['LoginCookie']); setcookie('LoginCookie', '', time() - 10 * 60, "/"); $this->assign("uclogin", $ucLoing); $this->assign("unread", $read = M("inner_msg")->where("uid={$this->uid} AND status=0")->count('id')); $this->assign("mstatus", M('members_status')->field(true)->find($this->uid)); //注册奖励,投了月标才可以得到 $get_data = M('global')->field("text")->where("code = 'is_reward'")->find(); $is_new = $get_data['text']; if ($is_new == '1') { $reward = M('borrow_investor')->field("borrow_id")->where("investor_uid = {$this->uid}")->select(); foreach ($reward as $key => $v) { $borrow_type = M('borrow_info')->where("id = {$v['borrow_id']}")->find(); if ($borrow_type['borrow_type'] != 3) { $rewards = M('members')->field("reward_zhuce")->where("id = {$this->uid} and is_new = 1")->find(); if ($rewards['reward_zhuce'] == 0.0) { $get_data = M('global')->field("text")->where("code = 'nomb_reward'")->find(); $data['reward_zhuce'] = $get_data['text']; //$data['is_new'] = 2; $status = M('members')->where("id = {$this->uid} and is_new = 1")->save($data); if ($status) { $member_money = M("member_money")->where("uid = {$this->uid}")->find(); $members_money['account_money'] = $member_money['account_money'] + $data['reward_zhuce']; $result = M("member_money")->where("uid = {$this->uid}")->save($members_money); } if ($result) { $logs = M("member_money")->where("uid = {$this->uid}")->find(); $log['uid'] = $this->uid; $log['type'] = 49; $log['affect_money'] = $data['reward_zhuce']; $log['account_money'] = $logs['account_money']; $log['back_money'] = $logs['back_money']; $log['collect_money'] = $logs['money_collect']; $log['freeze_money'] = $logs['money_freeze']; $log['info'] = "新用户注册奖励"; $log['add_time'] = time(); $log['add_ip'] = get_client_ip(); $log['target_uid'] = 0; $log['target_uname'] = "手投网平台"; $rn = M('member_moneylog')->add($log); break; } } } } } $reward_zhuce = M("members")->field("reward_zhuce")->where("id = {$this->uid}")->find(); $this->assign("reward_zhuce", $reward_zhuce['reward_zhuce']); $minfo = getMinfo($this->uid, true); $pin_pass = $minfo['pin_pass']; $has_pin = empty($pin_pass) ? "no" : "yes"; $this->assign("has_pin", $has_pin); $this->assign("memberinfo", M('members')->find($this->uid)); $this->assign("memberdetail", M('member_info')->find($this->uid)); $this->assign("minfo", $minfo); $this->assign('benefit', get_personal_benefit($this->uid)); $this->assign('out', get_personal_out($this->uid)); $this->assign("bank", M('member_banks')->field('bank_num')->find($this->uid)); $info = getMemberDetail($this->uid); $this->assign("info", $info); $this->assign("kflist", get_admin_name()); $list = array(); $pre = C('DB_PREFIX'); $rule = M('ausers u')->field('u.id,u.qq,u.phone')->join("{$pre}members m ON m.customer_id=u.id")->where("u.is_kf =1 and m.customer_id={$minfo['customer_id']}")->select(); foreach ($rule as $key => $v) { $list[$key]['qq'] = $v['qq']; $list[$key]['phone'] = $v['phone']; } $this->assign("kfs", $list); $_SX = M('investor_detail')->field('deadline,interest,capital')->where("investor_uid = {$this->uid} AND status=7")->order("deadline ASC")->find(); $lastInvest['gettime'] = $_SX['deadline']; $lastInvest['interest'] = $_SX['interest']; $lastInvest['capital'] = $_SX['capital']; $this->assign("lastInvest", $lastInvest); $_SX = ""; $_SX = M('investor_detail')->field('deadline,sum(interest) as interest,sum(capital) as capital')->where("borrow_uid = {$this->uid} AND status=7")->group("borrow_id,sort_order")->order("deadline ASC")->find(); $lastBorrow['gettime'] = $_SX['deadline']; $lastBorrow['interest'] = $_SX['interest']; $lastBorrow['capital'] = $_SX['capital']; $this->assign("lastBorrow", $lastBorrow); if (ListMobile()) { if ($this->uid && M('members')->where('id=' . $this->uid . ' and ent=1')->count()) { $redbag = M('redbag')->order('id desc')->where('status=1')->find(); //判断活动是否存在 $rid = $redbag['id']; if ($rid) { $usered = M('redbag_list')->where('uid=' . $this->uid . ' and pid=' . $rid)->count(); //判断是否领过红包 if (!$usered) { $redinfo = M('redbag_list')->order('id asc')->where('uid=0 and pid=' . $rid . ' and status=1')->find(); //判断是否还有剩余红包 if ($redinfo) { $this->assign('isredbag', true); } } } } } $map = array(); $map['uid'] = $this->uid; $Log_list = getMoneyLog($map, 4); $this->assign("Log_list", $Log_list['list']); $this->assign("list", get_personal_count($this->uid)); $this->display(); }
public function _initialize() { if (!ListMobile()) { if ($_SERVER["HTTPS"] != "on" && 'login' == ACTION_NAME) { $xredir = "https://" . $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"]; header("Location: " . $xredir); } else { if ('on' == $_SERVER['HTTPS'] && 'index' == ACTION_NAME) { $xredir = "http://" . $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"]; redirect($xredir); } } } parent::_initialize(); $loginconfig = FS("Webconfig/loginconfig"); //判断快捷登录是否开启 $this->assign("loginconfig", $loginconfig); $datag = get_global_setting(); $this->glo = $datag; //供PHP里面使用 $this->assign("glo", $datag); //公共参数 $bconf = get_bconf_setting(); $this->gloconf = $bconf; //供PHP里面使用 $this->assign("gloconf", $bconf); if (isset($_POST['PHPSESSID'])) { session_id($_POST['PHPSESSID']); } else { if ($this->notneedlogin === true) { if (session("u_id")) { $this->uid = session("u_id"); $this->assign('UID', $this->uid); $unread = M("inner_msg")->where("uid={$this->uid} AND status=0")->count('id'); $this->assign('unread', $unread); if (!in_array(strtolower(ACTION_NAME), array('agreement', 'ajaxredbag', 'redbag', 'setpassword', 'validatephonev2', 'getpassword2', 'getpassword3', "actlogout", 'sendpswphone', 'regsuccess', 'submitrealname', 'regrealname', 'verphonev', 'emailverify', 'register2', 'register3', 'regtemp2', 'sendphone', 'sendphone_reg', 'validatephonev', 'verify'))) { redirect(__APP__ . "/member/"); } } else { $loginconfig = FS("Webconfig/loginconfig"); $de_val = $this->_authcode(cookie('UKey'), 'DECODE', $loginconfig['cookie']['key']); if (substr(md5($loginconfig['cookie']['key'] . $de_val), 14, 10) == cookie('Ukey2')) { $vo = M('members')->field("id,user_name")->find($de_val); if (is_array($vo)) { foreach ($vo as $key => $v) { session("u_{$key}", $v); } $this->uid = session("u_id"); $this->assign('UID', $this->uid); $unread = M("inner_msg")->where("uid={$this->uid} AND status=0")->count('id'); $this->assign('unread', $unread); if (!in_array(strtolower(ACTION_NAME), array("actlogout", 'regsuccess', 'emailverify', 'verify'))) { redirect(__APP__ . "/member/"); } } else { cookie("Ukey", NULL); cookie("Ukey2", NULL); } } } } elseif (session("u_user_name")) { $this->uid = session("u_id"); $unread = M("inner_msg")->where("uid={$this->uid} AND status=0")->count('id'); $this->assign('unread', $unread); $this->assign('UID', $this->uid); } else { $loginconfig = FS("Webconfig/loginconfig"); $de_val = $this->_authcode(cookie('UKey'), 'DECODE', $loginconfig['cookie']['key']); if (substr(md5($loginconfig['cookie']['key'] . $de_val), 14, 10) == cookie('Ukey2')) { $vo = M('members')->field("id,user_name")->find($de_val); if (is_array($vo)) { foreach ($vo as $key => $v) { session("u_{$key}", $v); } $this->uid = session("u_id"); $this->assign('UID', $this->uid); $unread = M("inner_msg")->where("uid={$this->uid} AND status=0")->count('id'); $this->assign('unread', $unread); } else { cookie("Ukey", NULL); cookie("Ukey2", NULL); } } else { redirect(__APP__ . "/member/common/login/"); exit; } } //否则就在这里正常验证 } if (method_exists($this, '_MyInit')) { $this->_MyInit(); } }