public function save() { FS("ageconfig", $_POST['leve'], "Webconfig/"); alogs("Age", 0, 1, '会员年龄别称操作成功!'); //管理员操作日志 $this->success("操作成功", __URL__ . "/index/"); }
public function wapsave() { FS("wappayconfig", $_POST['pay'], "Webconfig/"); alogs("Payonline", 0, 1, '执行了wap端第三方支付接口参数的编辑操作!'); //管理员操作日志 $this->success("操作成功le", __URL__ . "/wap"); }
public function save() { FS("payconfig", $_POST['pay'], "Webconfig/"); alogs("Payonline", 0, 1, '执行了第三方支付接口参数的编辑操作!'); //管理员操作日志 $this->success("操作成功", __URL__ . "/index/"); }
public function doEdit() { $data['user_name'] = text($_POST['user_name']); $data['user_id'] = M('members')->getFieldByUser_name($data['user_name'], "id"); if (!$data['user_id']) { $this->error("找不到你要备注的会员"); } $data['remark'] = text($_POST['remark']); if (!$data['remark']) { $this->error("备注信息不可为空"); } $data['admin_id'] = $_SESSION['admin_id']; $data['admin_real_name'] = $_SESSION['admin_user_name']; $data['add_time'] = time(); $newid = M('member_remark')->add($data); if ($newid) { alogs("Remark", $newid, 1, '成功执行了备注信息的添加操作!'); //管理员操作日志 $this->success("添加成功"); } else { alogs("Remark", $newid, 0, '执行备注信息的添加操作失败!'); //管理员操作日志 $this->error("添加失败"); } }
public function save() { alogs("Loginonline", 0, 1, '执行了登陆接口管理参数编辑操作!'); //管理员操作日志 FS("loginconfig", $_POST['login'], "Webconfig/"); $this->success("操作成功", __URL__ . "/index/"); }
public function investsave() { alogs("Leve", 0, 2, '执行了投资积分等级数据编辑操作!'); //管理员操作日志 FS("leveinvestconfig", $_POST['leve'], "Webconfig/"); $this->success("操作成功", __URL__ . "/invest/"); }
public function save() { FS("id5", $_POST['id5'], "Webconfig/"); alogs("id5", 0, 1, '执行了身份验证接口参数的编辑操作!'); //管理员操作日志 $this->success("操作成功", __URL__ . "/index/"); }
/** * 保存参数 * */ public function save() { FS("loanconfig", $_POST['loan'], "Webconfig/"); alogs("Age", 0, 1, '托管设置操作成功!'); //管理员操作日志 $this->success("操作成功", __URL__ . "/index/"); }
public function save() { FS("tuoguanconfig", $_POST['tuoguan'], "Webconfig/"); alogs("Tuoguan", 0, 1, '成功执行了托管账户管理的设置操作!'); //管理员操作日志 $this->success("操作成功", __URL__ . "/index/"); }
public function logout() { alogs("logout", '', '1', "管理员退出"); //require C("APP_ROOT")."Common/menu.inc.php"; session(null); $this->assign('jumpUrl', '/'); $this->success('注销成功,现在转向首页'); }
public function cleanall() { alogs("Global", 0, 1, '执行了所有缓存清除操作!'); //管理员操作日志 $dirs = array(C('APP_ROOT') . 'Runtime'); foreach ($dirs as $value) { rmdirr($value); echo "<div style='border:2px solid green; background:#f1f1f1; padding:20px;margin:20px;width:800px;font-weight:bold;color:green;text-align:center;'>\"" . $value . "\" 目录下缓存清除成功! </div> <br /><br />"; @mkdir($value, 0777, true); } }
public function _editFilter($id) { $x = D('Areaarticle')->where("id = {$id} AND area_id=" . session('admin_area_id') . "")->count(); if ($x == 0) { alogs("AreaarticleEdit", 0, 0, '不能编辑,没有此文章的编辑权限!'); //管理员操作日志 $this->error("不能编辑,没有此文章的编辑权限"); exit; } $typelist = get_type_leve_list_area('0', 'Aacategory', session("admin_area_id")); //分级栏目 $this->assign('type_list', $typelist); }
public function upload() { $model = M("hetong"); $model->startTrans(); if (!empty($_FILES['picpath']['name'])) { $this->saveRule = 'uniqid'; //$this->saveRule = date("YmdHis",time()).rand(0,1000); $this->savePathNew = C('ADMIN_UPLOAD_DIR') . 'Hetong/'; $this->thumbMaxWidth = C('HETONG_UPLOAD_H'); $this->thumbMaxHeight = C('HETONG_UPLOAD_W'); $info = $this->CUpload(); $data['hetong_img'] = $info[0]['savepath'] . $info[0]['savename']; } if ($data['hetong_img']) { $model->hetong_img = $data['hetong_img']; //合同图章 //$model->thumb_hetong_img=$data['thumb_hetong_img'];//合同图章缩略图 } /*$model->add_time=time(); $model->deal_user=session('adminname'); $model->name=$_POST['name']; $model->dizhi=$_POST['dizhi']; $model->tel= intval($_POST['tel']);*/ $data['add_time'] = time(); $data['deal_user'] = session('adminname'); $data['name'] = text($_POST['name']); $data['dizhi'] = text($_POST['dizhi']); $data['tel'] = text($_POST['tel']); $res = M('hetong')->field(true)->find(); if ($res == '') { $result = $model->add($data); } else { $result = $model->where("id={$res['id']}")->save($data); } //保存当前数据对象 if ($result) { //保存成功 $model->commit(); alogs("hetong", 0, 1, '合同章上传的操作成功!'); //管理员操作日志 //成功提示 $this->assign('jumpUrl', __URL__); $this->success(L('上传成功')); } else { alogs("hetong", 0, 0, '合同章上传的操作失败!'); //管理员操作日志 $model->rollback(); //失败提示 $this->error(L('上传失败')); } }
public function save() { $str = text($_POST['o_time']) . "|"; $str .= text($_POST['o_rate']) . "|"; $str .= text($_POST['o_key']); $res = file_put_contents($this->updir . "config.txt", $str); if ($res) { alogs("Auto", 0, 1, '自动值守程序参数修改成功!'); //管理员操作日志 $this->success("保存成功,如执行时间有改动,请重启程序"); } else { alogs("Auto", 0, 0, '自动值守程序参数修改失败!'); //管理员操作日志 $this->error("保存失败,请重试"); } }
public function addAdmin() { $aid = $_POST['aid']; $data = array(); $data['user_name'] = $_POST['user_name']; $data['user_pass'] = md5($_POST['user_pass']); $data['real_name'] = $_POST['real_name']; $data['is_ban'] = $_POST['is_ban']; $data['user_word'] = $_POST['user_word']; $data['invitation_code'] = $_POST['invitation_code']; $ret = M('ausers')->where("id = {$aid}")->save($data); //echo M()->getlastsql();die; if ($ret) { alogs("addAdmin", 1, '管理员更新配资专员信息成功!'); //管理员操作日志 $this->success("更新成功!"); } else { alogs("addAdmin", 1, '管理员更新配资专员信息失败!'); //管理员操作日志 $this->error("更新失败!"); } }
public function doUploadShow() { $show['uid'] = intval($_REQUEST['uid']); $show['deal_time'] = time(); $show['deal_user'] = session('adminname'); //M("member_borrow_show")->where("uid={$show['uid']}")->delete(); foreach ($_POST['swfimglist'] as $key => $v) { $show['data_url'] = substr($v, 1); $show['data_name'] = $_POST['picinfo'][$key]; $show['sort'] = $_POST['picsort'][$key]; M("member_borrow_show")->add($show); } alogs("Memberdata", 0, 1, '成功执行了上传会员展示资料的操作!'); //管理员操作日志 //$this->assign('jumpUrl', __URL__."/".session('listaction')); $this->success("保存成功"); }
public function export() { $proid = (int) $_REQUEST['id']; $proinfo = M('promote')->find($proid); if (empty($proinfo)) { $this->error('数据错误'); } import("ORG.Io.Excel"); alogs("CapitalAccount", 0, 1, '执行了所有会员资金列表导出操作!'); //管理员操作日志 $map = array(); if ($_REQUEST['uname']) { $map['m.user_name'] = array("like", urldecode($_REQUEST['uname']) . "%"); $search['uname'] = urldecode($_REQUEST['uname']); } if ($_REQUEST['realname']) { $map['mi.real_name'] = urldecode($_REQUEST['realname']); $search['realname'] = $map['mi.real_name']; } if (!empty($_REQUEST['bj']) && !empty($_REQUEST['lx']) && !empty($_REQUEST['money'])) { if ($_REQUEST['lx'] == 'allmoney') { if ($_REQUEST['bj'] == 'gt') { $bj = '>'; } else { if ($_REQUEST['bj'] == 'lt') { $bj = '<'; } else { if ($_REQUEST['bj'] == 'eq') { $bj = '='; } } } $map['_string'] = "(mm.account_money+mm.back_money) " . $bj . $_REQUEST['money']; } else { $map[$_REQUEST['lx']] = array($_REQUEST['bj'], $_REQUEST['money']); } $search['bj'] = $_REQUEST['bj']; $search['lx'] = $_REQUEST['lx']; $search['money'] = $_REQUEST['money']; } $map['m.tid'] = $proid; //分页处理 import("ORG.Util.Page"); $count = M('members m')->join("{$this->pre}member_money mm ON mm.uid=m.id")->join("{$this->pre}member_info mi ON mi.uid=m.id")->where($map)->count('m.id'); $p = new Page($count, C('ADMIN_PAGE_SIZE')); $page = $p->show(); $Lsql = "{$p->firstRow},{$p->listRows}"; //分页处理 $pre = $this->pre; $field = 'm.id,m.reg_time,m.user_email,m.user_phone,m.user_name,m.user_type,mi.real_name,mm.money_freeze,mm.money_collect,(mm.account_money+mm.back_money) total_money,mm.account_money,mm.back_money'; $list = M('members m')->field($field)->join("{$this->pre}member_money mm ON mm.uid=m.id")->join("{$this->pre}member_info mi ON mi.uid=m.id")->where($map)->order("m.id DESC")->select(); foreach ($list as $key => $v) { $uid = $v['id']; //$umoney = M('members')->field('account_money,reward_money')->find($uid); //待确认投标 $investing = M()->query("select sum(investor_capital) as capital from {$pre}borrow_investor where investor_uid={$uid} AND status=1"); //待收金额 $invest = M()->query("select sum(investor_capital-receive_capital) as capital,sum(reward_money) as jiangli,sum(investor_interest-receive_interest) as interest from {$pre}borrow_investor where investor_uid={$uid} AND status =4"); //$invest = M()->query("SELECT sum(capital) as capital,sum(interest) as interest FROM {$pre}investor_detail WHERE investor_uid={$uid} AND `status` =7"); //待付金额 $borrow = M()->query("select sum(borrow_money-repayment_money) as repayment_money,sum(borrow_interest-repayment_interest) as repayment_interest from {$pre}borrow_info where borrow_uid={$uid} AND borrow_status=6"); $withdraw0 = M('member_withdraw')->where("uid={$uid} AND withdraw_status=0")->sum('withdraw_money'); //待提现 $withdraw1 = M('member_withdraw')->where("uid={$uid} AND withdraw_status=1")->sum('withdraw_money'); //提现处理中 $withdraw2 = M('member_withdraw')->where("uid={$uid} AND withdraw_status=2")->sum('withdraw_money'); //已提现 $withdraw3 = M('member_withdraw')->where("uid={$uid} AND withdraw_status=0")->sum('second_fee'); //待提现手续费 $withdraw4 = M('member_withdraw')->where("uid={$uid} AND withdraw_status=1")->sum('second_fee'); //处理中提现手续费 $borrowANDpaid = M()->query("select status,sort_order,borrow_id,sum(capital) as capital,sum(interest) as interest from {$pre}investor_detail where borrow_uid={$uid} AND status in(1,2,3)"); $investEarn = M('borrow_investor')->where("investor_uid={$uid} and status in(4,5,6)")->sum('receive_interest'); $investPay = M('borrow_investor')->where("investor_uid={$uid} status<>2")->sum('investor_capital'); $investEarn1 = M('borrow_investor')->where("investor_uid={$uid} and status in(4,5,6)")->sum('invest_fee'); //投资者管理费 $payonline = M('member_payonline')->where("uid={$uid} AND status=1")->sum('money'); //累计支付佣金 $commission1 = M('borrow_investor')->where("investor_uid={$uid}")->sum('paid_fee'); $commission2 = M('borrow_info')->where("borrow_uid={$uid} AND borrow_status in(2,4)")->sum('borrow_fee'); $uplevefee = M('member_moneylog')->where("uid={$uid} AND type=2")->sum('affect_money'); $adminop = M('member_moneylog')->where("uid={$uid} AND type=7")->sum('affect_money'); $txfee = M('member_withdraw')->where("uid={$uid} AND withdraw_status=2")->sum('second_fee'); $czfee = M('member_payonline')->where("uid={$uid} AND status=1")->sum('fee'); $interest_needpay = M()->query("select sum(borrow_interest-repayment_interest) as need_interest from {$pre}borrow_info where borrow_uid={$uid} AND borrow_status=6"); $interest_willget = M()->query("select sum(investor_interest-receive_interest) as willget_interest from {$pre}borrow_investor where investor_uid={$uid} AND status=4"); $interest_jiliang = M('borrow_investor')->where("borrow_uid={$uid}")->sum('reward_money'); //累计支付投标奖励 $moneylog = M("member_moneylog")->field("type,sum(affect_money) as money")->where("uid={$uid}")->group("type")->select(); $listarray = array(); foreach ($moneylog as $vs) { $listarray[$vs['type']]['money'] = $vs['money'] > 0 ? $vs['money'] : $vs['money'] * -1; } //$money['kyxjje'] = $umoney['account_money'];//可用现金金额 $money['kyxjje'] = $v['account_money']; //可用现金金额 $money['dsbx'] = floatval($invest[0]['capital'] + $invest[0]['interest']); //待收本息 $money['dsbj'] = $invest[0]['capital']; //待收本金 $money['dslx'] = $invest[0]['interest']; //待收利息 $money['dfbx'] = floatval($borrow[0]['repayment_money'] + $borrow[0]['repayment_interest']); //待付本息 $money['dfbj'] = $borrow[0]['repayment_money']; //待付本金 $money['dflx'] = $borrow[0]['repayment_interest']; //待付利息 $money['dxrtb'] = $investing[0]['capital']; //待确认投标 $money['dshtx'] = $withdraw0 + $withdraw3; //待审核提现 $money['clztx'] = $withdraw1 + $withdraw4; //处理中提现 //$money['jzlx'] = $investEarn;//净赚利息 $money['jzlx'] = $investEarn - $investEarn1; //净赚利息 $money['jflx'] = $borrowANDpaid[0]['interest']; //净付利息 $money['ljjj'] = $umoney['reward_money']; //累计收到奖金 $money['ljhyf'] = $uplevefee; //累计支付会员费 $money['ljtxsxf'] = $txfee; //累计提现手续费 $money['ljczsxf'] = $czfee; //累计充值手续费 $money['total_2'] = $money['jzlx'] - $money['jflx'] - $money['ljhyf'] - $money['ljtxsxf'] - $money['ljczsxf']; $money['ljtzje'] = $investPay; //累计投资金额 $money['ljjrje'] = $borrowANDpaid[0]['borrow_money']; //累计借入金额 $money['ljczje'] = $payonline; //累计充值金额 $money['ljtxje'] = $withdraw2; //累计提现金额 $money['ljzfyj'] = $commission1 + $commission2; //累计支付佣金 $money['glycz'] = $listarray['7']['money']; //管理员操作资金 // $money['dslxze'] = $interest_willget[0]['willget_interest']; //待收利息总额 $money['dflxze'] = $interest_needpay[0]['need_interest']; //待付利息总额 $money['ljtbjl'] = $listarray['20']['money']; //累计投标奖励 $list[$key]['xmoney'] = $money; } $row = array(); // $row[0]=array('ID','用户名','真实姓名','总余额','可用余额','冻结金额','待收本息金额','待收本金金额','待收利息金额','待付本息金额','待付本金金额','待付利息金额','待确认投标','待审核提现+手续费','处理中提现+手续费','累计提现手续费','累计充值手续费','累计提现金额','累计充值金额','累计支付佣金','累计投标奖励','净赚利息','净付利息','管理员操作资金'); $row[0] = array('ID', '用户名', '会员类型', '注册来源', '会员邮箱', '会员手机', '可用余额', '冻结金额', '待收本息', '注册时间'); $i = 1; foreach ($list as $v) { $row[$i]['uid'] = $v['id']; $row[$i]['card_num'] = $v['user_name']; //$row[$i]['card_pass'] = $v['real_name']; if ($v['user_type'] == 1) { $row[$i]['user_type'] = '普通会员'; } else { $row[$i]['user_type'] = 'VIP会员'; } $row[$i]['user_aaad'] = $proinfo['title']; $row[$i]['user_email'] = $v['user_email']; $row[$i]['user_phone'] = $v['user_phone']; $row[$i]['account_money'] = $v['account_money']; $row[$i]['money_freeze'] = $v['money_freeze']; $row[$i]['dsbx'] = $v['money_collect']; $row[$i]['tjsj'] = date('Y-m-d H:i:s', $v['reg_time']); $i++; } $xls = new Excel_XML('UTF-8', false, 'datalist'); $xls->addArray($row); $xls->generateXML("membersInfo"); }
public function _doDelFilter($id) { $n = M('area')->where("reid in ({$id})")->count(); if ($n > 0) { alogs("AreaDel", 0, 0, '删除失败,所删除的栏目包含有子地区!'); //管理员操作日志 $this->error("删除失败,所删除的栏目包含有子地区"); exit; } }
public function export() { import("ORG.Io.Excel"); alogs("CapitalDetail", 0, 1, '执行了会员资金明细列表导出操作!'); //管理员操作日志 $map = array(); if ($_REQUEST['uid'] && $_REQUEST['uname']) { $map['l.uid'] = $_REQUEST['uid']; $search['uid'] = $map['l.uid']; $search['uname'] = urldecode($_REQUEST['uname']); } if ($_REQUEST['uname'] && !$search['uid']) { $map['m.user_name'] = array("like", urldecode($_REQUEST['uname']) . "%"); $search['uname'] = urldecode($_REQUEST['uname']); } if ($_REQUEST['target_uname']) { $map['l.target_uname'] = urldecode($_REQUEST['target_uname']); $search['target_uname'] = $map['l.target_uname']; } if (isset($_REQUEST['type']) && $_REQUEST['type'] != '') { $map['l.type'] = intval($_REQUEST['type']); $search['type'] = $map['l.type']; } if (!empty($_REQUEST['bj']) && !empty($_REQUEST['money'])) { $map['l.affect_money'] = array($_REQUEST['bj'], $_REQUEST['money']); $search['bj'] = $_REQUEST['bj']; $search['money'] = $_REQUEST['money']; } if (!empty($_REQUEST['start_time']) && !empty($_REQUEST['end_time'])) { $timespan = strtotime(urldecode($_REQUEST['start_time'])) . "," . strtotime(urldecode($_REQUEST['end_time'])); $map['l.add_time'] = array("between", $timespan); $search['start_time'] = urldecode($_REQUEST['start_time']); $search['end_time'] = urldecode($_REQUEST['end_time']); } elseif (!empty($_REQUEST['start_time'])) { $xtime = strtotime(urldecode($_REQUEST['start_time'])); $map['l.add_time'] = array("gt", $xtime); $search['start_time'] = $xtime; } elseif (!empty($_REQUEST['end_time'])) { $xtime = strtotime(urldecode($_REQUEST['end_time'])); $map['l.add_time'] = array("lt", $xtime); $search['end_time'] = $xtime; } if (session('admin_is_kf') == 1) { $map['m.customer_id'] = session('admin_id'); } $field = 'l.id,l.add_time,m.user_name,l.affect_money,l.freeze_money,l.collect_money,(l.account_money+l.back_money) account_money,l.target_uname,l.type,l.info'; $list = M('member_moneylog l')->field($field)->join("{$this->pre}members m ON m.id=l.uid")->where($map)->limit($Lsql)->select(); $type = C('MONEY_LOG'); $row = array(); $row[0] = array('序号', '用户ID', '用户名', '交易对方', '交易类型', '影响金额', '可用余额', '冻结金额', '待收金额', '发生时间', '备注'); $i = 1; foreach ($list as $v) { $row[$i]['i'] = $i; $row[$i]['uid'] = $v['id']; $row[$i]['card_num'] = $v['user_name']; $row[$i]['card_pass'] = $v['target_uname']; $row[$i]['card_mianfei'] = $type[$v['type']]; $row[$i]['card_mianfei0'] = $v['affect_money']; $row[$i]['card_mianfei1'] = $v['account_money']; $row[$i]['card_mianfei2'] = $v['freeze_money']; $row[$i]['card_mianfei3'] = $v['collect_money']; $row[$i]['card_timelimit'] = date("Y-m-d H:i:s", $v['add_time']); $row[$i]['info'] = $v['info']; $i++; } $xls = new \Excel_XML('UTF-8', false, 'datalist'); $xls->addArray($row); $xls->generateXML("datalistcard"); }
/** * 流标处理 * */ public function auditBids() { import("ORG.Loan.Escrow"); $loan = new Escrow(); if ($loan->loanAuditVerify($_POST)) { $str = ''; if ($_POST['ResultCode'] == 88) { $borrow_id = loanBorrowId($_POST['LoanNoList']); if (!$borrow_id) { echo 'error'; exit; } $borrow = M("borrow_info")->field('borrow_uid, first_verify_time, borrow_status')->where("id={$borrow_id}")->find(); if ($borrow['borrow_status'] != 2) { echo 'SUCCESS'; exit; } //流标返回 $appid = borrowRefuse($borrow_id, 2); if (!$appid) { alogs("borrowRefuse", 0, 0, '流标操作失败!'); //管理员操作日志 echo 'error'; exit; } else { alogs("borrowRefuse", 0, 1, '流标操作成功!'); //管理员操作日志 } MTip('chk11', $borrow['borrow_uid'], $borrow_id); $vss = M("members")->field("user_phone,user_name")->where("id = {$borrow['borrow_uid']}")->find(); SMStip("refuse", $vss['user_phone'], array("#USERANEM#", "ID"), array($vss['user_name'], $verify_info['borrow_id'])); //保存当前数据对象 $borrow_save = array('second_verify_time' => time(), 'borrow_status' => 3); if ($result = M('borrow_info')->where("id={$borrow_id}")->save($borrow_save)) { //保存成功 preg_match('/([0-9]+)/', $_POST['Remark1'], $id_arr); $admin_id = $id_arr[0]; //流标操作相当于复审 $verify_info['borrow_id'] = $borrow_id; $verify_info['deal_info_2'] = text($_POST['Remark1']); $verify_info['deal_user_2'] = $admin_id; $verify_info['deal_time_2'] = time(); $verify_info['deal_status_2'] = 3; if ($borrow['first_verify_time'] > 0) { M('borrow_verify')->save($verify_info); } else { M('borrow_verify')->add($verify_info); } notifyMsg('流标', $_POST, 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'SUCCESS'); $str = 'SUCCESS'; } else { notifyMsg('流标', $_POST, 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'ERROR'); $str = 'error'; } } notifyMsg('流标', $_POST, 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], $str); echo $str; exit; } }
function msgByGroup() { if (empty($_POST['content'])) { $this->ajaxReturn('', '请输入发送内容', 0); } $content = $_POST['content']; $title = $_POST['title']; $type = $_POST['type']; $map = ' (ms.email_status OR ms.phone_status) AND '; switch ($_POST['user_group']) { case 2: $map = ' (m.user_leve=1 AND m.time_limit>' . time() . ')'; $likename = 'vip会员'; break; case 3: $map = ' (m.user_leve=0 OR m.time_limit<' . time() . ')'; $likename = '非vip会员'; break; case 1: default: $map = ''; $likename = '所有会员'; break; } $data = array(); $data['admin_id'] = $_SESSION['admin_id']; $data['admin_real_name'] = $_SESSION['adminname']; $data['add_time'] = time(); $data['is_inner'] = 0; $data['user_name'] = $likename; $data['user_phone'] = 0; $data['user_email'] = 0; $data['title'] = trim($_POST['title']); $data['content'] = trim($_POST['content']); $page = 1; $limit = 300; $flag = 1; set_time_limit(0); //设置脚本最大执行时间 while (true) { $inner = $mail = $sms = array(); $offset = $limit * ($page - 1); $list = M('members m')->field(" m.id,m.user_email,m.user_phone ")->join(" lzh_members_status ms ON m.id=ms.uid ")->where($map)->order('id')->limit("{$offset},{$limit}")->select(); $page++; if (empty($list)) { set_time_limit(30); // 还原 break; } foreach ($list as $r) { // 添加站内信要发送的内容 array_push($inner, array('uid' => $r['id'], 'title' => $title, 'msg' => $content, 'send_time' => time())); if (!empty($r['user_email'])) { array_push($mail, $r['user_email']); } if (!empty($r['user_phone'])) { array_push($sms, $r['user_phone']); } } if (in_array('3', $type)) { // 站内信 $data['is_inner'] = 1; if (!$this->_send_inner($inner, true)) { $flag--; } } if (!empty($mail) && in_array('2', $type)) { $data['user_email'] = 1; if (!$this->_send_mail($mail, $title, $content)) { $flag--; } } if (!empty($sms) && in_array('1', $type)) { // 短信 $data['user_phone'] = 1; $sign = $this->_check_sms(); if (!$this->_send_sms($sms, $content . $sign)) { $flag--; } } } if ($flag) { M('smslog')->add($data); $tip = $flag === 1 ? '' : '部分'; alogs("Smslog", 0, 1, "对{$likename}执行通讯通知{$tip}操作成功"); //管理员操作日志 $this->ajaxReturn('', $likename . $tip . '发送成功', 1); } else { alogs("Smslog", 0, 1, "对{$likename}执行通讯通知操作失败"); //管理员操作日志 $this->ajaxReturn('', $likename . $tip . '发送失败', 0); } }
public function doEdit() { $model = D('video_apply'); if (false === $model->create()) { $this->error($model->getError()); } $model->deal_user = session('admin_id'); $model->deal_time = time(); //保存当前数据对象 if ($result = $model->save()) { //保存成功 $uid = M('video_apply')->getFieldById($_POST['id'], 'uid'); if ($_POST['apply_status'] == 1) { setMemberStatus($uid, 'video', $_POST['apply_status'], 7, '视频'); addInnerMsg($uid, "您的视频认证审核已通过", "您的视频认证审核已通过"); alogs("VerifyVideo", 0, 1, '视频认证审核通过!'); //管理员操作日志 } else { addInnerMsg($uid, "您的视频认证审核未通过", "您的视频认证审核未通过"); alogs("VerifyVideo", 0, 0, '视频认证审核未通过!'); //管理员操作日志 } //成功提示 $this->assign('jumpUrl', __URL__ . "/index" . session('listaction')); $this->success(L('审核成功')); } else { //失败提示 $this->error(L('审核失败')); } }
public function doDel() { $model = D('comment'); if (!empty($model)) { $id = $_REQUEST['idarr']; if (isset($id)) { $pk = $model->getPk(); if (false !== $model->where("{$pk} in ({$id})")->delete()) { alogs("MarketPinglun", 0, 1, '成功执行了积分商城商品评论的删除操作!'); //管理员操作日志 $this->success(L('删除成功'), '', $id); } else { alogs("MarketPinglun", 0, 0, '执行积分商城商品评论的删除操作失败!'); //管理员操作日志 $this->error(L('删除失败')); } } else { $this->error('非法操作'); } } }
public function doEdit() { $model = D("member_withdraw"); $status = intval($_POST['withdraw_status']); $id = intval($_POST['id']); $deal_info = $_POST['deal_info']; $secondfee = floatval($_POST['withdraw_fee']); $info = $model->field('add_time')->where("id={$id} and (withdraw_status!=0)")->find(); if ($info['add_time']) { $this->error("此提现初审已处理过,请不要重复处理!"); } if (false === $model->create()) { $this->error($model->getError()); } //保存当前数据对象 $model->withdraw_status = $status; $model->deal_info = $deal_info; $model->deal_time = time(); $model->deal_user = session('adminname'); //////////////////////// $field = 'w.*,w.id,w.uid,(mm.account_money+mm.back_money) all_money'; $vo = M("member_withdraw w")->field($field)->join("lzh_member_money mm on w.uid = mm.uid")->find($id); $um = M('members')->field("user_name,user_phone")->find($vo['uid']); if ($vo['withdraw_status'] != 3 && $status == 3) { addInnerMsg($vo['uid'], "您的提现申请审核未通过", "您的提现申请审核未通过,处理说明:" . $deal_info); SMStip("nowithdraw", $um['user_phone'], array("#USERANEM#", "#MONEY#"), array($um['user_name'], $vo['withdraw_money'])); //memberMoneyLog($vo['uid'],12,$vo['withdraw_money'],"提现未通过,返还",'0','@网站管理员@'); memberMoneyLog($vo['uid'], 12, $vo['withdraw_money'], "提现未通过,返还", '0', '@网站管理员@', 0, $vo['withdraw_back_money']); $model->success_money = 0; } else { if ($vo['withdraw_status'] != 2 && $status == 2) { addInnerMsg($vo['uid'], "您的提现已完成", "您的提现已完成"); // 统一为;都从当笔提现中扣减手续费 /*if( ($vo['all_money'] - $vo['second_fee'])<0 ){ memberMoneyLog($vo['uid'],29,-($vo['withdraw_money']-$vo['second_fee']),"提现成功,扣除实际手续费".$vo['second_fee']."元,减去冻结资金,到帐金额".($vo['withdraw_money']-$vo['second_fee'])."元",'0','@网站管理员@',0,-$vo['second_fee']); $model->success_money = $vo['withdraw_money']; //SMStip("withdraw",$um['user_phone'],array("#USERANEM#","#MONEY#"),array($um['user_name'],($vo['withdraw_money']-$vo['second_fee']))); }else{ memberMoneyLog($vo['uid'],29,-($vo['withdraw_money']),"提现成功,扣除实际手续费".$vo['second_fee']."元,减去冻结资金,到帐金额".($vo['withdraw_money'])."走下",'0','@网站管理员@'); $model->success_money = $vo['withdraw_money']; //SMStip("withdraw",$um['user_phone'],array("#USERANEM#","#MONEY#"),array($um['user_name'],$vo['withdraw_money'])); }*/ memberMoneyLog($vo['uid'], 29, -($vo['withdraw_money'] - $vo['second_fee']), "提现成功,扣除手续费" . $vo['second_fee'] . "元,实到帐金额" . ($vo['withdraw_money'] - $vo['second_fee']) . "元", '0', '@网站管理员@', 0, -$vo['second_fee']); $model->success_money = $vo['withdraw_money']; } elseif ($vo['withdraw_status'] != 1 && $status == 1) { addInnerMsg($vo['uid'], "您的提现申请已通过", "您的提现申请已通过,正在处理中"); // 统一为;都从当笔提现中扣减手续费 /*if($vo['all_money'] <=$secondfee ){ memberMoneyLog($vo['uid'],36,-($vo['withdraw_money']),"提现申请已通过,扣除实际手续费".$secondfee."元,到帐金额".($vo['withdraw_money']-$secondfee)."元",'0','@网站管理员@',-$secondfee); $model->success_money = $vo['withdraw_money']-$secondfee; }else{ memberMoneyLog($vo['uid'],36,-$vo['withdraw_money'],"提现申请已通过,扣除实际手续费".$secondfee."元,到帐金额".($vo['withdraw_money'])."元",'0','@网站管理员@',-$secondfee); $model->success_money = $vo['withdraw_money']; }*/ memberMoneyLog($vo['uid'], 36, -$secondfee, "提现申请已通过,扣除手续费" . $secondfee . "元,到帐金额" . ($vo['withdraw_money'] - $secondfee) . "元", '0', '@网站管理员@', -$secondfee); $model->success_money = $vo['withdraw_money'] - $secondfee; $model->withdraw_fee = $vo['withdraw_fee']; $model->second_fee = $secondfee; } } ////////////////////////// $result = $model->save(); if ($result) { //保存成功 alogs("withdraw", $id, $status, $deal_info); //管理员操作日志 //成功提示 $this->assign('jumpUrl', __URL__); $this->success(L('修改成功')); } else { alogs("withdraw", $id, $status, '提现处理操作失败!'); //管理员操作日志 //$this->assign("waitSecond",10000); //失败提示 $this->error(L('修改失败')); } $vm = M("member_moneylog")->field("info")->where("uid = {$vo['uid']} and type=36")->limit(1)->order('id desc')->select(); if (!empty($um['user_phone'])) { // sendsms($um['user_phone'],$vm[0]['info']."【友情提醒】"); } }
public function doEdit() { $id = intval($_POST['id']); $status = intval($_POST['status']); $statusx = M('member_payonline')->getFieldById($id, "status"); if ($statusx != 0) { $this->error("请不要重复提交表单"); } if ($status == 1) { $vo = M('member_payonline')->field('money,fee,uid,way')->find($id); $newid = memberMoneyLog($vo['uid'], 27, $vo['money'] - $vo['fee'], "管理员手动审核充值"); if ($newid) { //////////////////////////// if ($vo['way'] == "off") { $tqfee = explode("|", $this->glo['offline_reward']); $fee[0] = explode("-", $tqfee[0]); $fee[2] = explode("-", $tqfee[2]); $fee[1] = floatval($tqfee[1]); $fee[3] = floatval($tqfee[3]); $fee[4] = floatval($tqfee[4]); $fee[5] = floatval($tqfee[5]); if ($vo['money'] >= $fee[0][0] && $vo['money'] <= $fee[0][1]) { $fee_rate = 0 < $fee[1] ? $fee[1] / 1000 : 0; } else { if ($vo['money'] >= $fee[2][0] && $vo['money'] <= $fee[2][1]) { $fee_rate = 0 < $fee[3] ? $fee[3] / 1000 : 0; } else { if ($vo['money'] >= $fee[4]) { $fee_rate = 0 < $fee[5] ? $fee[5] / 1000 : 0; } else { $fee_rate = 0; } } } $newidx = memberMoneyLog($vo['uid'], 32, $vo['money'] * $fee_rate, "线下充值奖励"); } ///////////////////////////// /* $offline_reward = explode("|",$this->glo['offline_reward']); if($vo['money']>$offline_reward[0]){ $fee_rate = 0<$offline_reward[1]?($offline_reward[1]/1000):0; $newidx = memberMoneyLog($vo['uid'],32,$vo['money']*$fee_rate,"线下充值奖励"); }*/ $save['deal_user'] = session('adminname'); $save['deal_uid'] = $this->admin_id; $save['status'] = 1; M('member_payonline')->where("id={$id}")->save($save); $vx = M('members')->field("user_name,user_phone")->find($vo['uid']); if ($vo['way'] == "off") { SMStip("payoffline", $vx['user_phone'], array("#USERANEM#", "#MONEY#"), array($vx['user_name'], $vo['money'])); } else { SMStip("payonline", $vx['user_phone'], array("#USERANEM#", "#MONEY#"), array($vx['user_name'], $vo['money'])); } alogs("Paylog", 0, 1, '执行了管理员手动审核充值操作!'); //管理员操作日志 $this->success("处理成功"); } else { alogs("Paylog", 0, 1, '执行管理员手动审核充值操作失败!'); //管理员操作日志 $this->error("处理失败"); } } else { $save['deal_user'] = session('adminname'); $save['deal_uid'] = $this->admin_id; $save['status'] = 3; $newid = M('member_payonline')->where("id={$id}")->save($save); if ($newid) { $this->success("处理成功"); } else { $this->error("处理失败"); } } }
public function doEdit() { $model = M("members"); $model2 = M("member_info"); if (false === $model->create()) { $this->error($model->getError()); } if (false === $model2->create()) { $this->error($model->getError()); } $model->startTrans(); //保存当前数据对象 $model->user_name = $_POST['user_name']; $model->reg_time = strtotime($_POST['reg_time'] . " " . date("H:i:s", time())); $model2->real_name = text($_POST['real_name']); $model2->address = text($_POST['address']); $model2->info = text($_POST['info']); $model2->uid = $model->id; $result = $model->save(); $result2 = $model2->save(); if ($result && $result2) { //保存成功 $model->commit(); alogs("Tmembers", 0, 1, '成功执行了流转会员的编辑操作!'); //管理员操作日志 //成功提示 $this->assign('jumpUrl', __URL__); $this->success(L('修改成功')); } else { alogs("Tmembers", 0, 0, '执行流转会员的编辑操作失败!'); //管理员操作日志 $model->rollback(); //失败提示 $this->error(L('修改失败')); } }
public function dodeletetel() { $data = $_POST; foreach ($data as $key => $v) { $data[$key] = EnHtml($v); } $idarray = $data['idarr']; $delnum = M('qq')->where("id in ({$idarray})")->delete(); alogs("QQ", 0, 0, '执行了客服电话的删除操作!'); //管理员操作日志 if ($delnum) { $a_data['success'] = $rid; $a_data['success_msg'] = "客服电话删除成功"; $a_data['aid'] = $idarray; } else { $a_data['success'] = 0; $a_data['error_msg'] = "客服电话删除失败"; } exit(json_encode($a_data)); }
public function supplyexamine() { $info = $_POST['info']; $uid = M('shares_supply')->getFieldByid($_POST, "uid"); $user = M("members")->find($uid); $shares_id = M('shares_apply')->getFieldByid($this->_post("id"), 'shares_id'); if (!getWantApply($shares_id)) { $this->error('该配资已经申请停止操盘,请优先处理停止操盘申请!'); } if ($this->_post("status") == 2) { $id = $this->_post("id"); $savedata['id'] = $this->_post("id"); $savedata['status'] = $this->_post("status"); $savedata['examine_time'] = time(); $res = M("shares_supply")->save($savedata); if ($res) { $ret = daysupply($id); if ($ret) { $info = '您在手投网申请资金补充审核通过!【手投网】'; sendsms($user['user_phone'], $info); alogs("supplyexamine", 0, 1, '管理员执行了股票配资补充实盘申请审核操作成功!'); $this->success("审核完成!"); } } else { alogs("supplyexamine", 0, 1, '管理员执行了股票配资补充实盘申请审核操作失败!'); $this->error("审核操作失败,请重试!"); } } elseif ($this->_post("status") == 3) { $savedata['id'] = $this->_post("id"); $savedata['status'] = $this->_post("status"); $savedata['examine_time'] = time(); $res = M("shares_supply")->save($savedata); if ($res) { $info = '您在手投网申请资金补充审核未通过,原因为' . $info . '!【手投网】'; sendsms($user['user_phone'], $info); $this->success("审核完成!"); } else { $this->error("审核操作失败,请重试!"); } } else { $this->error("非法请求!"); } }
public function doIdcardEdit() { $model = D(ucfirst($this->getActionName())); $model2 = M("member_info"); if (false === $model->create()) { $this->error($model->getError()); } if (false === $model2->create()) { $this->error($model->getError()); } $model->startTrans(); ///////////////////////////// if (!empty($_FILES['imgfile']['name'])) { $this->fix = false; //设置上传文件规则 $this->saveRule = 'uniqid'; //$this->saveRule = date("YmdHis",time()).rand(0,1000)."_".$model->id; $this->savePathNew = C('ADMIN_UPLOAD_DIR') . 'Idcard/'; $this->thumbMaxWidth = C('IDCARD_UPLOAD_H'); $this->thumbMaxHeight = C('IDCARD_UPLOAD_W'); $info = $this->CUpload(); $data['card_img'] = $info[0]['savepath'] . $info[0]['savename']; $data['card_back_img'] = $info[1]['savepath'] . $info[1]['savename']; if ($data['card_img'] && $data['card_back_img']) { $model2->card_img = $data['card_img']; $model2->card_back_img = $data['card_back_img']; } } /////////////////////////// $result = $model->save(); $result2 = $model2->save(); //保存当前数据对象 if ($result || $result2) { //保存成功 $model->commit(); alogs("Members", 0, 1, '成功执行了会员身份证代传的操作!'); //管理员操作日志 //成功提示 $this->assign('jumpUrl', __URL__ . "/" . session('listaction')); $this->success(L('修改成功')); } else { $model->rollback(); alogs("Members", 0, 0, '执行会员身份证代传的操作失败!'); //管理员操作日志 //失败提示 $this->error(L('修改失败')); } }
public function doEdit() { $model = M("transfer_borrow_info"); $model2 = M("transfer_detail"); if (false === $model->create()) { $this->error($model->getError()); } if (false === $model2->create()) { $this->error($model->getError()); } $model->startTrans(); //保存当前数据对象 $model->repayment_type = 5; if (intval($_POST['progress']) == 100) { $model->borrow_status = 6; } else { $model->borrow_status = 2; } //$model->collect_day = strtotime($_POST['collect_day']); $model->level_can = intval($_POST['level_can']); $model->borrow_max = intval($_POST['borrow_max']); //$model->transfer_total = intval($_POST['transfer_total']); //$model->min_month = $_POST['borrow_duration']; //$model->online_time = strtotime($_POST['online_time']); $model->online_time = strtotime($_POST['online_time']); //上线时间 foreach ($_POST['updata_name'] as $key => $v) { $updata[$key]['name'] = $v; $updata[$key]['time'] = $_POST['updata_time'][$key]; } $model->updata = serialize($updata); if (!empty($_FILES['picpath']['name'])) { $this->saveRule = date("YmdHis", time()) . rand(0, 1000); $this->savePathNew = C('ADMIN_UPLOAD_DIR') . 'Hetong/'; $this->thumbMaxWidth = C('PRODUCT_UPLOAD_W'); $this->thumbMaxHeight = C('PRODUCT_UPLOAD_H'); $info = $this->CUpload(); $data['hetong_img'] = $info[0]['savepath'] . $info[0]['savename']; } if ($data['hetong_img']) { $model->hetong_img = $data['hetong_img']; } //修改公章 if (!empty($_FILES['imgfile']['name'])) { $this->saveRule = date("YmdHis", time()) . rand(0, 1000); $this->savePathNew = C('ADMIN_UPLOAD_DIR') . 'Product/'; $this->thumbMaxWidth = C('PRODUCT_UPLOAD_W'); $this->thumbMaxHeight = C('PRODUCT_UPLOAD_H'); $info = $this->CUpload(); $data['b_img'] = $info[0]['savepath'] . $info[0]['savename']; } if ($data['b_img']) { $model->b_img = $data['b_img']; } //修改基金理财展示图 $result = $model->save(); foreach ($_POST['swfimglist'] as $key => $v) { $row[$key]['img'] = substr($v, 1); $row[$key]['info'] = $_POST['picinfo'][$key]; } $model2->borrow_img = serialize($row); $model2->borrow_id = intval($_POST['id']); $result2 = $model2->save(); //$this->assign("waitSecond",1000); if ($result || $result2) { //保存成功 $model->commit(); alogs("Tborrow", 0, 1, '成功执行了基金理财信息的修改操作!'); //管理员操作日志 //成功提示 $this->assign('jumpUrl', __URL__); $this->success(L('修改成功')); } else { alogs("Tborrow", 0, 0, '执行基金理财信息的修改操作失败!'); //管理员操作日志 $model->rollback(); //失败提示 $this->error(L('修改失败')); } }