Project

General

Profile

« Previous | Next » 

Revision 16

Added by stefan about 19 years ago

Reduced redundant initialization code, removed further 'CVS' occurrences. Made $admin accessible in page_content function.

View differences:

forgot.php
1 1
<?php
2 2

  
3
// $Id: forgot.php,v 1.4 2005/04/02 06:25:37 rdjurovich Exp $
3
// $Id$
4 4

  
5 5
/*
6 6

  
......
25 25

  
26 26
require('../config.php');
27 27

  
28
// Start a session
29
if(!defined('SESSION_STARTED')) {
30
	session_name(APP_NAME.'_session_id');
31
	session_start();
32
	define('SESSION_STARTED', true);
33
}
34

  
35
// Get users language if it is not already set
36
if(!defined('LANGUAGE')) {
37
	if(isset($_SESSION['LANGUAGE']) AND $_SESSION['LANGUAGE'] != '') {
38
		define('LANGUAGE', $_SESSION['LANGUAGE']);
39
	} else {
40
		define('LANGUAGE', DEFAULT_LANGUAGE);
41
	}
42
}
43

  
44
// Load the language file
45
if(!defined('LANGUAGE_LOADED')) {
46
	if(!file_exists(WB_PATH.'/languages/'.LANGUAGE.'.php')) {
47
		exit('Error loading language file '.LANGUAGE.', please check configuration');
48
	} else {
49
		require_once(WB_PATH.'/languages/'.LANGUAGE.'.php');
50
	}
51
}
52

  
53 28
// Required page details
54 29
$page_id = 0;
55 30
$page_description = '';
......
75 50
// Include the index (wrapper) file
76 51
require(WB_PATH.'/index.php');
77 52

  
78
?>
53
?>

Also available in: Unified diff