Example #1
0
File: dl.php Project: noikiy/web
 function chkinput()
 {
     if (strval($this->xym) != $_SESSION["autonum1"]) {
         echo "<script>alert('验证码输入错误!');history.go(-1);</script>";
         exit;
     }
     include_once "conn/conn.php";
     $sql = mysql_query("select usernc from tb_user where usernc='" . $this->usernc . "'", $conn);
     $info = mysql_fetch_array($sql);
     if ($info == false) {
         echo "<script>alert('对不起,不存在该用户!');history.back();</script>";
         exit;
     } else {
         $sql = mysql_query("select usernc from tb_user where usernc='" . $this->usernc . "' and pwd='" . $this->userpwd . "'", $conn);
         $info = mysql_fetch_array($sql);
         if ($info == false) {
             echo "<script>alert('对不起,密码输入错误!');history.back();</script>";
             exit;
         } else {
             //date_default_timezone_set("Asia/Hong_Kong");
             $lastlogintime = date("Y-m-j H:i:s");
             mysql_query("update tb_user set lastlogintime='" . $lastlogintime . "',logintimes=logintimes+1 where usernc='" . $this->usernc . "'", $conn);
             if ($_SESSION["unc"] != "") {
                 session_unregister("unc");
             }
             session_register("unc");
             $_SESSION["unc"] = $this->usernc;
             echo "<script>alert('登录成功!');history.back();</script>";
         }
     }
     mysql_close($conn);
 }
Example #2
0
function logout()
{
    session_unregister("password");
    session_unregister("sessid");
    session_destroy();
    die("Not logged in");
}
Example #3
0
function errorHandler($errno, $errstr, $errfile, $errline)
{
    switch ($errno) {
        case E_USER_NOTICE:
        case E_USER_WARNING:
        case E_WARNING:
        case E_NOTICE:
        case E_CORE_WARNING:
        case E_CORE_NOTICE:
        case E_COMPILE_WARNING:
            break;
        case E_USER_ERROR:
        case E_ERROR:
        case E_PARSE:
        case E_CORE_ERROR:
        case E_COMPILE_ERROR:
            session_start();
            if (session_is_registered("message")) {
                session_unregister("message");
            }
            if (session_is_registered("order_no")) {
                session_unregister("order_no");
            }
            $errorString = "Ride board system error: {$errstr} (# {$errno}).<br>\n" . "Please report the following to the administrator:<br>\n" . "Error in line {$errline} of file {$errfile}.<br>\n";
            // Send the error to the administrator by email
            error_log($errorString, 1, "kuper");
            ?>
        <?php 
            // Stop the system
            die("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n            \"http://www.w3.org/TR/html4/loose.dtd\">\n          <html>\n          <head>\n          <title>Ride Board</title>\n          <link rel=\"stylesheet\" type=\"text/css\" href=\"login.css\">\n          <META HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\">\n          </head>\n          <body>\n          <div id=\"content\">\n          The rideboard database is temporarily unavailable.<br><br>\n          {$errorString}\n          </div>\n          </body>\n          </html>");
        default:
            break;
    }
}
Example #4
0
 function check_input()
 {
     if (strval($this->tb_validate) != $_SESSION["validate1"]) {
         echo "<script>alert('验证码输入错误!');history.go(-1);</script>";
         exit;
     }
     include_once "conn/conn.php";
     $sql = mysql_query("select tb_forum_user from tb_forum_user where tb_forum_type=2 and tb_forum_user='******'", $conn);
     $info = mysql_fetch_array($sql);
     if ($info == false) {
         echo "<script>alert('对不起,不存在该用户!');history.back();</script>";
         exit;
     } else {
         $sql = mysql_query("select tb_forum_user from tb_forum_user where tb_forum_type=2 and tb_forum_user='******' and tb_forum_pass='******'", $conn);
         $info = mysql_fetch_array($sql);
         if ($info == false) {
             echo "<script>alert('对不起,密码输入错误!');history.back();</script>";
             exit;
         } else {
             if ($_SESSION["admin_user"] != "") {
                 session_unregister("admin_user");
             }
             session_register("admin_user");
             $_SESSION["admin_user"] = $this->tb_user;
             echo "<script>alert('登录成功!');window.location.href='index.php';</script>";
         }
     }
     mysql_close($conn);
 }
Example #5
0
 public function testSessionUnregister()
 {
     session_register("TESTES_#3");
     $this->assertTrue(session_is_registered("TESTES_#3"));
     session_unregister("TESTES_#3");
     $this->assertFalse(session_is_registered("TESTES_#3"));
 }
Example #6
0
function kill_session_var($var_name) {
	/* register_global = off: reset local settings cache so the user sees the new settings */
	session_unregister($var_name);

	/* register_global = on: reset local settings cache so the user sees the new settings */
	unset($_SESSION[$var_name]);
}
 function destroy($name)
 {
     if (isset($_SESSION[$name])) {
         session_unregister($name);
         unset($_SESSION[$name]);
     }
 }
/**
 * Session löschen wenn sich der Userabmeldet
 */
function f_abmelden()
{
    session_unregister("userpass");
    //Variablen aus der Session löschen
    session_unregister("username");
    session_destroy();
    //Session verwerfen -sie hat es nie gegeben (Aufräumen)
}
 function s_del($name)
 {
     $new_name = $this->s_var_prefix . $name;
     unset($_SESSION[$new_name]);
     if (ini_get('register_globals')) {
         session_unregister($new_name);
     }
 }
Example #10
0
function doLogout()
{
    if (function_exists('session_unregister')) {
        @session_unregister('clone');
    }
    unset($_SESSION['clone']);
    mosRedirect("index.php?option=com_cloner", "");
}
Example #11
0
 function closeSale()
 {
     //deletes sessions vars
     session_unregister('items_in_sale');
     session_unregister('current_sale_customer_id');
     session_unregister('current_item_search');
     session_unregister('current_customer_search');
 }
 /**
  * Removes a var from the session. Take also care on the global
  * scope.
  *
  * @param string $name The name of the var
  */
 function del($name)
 {
     if (empty($name)) {
         return false;
     }
     session_unregister($name);
     $_SESSION[$name] = NULL;
     return true;
 }
Example #13
0
 /**
  * Unset (delete) a session variable.
  * @param $key string
  */
 function unsetSessionVar($key)
 {
     if (isset($_SESSION[$key])) {
         unset($_SESSION[$key]);
     }
     if (session_is_registered($key)) {
         session_unregister($key);
     }
 }
Example #14
0
function set_session($param_name, $param_value)
{
    global ${$param_name};
    if (session_is_registered($param_name)) {
        session_unregister($param_name);
    }
    ${$param_name} = $param_value;
    session_register($param_name);
}
Example #15
0
function checkLogin()
{
    if (!session_is_registered('admin')) {
        session_unregister('admin');
        header('location: login.php');
    } else {
        header('location: index.php');
    }
}
Example #16
0
function doLogout()
{
    if (isset($_SESSION['plaincart_user_id'])) {
        unset($_SESSION['plaincart_user_id']);
        session_unregister('plaincart_user_id');
    }
    header('Location: login.php');
    exit;
}
Example #17
0
 function process()
 {
     if (is_object($_SESSION['ADMIN_userObject'])) {
         session_unregister('ADMIN_userObject');
         session_unset('ADMIN_userObject');
         session_destroy();
     }
     $this->redirect("Login");
 }
Example #18
0
 function process()
 {
     if (session_is_registered('REGI_userObject')) {
         session_unregister('REGI_userObject');
         session_unset('REGI_userObject');
         session_destroy();
     }
     $this->redirect("Login");
 }
Example #19
0
 public function logout()
 {
     if (isset($_SESSION['userID'])) {
         session_unregister("userID");
     }
     if (isset($_SESSION['isLogin'])) {
         session_unregister("isLogin");
     }
 }
Example #20
0
 /**
  * @desc 验证
  * @param string $vcode
  * @return boolean
  */
 public static function verify($vcode)
 {
     $rs = false;
     if (strtolower($_SESSION[self::$tag]) == strtolower($vcode)) {
         $rs = true;
     }
     session_unregister($_SESSION[self::$tag]);
     return $rs;
 }
 function logoutUser()
 {
     unset($_SESSION['username']);
     unset($_SESSION['password']);
     if (!ini_get('register_globals')) {
         session_unregister('username');
         session_unregister('password');
     }
     return TRUE;
 }
 public function logout()
 {
     try {
         unset($_SESSION["user_login"]);
         session_unregister("user_login");
         header("Location: index.php?rt=index/index");
     } catch (MyException $ex) {
         header("Location: index.php?rt=index/index");
     }
 }
 function removeSessionProcess()
 {
     session_start();
     session_unregister("memberID");
     session_unregister("memberName");
     session_unregister("memberNickName");
     session_unregister("memberEmail");
     session_unregister("memberSex");
     session_unregister("memberLevel");
 }
Example #24
0
function doLogout()
{
    if (isset($_SESSION['user_id']) && $_SESSION['user_name']) {
        unset($_SESSION['user_id']);
        unset($_SESSION['user_name']);
        session_unregister('user_id');
        session_unregister('user_name');
    }
    header('Location: http://iitechnology.in/demo2/admin/login_new.php');
    exit;
}
Example #25
0
 function messageStack()
 {
     global $messageToStack;
     $this->messages = array();
     if (session_is_registered('messageToStack')) {
         for ($i = 0, $n = sizeof($messageToStack); $i < $n; $i++) {
             $this->add($messageToStack[$i]['field'], $messageToStack[$i]['class'], $messageToStack[$i]['text'], $messageToStack[$i]['type']);
         }
         session_unregister('messageToStack');
     }
 }
function doLogout()
{
    if (isset($_SESSION['user_id']) && $_SESSION['user_name']) {
        unset($_SESSION['user_id']);
        unset($_SESSION['user_name']);
        session_unregister('user_id');
        session_unregister('user_name');
    }
    header('Location: http://localhost/html/admin/login_new.php');
    exit;
}
Example #27
0
 public function runModule()
 {
     session_unregister('user_name');
     session_unregister('user_id');
     session_unregister('user_group');
     session_unregister('auth_data');
     setcookie('auth_data', '', 0, '/');
     setcookie('post_password', '', 0, '/');
     header('location: ' . $this->stack['static_var']['siteurl']);
     return NULL;
 }
Example #28
0
function logout()
{
    session_start();
    session_unregister("valid");
    session_unregister("username");
    session_unregister("userid");
    session_unregister("isAdmin");
    $_SESSION = array();
    //destroy all of the session variables
    session_destroy();
    header('Location: index.php');
}
Example #29
0
function exitUser()
{
    session_unregister('username');
    session_unregister('fullname');
    session_unregister('userid');
    session_unregister('user_group');
    //DropCookie('agentid');
    //DropCookie('LoginTime');
    $_SESSION = array();
    session_unset();
    session_destroy();
}
Example #30
0
 public function getData()
 {
     $thumb = new thumbnail();
     $app = JFactory::getApplication();
     $obj_img = new thumbnail_images();
     $this->getzipfilenames();
     $this->install();
     session_unregister("filename");
     session_unregister("zipno");
     $msg = JText::_('COM_REDSHOP_REDSHOP_REMOTLY_UPDATED');
     $app->redirect(JURI::base() . 'index.php?option=com_redshop', $msg);
 }