Jump to content
php.lv forumi

Kaut kas ar sesiju(laikam)


kalabox

Recommended Posts

Uzliku patesteet vienu lapu un pie logout met aaraa kljuudu

 

Servera kļūda.

 

http://tratra.lv/index.php?m=account_logout izgūšanas laikā vietne konstatēja kļūdu. Iespējams, tam tiek veikti uzturēšanas darbi, vai arī tas ir nepareizi konfigurēts.

----------------------

<?php

$SESSION->logout();

redirect(VIR_PATH);

 

 

?>

Link to comment
Share on other sites

reku logout funkcija

function logout ()
   {
     global $DB;
     global $PREFS;
     call_module_function ('members', 'logout', array ('username' => $this->conf['username']));
     $DB->query ('UPDATE ' . DB_PREFIX . 'members SET lastvisit=\'' . (time () - $PREFS->conf['user_timeout'] * 60) . '\' WHERE member_id=\'' . $this->conf['member_id'] . '\' LIMIT 1');
     setcookie ('sessdata', '', time () - 60, '/');
     $_SESSION['member_id'] = '';
     $_SESSION['member_code'] = '';
     $_SESSION['member_name'] = '';
     unset ($_SESSION[member_id]);
     unset ($_SESSION[member_code]);
     unset ($_SESSION[member_name]);
     unset ($this[conf]);
     session_destroy ();

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...