1
|
<?php
|
2
|
/**
|
3
|
*
|
4
|
* @category frontend
|
5
|
* @package account
|
6
|
* @author Ryan Djurovich, WebsiteBaker Project
|
7
|
* @copyright 2009-2012, WebsiteBaker Org. e.V.
|
8
|
* @link http://www.websitebaker2.org/
|
9
|
* @license http://www.gnu.org/licenses/gpl.html
|
10
|
* @platform WebsiteBaker 2.8.x
|
11
|
* @requirements PHP 5.2.2 and higher
|
12
|
* @version $Id: signup.php 2063 2014-01-01 02:56:56Z Luisehahne $
|
13
|
* @filesource $HeadURL: svn://isteam.dynxs.de/wb-archiv/branches/2.8.x/wb/account/signup.php $
|
14
|
* @lastmodified $Date: 2014-01-01 03:56:56 +0100 (Wed, 01 Jan 2014) $
|
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
|
*
|
23
|
*/
|
24
|
|
25
|
// Include config file
|
26
|
$config_file = realpath('../framework/initialize.php');
|
27
|
if(file_exists($config_file) && !defined('WB_URL'))
|
28
|
{
|
29
|
$sAutoLanguage = 'EN';
|
30
|
// detect client language
|
31
|
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
|
32
|
if(preg_match('/([a-z]{2})(?:-[a-z]{2})*/i', strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']), $matches)) {
|
33
|
$sAutoLanguage = strtoupper($matches[1]);
|
34
|
}
|
35
|
}
|
36
|
$sAutoLanguage=( isset($_SESSION['LANGUAGE'] ) ? $_SESSION['LANGUAGE'] : $sAutoLanguage);
|
37
|
if(!defined('LANGUAGE')) { define('LANGUAGE',$sAutoLanguage); }
|
38
|
|
39
|
require_once($config_file);
|
40
|
}
|
41
|
|
42
|
ini_set('display_errors','0');
|
43
|
|
44
|
if(!class_exists('frontend', false)){ include(WB_PATH.'/framework/class.frontend.php'); }
|
45
|
|
46
|
require_once(WB_PATH.'/framework/functions.php');
|
47
|
|
48
|
// Create new frontend object
|
49
|
$wb = new frontend(false);
|
50
|
|
51
|
if( ( (intval(FRONTEND_SIGNUP)==0) &&
|
52
|
( 0 == (isset($_SESSION['USER_ID']) ? intval($_SESSION['USER_ID']) : 0) )))
|
53
|
{
|
54
|
$wb->send_header(WB_URL.'/index.php');
|
55
|
// if(INTRO_PAGE) {
|
56
|
// } else {
|
57
|
// header('Location: '.WB_URL.'/index.php');
|
58
|
// exit(0);
|
59
|
// }
|
60
|
}
|
61
|
|
62
|
// form faked? Check the honeypot-fields.
|
63
|
if(ENABLED_ASP && isset($_POST['username']) && (
|
64
|
(!isset($_POST['submitted_when']) OR !isset($_SESSION['submitted_when']) ) OR
|
65
|
// ($_POST['submitted_when'] != $_SESSION['submitted_when']) OR
|
66
|
(!isset($_POST['email-address']) OR $_POST['email-address']) OR
|
67
|
(!isset($_POST['name']) OR $_POST['name']) OR
|
68
|
(!isset($_POST['full_name']) OR $_POST['full_name'])
|
69
|
))
|
70
|
{
|
71
|
$wb->send_header(WB_URL.'/index.php');
|
72
|
}
|
73
|
|
74
|
//$langDir = WB_PATH . '/languages/' . LANGUAGE . '.php';
|
75
|
//require_once(!file_exists($langDir) ? WB_PATH . '/languages/EN.php' : $langDir );
|
76
|
|
77
|
$_SESSION['display_form'] = true;
|
78
|
|
79
|
$page_id = defined('REFERRER_ID') ? REFERRER_ID : isset($_SESSION['PAGE_ID']) ? $_SESSION['PAGE_ID'] : 0;
|
80
|
|
81
|
// Required page details
|
82
|
$page_description = '';
|
83
|
$page_keywords = '';
|
84
|
// Work out level
|
85
|
$level = ($page_id > 0 )? level_count($page_id): $page_id;
|
86
|
// Work out root parent
|
87
|
$root_parent = ($page_id > 0 )? root_parent($page_id): $page_id;
|
88
|
|
89
|
define('PAGE_ID', $page_id);
|
90
|
define('ROOT_PARENT', $root_parent);
|
91
|
define('PARENT', 0);
|
92
|
define('LEVEL', $level);
|
93
|
|
94
|
define('PAGE_TITLE', $TEXT['SIGNUP']);
|
95
|
define('MENU_TITLE', $TEXT['SIGNUP']);
|
96
|
define('MODULE', '');
|
97
|
define('VISIBILITY', 'public');
|
98
|
|
99
|
define('PAGE_CONTENT', WB_PATH.'/account/signup_form.php');
|
100
|
|
101
|
// Set auto authentication to false
|
102
|
$auto_auth = false;
|
103
|
|
104
|
// Include the index (wrapper) file
|
105
|
require(WB_PATH.'/index.php');
|
106
|
|
107
|
exit();
|