Project

General

Profile

« Previous | Next » 

Revision 1787

Added by Dietmar about 12 years ago

  1. fixed parsing error in signup

View differences:

signup.php
13 13
 * @filesource		$HeadURL$
14 14
 * @lastmodified    $Date$
15 15
 *
16
 * $_SESSION['USED_LANGUAGES']="NL,EN,DE";
17
 * if BROWSER_LANGUAGE is in USED_LANGUAGES then use BROWSER_LANGUAGE
18
 * and provide all other USED_LANGUAGES to choose
19
 * IF BROWSER_LANGUAGE is NOT in USED_LANGUAGES then use const LANGUAGE
20
 * and provide all other USED_LANGUAGES to choose
21
 *
22
 *
16 23
 */
17 24

  
18
require_once('../config.php');
25
// Include config file
26
$config_file = realpath('../config.php');
27
if(file_exists($config_file) && !defined('WB_URL'))
28
{
29
	require_once($config_file);
30
}
31

  
19 32
ini_set('display_errors','0');
20 33

  
21
require_once(WB_PATH.'/framework/class.admin.php');
34
if(!class_exists('frontend', false)){ include(WB_PATH.'/framework/class.frontend.php'); }
22 35

  
36
require_once(WB_PATH.'/framework/functions.php');
37

  
23 38
// Create new frontend object
24
$wb = new admin();
39
$wb = new frontend(false);
25 40

  
26
//require_once(dirname(__FILE__).'/MySignUp.php');
27
//print '<pre style="text-align: left;"><strong>function '.__FUNCTION__.'( '.$page_id.' );</strong>  basename: '.basename(__FILE__).'  line: '.__LINE__.' -> <br />';
28
//print_r( dirname(__FILE__) ); print '</pre>';
29

  
30
//
31 41
if( ( (intval(FRONTEND_SIGNUP)==0) &&
32 42
    (  0 == (isset($_SESSION['USER_ID']) ? intval($_SESSION['USER_ID']) : 0) )))
33 43
{
......
51 61
	$wb->send_header(WB_URL.'/index.php');
52 62
}
53 63

  
54
// Load the language file
55
//if(!file_exists(WB_PATH.'/languages/'.LANGUAGE.'.php')) {
56
//	exit('Error loading language file '.LANGUAGE.', please check configuration');
57
//} else {
58
//	require_once(WB_PATH.'/languages/'.LANGUAGE.'.php');
59
//	$load_language = false;
60
//}
64
$langDir = WB_PATH . '/languages/' . LANGUAGE . '.php';
65
require_once(!file_exists($langDir) ? WB_PATH . '/languages/EN.php' : $langDir );
61 66

  
62
$lang = WB_PATH . '/languages/' . LANGUAGE . '.php';
63
require_once(!file_exists($lang) ? WB_PATH . '/languages/EN.php' : $lang );
64

  
65 67
$_SESSION['display_form'] = true;
66 68

  
67
$page_id = isset($_SESSION['PAGE_ID']) ? intval($_SESSION['PAGE_ID']) : 0;
69
$page_id = defined('REFERRER_ID') ? REFERRER_ID : isset($_SESSION['PAGE_ID']) ? $_SESSION['PAGE_ID'] : 0;
68 70

  
71
// Required page details
69 72
$page_description = '';
70 73
$page_keywords = '';
74
// Work out level
75
$level = ($page_id > 0 )? level_count($page_id): $page_id;
76
// Work out root parent
77
$root_parent = ($page_id > 0 )? root_parent($page_id): $page_id;
78

  
71 79
define('PAGE_ID', $page_id);
72
define('ROOT_PARENT', 0);
80
define('ROOT_PARENT', $root_parent);
73 81
define('PARENT', 0);
74
define('LEVEL', 0);
82
define('LEVEL', $level);
83

  
75 84
define('PAGE_TITLE', $TEXT['SIGNUP']);
76 85
define('MENU_TITLE', $TEXT['SIGNUP']);
77 86
define('MODULE', '');
......
84 93

  
85 94
// Include the index (wrapper) file
86 95
require(WB_PATH.'/index.php');
96

  
97
exit();

Also available in: Unified diff