public function index() { $root = array(); $email = strim($GLOBALS['request']['email']); //用户名或邮箱 $pwd = strim($GLOBALS['request']['pwd']); //密码 $ids = strim($GLOBALS['request']['id']); //检查用户,用户密码 $user = user_check($email, $pwd); $user_id = intval($user['id']); if ($user_id > 0) { $root['user_login_status'] = 1; $sql = "delete from " . DB_PREFIX . "deal_collect where deal_id in (" . $ids . ") and user_id = " . $user_id; //$root['sql'] = $sql; $GLOBALS['db']->query($sql); $root['response_code'] = 1; $root['show_err'] = $GLOBALS['lang']['DELETE_SUCCESS']; /* if($GLOBALS['db']->affected_rows()){ $root['response_code'] = 1; $root['show_err'] = $GLOBALS['lang']['DELETE_SUCCESS']; } else{ $root['response_code'] = 0; $root['show_err'] = $GLOBALS['lang']['删除失败']; } */ } else { $root['response_code'] = 0; $root['show_err'] = "未登录"; $root['user_login_status'] = 0; } output($root); }
public function index() { $root = array(); $root['return'] = 1; $email = addslashes($GLOBALS['request']['email']); //用户名或邮箱 $pwd = md5(addslashes($GLOBALS['request']['pwd'])); //原始密码 $user_info = user_check($email, $pwd); $user_id = intval($user_info['id']); if (!$user_info) { $root['status'] = 0; $root['message'] = "用户密码错误"; output($root); } else { $new_password = addslashes($GLOBALS['request']['new_password']); if (strlen($new_password) < 4) { $root['status'] = 0; $root['message'] = "注册密码不能少于4位"; output($root); } $sql = "update " . DB_PREFIX . "user set is_account = 1, user_pwd = '" . md5($new_password) . "' where id = {$user_id}"; $GLOBALS['db']->query($sql); $rs = $GLOBALS['db']->affected_rows(); $root['status'] = 1; $root['uid'] = $user_id; $root['user_name'] = $email; $root['password'] = md5($new_password); $root['is_account'] = 1; output($root); } }
public function index() { $root = array(); $email = strim($GLOBALS['request']['email']); //用户名或邮箱 $pwd = strim($GLOBALS['request']['pwd']); //密码 $page = intval($GLOBALS['request']['page']); $status = strim($GLOBALS['request']['status']); //0:全部;1:可转让;2:转让中;3:已转让;4:已撤销; //检查用户,用户密码 $user = user_check($email, $pwd); $user_id = intval($user['id']); if ($user_id > 0) { require APP_ROOT_PATH . 'app/Lib/uc_func.php'; $root['user_login_status'] = 1; $root['response_code'] = 1; $result = getUcTransferBuys($page, $status); $root['item'] = $result['list']; $root['page'] = array("page" => $page, "page_total" => ceil($result['count'] / app_conf("DEAL_PAGE_SIZE"))); } else { $root['response_code'] = 0; $root['show_err'] = "未登录"; $root['user_login_status'] = 0; } output($root); }
public function index() { $root = array(); $email = strim($GLOBALS['request']['email']); //用户名或邮箱 $pwd = strim($GLOBALS['request']['pwd']); //密码 //检查用户,用户密码 $user = user_check($email, $pwd); $user_id = intval($user['id']); if ($user_id > 0) { require APP_ROOT_PATH . 'app/Lib/uc_func.php'; $root['user_login_status'] = 1; $paypassword = strim($GLOBALS['request']['paypassword']); $amount = floatval($GLOBALS['request']['amount']); $bid = intval($GLOBALS['request']['bid']); $result = getUcSaveCarry($amount, $paypassword, $bid); $root['response_code'] = $result['status']; $root['show_err'] = $result['show_err']; } else { $root['response_code'] = 0; $root['show_err'] = "未登录"; $root['user_login_status'] = 0; } output($root); }
public function index() { $root = array(); $email = strim($GLOBALS['request']['email']); //用户名或邮箱 $pwd = strim($GLOBALS['request']['pwd']); //密码 $id = intval($GLOBALS['request']['id']); //检查用户,用户密码 $user = user_check($email, $pwd); $user_id = intval($user['id']); if ($user_id > 0) { require APP_ROOT_PATH . 'app/Lib/uc_func.php'; $root['user_login_status'] = 1; $result = getUcToTransfer($id); $root['transfer'] = $result['transfer']; $root['response_code'] = $result['status']; $root['show_err'] = $result['show_err']; } else { $root['response_code'] = 0; $root['show_err'] = "未登录"; $root['user_login_status'] = 0; } $root['program_title'] = "转让详情"; output($root); }
public function index() { $root = array(); $email = strim($GLOBALS['request']['email']); //用户名或邮箱 $pwd = strim($GLOBALS['request']['pwd']); //密码 //检查用户,用户密码 $user = user_check($email, $pwd); $user_id = intval($user['id']); if ($user_id > 0) { $root['user_login_status'] = 1; $order_id = intval($_REQUEST['id']); $order_info = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "deal_order where order_status = 0 and user_id = " . intval($GLOBALS['user_info']['id']) . " and id = " . $order_id); if (!$order_info) { $root['info'] = '无效的订单'; } else { $money = $order_info['credit_pay']; $GLOBALS['db']->query("delete from " . DB_PREFIX . "deal_order where id = " . $order_id . " and user_id = " . intval($GLOBALS['user_info']['id']) . " and order_status = 0"); if ($GLOBALS['db']->affected_rows() > 0) { if ($money > 0) { require_once APP_ROOT_PATH . "system/libs/user.php"; modify_account(array("money" => $money), intval($GLOBALS['user_info']['id']), "删除" . $order_info['deal_name'] . "项目支付,退回支付款。"); } } $root['response_code'] = 1; $root['info'] = '删除成功'; } } else { $root['response_code'] = 0; $root['show_err'] = "未登录"; $root['user_login_status'] = 0; } output($root); }
public function index() { $root = array(); $email = strim($GLOBALS['request']['email']); //用户名或邮箱 $pwd = strim($GLOBALS['request']['pwd']); //密码 //检查用户,用户密码 $user = user_check($email, $pwd); $user_id = intval($user['id']); if ($user_id > 0) { $root['user_login_status'] = 1; $root['page_title'] = "发起项目"; $region_lv2 = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "region_conf where region_level = 2 order by py asc"); //二级地址 $root['region_lv2'] = $region_lv2; $cate_list = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "deal_cate order by sort asc"); $root['cate_list'] = $cate_list; $deal_image = es_session::get("deal_image"); $root['deal_image'] = $deal_image; } else { $root['response_code'] = 0; $root['show_err'] = "未登录"; $root['user_login_status'] = 0; } output($root); }
public function index() { $root = array(); $email = strim($GLOBALS['request']['email']); //用户名或邮箱 $pwd = strim($GLOBALS['request']['pwd']); //密码 $page = intval($GLOBALS['request']['page']); $status = intval($GLOBALS['request']['status']); //0:还款列表;1:已还清借款 //检查用户,用户密码 $user = user_check($email, $pwd); $user_id = intval($user['id']); if ($user_id > 0) { require APP_ROOT_PATH . 'app/Lib/deal.php'; $root['user_login_status'] = 1; $root['response_code'] = 1; if ($page == 0) { $page = 1; } $limit = ($page - 1) * app_conf("PAGE_SIZE") . "," . app_conf("PAGE_SIZE"); $deal_status = 4; if ($status == 1) { $deal_status = 5; } $result = get_deal_list($limit, 0, "deal_status ={$deal_status} AND user_id=" . $user_id, "id DESC", $email, $user['user_pwd']); $root['item'] = $result['list']; $root['page'] = array("page" => $page, "page_total" => ceil($result['count'] / app_conf("PAGE_SIZE"))); } else { $root['response_code'] = 0; $root['show_err'] = "未登录"; $root['user_login_status'] = 0; } output($root); }
public function index() { $root = array(); $email = strim($GLOBALS['request']['email']); //用户名或邮箱 $pwd = strim($GLOBALS['request']['pwd']); //密码 $address_id = intval($GLOBALS['request']['id']); //检查用户,用户密码 $user = user_check($email, $pwd); $user_id = intval($user['id']); if ($user_id > 0) { if ($address_id) { $GLOBALS['db']->query("delete from " . DB_PREFIX . "user_address where id = " . $address_id); $root['response_code'] = 1; $root["show_err"] = "删除成功"; } else { $root["show_err"] = "删除失败"; } output($root); } else { $root['response_code'] = 0; $root['show_err'] = "未登录"; $root['user_login_status'] = 0; } $root['program_title'] = "收货地址删除"; output($root); }
public function index() { $root = array(); $email = strim($GLOBALS['request']['email']); //用户名或邮箱 $pwd = strim($GLOBALS['request']['pwd']); //密码 //检查用户,用户密码 $user = user_check($email, $pwd); $user_id = intval($user['id']); if ($user_id > 0) { $root['user_login_status'] = 1; $id = intval($_REQUEST['id']); $paypassword = strim($GLOBALS['request']['paypassword']); $id = intval($GLOBALS['request']['id']); $status = dotrans($id, $paypassword); if ($status['status'] != 1) { $root['response_code'] = 0; $root['show_err'] = $status['show_err']; } else { $root['response_code'] = 1; $root['show_err'] = $GLOBALS['lang']['DEAL_BID_SUCCESS']; $root['id'] = $id; } } else { $root['response_code'] = 0; $root['show_err'] = "未登录"; $root['user_login_status'] = 0; } output($root); }
public function index() { $root = array(); $root['return'] = 1; $email = addslashes($GLOBALS['request']['email']); //用户名或邮箱 $pwd = addslashes($GLOBALS['request']['pwd']); //密码 //检查用户,用户密码 $user = user_check($email, $pwd); //print_r($user);exit; $user_id = intval($user['id']); if ($user_id == 0) { $root['user_login_status'] = 0; //用户登陆状态:1:成功登陆;0:未成功登陆 output($root); } else { $root['user_login_status'] = 1; } $brand_id = intval($GLOBALS['request']['brand_id']); $data['uid'] = $user_id; $data['brand_id'] = $brand_id; $is_set = intval($GLOBALS['db']->getOne("select count(*) from " . DB_PREFIX . "brand_dy where uid = " . $user_id . " and brand_id = " . $brand_id)); if ($is_set == 1) { $GLOBALS['db']->query("update " . DB_PREFIX . "brand set dy_count = dy_count - 1 where dy_count >0 and id =" . $brand_id); $GLOBALS['db']->query("delete from " . DB_PREFIX . "brand_dy where uid = " . $user_id . " and brand_id =" . $brand_id); $root['status'] = 0; output($root); } else { $GLOBALS['db']->autoExecute(DB_PREFIX . "brand_dy", $data, 'INSERT'); $GLOBALS['db']->query("update " . DB_PREFIX . "brand set dy_count = dy_count + 1 where id =" . $brand_id); $root['status'] = 1; output($root); } }
public function index() { $email = strim($GLOBALS['request']['email']); //用户名或邮箱 $pwd = strim($GLOBALS['request']['pwd']); //密码 //检查用户,用户密码 $user = user_check($email, $pwd); $user_id = intval($user['id']); $root = array(); $root['return'] = 1; if ($user_id > 0) { $root['user_login_status'] = 0; $id = intval($GLOBALS['request']['id']); //id,有ID值则更新,无ID值,则插入 $sql = "delete from " . DB_PREFIX . "user_consignee where user_id = {$user_id} and id = {$id}"; $GLOBALS['db']->query($sql); $root = array(); $root['return'] = 1; $root['info'] = "数据删除成功!"; } else { $root['user_login_status'] = 1; } output($root); }
public function index() { $root = array(); $id = intval($GLOBALS['request']['id']); $email = strim($GLOBALS['request']['email']); //用户名或邮箱 $pwd = strim($GLOBALS['request']['pwd']); //密码 //检查用户,用户密码 $user = user_check($email, $pwd); $user_id = intval($user['id']); if ($user_id > 0) { $root['is_faved'] = $GLOBALS['db']->getOne("SELECT count(*) FROM " . DB_PREFIX . "deal_collect WHERE deal_id = " . $id . " AND user_id=" . $user_id); } else { $root['is_faved'] = 0; //0:未关注;>0:已关注 } $root['response_code'] = 1; $deal = get_deal($id); //format_deal_item($deal,$email,$pwd); //print_r($deal); //exit; $root['deal'] = $deal; //data.deal.name output($root); }
public function index() { $email = strim($GLOBALS['request']['email']); //用户名或邮箱 $pwd = strim($GLOBALS['request']['pwd']); //密码 //检查用户,用户密码 $user = user_check($email, $pwd); $user_id = intval($user['id']); $root = array(); $root['return'] = 1; if ($user_id > 0) { $root['user_login_status'] = 1; $id = intval($GLOBALS['request']['id']); $GLOBALS['db']->query("update " . DB_PREFIX . "deal_order set is_delete = 1,order_status = 1 where id = " . $id . " and user_id = " . intval($user_id) . " and pay_status = 0"); $rs = $GLOBALS['db']->affected_rows(); if ($rs) { $root['return'] = 1; $root['info'] = "删除成功"; } else { $root['return'] = 0; $root['info'] = "删除失败"; } } else { $root['return'] = 0; $root['info'] = "未登录"; $root['user_login_status'] = 0; } output($root); }
public function index() { $root = array(); $email = strim($GLOBALS['request']['email']); //用户名或邮箱 $pwd = strim($GLOBALS['request']['pwd']); //密码 //检查用户,用户密码 $user = user_check($email, $pwd); $user_id = intval($user['id']); if ($user_id > 0) { $root['user_login_status'] = 1; if (intval($user['idcardpassed']) == 0) { $root['response_code'] = 0; $root['show_err'] = "您的实名信息尚未认证,为保护您的账户安全,请先完成实名认证。"; } else { $root['response_code'] = 1; $root['real_name'] = $user['real_name']; $bank_list = $GLOBALS['db']->getAll("SELECT * FROM " . DB_PREFIX . "bank ORDER BY is_rec DESC,sort DESC,id ASC"); $root['item'] = $bank_list; } } else { $root['response_code'] = 0; $root['show_err'] = "未登录"; $root['user_login_status'] = 0; } output($root); }
public function index() { $root = array(); $email = strim($GLOBALS['request']['email']); //用户名或邮箱 $pwd = strim($GLOBALS['request']['pwd']); //密码 //检查用户,用户密码 $user = user_check($email, $pwd); $user_id = intval($user['id']); if ($user_id > 0) { $root['user_login_status'] = 1; $root['response_code'] = 1; $page_size = $GLOBALS['m_config']['page_size']; $page = intval($_REQUEST['p']); if ($page == 0) { $page = 1; } $limit = ($page - 1) * $page_size . "," . $page_size; $refund_list = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "user_refund where user_id = " . intval($GLOBALS['user_info']['id']) . " order by create_time desc limit " . $limit); $refund_count = $GLOBALS['db']->getOne("select count(*) from " . DB_PREFIX . "user_refund where user_id = " . intval($GLOBALS['user_info']['id'])); $root['refund_list'] = $refund_list; $root['page'] = array("page" => $page, "page_total" => ceil($refund_count / $page_size), "page_size" => intval($page_size), 'total' => intval($refund_count)); } else { $root['response_code'] = 0; $root['show_err'] = "未登录"; $root['user_login_status'] = 0; } output($root); }
public function index() { $root = array(); $email = strim($GLOBALS['request']['email']); //用户名或邮箱 $pwd = strim($GLOBALS['request']['pwd']); //密码 //检查用户,用户密码 $user = user_check($email, $pwd); $user_id = intval($user['id']); $root['user_id'] = $user_id; if ($user_id > 0) { require APP_ROOT_PATH . 'app/Lib/uc_func.php'; $root['user_login_status'] = 1; $root['response_code'] = 1; $bank_list = $GLOBALS['db']->getAll("SELECT u.id, u.bankcard,u.real_name, b.name as bank_name, b.id as bank_id FROM " . DB_PREFIX . "user_bank u left join " . DB_PREFIX . "bank b on b.id = u.bank_id where u.user_id=" . $user_id . " ORDER BY u.id ASC"); foreach ($bank_list as $k => $v) { $bank_list[$k]['bankcode'] = str_replace(" ", "", $v['bankcard']); $bank_list[$k]['img'] = str_replace("/mapi", "", SITE_DOMAIN . APP_ROOT . '/public/bank/' . $v['bank_id'] . '.jpg'); } $root['item'] = $bank_list; //手续费 $fee_config = load_auto_cache("user_carry_config"); $json_fee = array(); foreach ($fee_config as $k => $v) { $json_fee[] = $v; $fee_config[$k]['fee_format'] = format_price($v['fee']); } $root['fee_config'] = $fee_config; //$root['json_fee'] = json_encode($json_fee); $root['open_ips'] = intval(app_conf("OPEN_IPS")); $root['ips_acct_no'] = $user['ips_acct_no']; $root['idno'] = $user['idno']; //身份证号 $root['real_name'] = $user['real_name']; //第三方托管标 if (!empty($user['ips_acct_no']) && intval(app_conf("OPEN_IPS")) > 0) { $result = GetIpsUserMoney($user_id, 0); $root['ips_money'] = $result['pBalance']; //提现 http://p2p.fanwe.net/index.php?ctl=collocation&act=DoDwTrade&user_type=0&from=app&user_id=44&pTrdAmt=10 $app_url = APP_ROOT . "/index.php?ctl=collocation&act=DoDwTrade&user_type=0&pTrdAmt=parm_amt&user_id=" . $user_id . "&from=" . $GLOBALS['request']['from']; $root['dw_url'] = str_replace("/mapi", "", SITE_DOMAIN . $app_url); } else { //申请 $app_url = APP_ROOT . "/index.php?ctl=collocation&act=CreateNewAcct&user_type=0&user_id=" . $user_id . "&from=" . $GLOBALS['request']['from']; $root['acct_url'] = str_replace("/mapi", "", SITE_DOMAIN . $app_url); $root['ips_money'] = 0; } $root['ips_money_format'] = format_price($root['ips_money']); //预留 提现金额 $root['ips_money_fee'] = 0; //预留 提现费用 } else { $root['response_code'] = 0; $root['show_err'] = "未登录"; $root['user_login_status'] = 0; } $root['program_title'] = "提现"; output($root); }
public function index() { $root = array(); $email = addslashes($GLOBALS['request']['email']); //用户名或邮箱 $pwd = addslashes($GLOBALS['request']['pwd']); //密码 //检查用户,用户密码 $user = user_check($email, $pwd); $user_id = intval($user['id']); if ($user_id == 0) { $root['user_login_status'] = 0; //用户登陆状态:1:成功登陆;0:未成功登陆 output($root); } else { $root['user_login_status'] = 1; } $yh_id = intval($GLOBALS['request']['yh_id']); $content = addslashes($GLOBALS['request']['content']); //$merchant_id = intval($GLOBALS['db']->getOne("select supplier_location_id from ".DB_PREFIX."youhui where id='".$yh_id."'")); $merchant_youhui_comment = array('user_id' => $user_id, 'rel_id' => $yh_id, 'rel_table' => 'youhui', 'title' => $content, 'content' => $content, 'is_effect' => 1, 'create_time' => get_gmtime()); $GLOBALS['db']->autoExecute(DB_PREFIX . "message", $merchant_youhui_comment, 'INSERT'); $id = $GLOBALS['db']->insert_id(); $root['id'] = $id; if ($id > 0) { increase_user_active($user_id, "点评了一个优惠券"); $root['status'] = 1; $root['info'] = "添加成功"; } else { $root['status'] = 0; $root['info'] = "添加失败"; } output($root); }
public function index() { $root = array(); $email = strim($GLOBALS['request']['email']); //用户名或邮箱 $pwd = strim($GLOBALS['request']['pwd']); //密码 $id = strim($GLOBALS['request']['id']); //检查用户,用户密码 $user = user_check($email, $pwd); $user_id = intval($user['id']); if ($user_id > 0) { $root['user_login_status'] = 1; $GLOBALS['db']->query("DELETE FROM " . DB_PREFIX . "user_bank where user_id=" . intval($GLOBALS['user_info']['id']) . " and id in (" . $id . ")"); if ($GLOBALS['db']->affected_rows()) { $root['response_code'] = 1; $root['show_err'] = $GLOBALS['lang']['DELETE_SUCCESS']; } else { $root['response_code'] = 0; $root['show_err'] = "删除失败"; } } else { $root['response_code'] = 0; $root['show_err'] = "未登录"; $root['user_login_status'] = 0; } output($root); }
public function index() { $root = array(); $email = strim($GLOBALS['request']['email']); //用户名或邮箱 $pwd = strim($GLOBALS['request']['pwd']); //密码 $id = intval($GLOBALS['request']['id']); //$user_id = intval($GLOBALS['user_info']['id']); //检查用户,用户密码 $user = user_check($email, $pwd); $user_id = intval($user['id']); if ($user_id > 0) { require APP_ROOT_PATH . 'app/Lib/deal.php'; $root['user_login_status'] = 1; $root['response_code'] = 1; //充值已支付 $root['incharge_count'] = $GLOBALS['db']->getOne("SELECT sum(money) FROM " . DB_PREFIX . "payment_notice where is_paid = 1 and user_id = " . $user_id . " "); $root['incharge_count'] = format_price($root['incharge_count']); //提现成功 $root['carry_money'] = $GLOBALS['db']->getOne("SELECT sum(money) FROM " . DB_PREFIX . "user_carry where status = 1 and user_id = " . $user_id . " "); $root['carry_money'] = format_price($root['carry_money']); //已付管理费 $root['true_repay_manage_money'] = $GLOBALS['db']->getOne("SELECT sum(true_repay_manage_money) FROM " . DB_PREFIX . "deal_load_repay where has_repay = 1 and user_id = " . $user_id . " "); $root['true_repay_manage_money'] = format_price($root['true_repay_manage_money']); $user_statistics = sys_user_status($user_id); $root['user_statistics'] = $user_statistics; } else { $root['response_code'] = 0; $root['show_err'] = "未登录"; $root['user_login_status'] = 0; } $root['program_title'] = "理财统计"; output($root); }
public function index() { $root = array(); $email = strim($GLOBALS['request']['email']); //用户名或邮箱 $pwd = strim($GLOBALS['request']['pwd']); //密码 $page = intval($GLOBALS['request']['page']); $mode = strim($GLOBALS['request']['mode']); //index,invite,ing,over,bad //检查用户,用户密码 $user = user_check($email, $pwd); $user_id = intval($user['id']); if ($user_id > 0) { $root['user_login_status'] = 1; $result = getInvestList($mode, $user_id, $page); $root['item'] = $result['list']; $root['page'] = array("page" => $page, "page_total" => ceil($result['count'] / app_conf("DEAL_PAGE_SIZE"))); } else { $root['response_code'] = 0; $root['show_err'] = "未登录"; $root['user_login_status'] = 0; } output($root); }
public function index() { $root = array(); $email = strim($GLOBALS['request']['email']); //用户名或邮箱 $pwd = strim($GLOBALS['request']['pwd']); //密码 //检查用户,用户密码 $user = user_check($email, $pwd); $user_id = intval($user['id']); if ($user_id > 0) { $root['user_login_status'] = 1; $root['response_code'] = 1; //$root['show_err'] = get_domain(); //输出支付方式 $payment_list = $GLOBALS['db']->getAll("select id,class_name,name,description,logo,total_amount,config from " . DB_PREFIX . "payment order by sort desc"); foreach ($payment_list as $k => $v) { $payment_list[$k]['logo'] = get_domain() . $v['logo']; } $root['payment_list'] = $payment_list; } else { $root['response_code'] = 0; $root['show_err'] = "未登录"; $root['user_login_status'] = 0; } output($root); }
public function index() { $email = strim($GLOBALS['request']['email']); //用户名或邮箱 $pwd = strim($GLOBALS['request']['pwd']); //密码 if (app_conf("SMS_ON") == 0) { $root['response_code'] = 0; $root['show_err'] = $GLOBALS['lang']['SMS_OFF']; //短信未开启 output($root); } //检查用户,用户密码 $user = user_check($email, $pwd); $user_id = intval($user['id']); $root['user_id'] = $user_id; if ($user_id > 0) { $mobile = $user['mobile']; $code = intval($user['bind_verify']); if ($mobile == '') { $root['response_code'] = 0; $root['show_err'] = $GLOBALS['lang']['MOBILE_EMPTY_TIP']; output($root); } if (!check_mobile($mobile)) { $root['response_code'] = 0; $root['show_err'] = $GLOBALS['lang']['FILL_CORRECT_MOBILE_PHONE']; output($root); } if (!check_ipop_limit(get_client_ip(), "mobile_verify", 60, 0)) { $root['response_code'] = 0; $root['show_err'] = $GLOBALS['lang']['MOBILE_SMS_SEND_FAST']; //短信发送太快 output($root); } //开始生成手机验证 if ($code == 0) { //已经生成过了,则使用旧的验证码;反之生成一个新的 $code = rand(1111, 9999); $GLOBALS['db']->query("update " . DB_PREFIX . "user set bind_verify = '" . $code . "',verify_create_time = '" . TIME_UTC . "' where id = " . $user_id); } //使用立即发送方式 $result = send_verify_sms($mobile, $code, $user, true); // $root['response_code'] = $result['status']; if ($root['response_code'] == 1) { $root['show_err'] = $GLOBALS['lang']['MOBILE_VERIFY_SEND_OK']; } else { $root['show_err'] = $result['msg']; if ($root['show_err'] == null || $root['show_err'] == '') { $root['show_err'] = "验证码发送失败"; } } } else { $root['response_code'] = 0; $root['show_err'] = "未登录"; $root['user_login_status'] = 0; } output($root); }
public function index() { $root = array(); $email = strim($GLOBALS['request']['email']); //用户名或邮箱 $pwd = strim($GLOBALS['request']['pwd']); //密码 $id = intval($GLOBALS['request']['id']); //检查用户,用户密码 $user = user_check($email, $pwd); $user_id = intval($user['id']); if ($user_id > 0) { require APP_ROOT_PATH . 'app/Lib/deal.php'; $root['user_login_status'] = 1; $result = getUCInrepayRepayBorrowMoney($id); $root['status'] = $result['status']; if ($result['status'] == 2) { $root['response_code'] = 1; $root['app_url'] = $result['jump']; } else { $root['response_code'] = $result['status']; $root['show_err'] = $result['show_err']; } } else { $root['response_code'] = 0; $root['show_err'] = "未登录"; $root['user_login_status'] = 0; } output($root); }
public function index() { $root = array(); $email = strim($GLOBALS['request']['email']); //用户名或邮箱 $pwd = strim($GLOBALS['request']['pwd']); //密码 $dltid = intval($GLOBALS['request']['dltid']); //检查用户,用户密码 $user = user_check($email, $pwd); $user_id = intval($user['id']); if ($user_id > 0) { $root['user_login_status'] = 1; $GLOBALS['db']->query("UPDATE " . DB_PREFIX . "deal_load_transfer SET status=0,callback_count = callback_count+1 where id=" . $dltid . " AND t_user_id=0 and user_id = " . $user_id); if ($GLOBALS['db']->affected_rows()) { $root['response_code'] = 1; $root['show_err'] = "撤销操作成功"; } else { $root['response_code'] = 0; $root['show_err'] = "撤销操作失败"; } } else { $root['response_code'] = 0; $root['show_err'] = "未登录"; $root['user_login_status'] = 0; } output($root); }
public function index() { $root = array(); $email = addslashes($GLOBALS['request']['email']); //用户名或邮箱 $pwd = addslashes($GLOBALS['request']['pwd']); //密码 //检查用户,用户密码 $user = user_check($email, $pwd); $user_id = intval($user['id']); if ($user_id == 0) { $root['user_login_status'] = 0; //用户登陆状态:1:成功登陆;0:未成功登陆 output($root); } else { $root['user_login_status'] = 1; } $userfrequented = array('uid' => $user_id, 'title' => $GLOBALS['request']['title'], 'addr' => $GLOBALS['request']['addr'], 'zoom_level' => floatval($GLOBALS['request']['zoom_level']), 'latitude_top' => floatval($GLOBALS['request']['latitude_top']), 'latitude_bottom' => floatval($GLOBALS['request']['latitude_bottom']), 'longitude_left' => floatval($GLOBALS['request']['longitude_left']), 'longitude_right' => floatval($GLOBALS['request']['longitude_right']), 'xpoint' => floatval($GLOBALS['request']['xpoint']), 'ypoint' => floatval($GLOBALS['request']['ypoint'])); $GLOBALS['db']->autoExecute(DB_PREFIX . "user_frequented", $userfrequented, 'INSERT'); $uid = $GLOBALS['db']->insert_id(); $root['uid'] = $uid; if ($uid > 0) { $root['return'] = 1; $root['info'] = "添加成功"; } else { $root['return'] = 0; $root['info'] = "添加失败"; } output($root); }
public function index() { $root = array(); $email = strim($GLOBALS['request']['email']); //用户名或邮箱 $pwd = strim($GLOBALS['request']['pwd']); //密码 $page = intval($GLOBALS['request']['page']); //检查用户,用户密码 $user = user_check($email, $pwd); $user_id = intval($user['id']); if ($user_id > 0) { require APP_ROOT_PATH . 'app/Lib/uc_func.php'; $root['user_login_status'] = 1; $root['response_code'] = 1; if ($page == 0) { $page = 1; } $limit = ($page - 1) * app_conf("PAGE_SIZE") . "," . app_conf("PAGE_SIZE"); $result = get_user_incharge($limit, $GLOBALS['user_info']['id']); $root['item'] = $result['list']; $root['page'] = array("page" => $page, "page_total" => ceil($result['count'] / app_conf("PAGE_SIZE"))); } else { $root['response_code'] = 0; $root['show_err'] = "未登录"; $root['user_login_status'] = 0; } output($root); }
public function index() { $root = array(); $email = strim($GLOBALS['request']['email']); //用户名或邮箱 $pwd = strim($GLOBALS['request']['pwd']); //密码 $id = intval($GLOBALS['request']['id']); //检查用户,用户密码 $user = user_check($email, $pwd); $user_id = intval($user['id']); if ($user_id > 0) { $root['user_login_status'] = 1; $root['response_code'] = 1; $root['is_faved'] = $GLOBALS['db']->getOne("SELECT count(*) FROM " . DB_PREFIX . "deal_collect WHERE deal_id = " . $id . " AND user_id=" . $user_id); $root['user_money'] = $user['money']; $root['user_money_format'] = format_price($user['money']); //用户金额 } else { $root['response_code'] = 0; $root['show_err'] = "未登录"; $root['user_login_status'] = 0; } output($root); }
public function index() { $root = array(); $email = strim($GLOBALS['request']['email']); //用户名或邮箱 $pwd = strim($GLOBALS['request']['pwd']); //密码 $page = intval($GLOBALS['request']['page']); //检查用户,用户密码 $user = user_check($email, $pwd); $user_id = intval($user['id']); if ($user_id > 0) { require APP_ROOT_PATH . 'app/Lib/uc_func.php'; $root['user_login_status'] = 1; $root['response_code'] = 1; if ($page == 0) { $page = 1; } $limit = ($page - 1) * app_conf("PAGE_SIZE") . "," . app_conf("PAGE_SIZE"); $result = get_user_log($limit, $GLOBALS['user_info']['id'], 'money'); $list = $result['list']; foreach ($list as $k => $v) { $list[$k]['log_time_format'] = to_date($v['log_time'], "Y-m-d H:i:s"); $list[$k]['money_format'] = format_price($v['money']); $list[$k]['lock_money_format'] = format_price($v['lock_money']); } $root['item'] = $list; $root['page'] = array("page" => $page, "page_total" => ceil($result['count'] / app_conf("PAGE_SIZE"))); } else { $root['response_code'] = 0; $root['show_err'] = "未登录"; $root['user_login_status'] = 0; } output($root); }
public function index() { $root = array(); $root['return'] = 1; $email = addslashes($GLOBALS['request']['email2']); //用户名或邮箱 $pwd = md5(addslashes($GLOBALS['request']['pwd2'])); //原始密码 if ($email == '' || empty($email)) { $email = addslashes($GLOBALS['request']['user_name']); //用户名或邮箱 $pwd = md5(addslashes($GLOBALS['request']['password'])); //原始密码 } $user_info = user_check($email, $pwd); $user_id = intval($user_info['id']); if (!$user_info) { $root['status'] = 0; $root['message'] = "用户已失效,无法登录"; output($root); } else { $root['status'] = 1; $root['uid'] = intval($user_info['id']); $root['user_name'] = $user_info['user_name']; $root['password'] = $user_info['user_pwd']; $root['is_account'] = intval($user_info['is_account']); output($root); } }