本文整理汇总了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);
}
示例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);
}
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}