当前位置: 首页>>代码示例>>PHP>>正文


PHP showErr函数代码示例

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


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


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