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


PHP es_session::delete方法代码示例

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


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

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

示例2: loginout_biz

/**
 * 登出,返回 array('status'=>'',data=>'',msg=>'') msg存放整合接口返回的字符串
 */
function loginout_biz()
{
    $account_info = es_session::get("account_info");
    if (!$account_info) {
        return false;
    } else {
        es_session::delete("account_info");
        es_session::delete("biz_account_auth");
    }
}
开发者ID:macall,项目名称:jsd,代码行数:13,代码来源:biz_user.php

示例3: check_auth

 /**
  * 验证检限
  * 已登录时验证用户权限, Index模块下的所有函数无需权限验证
  * 未登录时跳转登录
  */
 private function check_auth()
 {
     if (intval(app_conf("EXPIRED_TIME")) > 0 && es_session::is_expired()) {
         es_session::delete(md5(conf("AUTH_KEY")));
         es_session::delete("expire");
     }
     //管理员的SESSION
     $adm_session = es_session::get(md5(conf("AUTH_KEY")));
     $adm_name = $adm_session['adm_name'];
     $adm_id = intval($adm_session['adm_id']);
     $ajax = intval($_REQUEST['ajax']);
     $biz_account = es_session::get("account_info");
     $is_auth = 0;
     if (intval($biz_account['id']) > 0) {
         if (MODULE_NAME == 'File' && ACTION_NAME == 'do_upload' || MODULE_NAME == 'File' && ACTION_NAME == 'do_upload_img') {
             $is_auth = 1;
         }
     }
     if ($adm_id == 0 && $is_auth == 0) {
         if ($ajax == 0) {
             $this->redirect("Public/login");
         } else {
             $this->error(L("NO_LOGIN"), $ajax);
         }
     }
     //开始验证权限,当管理员名称不为默认管理员时
     //开始验证模块是否需要授权
     $sql = "select count(*) as c from " . conf("DB_PREFIX") . "role_node as role_node left join " . conf("DB_PREFIX") . "role_module as role_module on role_module.id = role_node.module_id " . " where role_node.action ='" . ACTION_NAME . "' and role_module.module = '" . MODULE_NAME . "' " . " and role_node.is_effect = 1 and role_node.is_delete = 0 and role_module.is_effect = 1 and role_module.is_delete = 0 ";
     $count = M()->query($sql);
     $count = $count[0]['c'];
     if ($adm_name != conf("DEFAULT_ADMIN") && MODULE_NAME != 'Index' && MODULE_NAME != 'Lang' && $count > 0 && $is_auth == 0) {
         //除IndexAction外需验证的权限列表
         $sql = "select count(*) as c from " . conf("DB_PREFIX") . "role_node as role_node left join " . conf("DB_PREFIX") . "role_access as role_access on role_node.id=role_access.node_id left join " . conf("DB_PREFIX") . "role as role on role_access.role_id = role.id left join " . conf("DB_PREFIX") . "role_module as role_module on role_module.id = role_node.module_id left join " . conf("DB_PREFIX") . "admin as admin on admin.role_id = role.id " . " where admin.id = " . $adm_id . " and role_node.action ='" . ACTION_NAME . "' and role_module.module = '" . MODULE_NAME . "' " . " and role_node.is_effect = 1 and role_node.is_delete = 0 and role_module.is_effect = 1 and role_module.is_delete = 0 and role.is_effect = 1 and role.is_delete = 0";
         $count = M()->query($sql);
         $count = $count[0]['c'];
         if ($count == 0) {
             //节点授权不足,开始判断是否有模块授权
             $module_sql = "select count(*) as c from " . conf("DB_PREFIX") . "role_access as role_access left join " . conf("DB_PREFIX") . "role as role on role_access.role_id = role.id left join " . conf("DB_PREFIX") . "role_module as role_module on role_module.id = role_access.module_id left join " . conf("DB_PREFIX") . "admin as admin on admin.role_id = role.id " . " where admin.id = " . $adm_id . " and role_module.module = '" . MODULE_NAME . "' " . " and role_access.node_id = 0" . " and role_module.is_effect = 1 and role_module.is_delete = 0 and role.is_effect = 1 and role.is_delete = 0";
             $module_count = M()->query($module_sql);
             $module_count = $module_count[0]['c'];
             if ($module_count == 0) {
                 if (MODULE_NAME == 'File' && ACTION_NAME == 'do_upload' || MODULE_NAME == 'File' && ACTION_NAME == 'do_upload_img') {
                     echo "<script>alert('" . L("NO_AUTH") . "');</script>";
                     exit;
                 } else {
                     $this->error(L("NO_AUTH"), $ajax);
                 }
             }
         }
     }
 }
开发者ID:xcdxcd,项目名称:zhongchou,代码行数:56,代码来源:AuthAction.class.php

示例4: insert_load_user_tip

function insert_load_user_tip()
{
    //输出未读的消息数
    if ($GLOBALS['user_info']) {
        $GLOBALS['tmpl']->assign("user_info", $GLOBALS['user_info']);
        //输出签到结果
        $signin_result = es_session::get("signin_result");
        if ($signin_result['status']) {
            $GLOBALS['tmpl']->assign("signin_result", json_encode($signin_result));
            es_session::delete("signin_result");
        }
    }
    return $GLOBALS['tmpl']->fetch("inc/insert/load_user_tip.html");
}
开发者ID:macall,项目名称:jsd,代码行数:14,代码来源:insert_libs.php

示例5: check_auth

 /**
  * 验证检限
  * 已登录时验证用户权限, Index模块下的所有函数无需权限验证
  * 未登录时跳转登录
  */
 private function check_auth()
 {
     if (intval(app_conf("EXPIRED_TIME")) > 0 && es_session::is_expired()) {
         es_session::delete(md5(conf("AUTH_KEY")));
         es_session::delete("expire");
     }
     //管理员的SESSION
     $adm_session = es_session::get(md5(conf("AUTH_KEY")));
     $adm_name = $adm_session['adm_name'];
     $adm_id = intval($adm_session['adm_id']);
     $ajax = intval($_REQUEST['ajax']);
     $is_auth = 0;
     $user_info = es_session::get("user_info");
     if (intval($user_info['id']) > 0) {
         if (MODULE_NAME == 'File' && ACTION_NAME == 'do_upload' || MODULE_NAME == 'File' && ACTION_NAME == 'do_upload_img') {
             $is_auth = 1;
         }
     }
     if ($adm_id == 0 && $is_auth == 0) {
         if ($ajax == 0) {
             $this->redirect("Public/login");
         } else {
             $this->error(L("NO_LOGIN"), $ajax);
         }
     }
     //开始验证权限,当管理员名称不为默认管理员时
     //开始验证模块是否需要授权
     global $access_list;
     $access_list = (require APP_ROOT_PATH . "system/admnode_cfg.php");
     $count = isset($access_list[MODULE_NAME]['node'][ACTION_NAME]) ? 1 : 0;
     if ($adm_name != app_conf("DEFAULT_ADMIN") && $count > 0 && $is_auth == 0) {
         $sql = "select count(*) from " . DB_PREFIX . "role_access as role left join " . DB_PREFIX . "admin as admin on admin.role_id = role.role_id  " . "where admin.id = " . $adm_id . " and role.node = '" . ACTION_NAME . "' and role.module = '" . MODULE_NAME . "' ";
         $count = $GLOBALS['db']->getOne($sql);
         if ($count == 0) {
             //节点授权不足,开始判断是否有模块授权
             $module_sql = "select count(*) from " . DB_PREFIX . "role_access as role left join " . DB_PREFIX . "admin as admin on admin.role_id = role.role_id " . "where admin.id = " . $adm_id . " and role.node = '' and role.module = '" . MODULE_NAME . "' ";
             $module_count = $GLOBALS['db']->getOne($module_sql);
             if ($module_count == 0) {
                 if (MODULE_NAME == 'File' && ACTION_NAME == 'do_upload' || MODULE_NAME == 'File' && ACTION_NAME == 'do_upload_img') {
                     echo "<script>alert('" . L("NO_AUTH") . "');</script>";
                     exit;
                 } else {
                     $this->error(L("NO_AUTH"), $ajax);
                 }
             }
         }
     }
 }
开发者ID:norain2050,项目名称:fanwei_xindai_3.2,代码行数:53,代码来源:AuthAction.class.php

示例6: do_loginout

 public function do_loginout()
 {
     //验证是否已登录
     //管理员的SESSION
     $adm_session = es_session::get(md5(conf("AUTH_KEY")));
     $adm_id = intval($adm_session['adm_id']);
     if ($adm_id == 0) {
         //已登录
         $this->redirect(u("Public/login"));
     } else {
         es_session::delete(md5(conf("AUTH_KEY")));
         $this->assign("jumpUrl", U("Public/login"));
         $this->assign("waitSecond", 3);
         $this->success(L("LOGINOUT_SUCCESS"));
     }
 }
开发者ID:centaurustech,项目名称:crowdfunding-9,代码行数:16,代码来源:PublicAction.class.php

示例7: investor_one_save


//.........这里部分代码省略.........
     			showErr("请选择公司是否已经成立",$ajax,"");
     		}
     */
     $data['business_create_time'] = to_timespan(strim($_REQUEST['business_create_time']), 'Y-m-d');
     if ($data['business_is_exist'] == 1) {
         if ($data['business_create_time'] == 0) {
             showErr("请选择企业成立时间", $ajax, "");
         }
     }
     $data['has_another_project'] = intval($_REQUEST['has_another_project']);
     /*		if($data['has_another_project']==0)
     		{
     			showErr("请选择是否有其他项目",$ajax,"");
     		}
     */
     $data['business_name'] = strim($_REQUEST['business_name']);
     if ($data['business_name'] == "") {
         showErr("请填写公司全称", $ajax, "");
     }
     $data['business_address'] = strim($_REQUEST['business_address']);
     if ($data['business_address'] == "") {
         showErr("请填写办公地址", $ajax, "");
     }
     $data['limit_price'] = floatval($_REQUEST['limit_price']);
     if ($data['limit_price'] <= 0) {
         showErr("请输入正确的融资金额", $ajax, "");
     }
     $data['invote_mini_money'] = floatval($_REQUEST['invote_mini_money']);
     if ($data['invote_mini_money'] <= 0) {
         showErr("请输入正确的单投资人最低出资", $ajax, "");
     }
     $data['transfer_share'] = floatval($_REQUEST['transfer_share']);
     if ($data['transfer_share'] == '' || $data['transfer_share'] > 100) {
         showErr("出让的股份为空或者出让的股份超过100%", $ajax, "");
     }
     $data['business_stock_type'] = intval($_REQUEST['business_stock_type']);
     /*	if($data['business_stock_type']==0)
     		{
     			showErr("请选择众筹股东成立的有限合伙企业入股方式",$ajax,"");
     		}
     	*/
     $data['business_descripe'] = strim($_REQUEST['business_descripe']);
     if ($data['business_descripe'] == "") {
         showErr("请填写企业项目简介", $ajax, "");
     }
     $data['image'] = replace_public(addslashes(trim($_REQUEST['image'])));
     //		echo $_REQUEST['image'];exit;
     if ($data['image'] == "") {
         showErr("上传封面图片", $ajax, "");
     }
     require_once APP_ROOT_PATH . "system/libs/words.php";
     $data['vedio'] = strim($_REQUEST['vedio']);
     if ($data['vedio'] != "") {
         require_once APP_ROOT_PATH . "system/utils/vedio.php";
         $vedio = fetch_vedio_url($data['vedio']);
         if ($vedio != "") {
             $data['source_vedio'] = $vedio;
         } else {
             showErr("非法的视频地址", $ajax, "");
         }
     }
     $audit_data = deal_investor_info($_REQUEST['audit_data'], 'audit_data', unserialize($deal['audit_data']));
     $data['audit_data'] = serialize($audit_data['data']);
     $data['is_edit'] = 1;
     $data['type'] = 1;
     $data['limit_price'] = $data['limit_price'] * 10000;
     $data['invote_mini_money'] = $data['invote_mini_money'] * 10000;
     if ($id > 0) {
         $savenext = intval($_REQUEST['savenext']);
         $GLOBALS['db']->autoExecute(DB_PREFIX . "deal", $data, "UPDATE", "id=" . $id, "SILENT");
         $GLOBALS['db']->query("update " . DB_PREFIX . "deal set deal_extra_cache = '' where id = " . $id);
         if ($savenext == 0) {
             showSuccess($id, $ajax, "");
         } else {
             $investor_edit = $GLOBALS['db']->getOne("select investor_edit from " . DB_PREFIX . "deal where id = " . $id . " and is_delete = 0 and user_id = " . intval($GLOBALS['user_info']['id']));
             if ($investor_edit == 1) {
                 showSuccess("", $ajax, url_wap("project#investor_edit", array("id" => $id)));
             } else {
                 showSuccess("", $ajax, url_wap("project#investor_two", array("id" => $id)));
             }
         }
     } else {
         $data['user_id'] = intval($GLOBALS['user_info']['id']);
         $data['user_name'] = $GLOBALS['user_info']['user_name'];
         $data['create_time'] = NOW_TIME;
         $savenext = intval($_REQUEST['savenext']);
         $GLOBALS['db']->autoExecute(DB_PREFIX . "deal", $data, "INSERT", "", "SILENT");
         $data_id = intval($GLOBALS['db']->insert_id());
         if ($data_id == 0) {
             showErr("保存失败,请联系管理员", $ajax, "");
         } else {
             es_session::delete("deal_image");
             if ($savenext == 0) {
                 showSuccess($data_id, $ajax, "");
             } else {
                 showSuccess("", $ajax, url_wap("project#investor_two", array("id" => $data_id)));
             }
         }
     }
 }
开发者ID:myjavawork,项目名称:sanxin-fangwei,代码行数:101,代码来源:project.action.php

示例8: output

 static function output($im, $type = 'gif', $filename = '')
 {
     ob_clean();
     header("Content-type: image/" . $type);
     $ImageFun = 'image' . $type;
     if (empty($filename)) {
         if (!$ImageFun($im)) {
             ob_clean();
             header("Content-type: image/jpeg");
             if (!imagejpeg($im)) {
                 ob_clean();
                 header("Content-type: image/png");
                 if (!imagepng($im)) {
                     es_session::delete("verify");
                 }
             }
         }
     } else {
         $ImageFun($im, $filename);
     }
     imagedestroy($im);
 }
开发者ID:myjavawork,项目名称:sanxin-fangwei,代码行数:22,代码来源:Image.class.php

示例9: loginout_user

/**
 * 登出,返回 array('status'=>'',data=>'',msg=>'') msg存放整合接口返回的字符串
 */
function loginout_user()
{
    $user_info = es_session::get("user_info");
    if (!$user_info) {
        return false;
    } else {
        //载入会员整合
        $integrate_code = trim(app_conf("INTEGRATE_CODE"));
        if ($integrate_code != '') {
            $integrate_file = APP_ROOT_PATH . "system/integrate/" . $integrate_code . "_integrate.php";
            if (file_exists($integrate_file)) {
                require_once $integrate_file;
                $integrate_class = $integrate_code . "_integrate";
                $integrate_obj = new $integrate_class();
            }
        }
        if ($integrate_obj) {
            $result = $integrate_obj->logout();
        }
        if (intval($result['status']) == 0) {
            $result['status'] = 1;
        }
        $account_name = $user_info['merchant_name'];
        $account = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "supplier_account where account_name = '" . $account_name . "' and is_effect = 1 and is_delete = 0");
        if ($account) {
            es_session::delete("account_info");
        }
        es_session::delete("user_info");
        return $result;
    }
}
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:34,代码来源:user.php

示例10: callback

 public function callback()
 {
     es_session::start();
     require_once APP_ROOT_PATH . 'system/api_login/Tencent/Tencent.php';
     OAuth::init($this->api['config']['app_key'], $this->api['config']['app_secret']);
     $code = strim($_REQUEST['code']);
     $openid = strim($_REQUEST['openid']);
     $openkey = strim($_REQUEST['openkey']);
     if ($this->api['config']['app_url'] == "") {
         $app_url = get_domain() . APP_ROOT . "/api_callback.php?c=Tencent";
     } else {
         $app_url = $this->api['config']['app_url'];
     }
     $token_url = OAuth::getAccessToken($code, $app_url);
     $result = Http::request($token_url);
     $result = preg_replace('/[^\\x20-\\xff]*/', "", $result);
     //清除不可见字符
     $result = iconv("utf-8", "utf-8//ignore", $result);
     //UTF-8转码
     parse_str($result, $result_arr);
     $access_token = $result_arr['access_token'];
     $refresh_token = $result_arr['refresh_token'];
     $name = $result_arr['name'];
     $nick = $result_arr['nick'];
     es_session::set("t_access_token", $access_token);
     es_session::set("t_openid", $openid);
     es_session::set("t_openkey", $openkey);
     if (es_session::get("t_access_token") || es_session::get("t_openid") && es_session::get("t_openkey")) {
         $r = Tencent::api('user/info');
         $r = json_decode($r, true);
         if ($r['errcode'] != 0) {
             showErr("腾讯微博返回出错");
         }
         //name,url,province,city,avatar,token,field,token_field(授权的字段),sex,secret_field(授权密码的字段),scret,url_field(微博地址的字段)
         $api_data['name'] = $r['data']['name'];
         $api_data['url'] = "http://t.qq.com/" . $r['data']['name'];
         $location = $r['data']['location'];
         $location = explode(" ", $location);
         $api_data['province'] = $location[1];
         $api_data['city'] = $location[2];
         $api_data['avatar'] = $r['data']['head'];
         $api_data['field'] = 'tencent_id';
         $api_data['token'] = $access_token;
         $api_data['token_field'] = "tencent_token";
         $api_data['secret'] = $openkey;
         $api_data['secret_field'] = "tencent_secret";
         $api_data['url_field'] = "tencent_url";
         if ($r['data']['sex'] == '1') {
             $api_data['sex'] = 1;
         } else {
             if ($r['data']['sex'] == '2') {
                 $api_data['sex'] = 0;
             } else {
                 $api_data['sex'] = -1;
             }
         }
         if ($api_data['name'] != "") {
             es_session::set("api_user_info", $api_data);
         }
         $user_data = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "user where tencent_id = '" . $openid . "' and tencent_id <> ''");
         if ($user_data) {
             es_session::delete("api_user_info");
             $GLOBALS['db']->query("update " . DB_PREFIX . "user set tencent_token = '" . $api_data['token'] . "',tencent_secret = '" . $api_data['secret'] . "',login_ip = '" . get_client_ip() . "',login_time= " . get_gmtime() . ",tencent_url = '" . $api_data['url'] . "' where id =" . $user_data['id']);
             update_user_weibo($user_data['id'], $api_data['url']);
             //更新微博
             es_session::set("user_info", $user_data);
             app_redirect_preview();
         } else {
             if ($GLOBALS['user_info']) {
                 update_user_weibo($GLOBALS['user_info']['id'], $api_data['url']);
                 //更新微博
                 $GLOBALS['db']->query("update " . DB_PREFIX . "user set tencent_id = '" . $openid . "',tencent_token = '" . $api_data['token'] . "',tencent_secret = '" . $api_data['secret'] . "',tencent_url = '" . $api_data['url'] . "' where id =" . intval($GLOBALS['user_info']['id']));
                 app_redirect(url("settings#bind"));
             } else {
                 app_redirect(url("user#api_register"));
             }
         }
     }
 }
开发者ID:xcdxcd,项目名称:zhongchou,代码行数:79,代码来源:Tencent_api.php

示例11: create_user

 public function create_user()
 {
     $s_api_user_info = es_session::get("api_user_info");
     $user_data['user_name'] = $s_api_user_info['name'];
     $user_data['user_pwd'] = md5(rand(100000, 999999));
     $user_data['create_time'] = TIME_UTC;
     $user_data['update_time'] = TIME_UTC;
     $user_data['login_ip'] = get_client_ip();
     $user_data['group_id'] = $GLOBALS['db']->getOne("select id from " . DB_PREFIX . "user_group order by score asc limit 1");
     $user_data['is_effect'] = 1;
     $user_data['alipay_id'] = $s_api_user_info['id'];
     $count = 0;
     do {
         if ($count > 0) {
             $user_data['user_name'] = $user_data['user_name'] . $count;
         }
         if (intval($user_data['alipay_id']) > 0) {
             $GLOBALS['db']->autoExecute(DB_PREFIX . "user", $user_data, "INSERT", '', 'SILENT');
         }
         $rs = $GLOBALS['db']->insert_id();
         $count++;
     } while (intval($rs) == 0 && intval($user_data['alipay_id']) > 0);
     $user_info = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "user where id = " . intval($rs));
     if ($rs > 0) {
         $user_id = $rs;
         $register_money = doubleval(app_conf("USER_REGISTER_MONEY"));
         $register_score = intval(app_conf("USER_REGISTER_SCORE"));
         $register_point = intval(app_conf("USER_REGISTER_POINT"));
         $register_lock_money = intval(app_conf("USER_LOCK_MONEY"));
         if ($register_money > 0 || $register_score > 0 || $register_point > 0 || $register_lock_money > 0) {
             $user_get['score'] = $register_score;
             $user_get['money'] = $register_money;
             $user_get['point'] = $register_point;
             $user_get['reg_lock_money'] = $register_lock_money;
             require_once APP_ROOT_PATH . "system/libs/user.php";
             modify_account($user_get, intval($user_id), "在" . to_date(TIME_UTC) . "注册成功");
         }
     }
     es_session::set("user_info", $user_info);
     es_session::delete("api_user_info");
 }
开发者ID:workplayteam,项目名称:P2P,代码行数:41,代码来源:Alipay_api.php

示例12: add

 public function add()
 {
     $ajax = intval($_REQUEST['ajax']);
     if (!$GLOBALS['user_info']) {
         showErr($GLOBALS['lang']['PLEASE_LOGIN_FIRST'], $ajax);
     }
     if ($_REQUEST['content'] == '') {
         showErr($GLOBALS['lang']['MESSAGE_CONTENT_EMPTY'], $ajax);
     }
     //验证码
     if (app_conf("VERIFY_IMAGE") == 1) {
         $verify = md5(trim($_REQUEST['verify']));
         $session_verify = es_session::get('verify');
         if ($verify != $session_verify) {
             showErr($GLOBALS['lang']['VERIFY_CODE_ERROR'], $ajax);
         }
     }
     es_session::delete("verify");
     if (!check_ipop_limit(get_client_ip(), "message", intval(app_conf("SUBMIT_DELAY")), 0)) {
         showErr($GLOBALS['lang']['MESSAGE_SUBMIT_FAST'], $ajax);
     }
     $rel_table = $_REQUEST['rel_table'];
     //		$message_type = $GLOBALS['db']->getRow("select * from ".DB_PREFIX."message_type where type_name='".$rel_table."' and type_name <> 'supplier'");
     //		if(!$message_type)
     //		{
     //			showErr($GLOBALS['lang']['INVALID_MESSAGE_TYPE'],$ajax);
     //		}
     $message_group = $_REQUEST['message_group'];
     //添加留言
     $message['title'] = $_REQUEST['title'] ? htmlspecialchars(addslashes(valid_str($_REQUEST['title']))) : htmlspecialchars(addslashes(valid_str($_REQUEST['content'])));
     $message['content'] = htmlspecialchars(addslashes(valid_str($_REQUEST['content'])));
     $message['title'] = valid_str($message['title']);
     if ($message_group) {
         $message['title'] = "[" . $message_group . "]:" . $message['title'];
         $message['content'] = "[" . $message_group . "]:" . $message['content'];
     }
     $message['create_time'] = get_gmtime();
     $message['rel_table'] = $rel_table;
     $rel_id = $message['rel_id'] = intval($_REQUEST['rel_id']);
     $message['user_id'] = intval($GLOBALS['user_info']['id']);
     if (isset($_REQUEST['is_effect'])) {
         $message_effect = intval($_REQUEST['is_effect']);
     } else {
         if (app_conf("USER_MESSAGE_AUTO_EFFECT") == 0) {
             $message_effect = 0;
         } else {
             $message_effect = $message_type['is_effect'];
         }
     }
     $message['is_effect'] = $message_effect;
     $message['is_buy'] = intval($_REQUEST['is_buy']);
     $message['contact'] = $_REQUEST['contact'] ? htmlspecialchars(addslashes($_REQUEST['contact'])) : '';
     $message['contact_name'] = $_REQUEST['contact_name'] ? htmlspecialchars(addslashes($_REQUEST['contact_name'])) : '';
     if ($message['is_buy'] == 1) {
         if ($GLOBALS['db']->getOne("select count(*) from " . DB_PREFIX . "deal_order_item as doi left join " . DB_PREFIX . "deal_order as do on doi.order_id = do.id where doi.deal_id = " . intval($message['rel_id']) . " and do.user_id = " . intval($message['user_id']) . " and do.pay_status = 2") == 0) {
             showErr($GLOBALS['lang']['AFTER_BUY_MESSAGE_TIP'], $ajax);
         }
     }
     $message['point'] = intval($_REQUEST['point']);
     $GLOBALS['db']->autoExecute(DB_PREFIX . "message", $message);
     $message_id = $GLOBALS['db']->insert_id();
     if ($message['is_buy'] == 1) {
         $deal_info = $GLOBALS['db']->getRow("select id,is_shop,name,sub_name from " . DB_PREFIX . "deal where id = " . $rel_id);
         if ($deal_info) {
             $attach_list = get_topic_attach_list();
             if ($deal_info['is_shop'] == 0) {
                 $url_route = array('rel_app_index' => 'tuan', 'rel_route' => 'deal', 'rel_param' => 'id=' . $deal_info['id']);
                 $type = "tuancomment";
                 $locations = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "deal_location_link where deal_id = " . intval($deal_info['id']));
                 $dp_title = "对" . $deal_info['sub_name'] . "的消费点评";
                 foreach ($locations as $location) {
                     insert_dp($dp_title, $message['content'], $location['location_id'], $message['point'], $is_buy = 1, $from = "tuan", $url_route, $message_id);
                 }
             }
             if ($deal_info['is_shop'] == 1) {
                 $url_route = array('rel_app_index' => 'shop', 'rel_route' => 'goods', 'rel_param' => 'id=' . $deal_info['id']);
                 $type = "shopcomment";
                 $locations = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "deal_location_link where deal_id = " . intval($deal_info['id']));
                 $dp_title = "对" . $deal_info['sub_name'] . "的消费点评";
                 foreach ($locations as $location) {
                     insert_dp($dp_title, $message['content'], $location['location_id'], $message['point'], $is_buy = 1, $from = "shop", $url_route, $message_id);
                 }
             }
             if ($deal_info['is_shop'] == 2) {
                 $url_route = array('rel_app_index' => 'youhui', 'rel_route' => 'ydetail', 'rel_param' => 'id=' . $deal_info['id']);
                 $type = "youhuicomment";
                 $locations = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "deal_location_link where deal_id = " . intval($deal_info['id']));
                 $dp_title = "对" . $deal_info['sub_name'] . "的消费点评";
                 foreach ($locations as $location) {
                     insert_dp($dp_title, $message['content'], $location['location_id'], $message['point'], $is_buy = 1, $from = "daijin", $url_route, $message_id);
                 }
             }
             increase_user_active(intval($GLOBALS['user_info']['id']), "点评了一个商品");
             $title = "对" . $deal_info['sub_name'] . "发表了点评";
             $tid = insert_topic($message['content'], $title, $type, $group = "", $relay_id = 0, $fav_id = 0, $group_data = "", $attach_list = array(), $url_route);
             if ($tid) {
                 $GLOBALS['db']->query("update " . DB_PREFIX . "topic set source_name = '网站' where id = " . intval($tid));
             }
         }
     }
//.........这里部分代码省略.........
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:101,代码来源:commentModule.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: create_user

 public function create_user()
 {
     $s_api_user_info = es_session::get("api_user_info");
     $user_data['user_name'] = $s_api_user_info['name'];
     $user_data['sina_id'] = $s_api_user_info['id'];
     $user_data['sina_token'] = $s_api_user_info['sina_token'];
     $result = auto_create($user_data, 0);
     if ($result['status']) {
         $user_info = $result['user_data'];
     } else {
         showErr("注册失败");
     }
     es_session::delete("api_user_info");
     return $user_info;
 }
开发者ID:macall,项目名称:jsd,代码行数:15,代码来源:Sina_api.php

示例15: clear_geo

 /**
  * 清除当前地理定位
  */
 public static function clear_geo()
 {
     es_session::delete("current_geo");
 }
开发者ID:macall,项目名称:jsd,代码行数:7,代码来源:city.php


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