/** * завершает сессию пользователя */ public function action_logout() { session::delete('uid'); setcookie('uid', '', time() - 360000, '/'); setcookie('username', '', time() + 60 * 60 * 24 * 30, '/'); $this->_actions_data['_ok'] = 1; }
function oauth_logout() { unset($_SESSION["state"]); unset($_SESSION["URI"]); $session = new session(); $session->delete('oauth_data'); }
function logout() { global $CONF, $LNG, $TMPL; require_once "{$CONF['path']}/sources/misc/session.php"; $session = new session(); $session->delete($_COOKIE['atsphp_sid_user_cp']); $TMPL['content'] = $LNG['user_cp_logout_message']; }
public static function check($token) { $tokenName = TOKEN_NAME; if (session::exist($tokenName) && $token === session::get($tokenName)) { session::delete($tokenName); return TRUE; } return FALSE; }
public static function check($token) { $tokenName = config::get('session/token_name'); if (session::exists($tokenName) && $token === session::get($tokenName)) { session::delete($tokenName); return true; } return false; }
function checkPass($chave) { session::delete('id_user'); if (!Access::where('accesskey', $chave)->exists()) { return true; } else { $a = Access::where('accesskey', $chave)->get(); session::set('id_user', $a[0]->id_user); return false; } }
function check($username) { global $CONF, $FORM; require_once "{$CONF['path']}/sources/misc/session.php"; $session = new session(); list($type, $data) = $session->get($FORM['sid']); $session->delete($FORM['sid']); if ($type == 'gateway' && $data == $username) { return 1; } else { return 0; } }
public function saveSetting($plugin, $keyword, $value, $orderID = false) { $data = array('val' => $value); if ($orderID !== false) { $data['order_id'] = $orderID; } $retval = $this->db->update('core_config', $data, array('plugin' => $plugin, 'keyword' => $keyword), 1); if ($retval) { // Action hook hook::action('system/settings/update', $plugin, $keyword, $value, $orderID); } session::delete('', 'config'); $this->cache->cleanup(); return $retval; }
function new_password() { global $CONF, $DB, $FORM, $LNG, $TMPL; require_once "{$CONF['path']}/sources/misc/session.php"; $session = new session(); list($type, $data) = $session->get($FORM['sid']); $TMPL['username'] = $DB->escape($data); $password = md5($FORM['password']); if ($type == 'lost_pw') { $session->delete($FORM['sid']); $DB->query("UPDATE {$CONF['sql_prefix']}_sites SET password = '******' WHERE username = '******'username']}'", __FILE__, __LINE__); $TMPL['content'] = $this->do_skin('lost_pw_finish_2'); } else { $this->error($LNG['g_session_expired']); } }
public static function delete($id) { session::delete("capcha_{$id}"); }
function check_input($type) { global $CONF, $DB, $FORM, $LNG, $TMPL; $error_username = 0; $error_username_duplicate = 0; $error_password = 0; $error_confirm_password = 0; $error_url = 0; $error_email = 0; $error_title = 0; $error_banner_url = 0; $error_captcha = 0; $error_security_question = 0; // Filter the URL using a regex I found here: http://www.manamplified.org/archives/000318.html preg_match('/[A-Za-z][A-Za-z0-9+.-]{1,120}:[A-Za-z0-9\\/](([A-Za-z0-9$_.+!*,;\\/?:@&~=-])|%[A-Fa-f0-9]{2}){1,333}(#([a-zA-Z0-9][a-zA-Z0-9$_.+!*,;\\/?:@&~=%-]{0,1000}))?/', $TMPL['url'], $matches); $TMPL['url'] = isset($matches[0]) ? $matches[0] : $TMPL['url']; preg_match('/[A-Za-z][A-Za-z0-9+.-]{1,120}:[A-Za-z0-9\\/](([A-Za-z0-9$_.+!*,;\\/?:@&~=-])|%[A-Fa-f0-9]{2}){1,333}(#([a-zA-Z0-9][a-zA-Z0-9$_.+!*,;\\/?:@&~=%-]{0,1000}))?/', $TMPL['banner_url'], $matches); $TMPL['banner_url'] = isset($matches[0]) ? $matches[0] : $TMPL['banner_url']; if ($type == 'join') { if (!preg_match('/^[a-zA-Z0-9\\-_]+$/', $FORM['u'])) { $error_username = 1; } list($username_sql) = $DB->fetch("SELECT username FROM {$CONF['sql_prefix']}_sites WHERE username = '******'username']}'", __FILE__, __LINE__); if ($username_sql && $username_sql == $TMPL['username']) { $error_username_duplicate = 1; } if (!$FORM['password']) { $error_password = 1; } if ($FORM['password'] != $FORM['confirm_password']) { $error_confirm_password = 1; } if ($CONF['captcha']) { $ip = $DB->escape($_SERVER['REMOTE_ADDR'], 1); list($sid) = $DB->fetch("SELECT sid FROM {$CONF['sql_prefix']}_sessions WHERE type = 'captcha' AND data LIKE '{$ip}|%'", __FILE__, __LINE__); require_once "{$CONF['path']}/sources/misc/session.php"; $session = new session(); list($type, $data) = $session->get($sid); list($ip, $hash) = explode('|', $data); if (!isset($FORM['captcha']) || $hash != sha1(')F*RJ@FHR^%X' . $FORM['captcha'] . '(*Ht3h7f9&^F' . $ip)) { $error_captcha = 1; } $session->delete($sid); } if ($CONF['security_question'] && $CONF['security_answer']) { if ($FORM['security_answer'] != $CONF['security_answer']) { $error_security_question = 1; } } } if (!preg_match('/^https?:\\/\\/.+/', $TMPL['url'])) { $error_url = 1; } if (!preg_match('/^([a-zA-Z0-9])+([a-zA-Z0-9._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9._-]+)+$/', $TMPL['email'])) { $error_email = 1; } if (!$TMPL['title']) { $error_title = 1; } if (!preg_match('/^https?:\\/\\/.+/', $TMPL['banner_url'])) { $TMPL['banner_url'] = $CONF['default_banner']; } elseif ($CONF['max_banner_width'] && $CONF['max_banner_height'] && ini_get('allow_url_fopen')) { $size = getimagesize($FORM['banner_url']); if ($size[0] > $CONF['max_banner_width'] || $size[1] > $CONF['max_banner_height']) { $error_banner_url = 1; } if (!isset($size[0]) && !isset($size[1])) { $error_banner_url = 1; } } $good_cat = 0; foreach ($CONF['categories'] as $cat => $skin) { if ($TMPL['category'] == $cat) { $good_cat = 1; } } if (!$good_cat) { $TMPL['category'] = $cat; } if ($error_username || $error_username_duplicate || $error_password || $error_confirm_password || $error_url || $error_email || $error_title || $error_banner_url || $error_captcha || $error_security_question) { if ($error_username) { $TMPL['error_username'] = "******"; $TMPL['error_style_username'] = '******'; } if ($error_username_duplicate) { $TMPL['error_username'] = "******"; $TMPL['error_style_username'] = '******'; } $TMPL['error_password'] = "******"; $TMPL['error_style_password'] = '******'; if ($error_confirm_password) { $TMPL['error_password'] = "******"; } if ($error_url) { $TMPL['error_url'] .= "<br />{$LNG['join_error_url']}"; $TMPL['error_style_url'] = 'join_edit_error'; } if ($error_email) { $TMPL['error_email'] .= "<br />{$LNG['join_error_email']}"; $TMPL['error_style_email'] = 'join_edit_error'; } if ($error_title) { $TMPL['error_title'] .= "<br />{$LNG['join_error_title']}"; $TMPL['error_style_title'] = 'join_edit_error'; } if ($error_banner_url) { $TMPL['error_banner_url'] .= "<br />{$LNG['join_error_urlbanner']}"; $TMPL['error_style_banner_url'] = 'join_edit_error'; } $TMPL['error_style_captcha'] = 'join_edit_error'; if ($error_captcha) { $TMPL['error_captcha'] .= "<br />{$LNG['join_error_captcha']}"; } if ($error_security_question) { $TMPL['error_style_question'] = 'join_edit_error'; $TMPL['error_question'] .= "<br />{$LNG['join_error_question']}"; } $TMPL['error_style_top'] = 'join_edit_error'; $TMPL['error_top'] = $LNG['join_error_top']; return 0; } else { return 1; } }
function session_delete($name) { return session::delete($name); }
public function uninstall($templateID, $template) { // Delete template $retval = $this->db->delete('core_templates', array('template_id' => $templateID), 1); if ($retval) { // Update users with the new system template ID $this->db->update('users', array('template_id' => config::item('template_id', 'system')), array('template_id' => $templateID)); if ($templateID == session::item('template_id')) { session::delete('', 'config'); } // Action hook hook::action('system/templates/uninstall', $templateID, $template); $this->cache->cleanup(); } return $retval; }
public function logout() { $this->_database->delete('User_session', array('UserID', '=', $this->data()->UserID)); session::delete($this->_sessionName); cookie::delete($this->_cookieName); }
public function logout() { $this->_db->delete('users_session', array('user_id', '=', $this->data()->id)); session::delete($this->_sessionName); cookie::delete($this->_cookieName); }
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; }
public function uninstall($languageID, $language) { // Delete language $retval = $this->db->delete('core_languages', array('language_id' => $languageID), 1); if ($retval) { // Update users with the new system language ID $this->db->update('users', array('language_id' => config::item('language_id', 'system')), array('language_id' => $languageID)); // Load dbforge library loader::library('dbforge'); // Languages $this->dbforge->dropColumns(':prefix:core_languages_data', array('value_' . $language['keyword'])); // Email templates $this->dbforge->dropColumns(':prefix:core_email_templates', array('subject_' . $language['keyword'])); $this->dbforge->dropColumns(':prefix:core_email_templates', array('message_html_' . $language['keyword'])); $this->dbforge->dropColumns(':prefix:core_email_templates', array('message_text_' . $language['keyword'])); // Meta tags $this->dbforge->dropColumns(':prefix:core_meta_tags', array('meta_title_' . $language['keyword'])); $this->dbforge->dropColumns(':prefix:core_meta_tags', array('meta_description_' . $language['keyword'])); $this->dbforge->dropColumns(':prefix:core_meta_tags', array('meta_keywords_' . $language['keyword'])); // Custom fields $this->dbforge->dropColumns(':prefix:core_fields', array('name_' . $language['keyword'])); $this->dbforge->dropColumns(':prefix:core_fields', array('sname_' . $language['keyword'])); $this->dbforge->dropColumns(':prefix:core_fields', array('vname_' . $language['keyword'])); $this->dbforge->dropColumns(':prefix:core_fields', array('validate_error_' . $language['keyword'])); $this->dbforge->dropColumns(':prefix:core_fields_items', array('name_' . $language['keyword'])); $this->dbforge->dropColumns(':prefix:core_fields_items', array('sname_' . $language['keyword'])); // Geo data foreach (array('countries', 'states', 'cities') as $table) { $this->dbforge->dropColumns(':prefix:geo_' . $table, array('name_' . $language['keyword'])); } // Report subjects $this->dbforge->dropColumns(':prefix:reports_subjects', array('name_' . $language['keyword'])); if ($languageID == session::item('language_id')) { session::set('language', config::item('language_id', 'system')); session::delete('', 'config'); } // Action hook hook::action('system/languages/uninstall', $languageID, $language['keyword']); $this->cache->cleanup(); } return $retval; }
protected function _createUser() { // Verify email and username one more time if (!$this->_is_unique_email(session::item('account', 'signup', 'email'))) { view::setError(__('email_duplicate', 'users_signup')); router::redirect('users/signup'); } elseif (config::item('user_username', 'users') && !$this->_is_valid_username(session::item('account', 'signup', 'username'))) { view::setError(__('duplicate_username', 'users_signup')); router::redirect('users/signup'); } // Get user data $user = array('email' => session::item('account', 'signup', 'email'), 'password' => session::item('account', 'signup', 'password') ? session::item('account', 'signup', 'password') : '', 'username' => session::item('account', 'signup', 'username'), 'type_id' => count(config::item('usertypes', 'core', 'names')) > 1 ? session::item('account', 'signup', 'type_id') : config::item('type_default_id', 'users'), 'group_id' => config::item('group_default_id', 'users'), 'verified' => config::item('signup_email_verify', 'users') && !session::item('connection', 'remote_connect') ? 0 : 1, 'active' => config::item('signup_admin_verify', 'users') ? 0 : 1, 'picture_id' => session::item('picture', 'signup', 'file_id') ? session::item('picture', 'signup', 'file_id') : 0, 'picture_active' => session::item('picture', 'signup', 'file_id') ? config::item('signup_picture_verify', 'users') ? 9 : 1 : 0, 'picture_date' => date_helper::now()); // Set names $user['name1'] = session::item('profile', 'signup', 'data_' . config::item('usertypes', 'core', 'fields', $user['type_id'], 1)); $user['name2'] = session::item('profile', 'signup', 'data_' . config::item('usertypes', 'core', 'fields', $user['type_id'], 2)); $user['name1'] = $user['name1'] ? $user['name1'] : ''; $user['name2'] = $user['name2'] ? $user['name2'] : ''; // Get fields $fields = $this->fields_model->getFields('users', $user['type_id'], 'edit', 'in_signup'); // Save user $userID = $this->users_model->saveUser(0, $user); // Save profile if (session::item('profile', 'signup')) { $this->users_model->saveProfile($userID, $user['type_id'], session::item('profile', 'signup'), $fields, array(), true); } // Did user upload a picture? if (session::item('picture', 'signup', 'file_id')) { // Update file's user ID $this->storage_model->updateUserID(session::item('picture', 'signup', 'file_id'), $userID, 5); } // Are we signing up using a third party site? $remoteconn = false; if (session::item('connection', 'remote_connect')) { $remoteconn = true; loader::library('authentication/' . session::item('connection', 'remote_connect', 'name')); $this->{session::item('connection', 'remote_connect', 'name')}->saveToken($userID); // Remove temporary session values session::delete('', 'remote_connect'); } // Remove temporary session values session::delete('', 'signup'); // Do we need to verify email address? if (config::item('signup_email_verify', 'users') && !$remoteconn) { // Get user data if (!($user = $this->users_model->getUser($userID))) { validate::setFieldError('email', __('email_invalid', 'users_signup')); return false; } // Save signup request $hash = $this->requests_model->saveRequest('signup', $userID); $user['security_hash'] = $hash; $user['activation_link'] = config::siteURL('users/signup/confirm/' . $userID . '/' . $hash); // Send activation email $this->email->sendTemplate('users_account_confirm', $user['email'], $user, $user['language_id']); // Success view::setInfo(__('confirm_email', 'users_signup')); router::redirect('users/login/index/verify'); } elseif (config::item('signup_admin_verify', 'users')) { // Success view::setInfo(__('confirm_user', 'users_signup')); router::redirect('users/login/index/approve'); } else { // Do we need to send welcome email? if (config::item('signup_email_welcome', 'users')) { // Get user data if (!($user = $this->users_model->getUser($userID))) { validate::setFieldError('email', __('email_invalid', 'users_signup')); return false; } // Send welcome email $this->email->sendTemplate('users_account_welcome', $user['email'], $user, $user['language_id']); } // Login user // $this->users_model->login($userID); // Success view::setInfo(__('user_registered', 'users_signup')); view::load('users/signup/registration_finish'); // router::redirect(session::item('slug')); } }
public function uninstall($pluginID, $plugin) { // Does installation class exist? if ($class = $this->getSetupClass($plugin['keyword'], $plugin)) { if (method_exists($class, 'uninstall')) { if ($class->uninstall()) { $this->runInstallFunctions($class, 'uninstall'); } } else { view::setError(__('no_class_method', 'system_plugins', array('%method' => 'Uninstall'))); return false; } } else { view::setError(__('no_class', 'system_plugins')); return false; } // Delete plugin $retval = $this->db->delete('core_plugins', array('plugin_id' => $pluginID), 1); if ($retval) { // Action hook hook::action('system/plugins/uninstall', $pluginID, $plugin); } session::delete('', 'config'); session::set('group_id', 0, 'permissions_system'); $this->cache->cleanup(); return $retval; }
/** * Log a user out and remove any auto-login cookies. * * @param boolean completely destroy the session * @return boolean */ public function logout($destroy) { if (cookie::get('authautologin')) { // Delete the autologin cookie to prevent re-login cookie::delete('authautologin'); } if (session::get('riverid')) { // Delete the riverid object in case it's set session::delete('riverid'); } return parent::logout($destroy); }
public function delete() { session::delete('name'); }
public function logout() { $this->_db->delete('User_Sessions', array('User_Id', '=', $this->data()->Id)); session::delete($this->_sessionName); cookie::delete($this->_cookieName); }
public function savePermissions($groupID, $plugin, $permissions, $orderID = array()) { // Loop through permissions groups foreach ($permissions as $keyword => $value) { $data = array('group_' . $groupID => $value); if ($orderID && isset($orderID[$keyword])) { $data['order_id'] = $orderID[$keyword]; } // Update permissions $this->db->update('users_permissions', $data, array('plugin' => $plugin, 'keyword' => $keyword), 1); } // Action hook hook::action('users/permissions/update', $groupID, $plugin, $permissions); if ($groupID == session::item('group_id')) { session::delete('group_id', 'permissions_system'); } $this->cache->cleanup(); return $groupID; }
public function saveProfile($userID, $typeID, $profileOld, $fields, $extra = array(), $static = false) { $type = config::item('usertypes', 'core', 'keywords', $typeID); // Save user profile $userID = $this->fields_model->saveValues('profile', $userID, $profileOld, $fields, $extra, $static, '', $type); // Update name1/name2 $names = array(); foreach (array(1, 2) as $index) { if ($static && isset($profileOld['data_' . config::item('usertypes', 'core', 'fields', $typeID, $index)]) && $profileOld['data_' . config::item('usertypes', 'core', 'fields', $typeID, $index)]) { $names['name' . $index] = $profileOld['data_' . config::item('usertypes', 'core', 'fields', $typeID, $index)]; } elseif (!$static && input::post('data_' . config::item('usertypes', 'core', 'fields', $typeID, $index))) { $names['name' . $index] = $static ? $profileOld['data_' . config::item('usertypes', 'core', 'fields', $typeID, $index)] : input::post('data_' . config::item('usertypes', 'core', 'fields', $typeID, $index)); } } if ($names) { $this->saveUser($userID, $names); } // Clean up profile session session::delete('profile_id'); return $userID; }
/** * Deconnecte l'utilisateur */ public function disconnect() { $this->session->delete('auth'); header('Location: ' . $this->dir . '/home'); exit; }
function oauth_logout() { $session = new session(); $session->delete('oauth_data'); }
function action($_arg) { //------------------------------------------------------------------------------ // extrace action from coordinate system while ($entry = each($_arg)) { $argArray = explode("_", $entry[key]); if (count($argArray) > 1) { $indexString = $argArray[0]; $valueString = $argArray[1]; $_arg[$indexString] = $valueString; if (isset($argArray[2])) { $_arg['_ID'] = $argArray[2]; } } } //echoalert($_arg); //echoalert($_SESSION); //------------------------------------------------------------------------------ // parse reset value if ($_arg[reset]) { $_arg = array(); session::destroy(searchshow); session::destroy(show); session::destroy(search); session::destroy(searchtype); session::destroy(searchcom); session::destroy(searchorder); session::destroy(searchString); session::destroy(searchexact); session::destroy(searchstart); session::destroy(searchowner); session::destroy(searchentrytype); session::destroy(searchstatus); } //------------------------------------------------------------------------------ // parse action parameter switch ($_arg[action]) { //------------------------------------------------------------------------------ // login / out case login: // login user user::login($_arg[user], $_arg[password]); // restore program status if new session restore_status(); // reset linking session::destroy("linkaction"); session::destroy("link"); break; case logout: // logout user user::logout(); break; case changedo: // change password if ($password = $_GET[password]) { database::query("UPDATE user SET password='******' WHERE ID='" . session::get("user") . "'"); echojavascript("Passwort erfolgreich geändert"); } break; //------------------------------------------------------------------------------ // inherit entrytype to children //------------------------------------------------------------------------------ // inherit entrytype to children case inherit: $childArray = thesaurus::get_child($_arg[id]); foreach ($childArray as $entry) { database::query("UPDATE entry SET entrytype={$_arg['entrytype']} WHERE ID={$entry}"); } break; //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ case update: if ($_arg[orderdefault]) { session::set(orderdefault, $_arg[id]); } elseif (isset($_arg[orderdefault])) { session::destroy(orderdefault); } break; //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ case edit: session::set("edit", TRUE); session::set("show", $_arg[id]); session::destroy("searchshow"); break; case noedit: session::destroy("edit"); break; //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ case open: session::open($_arg[id]); break; case close: session::close($_arg[id]); break; case closeall: session::close_all(); break; //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ case deleteid: end_link(); hide(); database::delete($_arg[id]); break; //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ case suchen: if (!$_arg[searchString] and ($_arg[searchowner] or $_arg[searchtype] or $_arg[searchstatus])) { $_arg[searchString] = "%"; } if ($_arg[searchString]) { session::set("searchshow", true); } // show search result session::set("search", $_arg[searchString]); session::set("searchcom", $_arg[searchcom]); session::set("searchorder", $_arg[searchorder]); session::set("searchentrytype", $_arg[searchentrytype]); session::set("searchstatus", $_arg[searchstatus]); if ($_arg[searchowner]) { session::set("searchowner", $_arg[searchowner]); } else { session::destroy("searchowner"); } switch ($_arg[searchtype]) { case 0: session::destroy("searchexact"); session::destroy("searchstart"); break; case 1: session::destroy("searchexact"); session::set("searchstart", TRUE); break; case 2: session::destroy("searchstart"); session::set("searchexact", TRUE); break; } break; case hidesearch: session::destroy(searchshow); break; //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ case show: session::destroy("searchshow"); $_arg[linkaction] = ""; if ($_arg[id] == NULL) { break; } elseif ($_arg[id] > 0) { session::set("show", $_arg[id]); break; } else { session::delete("show"); break; } break; //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ case swap: if ($_arg[id]) { thesaurus::swap_link($_arg[id], $_arg[_ID]); } break; case change: if ($_arg[id]) { // thesaurus::change_link($_arg); } break; case add: // add new descriptor session::destroy("show"); session::destroy("searchshow"); // session::set("",1); break; // clean database // clean database case correct: thesaurus::validate(true); echoalert("Datenbank bereinigt"); break; //------------------------------------------------------------------------------ // open hyrarchy down to selected entry //------------------------------------------------------------------------------ // open hyrarchy down to selected entry case showhyrarchy: if ($_arg[id]) { $hyrarchyArray = thesaurus::get_hyrarchy($_arg[id]); // don't open selected entry // array_pop($hyrarchyArray); foreach ($hyrarchyArray as $entry) { // echo $entry . " "; echo session::open($entry); } session::set("hyrarchy", TRUE); // hide search window session::destroy("searchshow"); // if nothing selected for display, show ID if (!session::get(show)) { session::set("show", $_arg[id]); } break; } //------------------------------------------------------------------------------ // debug on/off //------------------------------------------------------------------------------ // debug on/off case debugon: system::setval(debug, TRUE); break; case debugoff: system::setval(debug, FALSE); // legend on/off // legend on/off case legendon: session::set("legend", TRUE); break; case legendoff: session::destroy("legend"); break; // display / hide non descriptors // display / hide non descriptors case toggleND: if (session::get("descriptor")) { session::destroy("descriptor"); } else { session::set("descriptor", TRUE); } break; // display / hide orders // display / hide orders case toggleVI: if (session::get("visible")) { session::destroy("visible"); } else { session::set("visible", TRUE); } break; // toggle tooltips on/off // toggle tooltips on/off case off: session::set("tooltips", TRUE); break; case on: session::destroy("tooltips"); break; // toggle hyrarchy // toggle hyrarchy case hyrarchyon: session::set("hyrarchy", TRUE); break; case hyrarchyoff: session::set("hyrarchy", FALSE); break; } //------------------------------------------------------------------------------ // parse linkaction parameter switch ($_arg[linkaction]) { // link case link: session::set("link", $_arg[id]); session::set("linkaction", $_arg[linkaction]); session::set("linktype", $_arg[linktype]); break; // execute linking // execute linking case linkdo: switch (session::get('linkaction')) { case link: database::parent_insert(session::get("link"), $_arg[id], session::get("linktype")); session::set("show", session::get("link")); // set display to linked objects // with BS set linked descriptor to "no descriptor" if (session::get("linktype") == 2) { database::set_desc($_arg[id], 0); } // session::destroy("link"); // end linking break; case change: database::link_change(session::get('linkparent'), session::get('link'), $_arg['id']); // parent,oldlink,newlink break; } break; case linkend: end_link(); break; // unlink // unlink case unlink: if ($_arg[id]) { database::parent_delete(session::get("show"), $_arg[id]); } break; // change OB // change OB case change: if ($_arg[id]) { session::set("link", $_arg[id]); session::set("linkaction", $_arg[linkaction]); session::set("linkparent", $_arg[_ID]); session::set("linktype", $_arg[linktype]); } break; } // TEMP SETTINGS // if not link rights, set descriptor and visible to true if (!right::link()) { session::set(descriptor, FALSE); } //if (!right::link()) session::set(visible,TRUE); // save program status save_status($_SESSION); }
public static function logout() { session::delete('user_email'); session::delete('user_password'); self::$_valid = FALSE; }