當前位置: 首頁>>代碼示例>>PHP>>正文


PHP user_check函數代碼示例

本文整理匯總了PHP中user_check函數的典型用法代碼示例。如果您正苦於以下問題:PHP user_check函數的具體用法?PHP user_check怎麽用?PHP user_check使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了user_check函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: index

 public function index()
 {
     $root = array();
     $email = strim($GLOBALS['request']['email']);
     //用戶名或郵箱
     $pwd = strim($GLOBALS['request']['pwd']);
     //密碼
     $ids = strim($GLOBALS['request']['id']);
     //檢查用戶,用戶密碼
     $user = user_check($email, $pwd);
     $user_id = intval($user['id']);
     if ($user_id > 0) {
         $root['user_login_status'] = 1;
         $sql = "delete from " . DB_PREFIX . "deal_collect where deal_id in (" . $ids . ") and user_id = " . $user_id;
         //$root['sql'] = $sql;
         $GLOBALS['db']->query($sql);
         $root['response_code'] = 1;
         $root['show_err'] = $GLOBALS['lang']['DELETE_SUCCESS'];
         /*
         if($GLOBALS['db']->affected_rows()){
         	$root['response_code'] = 1;
         	$root['show_err'] = $GLOBALS['lang']['DELETE_SUCCESS'];
         }
         else{
         	$root['response_code'] = 0;
         	$root['show_err'] = $GLOBALS['lang']['刪除失敗'];
         }
         */
     } else {
         $root['response_code'] = 0;
         $root['show_err'] = "未登錄";
         $root['user_login_status'] = 0;
     }
     output($root);
 }
開發者ID:norain2050,項目名稱:fanwei_xindai_3.2,代碼行數:35,代碼來源:uc_del_collect.action.php

示例2: index

 public function index()
 {
     $root = array();
     $root['return'] = 1;
     $email = addslashes($GLOBALS['request']['email']);
     //用戶名或郵箱
     $pwd = md5(addslashes($GLOBALS['request']['pwd']));
     //原始密碼
     $user_info = user_check($email, $pwd);
     $user_id = intval($user_info['id']);
     if (!$user_info) {
         $root['status'] = 0;
         $root['message'] = "用戶密碼錯誤";
         output($root);
     } else {
         $new_password = addslashes($GLOBALS['request']['new_password']);
         if (strlen($new_password) < 4) {
             $root['status'] = 0;
             $root['message'] = "注冊密碼不能少於4位";
             output($root);
         }
         $sql = "update " . DB_PREFIX . "user set is_account = 1, user_pwd = '" . md5($new_password) . "' where id = {$user_id}";
         $GLOBALS['db']->query($sql);
         $rs = $GLOBALS['db']->affected_rows();
         $root['status'] = 1;
         $root['uid'] = $user_id;
         $root['user_name'] = $email;
         $root['password'] = md5($new_password);
         $root['is_account'] = 1;
         output($root);
     }
 }
開發者ID:YouthAndra,項目名稱:huaitaoo2o,代碼行數:32,代碼來源:editaccount.action.php

示例3: index

 public function index()
 {
     $root = array();
     $email = strim($GLOBALS['request']['email']);
     //用戶名或郵箱
     $pwd = strim($GLOBALS['request']['pwd']);
     //密碼
     $page = intval($GLOBALS['request']['page']);
     $status = strim($GLOBALS['request']['status']);
     //0:全部;1:可轉讓;2:轉讓中;3:已轉讓;4:已撤銷;
     //檢查用戶,用戶密碼
     $user = user_check($email, $pwd);
     $user_id = intval($user['id']);
     if ($user_id > 0) {
         require APP_ROOT_PATH . 'app/Lib/uc_func.php';
         $root['user_login_status'] = 1;
         $root['response_code'] = 1;
         $result = getUcTransferBuys($page, $status);
         $root['item'] = $result['list'];
         $root['page'] = array("page" => $page, "page_total" => ceil($result['count'] / app_conf("DEAL_PAGE_SIZE")));
     } else {
         $root['response_code'] = 0;
         $root['show_err'] = "未登錄";
         $root['user_login_status'] = 0;
     }
     output($root);
 }
開發者ID:workplayteam,項目名稱:P2P,代碼行數:27,代碼來源:uc_transfer_buys.action.php

示例4: index

 public function index()
 {
     $root = array();
     $email = strim($GLOBALS['request']['email']);
     //用戶名或郵箱
     $pwd = strim($GLOBALS['request']['pwd']);
     //密碼
     //檢查用戶,用戶密碼
     $user = user_check($email, $pwd);
     $user_id = intval($user['id']);
     if ($user_id > 0) {
         require APP_ROOT_PATH . 'app/Lib/uc_func.php';
         $root['user_login_status'] = 1;
         $paypassword = strim($GLOBALS['request']['paypassword']);
         $amount = floatval($GLOBALS['request']['amount']);
         $bid = intval($GLOBALS['request']['bid']);
         $result = getUcSaveCarry($amount, $paypassword, $bid);
         $root['response_code'] = $result['status'];
         $root['show_err'] = $result['show_err'];
     } else {
         $root['response_code'] = 0;
         $root['show_err'] = "未登錄";
         $root['user_login_status'] = 0;
     }
     output($root);
 }
開發者ID:myjavawork,項目名稱:sanxin-fangwei,代碼行數:26,代碼來源:uc_save_carry.action.php

示例5: index

 public function index()
 {
     $root = array();
     $email = strim($GLOBALS['request']['email']);
     //用戶名或郵箱
     $pwd = strim($GLOBALS['request']['pwd']);
     //密碼
     $id = intval($GLOBALS['request']['id']);
     //檢查用戶,用戶密碼
     $user = user_check($email, $pwd);
     $user_id = intval($user['id']);
     if ($user_id > 0) {
         require APP_ROOT_PATH . 'app/Lib/uc_func.php';
         $root['user_login_status'] = 1;
         $result = getUcToTransfer($id);
         $root['transfer'] = $result['transfer'];
         $root['response_code'] = $result['status'];
         $root['show_err'] = $result['show_err'];
     } else {
         $root['response_code'] = 0;
         $root['show_err'] = "未登錄";
         $root['user_login_status'] = 0;
     }
     $root['program_title'] = "轉讓詳情";
     output($root);
 }
開發者ID:eliu03,項目名稱:fanweP2P,代碼行數:26,代碼來源:uc_to_transfer.action.php

示例6: index

 public function index()
 {
     $root = array();
     $email = strim($GLOBALS['request']['email']);
     //用戶名或郵箱
     $pwd = strim($GLOBALS['request']['pwd']);
     //密碼
     //檢查用戶,用戶密碼
     $user = user_check($email, $pwd);
     $user_id = intval($user['id']);
     if ($user_id > 0) {
         $root['user_login_status'] = 1;
         $order_id = intval($_REQUEST['id']);
         $order_info = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "deal_order where order_status = 0 and user_id = " . intval($GLOBALS['user_info']['id']) . " and id = " . $order_id);
         if (!$order_info) {
             $root['info'] = '無效的訂單';
         } else {
             $money = $order_info['credit_pay'];
             $GLOBALS['db']->query("delete from " . DB_PREFIX . "deal_order where id = " . $order_id . " and user_id = " . intval($GLOBALS['user_info']['id']) . " and order_status = 0");
             if ($GLOBALS['db']->affected_rows() > 0) {
                 if ($money > 0) {
                     require_once APP_ROOT_PATH . "system/libs/user.php";
                     modify_account(array("money" => $money), intval($GLOBALS['user_info']['id']), "刪除" . $order_info['deal_name'] . "項目支付,退回支付款。");
                 }
             }
             $root['response_code'] = 1;
             $root['info'] = '刪除成功';
         }
     } else {
         $root['response_code'] = 0;
         $root['show_err'] = "未登錄";
         $root['user_login_status'] = 0;
     }
     output($root);
 }
開發者ID:myjavawork,項目名稱:sanxin-fangwei,代碼行數:35,代碼來源:uc_account_delorder.action.php

示例7: index

 public function index()
 {
     $root = array();
     $email = strim($GLOBALS['request']['email']);
     //用戶名或郵箱
     $pwd = strim($GLOBALS['request']['pwd']);
     //密碼
     //檢查用戶,用戶密碼
     $user = user_check($email, $pwd);
     $user_id = intval($user['id']);
     if ($user_id > 0) {
         $root['user_login_status'] = 1;
         $root['page_title'] = "發起項目";
         $region_lv2 = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "region_conf where region_level = 2 order by py asc");
         //二級地址
         $root['region_lv2'] = $region_lv2;
         $cate_list = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "deal_cate order by sort asc");
         $root['cate_list'] = $cate_list;
         $deal_image = es_session::get("deal_image");
         $root['deal_image'] = $deal_image;
     } else {
         $root['response_code'] = 0;
         $root['show_err'] = "未登錄";
         $root['user_login_status'] = 0;
     }
     output($root);
 }
開發者ID:myjavawork,項目名稱:sanxin-fangwei,代碼行數:27,代碼來源:project_add.action.php

示例8: index

 public function index()
 {
     $root = array();
     $email = strim($GLOBALS['request']['email']);
     //用戶名或郵箱
     $pwd = strim($GLOBALS['request']['pwd']);
     //密碼
     $page = intval($GLOBALS['request']['page']);
     $status = intval($GLOBALS['request']['status']);
     //0:還款列表;1:已還清借款
     //檢查用戶,用戶密碼
     $user = user_check($email, $pwd);
     $user_id = intval($user['id']);
     if ($user_id > 0) {
         require APP_ROOT_PATH . 'app/Lib/deal.php';
         $root['user_login_status'] = 1;
         $root['response_code'] = 1;
         if ($page == 0) {
             $page = 1;
         }
         $limit = ($page - 1) * app_conf("PAGE_SIZE") . "," . app_conf("PAGE_SIZE");
         $deal_status = 4;
         if ($status == 1) {
             $deal_status = 5;
         }
         $result = get_deal_list($limit, 0, "deal_status ={$deal_status} AND user_id=" . $user_id, "id DESC", $email, $user['user_pwd']);
         $root['item'] = $result['list'];
         $root['page'] = array("page" => $page, "page_total" => ceil($result['count'] / app_conf("PAGE_SIZE")));
     } else {
         $root['response_code'] = 0;
         $root['show_err'] = "未登錄";
         $root['user_login_status'] = 0;
     }
     output($root);
 }
開發者ID:workplayteam,項目名稱:P2P,代碼行數:35,代碼來源:uc_refund.action.php

示例9: index

 public function index()
 {
     $root = array();
     $email = strim($GLOBALS['request']['email']);
     //用戶名或郵箱
     $pwd = strim($GLOBALS['request']['pwd']);
     //密碼
     $address_id = intval($GLOBALS['request']['id']);
     //檢查用戶,用戶密碼
     $user = user_check($email, $pwd);
     $user_id = intval($user['id']);
     if ($user_id > 0) {
         if ($address_id) {
             $GLOBALS['db']->query("delete from " . DB_PREFIX . "user_address  where id = " . $address_id);
             $root['response_code'] = 1;
             $root["show_err"] = "刪除成功";
         } else {
             $root["show_err"] = "刪除失敗";
         }
         output($root);
     } else {
         $root['response_code'] = 0;
         $root['show_err'] = "未登錄";
         $root['user_login_status'] = 0;
     }
     $root['program_title'] = "收貨地址刪除";
     output($root);
 }
開發者ID:eliu03,項目名稱:fanweP2P,代碼行數:28,代碼來源:uc_del_address.action.php

示例10: index

 public function index()
 {
     $root = array();
     $email = strim($GLOBALS['request']['email']);
     //用戶名或郵箱
     $pwd = strim($GLOBALS['request']['pwd']);
     //密碼
     //檢查用戶,用戶密碼
     $user = user_check($email, $pwd);
     $user_id = intval($user['id']);
     if ($user_id > 0) {
         $root['user_login_status'] = 1;
         $id = intval($_REQUEST['id']);
         $paypassword = strim($GLOBALS['request']['paypassword']);
         $id = intval($GLOBALS['request']['id']);
         $status = dotrans($id, $paypassword);
         if ($status['status'] != 1) {
             $root['response_code'] = 0;
             $root['show_err'] = $status['show_err'];
         } else {
             $root['response_code'] = 1;
             $root['show_err'] = $GLOBALS['lang']['DEAL_BID_SUCCESS'];
             $root['id'] = $id;
         }
     } else {
         $root['response_code'] = 0;
         $root['show_err'] = "未登錄";
         $root['user_login_status'] = 0;
     }
     output($root);
 }
開發者ID:workplayteam,項目名稱:P2P,代碼行數:31,代碼來源:transfer_dobid.action.php

示例11: index

 public function index()
 {
     $root = array();
     $root['return'] = 1;
     $email = addslashes($GLOBALS['request']['email']);
     //用戶名或郵箱
     $pwd = addslashes($GLOBALS['request']['pwd']);
     //密碼
     //檢查用戶,用戶密碼
     $user = user_check($email, $pwd);
     //print_r($user);exit;
     $user_id = intval($user['id']);
     if ($user_id == 0) {
         $root['user_login_status'] = 0;
         //用戶登陸狀態:1:成功登陸;0:未成功登陸
         output($root);
     } else {
         $root['user_login_status'] = 1;
     }
     $brand_id = intval($GLOBALS['request']['brand_id']);
     $data['uid'] = $user_id;
     $data['brand_id'] = $brand_id;
     $is_set = intval($GLOBALS['db']->getOne("select count(*) from " . DB_PREFIX . "brand_dy where uid = " . $user_id . " and brand_id = " . $brand_id));
     if ($is_set == 1) {
         $GLOBALS['db']->query("update " . DB_PREFIX . "brand set dy_count = dy_count - 1 where dy_count >0 and id =" . $brand_id);
         $GLOBALS['db']->query("delete from " . DB_PREFIX . "brand_dy where uid = " . $user_id . " and brand_id =" . $brand_id);
         $root['status'] = 0;
         output($root);
     } else {
         $GLOBALS['db']->autoExecute(DB_PREFIX . "brand_dy", $data, 'INSERT');
         $GLOBALS['db']->query("update " . DB_PREFIX . "brand set dy_count = dy_count + 1 where id =" . $brand_id);
         $root['status'] = 1;
         output($root);
     }
 }
開發者ID:YouthAndra,項目名稱:huaitaoo2o,代碼行數:35,代碼來源:dybrand.action.php

示例12: index

 public function index()
 {
     $email = strim($GLOBALS['request']['email']);
     //用戶名或郵箱
     $pwd = strim($GLOBALS['request']['pwd']);
     //密碼
     //檢查用戶,用戶密碼
     $user = user_check($email, $pwd);
     $user_id = intval($user['id']);
     $root = array();
     $root['return'] = 1;
     if ($user_id > 0) {
         $root['user_login_status'] = 0;
         $id = intval($GLOBALS['request']['id']);
         //id,有ID值則更新,無ID值,則插入
         $sql = "delete from " . DB_PREFIX . "user_consignee where user_id = {$user_id} and id = {$id}";
         $GLOBALS['db']->query($sql);
         $root = array();
         $root['return'] = 1;
         $root['info'] = "數據刪除成功!";
     } else {
         $root['user_login_status'] = 1;
     }
     output($root);
 }
開發者ID:YouthAndra,項目名稱:huaitaoo2o,代碼行數:25,代碼來源:del_addr.action.php

示例13: index

 public function index()
 {
     $root = array();
     $id = intval($GLOBALS['request']['id']);
     $email = strim($GLOBALS['request']['email']);
     //用戶名或郵箱
     $pwd = strim($GLOBALS['request']['pwd']);
     //密碼
     //檢查用戶,用戶密碼
     $user = user_check($email, $pwd);
     $user_id = intval($user['id']);
     if ($user_id > 0) {
         $root['is_faved'] = $GLOBALS['db']->getOne("SELECT count(*) FROM " . DB_PREFIX . "deal_collect WHERE deal_id = " . $id . " AND user_id=" . $user_id);
     } else {
         $root['is_faved'] = 0;
         //0:未關注;>0:已關注
     }
     $root['response_code'] = 1;
     $deal = get_deal($id);
     //format_deal_item($deal,$email,$pwd);
     //print_r($deal);
     //exit;
     $root['deal'] = $deal;
     //data.deal.name
     output($root);
 }
開發者ID:workplayteam,項目名稱:P2P,代碼行數:26,代碼來源:deal.action.php

示例14: index

 public function index()
 {
     $email = strim($GLOBALS['request']['email']);
     //用戶名或郵箱
     $pwd = strim($GLOBALS['request']['pwd']);
     //密碼
     //檢查用戶,用戶密碼
     $user = user_check($email, $pwd);
     $user_id = intval($user['id']);
     $root = array();
     $root['return'] = 1;
     if ($user_id > 0) {
         $root['user_login_status'] = 1;
         $id = intval($GLOBALS['request']['id']);
         $GLOBALS['db']->query("update " . DB_PREFIX . "deal_order set is_delete = 1,order_status = 1 where id = " . $id . " and user_id = " . intval($user_id) . " and pay_status = 0");
         $rs = $GLOBALS['db']->affected_rows();
         if ($rs) {
             $root['return'] = 1;
             $root['info'] = "刪除成功";
         } else {
             $root['return'] = 0;
             $root['info'] = "刪除失敗";
         }
     } else {
         $root['return'] = 0;
         $root['info'] = "未登錄";
         $root['user_login_status'] = 0;
     }
     output($root);
 }
開發者ID:YouthAndra,項目名稱:huaitaoo2o,代碼行數:30,代碼來源:my_order_del.action.php

示例15: index

 public function index()
 {
     $root = array();
     $email = strim($GLOBALS['request']['email']);
     //用戶名或郵箱
     $pwd = strim($GLOBALS['request']['pwd']);
     //密碼
     //檢查用戶,用戶密碼
     $user = user_check($email, $pwd);
     $user_id = intval($user['id']);
     if ($user_id > 0) {
         $root['user_login_status'] = 1;
         if (intval($user['idcardpassed']) == 0) {
             $root['response_code'] = 0;
             $root['show_err'] = "您的實名信息尚未認證,為保護您的賬戶安全,請先完成實名認證。";
         } else {
             $root['response_code'] = 1;
             $root['real_name'] = $user['real_name'];
             $bank_list = $GLOBALS['db']->getAll("SELECT * FROM " . DB_PREFIX . "bank ORDER BY is_rec DESC,sort DESC,id ASC");
             $root['item'] = $bank_list;
         }
     } else {
         $root['response_code'] = 0;
         $root['show_err'] = "未登錄";
         $root['user_login_status'] = 0;
     }
     output($root);
 }
開發者ID:myjavawork,項目名稱:sanxin-fangwei,代碼行數:28,代碼來源:uc_add_bank.action.php


注:本文中的user_check函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。