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


PHP es_cookie类代码示例

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


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

示例1: loginout

 public function loginout()
 {
     $ajax = intval($_REQUEST['ajax']);
     require_once APP_ROOT_PATH . "system/libs/user.php";
     $result = loginout_user();
     if ($result['status']) {
         es_cookie::delete("email");
         es_cookie::delete("user_pwd");
         es_cookie::delete("hide_user_notify");
         if ($ajax == 1) {
             $return['status'] = 1;
             $return['info'] = "登出成功";
             $return['data'] = $result['msg'];
             $return['jump'] = get_gopreview();
             ajax_return($return);
         } else {
             $GLOBALS['tmpl']->assign('integrate_result', $result['msg']);
             if (trim(app_conf("INTEGRATE_CODE")) == '') {
                 app_redirect_preview();
             } else {
                 showSuccess("登出成功", 0, get_gopreview());
             }
         }
     } else {
         if ($ajax == 1) {
             $return['status'] = 1;
             $return['info'] = "登出成功";
             $return['jump'] = get_gopreview();
             ajax_return($return);
         } else {
             app_redirect(get_gopreview());
         }
     }
 }
开发者ID:xcdxcd,项目名称:zhongchou,代码行数:34,代码来源:userModule.class.php

示例2: loginout

 public function loginout()
 {
     es_cookie::delete("sp_account_name");
     es_cookie::delete("sp_account_password");
     es_session::delete("account_info");
     app_redirect(url("biz", "index"));
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:7,代码来源:loginModule.class.php

示例3: all

 public function all()
 {
     $city_name = trim(addslashes($_REQUEST['city']));
     if ($city_name) {
         $deal_city = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "deal_city where uname='' and is_effect = 1 and is_delete = 0");
     }
     if (!$deal_city) {
         $deal_city = get_current_deal_city();
     }
     es_cookie::set("deal_city", $deal_city['id']);
     app_redirect(url("index"));
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:12,代码来源:cityModule.class.php

示例4: set_sort_idx

 public function set_sort_idx()
 {
     $type = trim(addslashes($_REQUEST['type']));
     es_cookie::set("sort_field_idx", $type);
     if ($type != 'sort') {
         $sort_type = trim(es_cookie::get("sort_type_idx"));
         if ($sort_type && $sort_type == 'desc') {
             es_cookie::set("sort_type_idx", 'asc');
         } else {
             es_cookie::set("sort_type_idx", 'desc');
         }
     } else {
         es_cookie::set("sort_type_idx", 'desc');
     }
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:15,代码来源:ajaxModule.class.php

示例5: save

 public function save()
 {
     require_once APP_ROOT_PATH . 'system/libs/user.php';
     foreach ($_REQUEST as $k => $v) {
         $_REQUEST[$k] = htmlspecialchars(addslashes(trim($v)));
     }
     if ($GLOBALS['user_info']['user_name']) {
         $_REQUEST['user_name'] = $GLOBALS['user_info']['user_name'];
     }
     $res = save_user($_REQUEST, 'UPDATE');
     if ($res['status'] == 1) {
         // user_name mobile province_id city_id byear bmonth bday sex my_intro id
         // 向im.lingang.me发送用户名片修改请求
         $phone = $_REQUEST['mobile'];
         $rid = es_cookie::get("rid");
         $sig = md5($phone . "_" . $rid . "_" . $rid);
         $url = get_doubi_host();
         $post = array('action' => 'edit_profile', 'sig' => $sig, 'phone' => $phone, 'uname' => $_REQUEST['user_name'], 'uintro' => $_REQUEST['my_intro'], 'gender' => $_REQUEST['sex'], 'birth' => $_REQUEST['byear'] . "-" . $_REQUEST['bmonth'] . "-" . $_REQUEST['bday']);
         $response = json_decode(sentSigPost($url, $post), true);
         $s_user_info = es_session::get("user_info");
         $user_info = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "user where id = '" . intval($s_user_info['id']) . "'");
         es_session::set("user_info", $user_info);
         if (intval($_REQUEST['is_ajax']) == 1) {
             echo 1;
         } else {
             showSuccess($GLOBALS['lang']['SAVE_USER_SUCCESS']);
         }
     } else {
         $error = $res['data'];
         if (!$error['field_show_name']) {
             $error['field_show_name'] = $GLOBALS['lang']['USER_TITLE_' . strtoupper($error['field_name'])];
         }
         if ($error['error'] == EMPTY_ERROR) {
             $error_msg = sprintf($GLOBALS['lang']['EMPTY_ERROR_TIP'], $error['field_show_name']);
         }
         if ($error['error'] == FORMAT_ERROR) {
             $error_msg = sprintf($GLOBALS['lang']['FORMAT_ERROR_TIP'], $error['field_show_name']);
         }
         if ($error['error'] == EXIST_ERROR) {
             $error_msg = sprintf($GLOBALS['lang']['EXIST_ERROR_TIP'], $error['field_show_name']);
         }
         if (intval($_REQUEST['is_ajax']) == 1) {
             echo 1;
         } else {
             showErr($error_msg);
         }
     }
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:48,代码来源:uc_accountModule.class.php

示例6: get_deal_list

/**
 * 获取正在进行的投标列表
 */
function get_deal_list($limit = "", $cate_id = 0, $where = '', $orderby = '', $user_name = '', $user_pwd = '', $is_all = false)
{
    $time = TIME_UTC;
    $count_sql = "select count(*) from " . DB_PREFIX . "deal where 1=1 ";
    if ($is_all == false) {
        $count_sql .= " and is_effect = 1 and is_delete = 0 ";
    }
    if (es_cookie::get("shop_sort_field") == "ulevel") {
        $extfield = ",(SELECT u.level_id FROM fanwe_user u WHERE u.id=user_id ) as ulevel";
    }
    $sql = "select *,start_time as last_time,(load_money/borrow_amount*100) as progress_point,(start_time + enddate*24*3600 - " . $time . ") as remain_time {$extfield} from " . DB_PREFIX . "deal where 1 = 1 ";
    if ($is_all == false) {
        $sql .= " and is_effect = 1 and is_delete = 0 ";
    }
    if ($cate_id > 0) {
        $ids = load_auto_cache("deal_sub_parent_cate_ids", array("cate_id" => $cate_id));
        $sql .= " and cate_id in (" . implode(",", $ids) . ")";
        $count_sql .= " and cate_id in (" . implode(",", $ids) . ")";
    }
    if ($where != '') {
        $sql .= " and " . $where;
        $count_sql .= " and " . $where;
    }
    if ($orderby == '') {
        $sql .= " order by sort desc ";
    } else {
        $sql .= " order by " . $orderby;
    }
    if ($limit != "") {
        $sql .= " limit " . $limit;
    }
    $deals_count = $GLOBALS['db']->getOne($count_sql);
    if ($deals_count > 0) {
        $deals = $GLOBALS['db']->getAll($sql);
        //echo $sql;
        if ($deals) {
            foreach ($deals as $k => $deal) {
                format_deal_item($deal, $user_name, $user_pwd);
                $deals[$k] = $deal;
            }
        }
    } else {
        $deals = array();
    }
    return array('list' => $deals, 'count' => $deals_count);
}
开发者ID:workplayteam,项目名称:P2P,代码行数:49,代码来源:deal_func.php

示例7: rm

 public function rm($param)
 {
     $rel_id = intval($param['rel_id']);
     unset($param['rel_id']);
     //为默认cookie准备的参数
     unset($param['session_id']);
     unset($param['uid']);
     if ($param['type'] == "shop") {
         //商城不用城市划分
         unset($param['city_id']);
     }
     $key = $this->build_key(__CLASS__, $param);
     es_cookie::delete($key);
     // 		$key = $this->build_key(__CLASS__,$param);
     // 		$GLOBALS['cache']->set_dir(APP_ROOT_PATH."public/runtime/data/".__CLASS__."/");
     // 		$GLOBALS['cache']->rm($key);
 }
开发者ID:macall,项目名称:jsd,代码行数:17,代码来源:cache_history.auto_cache.php

示例8: index

 public function index()
 {
     if (!$GLOBALS['user_info']) {
         app_redirect(url_wap("user#login"));
     }
     $id = $GLOBALS['user_info']['id'];
     $mobile_is_bind = es_cookie::get(md5("mobile_is_bind" . $id));
     $GLOBALS['tmpl']->assign("mobile_is_bind", $mobile_is_bind);
     $data = $GLOBALS['db']->getRow("select is_investor,identify_name,identify_number,identify_positive_image,identify_nagative_image,investor_status,identify_business_licence,identify_business_code,identify_business_tax,identify_business_name from " . DB_PREFIX . "user where id=" . $id);
     if ($data['is_investor'] == 1 && $data['investor_status'] == 0 && $data['identify_name'] != null && $data['identify_number'] != null && $data['identify_positive_image'] != null && $data['identify_nagative_image'] != null || $data['is_investor'] == 2 && $data['investor_status'] == 0 && $data['identify_business_licence'] != null && $data['identify_business_code'] != null && $data['identify_business_tax'] != null && $data['identify_business_name'] != null || $data['investor_status'] == 1 || $data['investor_status'] == 1) {
         app_redirect(url_wap("user#investor_result"));
     }
     //服务条款
     $help_item = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "help where type ='term'");
     $GLOBALS['tmpl']->assign("help_item", $help_item);
     $GLOBALS['tmpl']->assign("help_title", "服务条款");
     $GLOBALS['tmpl']->display("investor_index.html");
 }
开发者ID:myjavawork,项目名称:sanxin-fangwei,代码行数:18,代码来源:investor.action.php

示例9: save_mobile

 public function save_mobile()
 {
     $mobile = strim($_POST['mobile']);
     $cid = strim($_POST['cid']);
     $verify_coder = strim($_POST['verify_coder']);
     if ($mobile == null) {
         $data['status'] = 0;
         $data['info'] = "手机号码不能为空!";
         ajax_return($data);
         return false;
     }
     if ($GLOBALS['db']->getOne("SELECT count(*) FROM " . DB_PREFIX . "mobile_verify_code WHERE mobile=" . $mobile . " AND verify_code='" . $verify_coder . "'") == 0) {
         $data['status'] = 0;
         $data['info'] = "手机验证码出错";
         ajax_return($data);
         return false;
     }
     $id = $GLOBALS['user_info']['id'];
     if ($GLOBALS['db']->query("UPDATE " . DB_PREFIX . "user SET mobile=" . $mobile . " WHERE id = " . $id)) {
         //绑定过回退不用再次发送短信
         es_cookie::set(md5("mobile_is_bind" . $GLOBALS['user_info']['id']), 1);
         $data['status'] = 1;
         ajax_return($data);
     }
     return false;
 }
开发者ID:myjavawork,项目名称:sanxin-fangwei,代码行数:26,代码来源:user.action.php

示例10: delete

 static function delete($name)
 {
     es_cookie::set($name, '', 0);
 }
开发者ID:norain2050,项目名称:fanwei_xindai_3.2,代码行数:4,代码来源:es_cookie.php

示例11: index

 public function index()
 {
     $field = es_cookie::get("shop_sort_field");
     $field_sort = es_cookie::get("shop_sort_type");
     require APP_ROOT_PATH . 'app/Lib/page.php';
     $level_list = load_auto_cache("level");
     $GLOBALS['tmpl']->assign("level_list", $level_list['list']);
     if (check_ipop_limit(get_client_ip(), "transfer_status", 10)) {
         syn_transfer_status();
     }
     if (trim($_REQUEST['cid']) == "last") {
         $cate_id = "-1";
         $page_title = $GLOBALS['lang']['LAST_SUCCESS_DEALS'] . " - ";
     } else {
         $cate_id = intval($_REQUEST['cid']);
     }
     if ($cate_id == 0) {
         $page_title = $GLOBALS['lang']['ALL_TRANSFER'] . " - ";
     }
     $keywords = trim(htmlspecialchars($_REQUEST['keywords']));
     $GLOBALS['tmpl']->assign("keywords", $keywords);
     $level = intval($_REQUEST['level']);
     $GLOBALS['tmpl']->assign("level", $level);
     $interest = intval($_REQUEST['interest']);
     $GLOBALS['tmpl']->assign("interest", $interest);
     $months = intval($_REQUEST['months']);
     $GLOBALS['tmpl']->assign("months", $months);
     $months_type = intval($_REQUEST['months_type']);
     $GLOBALS['tmpl']->assign("months_type", $months_type);
     $lefttime = intval($_REQUEST['lefttime']);
     $GLOBALS['tmpl']->assign("lefttime", $lefttime);
     $city = intval($_REQUEST['city']);
     $GLOBALS['tmpl']->assign("city_id", $city);
     $scity = intval($_REQUEST['scity']);
     $GLOBALS['tmpl']->assign("scity_id", $scity);
     //输出分类
     $deal_cates_db = load_auto_cache("cache_deal_cate");
     $deal_cates = array();
     foreach ($deal_cates_db as $k => $v) {
         if ($cate_id == $v['id']) {
             $v['current'] = 1;
             $page_title = $v['name'] . " - ";
         }
         $v['url'] = url("index", "transfer", array("cid" => $v['id']));
         $deal_cates[] = $v;
     }
     unset($deal_cates_db);
     //输出投标列表
     $page = intval($_REQUEST['p']);
     if ($page == 0) {
         $page = 1;
     }
     $page_args = array();
     $sfield = "";
     switch ($field) {
         case "borrow_amount":
             $sfield = "dlt.transfer_amount";
             break;
         case "rate":
             $sfield = "d.rate";
             break;
         case "repay_time":
             $sfield = "dlt.last_repay_time";
             break;
         case "remain_time":
             $sfield = "dlt.near_repay_time";
             break;
         default:
             $sfield = "";
     }
     $condition = " AND dlt.status=1 ";
     if ($cate_id > 0) {
         $condition .= "AND d.deal_status >=4 and cate_id=" . $cate_id;
         if ($sfield && $field_sort) {
             $orderby = "{$sfield} {$field_sort} ,d.deal_status desc , d.sort DESC,d.id DESC";
         } else {
             $orderby = "d.update_time DESC ,d.sort DESC,d.id DESC";
         }
     } elseif ($cate_id == 0) {
         if ($sfield && $field_sort) {
             $orderby = "{$sfield} {$field_sort}, dlt.create_time DESC , dlt.id DESC ";
         } else {
             $orderby = " d.create_time DESC , dlt.id DESC";
         }
     } elseif ($cate_id == "-1") {
         $condition .= "AND d.deal_status >=4 AND dlt.t_user_id > 0 ";
         $orderby = "dlt.transfer_time DESC,d.create_time DESC , dlt.id DESC";
     }
     if ($keywords) {
         $kw_unicode = str_to_unicode_string($keywords);
         $condition .= " and (match(d.name_match,d.deal_cate_match,d.tag_match,d.type_match) against('" . $kw_unicode . "' IN BOOLEAN MODE))";
     }
     if ($level > 0) {
         $point = $level_list['point'][$level];
         $condition .= " AND d.user_id in(SELECT u.id FROM " . DB_PREFIX . "user u LEFT JOIN " . DB_PREFIX . "user_level ul ON ul.id=u.level_id WHERE ul.point >= {$point})";
     }
     if ($interest > 0) {
         $condition .= " AND d.rate >= " . $interest;
     }
     if ($months > 0) {
//.........这里部分代码省略.........
开发者ID:norain2050,项目名称:fanwei_xindai_3.2,代码行数:101,代码来源:transferModule.class.php

示例12: pick

 public function pick()
 {
     $url_param = array("id" => addslashes(trim($_REQUEST['id'])), "b" => intval($_REQUEST['b']), "min_price" => doubleval($_REQUEST['min_price']), "max_price" => doubleval($_REQUEST['max_price']), "keyword" => addslashes(trim($_REQUEST['keyword'])));
     $filter_req = $_REQUEST['f'];
     //筛选数组
     if (count($filter_req) > 0) {
         foreach ($filter_req as $k => $v) {
             $url_param['f[' . $k . ']'] = $v;
         }
     }
     if (intval($_REQUEST['is_redirect']) == 1) {
         app_redirect(url("shop", "ss#pick", $url_param));
     }
     //输出商城分类
     $cate_tree = get_cate_tree();
     $all_cate_tree = get_cate_tree(0, 1);
     $GLOBALS['tmpl']->assign("cate_tree", $cate_tree);
     $GLOBALS['tmpl']->assign("all_cate_tree", $all_cate_tree);
     convert_req($_REQUEST);
     //获取当前页的团购商品列表
     //分页
     $page = intval($_REQUEST['p']);
     if ($page == 0) {
         $page = 1;
     }
     $limit = ($page - 1) * app_conf("DEAL_PAGE_SIZE") . "," . app_conf("DEAL_PAGE_SIZE");
     $id = intval($_REQUEST['id']);
     if ($id == 0) {
         $uname = addslashes(trim($_REQUEST['id']));
     }
     $cate_item = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "shop_cate where id = " . $id . " or (uname = '" . $uname . "' and uname <> '')");
     $condition = " d.buy_type<>1 ";
     //条件
     $ids = load_auto_cache("shop_sub_cate_ids", array("cate_id" => intval($cate_item['id'])));
     $add_title = "";
     //输出品牌
     $brand_id = intval($_REQUEST['b']);
     if ($brand_id > 0) {
         $condition .= " and d.brand_id = " . $brand_id;
         $add_title .= $GLOBALS['db']->getOne("select name from " . DB_PREFIX . "brand where id = " . $brand_id);
         $GLOBALS['tmpl']->assign("brand_id", $brand_id);
     }
     $brand_list = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "brand order by sort desc");
     $GLOBALS['tmpl']->assign("brand_list", $brand_list);
     //输出属性筛选
     $filter_req = $_REQUEST['f'];
     $join_str = "";
     $unicode_tags = array();
     foreach ($filter_req as $k => $v) {
         $filter_req[$k] = trim(addslashes(urldecode($v)));
         if ($filter_req[$k] != '' && $filter_req[$k] != 'all') {
             if ($add_title != '') {
                 $add_title .= " - ";
             }
             $add_title .= $filter_req[$k];
             //				//联表及条件
             //				$join_str.=" left join ".DB_PREFIX."deal_filter as df_".$k." on d.id=df_".$k.".deal_id and df_".$k.".filter_group_id = ".$k;
             //				$condition.=" and df_".$k.".filter like '%".$filter_req[$k]."%' ";
             $unicode_tags[] = "+" . str_to_unicode_string($filter_req[$k]);
         }
     }
     if (count($unicode_tags) > 0) {
         $kw_unicode = implode(" ", $unicode_tags);
         //有筛选
         $condition .= " and (match(d.tag_match) against('" . $kw_unicode . "' IN BOOLEAN MODE))";
     }
     if (intval($_REQUEST['id']) != 0) {
         $filter_group = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "filter_group where is_effect = 1 and cate_id in (" . implode(",", $ids) . ") order by sort desc");
         foreach ($filter_group as $k => $v) {
             $filter_group[$k]['value'] = $filter_req[$v['id']];
         }
         $GLOBALS['tmpl']->assign("filter_group", $filter_group);
     }
     //输出价格区间
     $min_price = doubleval($_REQUEST['min_price']);
     $max_price = doubleval($_REQUEST['max_price']);
     $GLOBALS['tmpl']->assign("min_price", $min_price);
     $GLOBALS['tmpl']->assign("max_price", $max_price);
     if ($min_price > 0) {
         $condition .= " and d.current_price >= " . $min_price;
     }
     if ($max_price > 0) {
         $condition .= " and d.current_price <= " . $max_price;
     }
     $sort_field = es_cookie::get("shop_sort_field") ? es_cookie::get("shop_sort_field") : "sort";
     $sort_type = es_cookie::get("shop_sort_type") ? es_cookie::get("shop_sort_type") : "desc";
     $GLOBALS['tmpl']->assign('sort_field', $sort_field);
     $GLOBALS['tmpl']->assign('sort_type', $sort_type);
     if (es_cookie::get("list_type") === null) {
         $list_type = app_conf("LIST_TYPE");
     } else {
         $list_type = intval(es_cookie::get("list_type"));
     }
     $GLOBALS['tmpl']->assign("list_type", $list_type);
     $kw = addslashes(htmlspecialchars(trim($_REQUEST['keyword'])));
     if ($kw != '') {
         $GLOBALS['tmpl']->assign('keyword', $kw);
         if ($add_title != '') {
             $add_title .= "-";
         }
//.........这里部分代码省略.........
开发者ID:norain2050,项目名称:fanwei_xindai_3.2,代码行数:101,代码来源:ssModule.class.php

示例13: synlogout

 function synlogout($get, $post)
 {
     if (!API_SYNLOGOUT) {
         return API_RETURN_FORBIDDEN;
     }
     es_cookie::delete("user_name");
     es_cookie::delete("user_pwd");
     es_session::delete("user_info");
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:9,代码来源:uc.php

示例14: index

 public function index()
 {
     $GLOBALS['tmpl']->caching = true;
     $GLOBALS['tmpl']->cache_lifetime = 60;
     //首页缓存10分钟
     $field = es_cookie::get("shop_sort_field");
     $field_sort = es_cookie::get("shop_sort_type");
     $cache_id = md5(MODULE_NAME . ACTION_NAME . implode(",", $_REQUEST) . $field . $field_sort);
     if (!$GLOBALS['tmpl']->is_cached("page/deals.html", $cache_id)) {
         require APP_ROOT_PATH . 'app/Lib/page.php';
         $level_list = load_auto_cache("level");
         $GLOBALS['tmpl']->assign("level_list", $level_list['list']);
         if (trim($_REQUEST['cid']) == "last") {
             $cate_id = "-1";
             $page_title = $GLOBALS['lang']['LAST_SUCCESS_DEALS'] . " - ";
         } else {
             $cate_id = intval($_REQUEST['cid']);
         }
         if ($cate_id == 0) {
             $page_title = $GLOBALS['lang']['ALL_DEALS'] . " - ";
         }
         $keywords = trim(htmlspecialchars($_REQUEST['keywords']));
         $GLOBALS['tmpl']->assign("keywords", $keywords);
         $level = intval($_REQUEST['level']);
         $GLOBALS['tmpl']->assign("level", $level);
         $interest = intval($_REQUEST['interest']);
         $GLOBALS['tmpl']->assign("interest", $interest);
         $months = intval($_REQUEST['months']);
         $GLOBALS['tmpl']->assign("months", $months);
         $lefttime = intval($_REQUEST['lefttime']);
         $GLOBALS['tmpl']->assign("lefttime", $lefttime);
         $months_type = intval($_REQUEST['months_type']);
         $GLOBALS['tmpl']->assign("months_type", $months_type);
         $deal_status = intval($_REQUEST['deal_status']);
         $GLOBALS['tmpl']->assign("deal_status", $deal_status);
         $cates = intval($_REQUEST['cates']);
         $GLOBALS['tmpl']->assign("cates", $cates);
         $city = intval($_REQUEST['city']);
         $GLOBALS['tmpl']->assign("city_id", $city);
         $scity = intval($_REQUEST['scity']);
         $GLOBALS['tmpl']->assign("scity_id", $scity);
         //输出分类
         $deal_cates_db = load_auto_cache("cache_deal_cate");
         $deal_cates = array();
         foreach ($deal_cates_db as $k => $v) {
             if ($cate_id == $v['id']) {
                 $v['current'] = 1;
                 $page_title = $v['name'] . " - ";
             }
             $v['url'] = url("index", "deals", array("cid" => $v['id']));
             $deal_cates[] = $v;
         }
         unset($deal_cates_db);
         //输出投标列表
         $page = intval($_REQUEST['p']);
         if ($page == 0) {
             $page = 1;
         }
         $limit = ($page - 1) * app_conf("DEAL_PAGE_SIZE") . "," . app_conf("DEAL_PAGE_SIZE");
         $n_cate_id = 0;
         $condition = " publish_wait = 0 and is_hidden = 0 ";
         $orderby = "";
         if ($cate_id > 0) {
             $n_cate_id = $cate_id;
             if ($field && $field_sort) {
                 $orderby = "{$field} {$field_sort} ,deal_status desc , sort DESC,id DESC";
             } else {
                 $orderby = "sort DESC,id DESC";
             }
             $total_money = $GLOBALS['db']->getOne("SELECT sum(borrow_amount) FROM " . DB_PREFIX . "deal WHERE cate_id={$cate_id} AND deal_status in(4,5) AND is_effect = 1 and is_delete = 0 ");
         } elseif ($cate_id == 0) {
             $n_cate_id = 0;
             if ($field && $field_sort) {
                 $orderby = "{$field} {$field_sort} ,sort DESC,id DESC";
             } else {
                 $orderby = "sort DESC , id DESC";
             }
             $total_money = $GLOBALS['db']->getOne("SELECT sum(borrow_amount) FROM " . DB_PREFIX . "deal WHERE deal_status in(4,5) AND is_effect = 1 and is_delete = 0");
         } elseif ($cate_id == "-1") {
             $n_cate_id = 0;
             $condition .= "AND deal_status in(2,4,5) ";
             $orderby = "deal_status ASC,success_time DESC,sort DESC,id DESC";
         }
         if ($keywords) {
             $kw_unicode = str_to_unicode_string($keywords);
             $condition .= " and (match(name_match,deal_cate_match,tag_match,type_match) against('" . $kw_unicode . "' IN BOOLEAN MODE))";
         }
         if ($level > 0) {
             $point = $level_list['point'][$level];
             $condition .= " AND user_id in(SELECT u.id FROM " . DB_PREFIX . "user u LEFT JOIN " . DB_PREFIX . "user_level ul ON ul.id=u.level_id WHERE ul.point >= {$point})";
         }
         if ($interest > 0) {
             $condition .= " AND rate >= " . $interest;
         }
         if ($months > 0) {
             if ($months == 12) {
                 $condition .= " AND repay_time <= " . $months;
             } elseif ($months == 18) {
                 $condition .= " AND repay_time >= " . $months;
             }
//.........这里部分代码省略.........
开发者ID:eliu03,项目名称:fanweP2P,代码行数:101,代码来源:dealsModule.class.php

示例15: json_decode

 if ($class == 'login') {
     $i = json_decode($data);
     if ($i->return == 1) {
         /*
         //将会员信息存在session中			
          			es_session::set('uid',$i->uid);
         es_session::set('user_name',$i->user_name);
         es_session::set('user_pwd',$request_param['pwd']);
         //cookie
         es_cookie::set('uid',$i->uid,3600*24*365);
         es_cookie::set('user_name',$i->user_name,3600*24*365);
         es_cookie::set('user_pwd',$request_param['pwd'],3600*24*365);
         */
         es_session::delete("user_info");
         es_cookie::set("user_name", $i->user_name, 3600 * 24 * 30);
         es_cookie::set("user_pwd", md5($i->user_pwd . "_EASE_COOKIE"), 3600 * 24 * 30);
     }
 }
 if ($class == 'biz_login') {
     $i = json_decode($data);
     if ($i->status == 1) {
         //将会员信息存在session中
         es_session::set('supplier_id', $i->supplier_id);
         es_session::set('biz_email', $i->biz_email);
         es_session::set('biz_pwd', $i->biz_pwd);
     }
 }
 if ($class == 'changecity') {
     $i = json_decode($data);
     //print_r($i);
     if ($i->status == 1) {
开发者ID:macall,项目名称:baikec_jsd,代码行数:31,代码来源:index.php


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