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

PHP showErr函数代码示例

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

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



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

示例1: response

 public function response($request)
 {
     $return_res = array('info' => '', 'status' => false);
     $payment = $GLOBALS['db']->getRow("select id,config from " . DB_PREFIX . "payment where class_name='Alipay'");
     $payment['config'] = unserialize($payment['config']);
     /* 检查数字签名是否正确 */
     ksort($request);
     reset($request);
     foreach ($request as $key => $val) {
         if ($key != 'sign' && $key != 'sign_type' && $key != 'code' && $key != 'class_name' && $key != 'act' && $key != 'ctl') {
             $sign .= "{$key}={$val}&";
         }
     }
     $sign = substr($sign, 0, -1) . $payment['config']['alipay_key'];
     if (md5($sign) != $request['sign']) {
         showErr("签名验证失败");
     }
     $payment_notice_sn = $request['out_trade_no'];
     $money = $request['total_fee'];
     $outer_notice_sn = $request['trade_no'];
     if ($request['trade_status'] == 'TRADE_SUCCESS' || $request['trade_status'] == 'TRADE_FINISHED' || $request['trade_status'] == 'WAIT_SELLER_SEND_GOODS' || $request['trade_status'] == 'WAIT_BUYER_CONFIRM_GOODS') {
         require_once APP_ROOT_PATH . "system/libs/cart.php";
         $rs = payment_paid($payment_notice_sn, $outer_notice_sn);
         showSuccess($rs['info'], 0, $rs['jump'], 1);
     } else {
         showErr("支付失败", 0, url("index"), 1);
     }
 }
开发者ID:bharatthakkar,项目名称:stock-crowd-funding-system,代码行数:28,代码来源:Alipay_payment.php


示例2: save

 public function save()
 {
     if (trim($_REQUEST['consignee']) == '') {
         showErr($GLOBALS['lang']['FILL_CORRECT_CONSIGNEE']);
     }
     if (trim($_REQUEST['address']) == '') {
         showErr($GLOBALS['lang']['FILL_CORRECT_ADDRESS']);
     }
     if (trim($_REQUEST['zip']) == '') {
         showErr($GLOBALS['lang']['FILL_CORRECT_ZIP']);
     }
     if (trim($_REQUEST['mobile']) == '') {
         showErr($GLOBALS['lang']['FILL_MOBILE_PHONE']);
     }
     if (!check_mobile($_REQUEST['mobile'])) {
         showErr($GLOBALS['lang']['FILL_CORRECT_MOBILE_PHONE']);
     }
     $consignee_data['user_id'] = $GLOBALS['user_info']['id'];
     $consignee_data['region_lv1'] = intval($_REQUEST['region_lv1']);
     $consignee_data['region_lv2'] = intval($_REQUEST['region_lv2']);
     $consignee_data['region_lv3'] = intval($_REQUEST['region_lv3']);
     $consignee_data['region_lv4'] = intval($_REQUEST['region_lv4']);
     $consignee_data['address'] = addslashes(trim(htmlspecialchars($_REQUEST['address'])));
     $consignee_data['mobile'] = addslashes(trim(htmlspecialchars($_REQUEST['mobile'])));
     $consignee_data['consignee'] = addslashes(trim(htmlspecialchars($_REQUEST['consignee'])));
     $consignee_data['zip'] = addslashes(trim(htmlspecialchars($_REQUEST['zip'])));
     $consignee_id = intval($_REQUEST['id']);
     if ($consignee_id == 0) {
         $GLOBALS['db']->autoExecute(DB_PREFIX . "user_consignee", $consignee_data);
     } else {
         $GLOBALS['db']->autoExecute(DB_PREFIX . "user_consignee", $consignee_data, "UPDATE", "id=" . $consignee_id);
     }
     rm_auto_cache("consignee_info", array("consignee_id" => intval($consignee_id)));
     showSuccess($GLOBALS['lang']['UPDATE_SUCCESS']);
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:35,代码来源:uc_consigneeModule.class.php


示例3: init

 public function init()
 {
     if (!$GLOBALS['user_info']) {
         if ($_REQUEST['ajax'] == 1) {
             ajax_return(array("status" => 0, "info" => "请先登录"));
         } else {
             es_session::set('before_login', $_SERVER['REQUEST_URI']);
             app_redirect(url("index", "user#login"));
         }
     }
     $id = intval($_REQUEST['id']);
     $this->space_user = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "user where id = " . $id . " and is_effect=  1 and is_delete = 0");
     $user_id = intval($GLOBALS['user_info']['id']);
     if (!$this->space_user) {
         showErr($GLOBALS['lang']['USER_NOT_EXISTS']);
     }
     $focus_data = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "user_focus where focus_user_id = " . $user_id . " and focused_user_id = " . $this->space_user['id']);
     if ($focus_data) {
         $this->space_user['focused'] = 1;
     }
     $province_str = $GLOBALS['db']->getOne("select name from " . DB_PREFIX . "region_conf where id = " . $this->space_user['province_id']);
     $city_str = $GLOBALS['db']->getOne("select name from " . DB_PREFIX . "region_conf where id = " . $this->space_user['city_id']);
     if ($province_str . $city_str == '') {
         $user_location = $GLOBALS['lang']['LOCATION_NULL'];
     } else {
         $user_location = $province_str . " " . $city_str;
     }
     $this->space_user['fav_count'] = $GLOBALS['db']->getOne("select count(*) from " . DB_PREFIX . "topic where user_id = " . $this->space_user['id'] . " and fav_id <> 0");
     $this->space_user['user_location'] = $user_location;
     $this->space_user['group_name'] = $GLOBALS['db']->getOne("select name from " . DB_PREFIX . "user_group where id = " . $this->space_user['group_id'] . " ");
     $GLOBALS['tmpl']->assign("space_user", $this->space_user);
     $GLOBALS['tmpl']->assign('user_statics', sys_user_status($id, true));
 }
开发者ID:workplayteam,项目名称:P2P,代码行数:33,代码来源:spaceModule.class.php


示例4: save_info

 public function save_info()
 {
     $data = array();
     $ajax = intval($_REQUEST['ajax']);
     $data['user_name'] = strim($_REQUEST['user_name']);
     if (empty($data['user_name'])) {
         showErr("请填写您的姓名", $ajax);
     }
     $data['tel'] = strim($_REQUEST['tel']);
     if (empty($data['tel'])) {
         showErr("请填写您的联系方式", $ajax);
     }
     $data['content'] = strim($_REQUEST['content']);
     if (empty($data['content'])) {
         showErr("请填写您的留言内容", $ajax);
     }
     $data['cate_id'] = intval($_REQUEST['cate_id']);
     $data['create_time'] = NOW_TIME;
     $data['user_id'] = intval($_REQUEST['user_id']);
     $GLOBALS['db']->autoExecute(DB_PREFIX . "message", $data, "INSERT", "", "SILENT");
     $message_id = $GLOBALS['db']->insert_id();
     if ($message_id > 0) {
         showSuccess("申请成功!", $ajax, url_wap("index"));
     } else {
         showErr("发送失败,请重新申请!", $ajax);
     }
 }
开发者ID:myjavawork,项目名称:sanxin-fangwei,代码行数:27,代码来源:user_message.action.php


示例5: do_exchange

 public function do_exchange()
 {
     global_run();
     if (check_save_login() != LOGIN_STATUS_LOGINED) {
         $result['status'] = 2;
         ajax_return($result);
     }
     $id = intval($_REQUEST['id']);
     $ecv_type = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "ecv_type where id = " . $id);
     if (!$ecv_type) {
         showErr($GLOBALS['lang']['INVALID_VOUCHER'], 1);
     } else {
         $exchange_count = $GLOBALS['db']->getOne("select count(*) from " . DB_PREFIX . "ecv where ecv_type_id = " . $id . " and user_id = " . intval($GLOBALS['user_info']['id']));
         if ($ecv_type['exchange_limit'] > 0 && $exchange_count >= $ecv_type['exchange_limit']) {
             $msg = sprintf($GLOBALS['lang']['EXCHANGE_VOUCHER_LIMIT'], $ecv_type['exchange_limit']);
             showErr($msg, 1);
         } elseif ($ecv_type['exchange_score'] > intval($GLOBALS['db']->getOne("select score from " . DB_PREFIX . "user where id = " . intval($GLOBALS['user_info']['id'])))) {
             showErr($GLOBALS['lang']['INSUFFCIENT_SCORE'], 1);
         } else {
             require_once APP_ROOT_PATH . "system/libs/voucher.php";
             $rs = send_voucher($ecv_type['id'], $GLOBALS['user_info']['id'], 1);
             if ($rs) {
                 require_once APP_ROOT_PATH . "system/model/user.php";
                 $msg = sprintf($GLOBALS['lang']['EXCHANGE_VOUCHER_USE_SCORE'], $ecv_type['name'], $ecv_type['exchange_score']);
                 modify_account(array('money' => 0, 'score' => "-" . $ecv_type['exchange_score']), $GLOBALS['user_info']['id'], $msg);
                 showSuccess($GLOBALS['lang']['EXCHANGE_SUCCESS'], 1);
             } else {
                 showSuccess($GLOBALS['lang']['EXCHANGE_FAILED'], 1, url('index', 'uc_voucher'));
             }
         }
     }
 }
开发者ID:macall,项目名称:jsd,代码行数:32,代码来源:uc_voucherModule.class.php


示例6: index

 public function index()
 {
     $preview = intval($_REQUEST['preview']);
     $event_id = intval($_REQUEST['id']);
     if ($preview > 0) {
         $event = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "event where id = " . $event_id);
         $adm_session = es_session::get(md5(app_conf("AUTH_KEY")));
         $adm_name = $adm_session['adm_name'];
         $adm_id = intval($adm_session['adm_id']);
         if ($adm_id == 0) {
             //验证是否当前的商家(不是后台管理员)
             $s_account_info = es_session::get("account_info");
             if ($s_account_info) {
                 foreach ($s_account_info['location_ids'] as $id) {
                     $location = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "supplier_location where id = " . $id);
                     if ($location) {
                         $locations[] = $location;
                     }
                 }
                 $deal_test = $GLOBALS['db']->getRow("select e.* from " . DB_PREFIX . "event as e left join " . DB_PREFIX . "event_location_link as l on l.event_id = e.id where e.id = " . intval($event['id']) . " and e.publish_wait = 1 and l.location_id in (" . implode(",", $s_account_info['location_ids']) . ")");
                 if (!$deal_test) {
                     showErr("活动不存在或者没有预览该活动的权限", 0, APP_ROOT . "/admin.php?m=Public&a=login");
                 }
             } else {
                 showErr("您不是系统管理员或者商家会员,无法预览", 0, APP_ROOT . "/");
             }
         }
     } else {
         $event = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "event where id = " . $event_id . " and is_effect = 1");
     }
     if (!$event) {
         app_redirect(url("youhui", "fcate"));
     }
     $GLOBALS['tmpl']->assign("event", $event);
     //开始输出当前的site_nav
     $cate = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "event_cate where id = " . $event['cate_id']);
     $site_nav[] = array('name' => $GLOBALS['lang']['HOME_PAGE'], 'url' => url("index", "index"));
     if ($cate) {
         $curl = url("youhui", "event#index", array("cid" => $cate['id']));
         $site_nav[] = array('name' => $cate['name'], 'url' => $curl);
     }
     $gurl = url("youhui", "edetail#index", array("id" => $event['id']));
     $site_nav[] = array('name' => $event['name'], 'url' => $gurl);
     $GLOBALS['tmpl']->assign("site_nav", $site_nav);
     //输出当前的site_nav
     $seo_title = $event['name'];
     $GLOBALS['tmpl']->assign("page_title", $seo_title);
     $seo_keyword = $event['name'];
     $GLOBALS['tmpl']->assign("page_keyword", $seo_keyword . ",");
     $seo_description = $event['name'];
     $GLOBALS['tmpl']->assign("page_description", $seo_description . ",");
     $submit_result = $GLOBALS['db']->getAll("select user_id from " . DB_PREFIX . "event_submit where event_id = " . $event_id . " limit 18");
     $GLOBALS['tmpl']->assign("submit_result", $submit_result);
     if ($_REQUEST['plat'] == APP_PLAT) {
         $GLOBALS['tmpl']->display("youhui_app_edetail.html");
     } else {
         $GLOBALS['tmpl']->display("youhui_edetail.html");
     }
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:59,代码来源:edetailModule.class.php


示例7: init

 public function init()
 {
     $id = intval($_REQUEST['id']);
     $this->space_user = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "user where id = " . $id . " and is_effect=  1 and is_delete = 0");
     $user_id = intval($GLOBALS['user_info']['id']);
     if (!$this->space_user) {
         showErr($GLOBALS['lang']['USER_NOT_EXISTS']);
     }
     $focus_data = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "user_focus where focus_user_id = " . $user_id . " and focused_user_id = " . $this->space_user['id']);
     if ($focus_data) {
         $this->space_user['focused'] = 1;
     }
     $region_list = load_auto_cache("cache_region_conf");
     // 			$province_str = $GLOBALS['db']->getOne("select name from ".DB_PREFIX."region_conf where id = ".$this->space_user['province_id']);
     $province_str = $region_list[$this->space_user['province_id']]['name'];
     // 			$city_str = $GLOBALS['db']->getOne("select name from ".DB_PREFIX."region_conf where id = ".$this->space_user['city_id']);
     $city_str = $region_list[$this->space_user['city_id']]['name'];
     if ($province_str . $city_str == '') {
         $user_location = $GLOBALS['lang']['LOCATION_NULL'];
     } else {
         $user_location = $province_str . $city_str;
     }
     $this->space_user['fav_count'] = $GLOBALS['db']->getOne("select count(*) from " . DB_PREFIX . "topic where user_id = " . $this->space_user['id'] . " and fav_id <> 0");
     $this->space_user['user_location'] = $user_location;
     $GLOBALS['tmpl']->assign("space_user", $this->space_user);
     //输出粉丝
     $fans_list = $GLOBALS['db']->getAll("select focus_user_id as id,focus_user_name as user_name from " . DB_PREFIX . "user_focus where focused_user_id = " . $this->space_user['id'] . " order by rand() limit 5");
     $ids = array(0);
     foreach ($fans_list as $k => $v) {
         $ids[] = $v['id'];
     }
     $focus_data = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "user_focus where focus_user_id = " . $user_id . " and focused_user_id in (" . implode(",", $ids) . ")");
     foreach ($fans_list as $k => $v) {
         foreach ($focus_data as $kk => $vv) {
             if ($vv['focused_user_id'] == $v['id']) {
                 $fans_list[$k]['focused'] = 1;
                 break;
             }
         }
     }
     $GLOBALS['tmpl']->assign("rfans_list", $fans_list);
     //输出我的关注
     $focus_list = $GLOBALS['db']->getAll("select focused_user_id as id,focused_user_name as user_name from " . DB_PREFIX . "user_focus where focus_user_id = " . $this->space_user['id'] . " order by rand() limit 5");
     $ids = array(0);
     foreach ($focus_list as $k => $v) {
         $ids[] = $v['id'];
     }
     $focus_data = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "user_focus where focus_user_id = " . $user_id . " and focused_user_id in (" . implode(",", $ids) . ")");
     foreach ($focus_list as $k => $v) {
         foreach ($focus_data as $kk => $vv) {
             if ($vv['focused_user_id'] == $v['id']) {
                 $focus_list[$k]['focused'] = 1;
                 break;
             }
         }
     }
     $GLOBALS['tmpl']->assign("rfocus_list", $focus_list);
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:58,代码来源:spaceModule.class.php


示例8: response

 public function response($request)
 {
     $payment = $GLOBALS['db']->getRow("select id,config from " . DB_PREFIX . "payment where class_name='Paypal'");
     $payment['config'] = unserialize($payment['config']);
     $merchant_id = $payment['config']['paypal_account'];
     // assign posted variables to local variables
     $item_name = $request['item_name'];
     $item_number = $request['item_number'];
     $payment_status = $request['payment_status'];
     $payment_amount = floatval($request['mc_gross']);
     $payment_currency = $request['mc_currency'];
     $txn_id = $request['txn_id'];
     $receiver_email = $request['receiver_email'];
     $payer_email = $request['payer_email'];
     $data_id = $request['invoice'];
     //开始初始化参数
     $payment_notice_sn = $data_id;
     $money = $payment_amount;
     $payment_notice = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "payment_notice where notice_sn = '" . $payment_notice_sn . "'");
     $order_info = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "deal_order where id = " . $payment_notice['order_id']);
     if ($payment_status != 'Completed' && $payment_status != 'Pending') {
         showErr("支付不成功");
     } elseif ($receiver_email != $merchant_id) {
         showErr("商户号不匹配");
     } elseif (abs($payment_notice['money'] * $payment['config']['paypal_rate'] - $payment_amount) > 0.008999999999999999) {
         showErr("金额不匹配");
     } elseif ($payment['config']['paypal_currency'] != $payment_currency) {
         showErr("货币不对");
     } else {
         require_once APP_ROOT_PATH . "system/libs/cart.php";
         $rs = payment_paid($payment_notice['id']);
         if ($rs) {
             $rs = order_paid($payment_notice['order_id']);
             if ($rs) {
                 if ($order_info['type'] == 0) {
                     app_redirect(url("shop", "payment#done", array("id" => $payment_notice['order_id'])));
                 } else {
                     app_redirect(url("shop", "payment#incharge_done", array("id" => $payment_notice['order_id'])));
                 }
                 //支付成功
             } else {
                 if ($order_info['pay_status'] == 2) {
                     if ($order_info['type'] == 0) {
                         app_redirect(url("shop", "payment#done", array("id" => $payment_notice['order_id'])));
                     } else {
                         app_redirect(url("shop", "payment#incharge_done", array("id" => $payment_notice['order_id'])));
                     }
                     //支付成功
                 } else {
                     app_redirect(url("shop", "payment#pay", array("id" => $payment_notice['id'])));
                 }
             }
         } else {
             app_redirect(url("shop", "payment#pay", array("id" => $payment_notice['id'])));
         }
     }
 }
开发者ID:dalinhuang,项目名称:zsh_business,代码行数:57,代码来源:Paypal_payment.php


示例9: step2

 public function step2()
 {
     check_issupplier();
     $user_id = intval($GLOBALS['user_info']['id']);
     if ($user_id == 0) {
         app_redirect(url("shop", "user#login"));
     }
     $location_id = intval($_REQUEST['location_id']);
     $location = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "supplier_location where id = " . $location_id . " and is_effect = 1");
     if ($location) {
         $account_info = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "supplier_account where account_name = '" . $GLOBALS['user_info']['merchant_name'] . "'");
         if ($account_info && $location['supplier_id'] != $account_info['supplier_id']) {
             showErr("这家商户不是您的,您不能认领");
         } else {
             $data['name'] = $location['name'];
             $data['deal_cate_id'] = $location['deal_cate_id'];
             $deal_cate_type_list = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "deal_cate_type_location_link where location_id = " . $location['id']);
             foreach ($deal_cate_type_list as $type) {
                 $data['deal_cate_type_id'][] = $type['deal_cate_type_id'];
             }
             $area_list = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "supplier_location_area_link where location_id = " . $location['id']);
             foreach ($area_list as $area) {
                 $data['area_id'][] = $area['area_id'];
             }
             $data['address'] = $location['address'];
             $data['xpoint'] = $location['xpoint'];
             $data['ypoint'] = $location['ypoint'];
             $data['tel'] = $location['tel'];
             $data['open_time'] = $location['open_time'];
             $data['location_id'] = $location['id'];
             $data['city_id'] = intval($location['city_id']);
         }
     } elseif ($_POST) {
         $data['name'] = addslashes(htmlspecialchars(trim($_REQUEST['name'])));
         $data['deal_cate_id'] = intval($_REQUEST['deal_cate_id']);
         foreach ($_REQUEST['deal_cate_type_id'] as $type) {
             $data['deal_cate_type_id'][] = intval($type);
         }
         foreach ($_REQUEST['area_id'] as $area) {
             $data['area_id'][] = intval($area);
         }
         $data['address'] = addslashes(htmlspecialchars(trim($_REQUEST['address'])));
         $data['xpoint'] = doubleval($_REQUEST['xpoint']);
         $data['ypoint'] = doubleval($_REQUEST['ypoint']);
         $data['tel'] = addslashes(htmlspecialchars(trim($_REQUEST['tel'])));
         $data['open_time'] = addslashes(htmlspecialchars(trim($_REQUEST['open_time'])));
         $data['location_id'] = 0;
         $data['city_id'] = intval($_REQUEST['city_id']);
     } else {
         app_redirect(url("biz", "join#step1"));
     }
     $GLOBALS['tmpl']->assign("base_data", base64_encode(serialize($data)));
     $GLOBALS['tmpl']->assign("step", 2);
     $GLOBALS['tmpl']->assign("page_title", "签协议");
     $GLOBALS['tmpl']->display("biz/biz_join_step2.html");
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:56,代码来源:joinModule.class.php


示例10: del

 public function del()
 {
     $id = intval($_REQUEST['id']);
     $GLOBALS['db']->query("delete from " . DB_PREFIX . "deal_collect where id = " . $id . " and user_id = " . intval($GLOBALS['user_info']['id']));
     if ($GLOBALS['db']->affected_rows()) {
         showSuccess($GLOBALS['lang']['DELETE_SUCCESS']);
     } else {
         showErr($GLOBALS['lang']['INVALID_COLLECT']);
     }
 }
开发者ID:norain2050,项目名称:fanwei_xindai_3.2,代码行数:10,代码来源:uc_collectModule.class.php


示例11: 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


示例12: autoopen

 function autoopen()
 {
     if (intval($GLOBALS['user_info']['id']) == 0) {
         showErr($GLOBALS['lang']['PLEASE_LOGIN_FIRST'], 1);
     }
     if (!isset($_REQUEST['is_effect'])) {
         showErr($GLOBALS['lang']['ERROR_TITLE'], 1);
     }
     $is_effect = intval($_REQUEST['is_effect']);
     $GLOBALS['db']->autoExecute(DB_PREFIX . "user_autobid", array("is_effect" => $is_effect), "UPDATE", "user_id=" . intval($GLOBALS['user_info']['id']));
     showSuccess($GLOBALS['lang']['SUCCESS_TITLE'], 1);
 }
开发者ID:workplayteam,项目名称:P2P,代码行数:12,代码来源:uc_autobidModule.class.php


示例13: dounsubscribe

 public function dounsubscribe()
 {
     $email_code = trim($_REQUEST['code']);
     $email_code = base64_decode($email_code);
     $arr = explode("|", $email_code);
     $GLOBALS['db']->query("delete from " . DB_PREFIX . "mail_list where code = '" . $arr[0] . "' and mail_address = '" . $arr[1] . "'");
     $rs = $GLOBALS['db']->affected_rows();
     if ($rs) {
         showSuccess($GLOBALS['lang']['MAIL_UNSUBSCRIBE_SUCCESS'], 0, APP_ROOT . "/");
     } else {
         showErr($GLOBALS['lang']['MAIL_UNSUBSCRIBE_FAILED'], 0, APP_ROOT . "/");
     }
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:13,代码来源:subscribeModule.class.php


示例14: dovote

 public function dovote()
 {
     $ok = false;
     $ajax = intval($_REQUEST['ajax']);
     foreach ($_REQUEST['name'] as $vote_ask_id => $names) {
         foreach ($names as $kk => $name) {
             if ($name != '') {
                 $ok = true;
             }
         }
     }
     if (!$ok) {
         showErr("请选择要调查的内容", $ajax, '');
     }
     $vote_id = intval($_REQUEST['vote_id']);
     if (check_ipop_limit(get_client_ip(), "vote", 3600, $vote_id)) {
         foreach ($_REQUEST['name'] as $vote_ask_id => $names) {
             foreach ($names as $kk => $name) {
                 $name = htmlspecialchars(addslashes(trim($name)));
                 $result = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "vote_result where name = '" . $name . "' and vote_id = " . $vote_id . " and vote_ask_id = " . $vote_ask_id);
                 $is_add = true;
                 if ($result) {
                     $GLOBALS['db']->query("update " . DB_PREFIX . "vote_result set count = count + 1 where name = '" . $name . "' and vote_id = " . $vote_id . " and vote_ask_id = " . $vote_ask_id);
                     if (intval($GLOBALS['db']->affected_rows()) != 0) {
                         $is_add = false;
                     }
                 }
                 if ($is_add) {
                     if ($name != '') {
                         $result = array();
                         $result['name'] = $name;
                         $result['vote_id'] = $vote_id;
                         $result['vote_ask_id'] = $vote_ask_id;
                         $result['count'] = 1;
                         $GLOBALS['db']->autoExecute(DB_PREFIX . "vote_result", $result);
                     }
                 }
             }
         }
         $vote_list = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "vote_list where vote_id = " . $vote_id);
         $vote_list = array();
         $vote_list['vote_id'] = $vote_id;
         $vote_list['value'] = serialize($_REQUEST['name']);
         $GLOBALS['db']->autoExecute(DB_PREFIX . "vote_list", $vote_list);
         showSuccess("调查提交成功", $ajax, url("vote#index"));
     } else {
         showErr("你已经提交过该问卷", $ajax, '');
     }
 }
开发者ID:centaurustech,项目名称:crowdfunding-9,代码行数:49,代码来源:voteModule.class.php


示例15: do_add_quota

 public function do_add_quota()
 {
     $data['user_id'] = $GLOBALS['user_info']['id'];
     $data['money'] = intval($_REQUEST['money']);
     $data['memo'] = strim($_REQUEST['memo']);
     $data['other_memo'] = strim($_REQUEST['other_memo']);
     $data['create_time'] = TIME_UTC;
     //申请时间
     $GLOBALS['db']->autoExecute(DB_PREFIX . "rebid_submit", $data);
     if ($GLOBALS['db']->insert_id()) {
         showSuccess('提交成功,等待管理员审核', 0, url("index", "uc_rebid"));
     } else {
         showErr('提交失败', 0, url("index", "uc_rebid"));
     }
 }
开发者ID:neteasy-work,项目名称:fanwei_xindai_3.2,代码行数:15,代码来源:uc_rebidModule.class.php


示例16: response

 public function response()
 {
     //支付跳转返回页
     $class_name = quotes(trim($_REQUEST['class_name']));
     $payment_info = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "payment where class_name = '" . $class_name . "'");
     if ($payment_info) {
         require_once APP_ROOT_PATH . "system/payment/" . $payment_info['class_name'] . "_payment.php";
         $payment_class = $payment_info['class_name'] . "_payment";
         $payment_object = new $payment_class();
         $_REQUEST = quotes($_REQUEST);
         $payment_code = $payment_object->response($_REQUEST);
     } else {
         showErr("支付接口不存在");
     }
 }
开发者ID:bharatthakkar,项目名称:stock-crowd-funding-system,代码行数:15,代码来源:paymentModule.class.php


示例17: send

 public function send()
 {
     $ajax = intval($_REQUEST['ajax']);
     if (!$GLOBALS['user_info']) {
         showErr("", $ajax, url_wap("user#login"));
     }
     $receive_user_id = intval($_REQUEST['id']);
     $send_user_id = intval($GLOBALS['user_info']['id']);
     if ($receive_user_id == $send_user_id) {
         showErr("不能向自己发私信", $ajax);
     } else {
         $receive_user_info = $GLOBALS['db']->getRow("select user_name from " . DB_PREFIX . "user where is_effect = 1 and id = " . $receive_user_id);
         if (!$receive_user_info) {
             showErr("收信人不存在", $ajax);
         }
         //发私信:生成发件与收件
         //1.生成发件
         $data = array();
         $data['create_time'] = NOW_TIME;
         $data['message'] = strim($_REQUEST['message']);
         $data['user_id'] = $send_user_id;
         $data['dest_user_id'] = $receive_user_id;
         $data['send_user_id'] = $send_user_id;
         $data['receive_user_id'] = $receive_user_id;
         $data['user_name'] = $GLOBALS['user_info']['user_name'];
         $data['dest_user_name'] = $receive_user_info['user_name'];
         $data['send_user_name'] = $GLOBALS['user_info']['user_name'];
         $data['receive_user_name'] = $receive_user_info['user_name'];
         $data['message_type'] = "outbox";
         $data['is_read'] = 1;
         $GLOBALS['db']->autoExecute(DB_PREFIX . "user_message", $data);
         //2.生成收件
         $data = array();
         $data['create_time'] = NOW_TIME;
         $data['message'] = strim($_REQUEST['message']);
         $data['user_id'] = $receive_user_id;
         $data['dest_user_id'] = $send_user_id;
         $data['send_user_id'] = $send_user_id;
         $data['receive_user_id'] = $receive_user_id;
         $data['user_name'] = $receive_user_info['user_name'];
         $data['dest_user_name'] = $GLOBALS['user_info']['user_name'];
         $data['send_user_name'] = $GLOBALS['user_info']['user_name'];
         $data['receive_user_name'] = $receive_user_info['user_name'];
         $data['message_type'] = "inbox";
         $GLOBALS['db']->autoExecute(DB_PREFIX . "user_message", $data);
         showSuccess("发送成功", $ajax);
     }
 }
开发者ID:myjavawork,项目名称:sanxin-fangwei,代码行数:48,代码来源:message.action.php


示例18: index

 public function index()
 {
     if (!$GLOBALS['user_info']) {
         //$data['html'] = $GLOBALS['tmpl']->display("inc/user_login_box.html","",true);
         $data['status'] = 2;
     } else {
         $id = intval($_REQUEST['id']);
         $deal_info = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "deal where id = " . $id . " and is_delete = 0 and is_effect = 1 and user_id = " . intval($GLOBALS['user_info']['id']));
         if (!$deal_info) {
             showErr("不能更新该项目的动态", 1);
         } else {
             $GLOBALS['tmpl']->assign("deal_info", $deal_info);
             //$data['html'] = $GLOBALS['tmpl']->fetch("inc/add_update.html");
             $data['status'] = 1;
         }
     }
     ajax_return($data);
 }
开发者ID:myjavawork,项目名称:sanxin-fangwei,代码行数:18,代码来源:deal_add_update.action.php


示例19: oldAppDb

 function oldAppDb($dbhost, $dbuser, $dbpw, $dbName = '', $charset = 'utf8', $newlink = false)
 {
     if (!($this->sql_id = mysql_connect($dbhost, $dbuser, $dbpw, $newlink))) {
         showErr("DataBase", "Can't pConnect MySQL Server({$dbhost})!");
     }
     mysql_query("SET NAMES " . $charset, $this->sql_id);
     mysql_query("SET character_set_client " . $charset, $this->sql_id);
     mysql_query("SET character_set_results " . $charset, $this->sql_id);
     @mysql_query($this->sql_id);
     if ($dbName) {
         if (mysql_select_db($dbName, $this->sql_id) === false) {
             showErr("DataBase", "Can't select MySQL database({$dbName})!");
             return false;
         } else {
             return true;
         }
     }
 }
开发者ID:klarclm,项目名称:sgv,代码行数:18,代码来源:class.php


示例20: jdpay

 public function jdpay()
 {
     if (!$GLOBALS['user_info']) {
         app_redirect(url("user#login"));
     }
     $payment_notice_id = intval($_REQUEST['payment_notice_id']);
     $notice_info = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "payment_notice where id = " . $payment_notice_id . " and is_paid = 0 and user_id = " . intval($GLOBALS['user_info']['id']));
     $payment_info = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "payment where id = " . intval($notice_info['payment_id']));
     if ($payment_info['class_name'] == 'Jdpay') {
         $class_name = $payment_info['class_name'] . "_payment";
         require_once APP_ROOT_PATH . "system/payment/" . $class_name . ".php";
         $o = new $class_name();
         $pay_data = $o->get_payment_code($payment_notice_id);
         header("location:" . $pay_data['url']);
     } else {
         showErr("支付出错", 0, url("account#view_order", array("id" => $notice_info['order_id'])));
     }
 }
开发者ID:myjavawork,项目名称:sanxin-fangwei,代码行数:18,代码来源:gopaymentModule.class.php



注:本文中的showErr函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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