Project

General

Profile

« Previous | Next » 

Revision 107

Added by stefan about 19 years ago

Corrected session code.

View differences:

trunk/wb/admin/logout/index.php
1 1
<?php
2 2

  
3
// $Id: index.php,v 1.2 2005/04/01 07:52:57 rdjurovich Exp $
3
// $Id$
4 4

  
5 5
/*
6 6

  
......
29 29
	setcookie('REMEMBER_KEY', '', time()+60*60*24*30, '/');
30 30
}
31 31

  
32
// Start a session
33
if(!defined('SESSION_STARTED')) {
34
	session_name(APP_NAME.'_session_id');
35
	session_start();
36
	define('SESSION_STARTED', true);
37
}
38

  
39 32
$_SESSION['USER_ID'] = null;
40 33
$_SESSION['GROUP_ID'] = null;
41 34
$_SESSION['USERNAME'] = null;
trunk/wb/framework/initialize.php
31 31
	// Create database class
32 32
	$database = new database();
33 33
	
34
	// Start a session
35
	if(!defined('SESSION_STARTED')) {
36
		session_name(APP_NAME.'_session_id');
37
		session_start();
38
		define('SESSION_STARTED', true);
39
	}
40
	
41 34
	set_magic_quotes_runtime(0);
42 35
	
43 36
	// Get website settings (title, keywords, description, header, and footer)
......
57 50
	$string_dir_mode = STRING_DIR_MODE;
58 51
	define('OCTAL_DIR_MODE',(int) $string_dir_mode);
59 52
	
53
	// Start a session
54
	if(!defined('SESSION_STARTED')) {
55
		session_name(APP_NAME.'_session_id');
56
		session_start();
57
		define('SESSION_STARTED', true);
58
	}
59
	
60 60
	// Get users language
61 61
	if(isset($_GET['lang']) AND $_GET['lang'] != '' AND !is_numeric($_GET['lang']) AND strlen($_GET['lang']) == 2) {
62 62
	  	define('LANGUAGE', strtoupper($_GET['lang']));

Also available in: Unified diff