function perform()
 {
     $chat_room_data =& fetch_mapped_by_url();
     session::destroy('last_message_ids');
     setcookie('chat_room_id', $chat_room_data['object_id'], time() + 365 * 24 * 3600);
     chat_user::enter_chat_room($chat_room_data['object_id']);
     return parent::perform();
 }
Beispiel #2
0
 public function logout()
 {
     session::destroy();
     if (isset($_COOKIE['user'])) {
         setcookie('user', "", 1, "/");
     }
     header('Location: ../index');
     exit;
 }
 function logout()
 {
     session::destroy();
     header('location: ../login');
     /*
      * In Tutorial MVC, the header is
      *      header('location: ' . URL . 'login');
      */
     exit;
 }
Beispiel #4
0
 function logout()
 {
     session::destroy();
     if (session::get("isLoggedIn")) {
         $this->add_sys_msg("There was an error. You may still be logged in.");
     } else {
         $this->add_sys_msg("You have successfully logged out.");
     }
     $this->view->render("index/index");
 }
Beispiel #5
0
 function __construct()
 {
     parent::__construct();
     auth::handleLogin();
     $type = session::get('role');
     if ($type != 'owner') {
         session::destroy();
         header('Location: ' . URL . 'index');
     }
 }
 public function __construct()
 {
     parent::__construct();
     $logged = session::get("isLoggedIn");
     if ($logged == false) {
         session::destroy();
         echo $logged;
         header('location: ' . $this->base_url . '/index/error/You tried to access a page without logging in.');
         echo "fail";
         exit;
     }
     $this->view->js = array(VIEWS_DIR . 'dashboard/js/default.js');
 }
 function perform(&$request, &$response)
 {
     $chat_room_data =& fetch_requested_object();
     session::destroy('last_message_ids');
     setcookie('chat_room_id', $chat_room_data['object_id'], time() + 365 * 24 * 3600);
     if ($chat_user_data = chat_user::get_chat_user_data()) {
         if ($chat_user_data['chat_room_id'] != $chat_room_data['object_id']) {
             chat_system::leave_chat_room($chat_user_data['id'], $chat_user_data['nickname'], $chat_user_data['chat_room_id']);
             chat_system::enter_chat_room($chat_user_data['id'], $chat_user_data['nickname'], $chat_room_data['object_id']);
         }
         $this->view->set('nickname', $chat_user_data['nickname']);
     }
     parent::perform(&$request, &$response);
 }
Beispiel #8
0
 public static function set($type, $key, $value)
 {
     if (DEBUG) {
         $check = self::_get($type);
         if (!empty($check)) {
             self::$messages[$type] = $check;
             if (array_key_exists($key, self::$messages[$type])) {
                 unset(self::$messages[$type][$key]);
             }
             self::$messages[$type][$key] = $value;
         } else {
             self::$messages[$type][$key] = $value;
         }
         session::set("debug", self::$messages);
     } else {
         session::destroy("debug");
     }
 }
 public static function logout()
 {
     return session::destroy();
 }
Beispiel #10
0
 public function logout()
 {
     if (session::item('spy_id')) {
         $oldID = session::item('user_id');
         $this->login(session::item('spy_id'), 0, array());
         session::delete('spy_id');
         router::redirect('cp/users/edit/' . $oldID);
     }
     $authID = session::item('auth_id');
     $userID = session::item('user_id');
     $ipaddress = substr(input::ipaddress(), 0, 15);
     $useragent = substr(input::useragent(), 0, 255);
     $this->deleteSession($authID, $userID, $ipaddress, $useragent);
     // Action hook
     hook::action('users/account/logout', $userID);
     cookie::delete('sessdata');
     session::set('auth_id', 0);
     session::set('user_id', 0);
     session::delete(array('auth_id', 'user_id'));
     session::destroy();
     session::initialize();
     return true;
 }
Beispiel #11
0
 public function pageLogout()
 {
     session::destroy();
     $this->redirect('login');
 }
Beispiel #12
0
 function close($id)
 {
     session::destroy('open' . $id);
 }
Beispiel #13
0
 public static function logout()
 {
     session::destroy();
     $tokenExist = cookie::exists(TOKEN_NAME);
     if ($tokenExist) {
         $token = cookie::get(TOKEN_NAME);
         try {
             $db = new database(DBTYPE, DBHOST, DBNAME, DBUSER, DBPASS);
             $data = $db->select("users_session", "*", "token = '{$token}'", "fetch");
             $agent_id = $data['agent_id'];
             $db->delete("users_session", "token = '{$agent_id}'");
             cookie::delete(TOKEN_NAME);
         } catch (Exception $ex) {
             cookie::delete(TOKEN_NAME);
         }
     }
     redirect::to("login");
 }
Beispiel #14
0
 function logout()
 {
     session::destroy();
     header('location: ' . URL . 'login');
     exit;
 }
 function _session_destroy()
 {
     session::destroy('chat_user_id');
     session::destroy('chat_user_data');
 }
Beispiel #16
0
 function logout()
 {
     session::destroy("user");
 }
Beispiel #17
0
<?php

require_once dirname(__FILE__) . '/../../config/configuracao.php';
require_once $BASE_DIR . 'core/login/session.php';
// Inicia a sessao
$sessao = new session($param_conn);
$sessao->destroy();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title> - Sistema Acad&ecirc;mico</title>
        <link href="../../public/images/favicon.ico" rel="shortcut icon" />
        <link href="../../public/styles/style.css" rel="stylesheet" type="text/css" />
        <style>
            #alert_login{
                font-family:verdana,arial;
                font-size:14;
                font-weight:bold;
                color: red;
                position:absolute;
                top: 50%;
                left: 50%;
                margin-left:-170px;
                margin-top:-120px;
                width:300px;
                height:180px;
                z-index:1;
                background-color:#FFF6D5;
                padding: 4px;
Beispiel #18
0
 public function logout()
 {
     session::destroy();
     header("Location:" . SITE_URL . "/Login");
 }
Beispiel #19
0
 /**
  * session sınıfı kullanımı
  * http://cms.dev/session
  */
 public function session()
 {
     session::set('message', 'merhaba');
     session::pull('message');
     echo session::get('message');
     print_r(session::display());
     session::destroy();
 }
 function logout()
 {
     $this->_delete_cookie();
     session::destroy('phpbb_sid');
     return true;
 }
Beispiel #21
0
 public function logout()
 {
     session::destroy();
     $this->load->view("Entry/loginForm");
 }
Beispiel #22
0
function hide()
{
    session::destroy("show");
}
Beispiel #23
0
 /**
  * =========================================================
  * Logs user out.
  * =========================================================
  **/
 public static function logout()
 {
     session::destroy("username");
     session::destroy('loggedPages');
 }
Beispiel #24
0
session::start();
if (isset($_REQUEST['signout']) && $_REQUEST['signout']) {
    if (session::global_is_set('connected')) {
        $config = session::global_get('config');
        if ($config->get_cfg_value('casActivated') == 'TRUE') {
            require_once 'CAS.php';
            /* Move CAS autoload before FD autoload */
            spl_autoload_unregister('CAS_autoload');
            spl_autoload_register('CAS_autoload', TRUE, TRUE);
            phpCAS::client(CAS_VERSION_2_0, $config->get_cfg_value('casHost', 'localhost'), (int) $config->get_cfg_value('casPort', 443), $config->get_cfg_value('casContext', ''));
            // Set the CA certificate that is the issuer of the cert
            phpCAS::setCasServerCACert($config->get_cfg_value('casServerCaCertPath'));
            phpCas::logout();
        }
    }
    session::destroy();
    session::start();
}
/* Reset errors */
session::set('errors', '');
session::set('errorsAlreadyPosted', '');
session::set('LastError', '');
/* Check if we need to run setup */
if (!file_exists(CONFIG_DIR . '/' . CONFIG_FILE)) {
    header('location:setup.php');
    exit;
}
/* Check if fusiondirectory.conf (.CONFIG_FILE) is accessible */
if (!is_readable(CONFIG_DIR . '/' . CONFIG_FILE)) {
    msg_dialog::display(_('Configuration error'), sprintf(_('FusionDirectory configuration %s/%s is not readable. Please run fusiondirectory-setup --check-config to fix this.'), CONFIG_DIR, CONFIG_FILE), FATAL_ERROR_DIALOG);
    exit;
Beispiel #25
0
 function insert($_arg, $mandatory)
 {
     $errorArray = array();
     if ($_arg[action] == "insert" or $_arg[action] == "update") {
         session::destroy(searchshow);
         $action = $_arg[action];
         $ok = TRUE;
         // set error default ok
         //-----------------------------------------------------------------------------
         // insert
         if ($_arg[action] == "insert") {
             //-----------------------------------------------------------------------------
             // check for existing name entry
             $tempArray = search::get("{$_arg['name']}", "exact");
             if (is_array($tempArray)) {
                 $ok = FALSE;
                 $errorArray[name] = "exist";
             } else {
                 // check for alike name entry
                 $tempArray = search::get("{$_arg['name']}%", "start");
                 if (is_array($tempArray)) {
                     //            $ok = FALSE;
                     $errorArray[name] = "alike";
                 }
             }
         }
         // check mandatory fields
         foreach ($mandatory as $check) {
             if (!$_arg[$check] != "") {
                 $ok = FALSE;
                 $errorArray[$check] = "error";
             }
         }
         //echoalert($errorArray);
         // mandatory fields ok -> create sql-string out of data
         if ($ok) {
             //echoalert($_GET);
             //-----------------------------------------------------------------------------
             // reset parameters for next entry
             unset($_GET[name]);
             // delete name, sysnonym and comment
             unset($_GET[comment]);
             unset($_arg[action]);
             // remove action comment from $_arg
             $errorArray = false;
             // combine parameters
             $queryArray = array();
             while ($entry = each($_arg)) {
                 switch ($entry[key]) {
                     case parent:
                         $parent = $entry[value];
                         // filter parent
                         break;
                     case id:
                         $child = $entry[value];
                         // filter ID
                         break;
                     case type:
                         $type = $entry[value];
                         // filter type
                         break;
                     case PHPSESSID:
                         // filter SSID
                         break;
                     case orderdefault:
                         system::setval("val_orderdefault", $entry[value]);
                         break;
                     default:
                         array_push($queryArray, $entry[key] . "='" . $entry[value] . "'");
                         break;
                 }
             }
             $insertString = implode(",", $queryArray);
             // add sql-clauses
             switch ($action) {
                 // query for entry insert
                 case insert:
                     $_GET[action] = "add";
                     // set for next entry
                     $insertString .= ",owner='" . user::id() . "'";
                     $queryString = "INSERT INTO entry SET {$insertString}";
                     // = "INSERT entry
                     //echoalert($queryString);
                     if (database::query($queryString)) {
                         // query for parent insert
                         $child = mysql_insert_id();
                         $parentString = "INSERT INTO parent SET child='{$child}',parent='{$parent}',type='{$type}',owner='{$user}'";
                         database::query($parentString);
                     }
                     break;
                     // query for entry update
                 // query for entry update
                 case update:
                     $queryString = "UPDATE entry SET {$insertString} WHERE ID='" . $_arg[id] . "';";
                     // = "UPDATE entry
                     database::query($queryString);
                     break;
             }
         }
         return $errorArray;
     }
 }