• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP get_gopreview函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中get_gopreview函数的典型用法代码示例。如果您正苦于以下问题:PHP get_gopreview函数的具体用法?PHP get_gopreview怎么用?PHP get_gopreview使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了get_gopreview函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: do_login

 public function do_login()
 {
     if (!$_POST) {
         app_redirect(APP_ROOT . "/");
     }
     foreach ($_POST as $k => $v) {
         $_POST[$k] = strim($v);
     }
     $ajax = intval($_REQUEST['ajax']);
     require_once APP_ROOT_PATH . "system/libs/user.php";
     if (check_ipop_limit(get_client_ip(), "user_dologin", 5)) {
         $result = do_login_user($_POST['mobile'], $_POST['user_pwd']);
     } else {
         showErr("提交太快", $ajax, url_wap("user#login"));
     }
     if ($result['status']) {
         $s_user_info = es_session::get("user_info");
         if (intval($_POST['auto_login']) == 1) {
             //自动登录,保存cookie
             $user_data = $s_user_info;
             es_cookie::set("mobile", $user_data['mobile'], 3600 * 24 * 30);
             es_cookie::set("user_pwd", md5($user_data['user_pwd'] . "_EASE_COOKIE"), 3600 * 24 * 30);
         }
         if ($ajax == 0 && trim(app_conf("INTEGRATE_CODE")) == '') {
             $redirect = $_SERVER['HTTP_REFERER'] ? $_SERVER['HTTP_REFERER'] : url_wap("index");
             app_redirect($redirect);
         } else {
             $jump_url = get_gopreview();
             if ($ajax == 1) {
                 $return['status'] = 1;
                 $return['info'] = "登录成功";
                 $return['data'] = $result['msg'];
                 $return['jump'] = $jump_url;
                 ajax_return($return);
             } else {
                 $GLOBALS['tmpl']->assign('integrate_result', $result['msg']);
                 showSuccess("登录成功", $ajax, $jump_url);
             }
         }
     } else {
         if ($result['data'] == ACCOUNT_NO_EXIST_ERROR) {
             $err = "会员不存在";
         }
         if ($result['data'] == ACCOUNT_PASSWORD_ERROR) {
             $err = "密码错误";
         }
         if ($result['data'] == ACCOUNT_NO_VERIFY_ERROR) {
             $err = "用户未通过验证";
             if (app_conf("MAIL_ON") == 1 && $ajax == 0) {
                 $GLOBALS['tmpl']->assign("page_title", $err);
                 $GLOBALS['tmpl']->assign("user_info", $result['user']);
                 $GLOBALS['tmpl']->display("verify_user.html");
                 exit;
             }
         }
         showErr($err, $ajax);
     }
 }
开发者ID:xinlechou,项目名称:wap,代码行数:58,代码来源:user.action.php


示例2: delmessage

 public function delmessage()
 {
     $ajax = intval($_REQUEST['ajax']);
     if (!$GLOBALS['user_info']) {
         app_redirect(url_wap("user#login"));
     }
     $id = intval($_REQUEST['id']);
     $user_id = intval($GLOBALS['user_info']['id']);
     $GLOBALS['db']->query("delete from " . DB_PREFIX . "user_message where user_id = " . $user_id . " and id = " . $id);
     showSuccess("", $ajax, get_gopreview());
 }
开发者ID:myjavawork,项目名称:sanxin-fangwei,代码行数:11,代码来源:message.action.php


示例3: delnotify

 public function delnotify()
 {
     $ajax = intval($_REQUEST['ajax']);
     if (!$GLOBALS['user_info']) {
         showErr("", $ajax, url("user#login"));
     }
     $id = intval($_REQUEST['id']);
     $user_id = intval($GLOBALS['user_info']['id']);
     $GLOBALS['db']->query("delete from " . DB_PREFIX . "user_notify where user_id = " . $user_id . " and id = " . $id);
     showSuccess("", $ajax, get_gopreview());
 }
开发者ID:noikiy,项目名称:yisheji,代码行数:11,代码来源:notifyModule.class.php


示例4: go_order_pay

 public function go_order_pay()
 {
     if (!$GLOBALS['user_info']) {
         app_redirect(url("user#login"));
     }
     $id = intval($_REQUEST['order_id']);
     $order_info = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "deal_order where id = " . $id . " and user_id = " . intval($GLOBALS['user_info']['id']) . " and order_status = 0");
     $paypassword = strim($_REQUEST['paypassword']);
     if ($paypassword == '') {
         showErr("请输入支付密码", 0);
     }
     if (md5($paypassword) != $GLOBALS['user_info']['paypassword']) {
         showErr("支付密码错误", 0);
     }
     $is_tg = intval($_REQUEST['is_tg']);
     if ($is_tg) {
         if (!$GLOBALS['is_user_tg']) {
             $jump_url = APP_ROOT . "/index.php?ctl=collocation&act=CreateNewAcct&user_type=0&user_id=" . $GLOBALS['user_info']['id'];
             showErr("您未绑定第三方接口无法支付,点击确定后跳转到绑定页面", 0, $jump_url);
         } elseif ($order_info) {
             $sign = md5(md5($paypassword) . $order_info['id']);
             $url = APP_ROOT . "/index.php?ctl=collocation&act=RegisterCreditor&order_id=" . $order_info['id'] . "&sign=" . $sign;
             //showSuccess("",0,$url);
             app_redirect($url);
         }
     }
     if (!$order_info) {
         showErr("项目支持已支付", 0, get_gopreview());
     } else {
         $credit = doubleval($_REQUEST['credit']);
         $payment_id = intval($_REQUEST['payment']);
         $pay_score = intval($_REQUEST['pay_score']);
         $score_trade_number = intval(app_conf("SCORE_TRADE_NUMBER")) > 0 ? intval(app_conf("SCORE_TRADE_NUMBER")) : 0;
         $pay_score_money = intval($pay_score / $score_trade_number * 100) / 100;
         /*余额支付金额先不扣,只写入订单
         		if($credit>0)
         		{				
         			$max_pay = $order_info['total_price'] - $order_info['credit_pay'];
         			$max_credit= $max_pay<$GLOBALS['user_info']['money']?$max_pay:$GLOBALS['user_info']['money'];
         			if($max_credit<0){
         				$max_credit=0;
         			}
         			$credit = $credit>$max_credit?$max_credit:$credit;		
         		
         			if($credit>0)
         			{
          				require_once APP_ROOT_PATH."system/libs/user.php";
         				$re=modify_account(array("money"=>"-".$credit),intval($GLOBALS['user_info']['id']),"支持".$order_info['deal_name']."项目支付");		
         					if($re){
         						$GLOBALS['db']->query("update ".DB_PREFIX."deal_order set credit_pay = credit_pay + ".$credit." where id = ".$order_info['id']);//追加使用余额支付
          				}
         			}
         		}
         		*/
         if (!$is_tg) {
             if ($credit > $GLOBALS['user_info']['money']) {
                 showErr("余额最多只能用" . format_price($GLOBALS['user_info']['money']), 0);
             }
             if ($pay_score > $GLOBALS['user_info']['score']) {
                 showErr("积分最多只能用" . $GLOBALS['user_info']['score']);
             }
             if ($pay_score_money + $credit > $order_info['total_price']) {
                 showErr("支付超出");
             }
         }
         if ($credit > 0) {
             $order_data['credit_pay'] = $credit;
         } else {
             $order_data['credit_pay'] = 0;
         }
         if ($pay_score > 0) {
             $order_data['score'] = $pay_score;
             $order_data['score_money'] = $pay_score_money;
         } else {
             $order_data['score'] = 0;
             $order_data['score_money'] = 0;
         }
         $GLOBALS['db']->query("update " . DB_PREFIX . "deal_order set credit_pay = " . $order_data['credit_pay'] . ",score=" . $order_data['score'] . ",score_money=" . $order_data['score_money'] . " where id = " . intval($order_info['id']) . " ");
         $result = pay_order($order_info['id']);
         if ($result['status'] == 0) {
             $money = $result['money'];
             $payment_notice['create_time'] = NOW_TIME;
             $payment_notice['user_id'] = intval($GLOBALS['user_info']['id']);
             $payment_notice['payment_id'] = $payment_id;
             $payment_notice['money'] = $money;
             $payment_notice['bank_id'] = strim($_REQUEST['bank_id']);
             $payment_notice['order_id'] = $order_info['id'];
             $payment_notice['memo'] = $order_info['support_memo'];
             $payment_notice['deal_id'] = $order_info['deal_id'];
             $payment_notice['deal_item_id'] = $order_info['deal_item_id'];
             $payment_notice['deal_name'] = $order_info['deal_name'];
             do {
                 $payment_notice['notice_sn'] = to_date(NOW_TIME, "Ymd") . rand(100, 999);
                 $GLOBALS['db']->autoExecute(DB_PREFIX . "payment_notice", $payment_notice, "INSERT", "", "SILENT");
                 $notice_id = $GLOBALS['db']->insert_id();
             } while ($notice_id == 0);
             app_redirect(url("cart#jump", array("id" => $notice_id)));
         } else {
             app_redirect(url("account#view_order", array("id" => $order_info['id'])));
         }
//.........这里部分代码省略.........
开发者ID:myjavawork,项目名称:sanxin-fangwei,代码行数:101,代码来源:accountModule.class.php


示例5: gopreview

 public function gopreview()
 {
     header("Content-Type:text/html; charset=utf-8");
     echo get_gopreview();
 }
开发者ID:eliu03,项目名称:fanweP2P,代码行数:5,代码来源:ajaxModule.class.php


示例6: verify

 public function verify()
 {
     $id = intval($_REQUEST['id']);
     $user_info = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "user where id = " . $id);
     if (!$user_info) {
         showErr($GLOBALS['lang']['NO_THIS_USER']);
     }
     $verify = addslashes(trim($_REQUEST['code']));
     if ($user_info['verify'] != '' && $user_info['verify'] == $verify) {
         //成功
         es_session::set("user_info", $user_info);
         $GLOBALS['db']->query("update " . DB_PREFIX . "user set login_ip = '" . get_client_ip() . "',login_time= " . get_gmtime() . ",verify = '',is_effect = 1 where id =" . $user_info['id']);
         $GLOBALS['db']->query("update " . DB_PREFIX . "mail_list set is_effect = 1 where mail_address ='" . $user_info['email'] . "'");
         $GLOBALS['db']->query("update " . DB_PREFIX . "mobile_list set is_effect = 1 where mobile ='" . $user_info['mobile'] . "'");
         showSuccess($GLOBALS['lang']['VERIFY_SUCCESS'], 0, get_gopreview());
     } elseif ($user_info['verify'] == '') {
         showErr($GLOBALS['lang']['HAS_VERIFIED'], 0, get_gopreview());
     } else {
         showErr($GLOBALS['lang']['VERIFY_FAILED'], 0, get_gopreview());
     }
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:21,代码来源:userModule.class.php


示例7: app_recirect_preview

function app_recirect_preview()
{
    app_redirect(get_gopreview());
}
开发者ID:eliu03,项目名称:fanweP2P,代码行数:4,代码来源:common.php


示例8: do_api_login

 public function do_api_login()
 {
     $api_info = es_session::get("api_user_info");
     if (!$api_info) {
         app_redirect_preview();
     }
     if (!$_POST) {
         app_redirect(APP_ROOT . "/");
     }
     foreach ($_POST as $k => $v) {
         $_POST[$k] = strim($v);
     }
     $ajax = intval($_REQUEST['ajax']);
     if (!check_ipop_limit(get_client_ip(), "user_do_api_login", 5)) {
         showErr("提交太快", $ajax);
     }
     require_once APP_ROOT_PATH . "system/libs/user.php";
     $result = do_login_user($_POST['email'], $_POST['user_pwd']);
     if ($result['status']) {
         $s_user_info = es_session::get("user_info");
         $GLOBALS['db']->query("update " . DB_PREFIX . "user set " . $api_info['field'] . " = '" . $api_info['name'] . "'," . $api_info['token_field'] . " = '" . $api_info['token'] . "'," . $api_info['secret_field'] . " = '" . $api_info['secret'] . "'," . $api_info['url_field'] . " = '" . $api_info['url'] . "' where id = " . $s_user_info['id']);
         $GLOBALS['db']->query("delete from " . DB_PREFIX . "user_weibo where user_id = " . intval($s_user_info['id']) . " and weibo_url = '" . $api_info['url'] . "'");
         update_user_weibo(intval($s_user_info['id']), $api_info['url']);
         if ($ajax == 0 && trim(app_conf("INTEGRATE_CODE")) == '') {
             $redirect = $_SERVER['HTTP_REFERER'] ? $_SERVER['HTTP_REFERER'] : url("index");
             app_redirect($redirect);
         } else {
             $jump_url = get_gopreview();
             if ($ajax == 1) {
                 $return['status'] = 1;
                 $return['info'] = "登录成功";
                 $return['data'] = $result['msg'];
                 $return['jump'] = $jump_url;
                 ajax_return($return);
             } else {
                 $GLOBALS['tmpl']->assign('integrate_result', $result['msg']);
                 showSuccess("登录成功", $ajax, $jump_url);
             }
         }
     } else {
         if ($result['data'] == ACCOUNT_NO_EXIST_ERROR) {
             $err = "会员不存在";
         }
         if ($result['data'] == ACCOUNT_PASSWORD_ERROR) {
             $err = "密码错误";
         }
         showErr($err, $ajax);
     }
 }
开发者ID:xcdxcd,项目名称:zhongchou,代码行数:49,代码来源:userModule.class.php


示例9: submitrefund

 public function submitrefund()
 {
     $ajax = intval($_REQUEST['ajax']);
     if (!$GLOBALS['user_info']) {
         showErr("", $ajax, url("user#login"));
     }
     $money = doubleval($_REQUEST['money']);
     $memo = strim($_REQUEST['memo']);
     if ($money <= 0) {
         showErr("提现金额出错", $ajax);
     }
     $ready_refund_money = doubleval($GLOBALS['db']->getOne("select sum(money) from " . DB_PREFIX . "user_refund where user_id = " . intval($GLOBALS['user_info']['id']) . " and is_pay = 0"));
     if ($ready_refund_money + $money > $GLOBALS['user_info']['money']) {
         showErr("提现超出限制", $ajax);
     }
     $refund_data['money'] = $money;
     $refund_data['user_id'] = $GLOBALS['user_info']['id'];
     $refund_data['create_time'] = NOW_TIME;
     $refund_data['memo'] = $memo;
     $GLOBALS['db']->autoExecute(DB_PREFIX . "user_refund", $refund_data);
     showSuccess("", $ajax, get_gopreview());
 }
开发者ID:bharatthakkar,项目名称:stock-crowd-funding-system,代码行数:22,代码来源:accountModule.class.php


示例10: callback

 public function callback()
 {
     require_once APP_ROOT_PATH . 'system/api_login/sina/saetv2.ex.class.php';
     es_session::start();
     //$sina_keys = es_session::get("sina_keys");
     $o = new SaeTOAuthV2($this->api['config']['app_key'], $this->api['config']['app_secret']);
     if (isset($_REQUEST['code'])) {
         $keys = array();
         $keys['code'] = $_REQUEST['code'];
         if ($this->api['config']['app_url'] == "") {
             $app_url = SITE_DOMAIN . APP_ROOT . "/api_callback.php?c=Sina";
         } else {
             $app_url = $this->api['config']['app_url'];
         }
         $keys['redirect_uri'] = $app_url;
         try {
             $token = $o->getAccessToken('code', $keys);
         } catch (OAuthException $e) {
             //print_r($e);exit;
             showErr("授权失败,错误信息:" . $e->getMessage());
             die;
         }
     }
     $c = new SaeTClientV2($this->api['config']['app_key'], $this->api['config']['app_secret'], $token['access_token']);
     $ms = $c->home_timeline();
     // done
     $uid_get = $c->get_uid();
     $uid = $uid_get['uid'];
     $msg = $c->show_user_by_id($uid);
     //根据ID获取用户等基本信息
     if (intval($msg['error_code']) != 0) {
         showErr("授权失败,错误代码:" . $msg['error_code']);
         die;
     }
     $msg['field'] = 'sina_id';
     $msg['sina_token'] = $token['access_token'];
     es_session::set("api_user_info", $msg);
     if (!$msg['name']) {
         app_redirect(url("index"));
         exit;
     }
     $user_data = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "user where sina_id = '" . $msg['id'] . "' and sina_id <> 0");
     //print_r($user_data);die();
     if ($user_data) {
         $user_current_group = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "user_group where id = " . intval($user_data['group_id']));
         $user_group = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "user_group where score <=" . intval($user_data['score']) . " order by score desc");
         if ($user_current_group['score'] < $user_group['score']) {
             $user_data['group_id'] = intval($user_group['id']);
         }
         $GLOBALS['db']->query("update " . DB_PREFIX . "user set sina_token = '" . $token['access_token'] . "',login_ip = '" . get_client_ip() . "',login_time= " . get_gmtime() . ",group_id=" . intval($user_data['group_id']) . " where id =" . $user_data['id']);
         es_session::delete("api_user_info");
         $is_bind = intval(es_session::get("is_bind"));
         if ($is_bind) {
             if (intval($user_data['id']) != intval($GLOBALS['user_info']['id'])) {
                 showErr("该帐号已经被别的会员绑定过,请直接用帐号登录", 0, url("shop", "uc_center#setweibo"));
             } else {
                 es_session::set("user_info", $user_data);
                 app_redirect(url("index", "uc_center#setweibo"));
             }
         } else {
             require_once APP_ROOT_PATH . "system/libs/user.php";
             auto_do_login_user($user_data['user_name'], md5($user_data['user_pwd'] . "_EASE_COOKIE"), $from_cookie = false);
             app_recirect_preview();
         }
     } elseif ($is_bind == 1 && $GLOBALS['user_info']) {
         //当有用户身份且要求绑定时
         $GLOBALS['db']->query("update " . DB_PREFIX . "user set sina_id= '" . intval($msg['id']) . "', sina_token ='" . $token['access_token'] . "' where id =" . $GLOBALS['user_info']['id']);
         app_redirect(url("index", "uc_center#setweibo"));
     } else {
         $this->create_user();
         app_redirect(get_gopreview());
     }
 }
开发者ID:norain2050,项目名称:fanwei_xindai_3.2,代码行数:73,代码来源:Sina_api.php


示例11: bidverify

 public function bidverify()
 {
     $user_info = $GLOBALS['user_info'];
     if (!$user_info) {
         showErr($GLOBALS['lang']['NO_THIS_USER']);
     }
     $verify = addslashes(trim($_REQUEST['code']));
     if ($user_info['verify'] != '' && $user_info['verify'] == $verify) {
         //成功
         es_session::set("user_info", $user_info);
         $GLOBALS['db']->query("update " . DB_PREFIX . "user set login_ip = '" . get_client_ip() . "',login_time= " . TIME_UTC . ",verify = '',emailpassed = 1,email=tmp_email,is_effect = 1 where id =" . $user_info['id']);
         $GLOBALS['db']->query("update " . DB_PREFIX . "mail_list set is_effect = 1,mail_address='" . $user_info['tmp_email'] . "' where mail_address ='" . $user_info['email'] . "'");
         $GLOBALS['db']->query("update " . DB_PREFIX . "user set tmp_email = '' where id =" . $user_info['id']);
         showSuccess($GLOBALS['lang']['VERIFY_SUCCESS'], 0, get_gopreview());
     } elseif ($user_info['verify'] == '') {
         showErr($GLOBALS['lang']['HAS_VERIFIED'], 1);
     } else {
         showErr($GLOBALS['lang']['VERIFY_FAILED'], 1);
     }
 }
开发者ID:workplayteam,项目名称:P2P,代码行数:20,代码来源:userModule.class.php


示例12: showSuccess

function showSuccess($msg, $ajax = 0, $jump = '', $stay = 0)
{
    if ($ajax == 1) {
        $result['status'] = 1;
        $result['info'] = $msg;
        $result['jump'] = $jump;
        ajax_return($result);
    } else {
        $GLOBALS['tmpl']->assign('page_title', $GLOBALS['lang']['SUCCESS_TITLE']);
        $GLOBALS['tmpl']->assign('msg', $msg);
        if ($jump == '') {
            $jump = get_gopreview();
        }
        $GLOBALS['tmpl']->assign('jump', $jump);
        $GLOBALS['tmpl']->assign("stay", $stay);
        $GLOBALS['tmpl']->display("msg_page.html");
        exit;
    }
}
开发者ID:macall,项目名称:jsd,代码行数:19,代码来源:common.php


示例13: save_consignee

 public function save_consignee()
 {
     $ajax = intval($_REQUEST['ajax']);
     if (!$GLOBALS['user_info']) {
         showErr("", $ajax, url("user#login"));
     }
     if ($GLOBALS['db']->getOne("select count(*) from " . DB_PREFIX . "user_consignee where user_id = " . intval($GLOBALS['user_info']['id'])) > 10) {
         showErr("每个会员只能预设10个配送地址", $ajax, "");
     }
     $id = intval($_REQUEST['id']);
     $consignee = strim($_REQUEST['consignee']);
     $province = strim($_REQUEST['province']);
     $city = strim($_REQUEST['city']);
     $address = strim($_REQUEST['address']);
     $zip = strim($_REQUEST['zip']);
     $mobile = strim($_REQUEST['mobile']);
     if ($consignee == "") {
         showErr("请填写收货人姓名", $ajax, "");
     }
     if ($province == "") {
         showErr("请选择省份", $ajax, "");
     }
     if ($city == "") {
         showErr("请选择城市", $ajax, "");
     }
     if ($address == "") {
         showErr("请填写详细地址", $ajax, "");
     }
     if (!check_postcode($zip)) {
         showErr("请填写正确的邮编", $ajax, "");
     }
     if ($mobile == "") {
         showErr("请填写收货人手机号码", $ajax, "");
     }
     if (!check_mobile($mobile)) {
         showErr("请填写正确的手机号码", $ajax, "");
     }
     $data = array();
     $data['consignee'] = $consignee;
     $data['province'] = $province;
     $data['city'] = $city;
     $data['address'] = $address;
     $data['zip'] = $zip;
     $data['mobile'] = $mobile;
     $data['user_id'] = intval($GLOBALS['user_info']['id']);
     if (!check_ipop_limit(get_client_ip(), "setting_save_consignee", 5)) {
         showErr("提交太频繁", $ajax, "");
     }
     if ($id > 0) {
         $GLOBALS['db']->autoExecute(DB_PREFIX . "user_consignee", $data, "UPDATE", "id=" . $id);
     } else {
         $GLOBALS['db']->autoExecute(DB_PREFIX . "user_consignee", $data);
     }
     showSuccess("保存成功", $ajax, get_gopreview());
     //$res = save_user($user_data);
 }
开发者ID:xinlechou,项目名称:app,代码行数:56,代码来源:settingsModule.class.php


示例14: domodifypassword

 public function domodifypassword()
 {
     $id = intval($_REQUEST['id']);
     $user_info = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "user where id = " . $id);
     if (!$user_info) {
         showErr($GLOBALS['lang']['NO_THIS_USER'], 1);
     }
     $verify = strim($_REQUEST['code']);
     if ($user_info['password_verify'] == $verify && $user_info['password_verify'] != '') {
         if (strim($_REQUEST['user_pwd']) != strim($_REQUEST['user_pwd_confirm'])) {
             $data['status'] = false;
             $data['info'] = $GLOBALS['lang']['PASSWORD_VERIFY_FAILED'];
             $data['field'] = "user_pwd_confirm";
             ajax_return($data);
         } else {
             $password = strim($_REQUEST['user_pwd']);
             $user_info['user_pwd'] = $password;
             $password = md5($password . $user_info['code']);
             $result = 1;
             //初始为1
             //载入会员整合
             $integrate_code = trim(app_conf("INTEGRATE_CODE"));
             if ($integrate_code != '') {
                 $integrate_file = APP_ROOT_PATH . "system/integrate/" . $integrate_code . "_integrate.php";
                 if (file_exists($integrate_file)) {
                     require_once $integrate_file;
                     $integrate_class = $integrate_code . "_integrate";
                     $integrate_obj = new $integrate_class();
                 }
             }
             if ($integrate_obj) {
                 $result = $integrate_obj->edit_user($user_info, $user_info['user_pwd']);
             }
             if ($result > 0) {
                 $GLOBALS['db']->query("update " . DB_PREFIX . "user set user_pwd = '" . $password . "',password_verify='' where id = " . $user_info['id']);
                 showSuccess($GLOBALS['lang']['NEW_PWD_SET_SUCCESS'], 1, get_gopreview());
             } else {
                 showErr($GLOBALS['lang']['NEW_PWD_SET_FAILED'], 1);
             }
         }
     } else {
         showErr($GLOBALS['lang']['VERIFY_FAILED'], 1);
     }
 }
开发者ID:macall,项目名称:jsd,代码行数:44,代码来源:userModule.class.php


示例15: del_consignee

 public function del_consignee()
 {
     if (!$GLOBALS['user_info']) {
         $data['html'] = $GLOBALS['tmpl']->display("inc/user_login_box.html", "", true);
         $data['status'] = 1;
         ajax_return($data);
     } else {
         $id = intval($_REQUEST['id']);
         $GLOBALS['db']->query("delete from " . DB_PREFIX . "user_consignee where id = " . $id . " and user_id = " . intval($GLOBALS['user_info']['id']));
         showSuccess("", 1, get_gopreview());
     }
 }
开发者ID:BruceJi,项目名称:fanwe,代码行数:12,代码来源:settingsModule.class.php


示例16: do_register

 public function do_register()
 {
     $email = strim($_REQUEST['email']);
     require_once APP_ROOT_PATH . "system/libs/user.php";
     $return = $this->register_check_all();
     if ($return['status'] == 0) {
         ajax_return($return);
     }
     $user_data = $_POST;
     foreach ($_POST as $k => $v) {
         $user_data[$k] = strim($v);
     }
     //开启邮箱验证
     if (app_conf("USER_VERIFY") == 0 || app_conf("USER_VERIFY") == 2 || app_conf("USER_VERIFY") == 1 || app_conf("USER_VERIFY") == 4) {
         $user_data['is_effect'] = 1;
     } else {
         $user_data['is_effect'] = 0;
     }
     if (intval($GLOBALS['ref_uid']) > 0) {
         $user_data['pid'] = intval($GLOBALS['ref_uid']);
         //推荐人id
         $user_data['is_send_referrals'] = 1;
         //未发放返利给推荐人
     } else {
         $user_data['pid'] = 0;
         //没有推荐人
         $user_data['is_send_referrals'] = 0;
         //不用发放返利
     }
     $res = save_user($user_data);
     if ($res['status'] == 1) {
         if (!check_ipop_limit(get_client_ip(), "user_do_register", 5)) {
             showErr("提交太快", 1);
         }
         $user_id = intval($res['data']);
         $user_info = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "user where id = " . $user_id);
         if ($user_info['is_effect'] == 1) {
             //发放返利给推荐人
             if ($user_info['pid'] > 0) {
                 send_referrals($user_info);
             }
             //在此自动登录
             //send_register_success(0,$user_data);
             $result = do_login_user($user_data['user_name'], $user_data['user_pwd']);
             //	ajax_return(array("status"=>1,"jump"=>get_gopreview()));
             ajax_return(array("status" => 1, "data" => $result['msg'], "jump" => get_gopreview()));
         } else {
             if (app_conf("USER_VERIFY") == 1) {
                 ajax_return(array("status" => 1, "jump" => url_wap("user#mail_check", array('uid' => $user_id))));
             } else {
                 if (app_conf("USER_VERIFY") == 3) {
                     ajax_return(array("status" => 0, "info" => "请等待管理员审核"));
                 }
             }
         }
     } else {
         $error = $res['data'];
         if ($error['field_name'] == "user_name") {
             $data[] = array("type" => "form_success", "field" => "email", "info" => "");
             $field_name = "会员帐号";
         }
         if ($error['field_name'] == "email") {
             $data[] = array("type" => "form_success", "field" => "user_name", "info" => "");
             $field_name = "电子邮箱";
         }
         if ($error['field_name'] == "mobile") {
             $data[] = array("type" => "form_success", "field" => "mobile", "info" => "");
             $field_name = "手机号码";
         }
         if ($error['field_name'] == "verify_code") {
             $data[] = array("type" => "form_success", "field" => "verify_code", "info" => "");
             $field_name = "验证码";
         }
         if ($error['error'] == EMPTY_ERROR) {
             $error_info = "不能为空";
             $type = "form_tip";
         }
         if ($error['error'] == FORMAT_ERROR) {
             $error_info = "错误";
             $type = "form_error";
         }
         if ($error['error'] == EXIST_ERROR) {
             $error_info = "已存在";
             $type = "form_error";
         }
         //$data[] = array("type"=>$type,"field"=>$error['field_name'],"info"=>$field_name.$error_info);
         ajax_return(array("status" => 0, "data" => $field_name . $error_info, "info" => ""));
     }
 }
开发者ID:myjavawork,项目名称:sanxin-fangwei,代码行数:89,代码来源:user.action.php


示例17: save_deal_item

 public function save_deal_item()
 {
     $ajax = intval($_REQUEST['ajax']);
     if (!$GLOBALS['user_info']) {
         showErr("", $ajax, url("user#login"));
     }
     $id = intval($_REQUEST['id']);
     $data['price'] = doubleval($_REQUEST['price']);
     if ($data['price'] <= 0) {
         showErr("请输入正确的价格", $ajax);
     }
     $data['description'] = strim($_REQUEST['description']);
     $data['is_delivery'] = intval($_REQUEST['is_delivery']);
     $data['delivery_fee'] = doubleval($_REQUEST['delivery_fee']);
     $data['is_limit_user'] = intval($_REQUEST['is_limit_user']);
     $data['limit_user'] = intval($_REQUEST['limit_user']);
     $data['repaid_day'] = intval($_REQUEST['repaid_day']);
     $data['deal_id'] = intval($_REQUEST['deal_id']);
     if (count($_REQUEST['image']) > 4) {
         showErr("图片不能超过四张", $ajax);
     }
     if ($id == 0) {
         $GLOBALS['db']->autoExecute(DB_PREFIX . "deal_item", $data, "INSERT", "", "SILENT");
         $result_id = intval($GLOBALS['db']->insert_id());
         if ($result_id > 0) {
             if (count($_REQUEST['image']) >= 0) {
                 foreach ($_REQUEST['image'] as $k => $v) {
                     $image_data['deal_id'] = $data['deal_id'];
                     $image_data['deal_item_id'] = $result_id;
                     $image_data['image'] = replace_public($v);
                     $GLOBALS['db']->autoExecute(DB_PREFIX . "deal_item_image", $image_data);
                 }
             }
             showSuccess("保存成功", $ajax, get_gopreview());
         } else {
             showErr("保存失败", $ajax);
         }
     } else {
         $GLOBALS['db']->autoExecute(DB_PREFIX . "deal_item", $data, "UPDATE", "id=" . $id, "SILENT");
         if (count($_REQUEST['image']) >= 0) {
             $GLOBALS['db']->query("delete from " . DB_PREFIX . "deal_item_image where deal_item_id = " . $id);
             foreach ($_REQUEST['image'] as $k => $v) {
                 $image_data['deal_id'] = $data['deal_id'];
                 $image_data['deal_item_id'] = $id;
                 $image_data['image'] = replace_public(strim($v));
                 $GLOBALS['db']->autoExecute(DB_PREFIX . "deal_item_image", $image_data);
             }
         }
         showSuccess("保存成功", $ajax, get_gopreview());
     }
 }
开发者ID:xcdxcd,项目名称:zhongchou,代码行数:51,代码来源:projectModule.class.php


示例18: del_item

 public function del_item()
 {
     $ajax = intval($_REQUEST['ajax']);
     if (!$GLOBALS['user_info']) {
         showErr("", $ajax, url("user#login"));
     }
     $id = intval($_REQUEST['id']);
     $item = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "deal_item where id = " . $id);
     $deal_item = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "deal where is_edit = 1 and (is_effect = 0 or is_effect = 2) and is_delete = 0 and id = " . $item['deal_id'] . " and user_id = " . intval($GLOBALS['user_info']['id']));
     if ($deal_item && $item) {
         $GLOBALS['db']->query("delete from " . DB_PREFIX . "deal_item where id = " . $id);
         $GLOBALS['db']->query("delete from " . DB_PREFIX . "deal_item_image where deal_item_id = " . $id);
         showErr("", $ajax, get_gopreview());
     } else {
         showErr("删除失败", $ajax);
     }
 }
开发者ID:myjavawork,项目名称:sanxin-fangwei,代码行数:17,代码来源:project.action.php


示例19: go_pay_


//.........这里部分代码省略.........
         app_redirect(url("deal#show", array("id" => $deal_item['deal_id'])));
     }
     /*$buy_right_number = 0;
     		if($deal_info['type']==3||$deal_info['type']==4){//企业众筹和币创投
     			$rights = $GLOBALS['db']->getAll("select * from ".DB_PREFIX."user_right where deal_id = ".$deal_info["id"]." and user_id = ".intval($GLOBALS['user_info']['id'])."");
     			if(count($rights)>0){ 
     				foreach ($rights as $k=>$v){
     					$buy_right_number += $v["right_amount"] + $v["frozen_right_amount"];
     			}
     			}  
     		}*/
     $buy_right_number = get_zc_right_number($deal_info["id"], intval($GLOBALS['user_info']['id']));
     $zc_amount = $pay_money / $deal_info["price_per_right"];
     if ($deal_info["zc_amount_limit"] > 0 && $zc_amount + $buy_right_number > $deal_info["zc_amount_limit"]) {
         showErr("对不起,您众筹数字权益份额已经超过上限!", 0, url("deal#show", array("id" => $deal_info["id"])));
     }
     $zc_count = $GLOBALS['db']->getOne("select count(*) from " . DB_PREFIX . "deal_order where deal_id = " . $deal_info["id"] . " and user_id = " . $GLOBALS['user_info']['id']);
     if ($deal_info["zc_count_limit"] != 0 and $zc_count >= $deal_info["zc_count_limit"]) {
         showErr("对不起,您参与次数超过上限,已经无法继续参与本项目!", 0, url("deal#show", array("id" => $deal_info["id"])));
     }
     $order_info['type'] = 0;
     //普通众筹
     $order_info['is_tg'] = $is_tg;
     $order_info['deal_id'] = $deal_info['id'];
     $order_info['deal_item_id'] = 0;
     $order_info['user_id'] = intval($GLOBALS['user_info']['id']);
     $order_info['user_name'] = $GLOBALS['user_info']['user_name'];
     $order_info['total_price'] = floatval($_REQUEST['pay_money']);
     $order_info['delivery_fee'] = 0;
     $order_info['deal_price'] = floatval($_REQUEST['pay_money']);
     //$order_info['support_memo'] = $memo;
     $order_info['payment_id'] = $payment_id;
     $order_info['bank_id'] = strim($_REQUEST['bank_id']);
     $order_info['share_fee'] = 0;
     if (!$is_tg) {
         $credit_score_money = $pay_score_money + $credit;
         if ($credit > $GLOBALS['user_info']['money']) {
             showErr("余额最多只能用" . format_price($GLOBALS['user_info']['money']), 0);
         }
         if ($pay_score > $GLOBALS['user_info']['score']) {
             showErr("积分最多只能用" . $GLOBALS['user_info']['score']);
         }
         if ($credit_score_money > $order_info['total_price']) {
             showErr("支付超出");
         }
         if (intval(($order_info['total_price'] - $credit_score_money) * 100) > 0 && $payment_id == 0) {
             showErr("请选择支付方式");
         }
     }
     if ($credit > 0) {
         $order_info['credit_pay'] = $credit;
     }
     if ($pay_score > 0) {
         $order_info['score'] = $pay_score;
         $order_info['score_money'] = $pay_score_money;
     }
     $order_info['online_pay'] = 0;
     $order_info['deal_name'] = $deal_info['name'];
     $order_info['order_status'] = 0;
     $order_info['create_time'] = NOW_TIME;
     $order_info['is_success'] = $deal_info['is_success'];
     $GLOBALS['db']->autoExecute(DB_PREFIX . "deal_order", $order_info);
     $order_id = $GLOBALS['db']->insert_id();
     if ($order_id > 0) {
         if ($is_tg) {
             $sign = md5(md5($paypassword) . $order_id);
             $url = APP_ROOT . "/index.php?ctl=collocation&act=RegisterCreditor&order_id=" . $order_id . "&sign=" . $sign;
             //showSuccess("",0,$url);
             app_redirect($url);
         }
         $result = pay_order($order_id);
         if ($result['status'] == 0) {
             $money = $result['money'];
             $payment_notice['create_time'] = NOW_TIME;
             $payment_notice['user_id'] = intval($GLOBALS['user_info']['id']);
             $payment_notice['payment_id'] = $payment_id;
             $payment_notice['money'] = $money;
             $payment_notice['bank_id'] = strim($_REQUEST['bank_id']);
             $payment_notice['order_id'] = $order_id;
             $payment_notice['memo'] = $memo;
             $payment_notice['deal_id'] = $deal_info['id'];
             $paymen 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_grade_options函数代码示例发布时间:2022-05-15
下一篇:
PHP get_goodsinfo函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap