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 1787 2012-10-12 23:26:43Z Luisehahne $
|
13
|
* @filesource $HeadURL: svn://isteam.dynxs.de/wb-archiv/branches/2.8.x/wb/account/signup.php $
|
14
|
* @lastmodified $Date: 2012-10-13 01:26:43 +0200 (Sat, 13 Oct 2012) $
|
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('../config.php');
|
27
|
if(file_exists($config_file) && !defined('WB_URL'))
|
28
|
{
|
29
|
require_once($config_file);
|
30
|
}
|
31
|
|
32
|
ini_set('display_errors','0');
|
33
|
|
34
|
if(!class_exists('frontend', false)){ include(WB_PATH.'/framework/class.frontend.php'); }
|
35
|
|
36
|
require_once(WB_PATH.'/framework/functions.php');
|
37
|
|
38
|
// Create new frontend object
|
39
|
$wb = new frontend(false);
|
40
|
|
41
|
if( ( (intval(FRONTEND_SIGNUP)==0) &&
|
42
|
( 0 == (isset($_SESSION['USER_ID']) ? intval($_SESSION['USER_ID']) : 0) )))
|
43
|
{
|
44
|
$wb->send_header(WB_URL.'/index.php');
|
45
|
// if(INTRO_PAGE) {
|
46
|
// } else {
|
47
|
// header('Location: '.WB_URL.'/index.php');
|
48
|
// exit(0);
|
49
|
// }
|
50
|
}
|
51
|
|
52
|
// form faked? Check the honeypot-fields.
|
53
|
if(ENABLED_ASP && isset($_POST['username']) && (
|
54
|
(!isset($_POST['submitted_when']) OR !isset($_SESSION['submitted_when']) ) OR
|
55
|
// ($_POST['submitted_when'] != $_SESSION['submitted_when']) OR
|
56
|
(!isset($_POST['email-address']) OR $_POST['email-address']) OR
|
57
|
(!isset($_POST['name']) OR $_POST['name']) OR
|
58
|
(!isset($_POST['full_name']) OR $_POST['full_name'])
|
59
|
))
|
60
|
{
|
61
|
$wb->send_header(WB_URL.'/index.php');
|
62
|
}
|
63
|
|
64
|
$langDir = WB_PATH . '/languages/' . LANGUAGE . '.php';
|
65
|
require_once(!file_exists($langDir) ? WB_PATH . '/languages/EN.php' : $langDir );
|
66
|
|
67
|
$_SESSION['display_form'] = true;
|
68
|
|
69
|
$page_id = defined('REFERRER_ID') ? REFERRER_ID : isset($_SESSION['PAGE_ID']) ? $_SESSION['PAGE_ID'] : 0;
|
70
|
|
71
|
// Required page details
|
72
|
$page_description = '';
|
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
|
|
79
|
define('PAGE_ID', $page_id);
|
80
|
define('ROOT_PARENT', $root_parent);
|
81
|
define('PARENT', 0);
|
82
|
define('LEVEL', $level);
|
83
|
|
84
|
define('PAGE_TITLE', $TEXT['SIGNUP']);
|
85
|
define('MENU_TITLE', $TEXT['SIGNUP']);
|
86
|
define('MODULE', '');
|
87
|
define('VISIBILITY', 'public');
|
88
|
|
89
|
define('PAGE_CONTENT', WB_PATH.'/account/signup_form.php');
|
90
|
|
91
|
// Set auto authentication to false
|
92
|
$auto_auth = false;
|
93
|
|
94
|
// Include the index (wrapper) file
|
95
|
require(WB_PATH.'/index.php');
|
96
|
|
97
|
exit();
|