示例#1
0
 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());
         }
     }
 }
示例#2
0
 public function loginout()
 {
     require_once APP_ROOT_PATH . "system/libs/user.php";
     $result = loginout_user();
     if ($result['status']) {
         $s_user_info = es_session::get("user_info");
         es_cookie::delete("user_name");
         es_cookie::delete("user_pwd");
         $GLOBALS['tmpl']->assign('integrate_result', $result['msg']);
         $before_loginout = $_SERVER['HTTP_REFERER'] ? $_SERVER['HTTP_REFERER'] : url("index");
         if (trim(app_conf("INTEGRATE_CODE")) == '') {
             app_redirect($before_loginout);
         } else {
             showSuccess($GLOBALS['lang']['LOGINOUT_SUCCESS'], 0, $before_loginout);
         }
     } else {
         app_redirect(url("index"));
     }
 }
示例#3
0
 public function loginout()
 {
     require_once APP_ROOT_PATH . "system/model/user.php";
     $result = loginout_user();
     es_cookie::delete("user_name");
     es_cookie::delete("user_pwd");
     $jump = get_gopreview();
     if ($result['msg']) {
         app_redirect($jump, 0, $result['msg']);
     } else {
         app_redirect($jump);
     }
 }