Project

General

Profile

1 1514 Luisehahne
<?php
2
/**
3
 *
4
 * @category        frontend
5
 * @package         account
6 1773 Luisehahne
 * @author          Ryan Djurovich, WebsiteBaker Project
7
 * @copyright       2009-2012, WebsiteBaker Org. e.V.
8 1514 Luisehahne
 * @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$
13
 * @filesource		$HeadURL$
14
 * @lastmodified    $Date$
15
 *
16 1787 Luisehahne
 * $_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 1514 Luisehahne
 */
24
25 1787 Luisehahne
// 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 1673 Luisehahne
ini_set('display_errors','0');
33 1514 Luisehahne
34 1787 Luisehahne
if(!class_exists('frontend', false)){ include(WB_PATH.'/framework/class.frontend.php'); }
35 1773 Luisehahne
36 1787 Luisehahne
require_once(WB_PATH.'/framework/functions.php');
37
38 1773 Luisehahne
// Create new frontend object
39 1787 Luisehahne
$wb = new frontend(false);
40 1773 Luisehahne
41
if( ( (intval(FRONTEND_SIGNUP)==0) &&
42
    (  0 == (isset($_SESSION['USER_ID']) ? intval($_SESSION['USER_ID']) : 0) )))
43 1514 Luisehahne
{
44 1773 Luisehahne
	$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 1514 Luisehahne
}
51
52 1773 Luisehahne
// 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 1514 Luisehahne
}
63
64 1787 Luisehahne
$langDir = WB_PATH . '/languages/' . LANGUAGE . '.php';
65
require_once(!file_exists($langDir) ? WB_PATH . '/languages/EN.php' : $langDir );
66 1514 Luisehahne
67 1673 Luisehahne
$_SESSION['display_form'] = true;
68 1514 Luisehahne
69 1787 Luisehahne
$page_id = defined('REFERRER_ID') ? REFERRER_ID : isset($_SESSION['PAGE_ID']) ? $_SESSION['PAGE_ID'] : 0;
70 1773 Luisehahne
71 1787 Luisehahne
// Required page details
72 1514 Luisehahne
$page_description = '';
73
$page_keywords = '';
74 1787 Luisehahne
// 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 1514 Luisehahne
define('PAGE_ID', $page_id);
80 1787 Luisehahne
define('ROOT_PARENT', $root_parent);
81 1514 Luisehahne
define('PARENT', 0);
82 1787 Luisehahne
define('LEVEL', $level);
83
84 1514 Luisehahne
define('PAGE_TITLE', $TEXT['SIGNUP']);
85
define('MENU_TITLE', $TEXT['SIGNUP']);
86
define('MODULE', '');
87
define('VISIBILITY', 'public');
88
89 1673 Luisehahne
define('PAGE_CONTENT', WB_PATH.'/account/signup_form.php');
90 1773 Luisehahne
91 1514 Luisehahne
// Set auto authentication to false
92
$auto_auth = false;
93
94
// Include the index (wrapper) file
95
require(WB_PATH.'/index.php');
96 1787 Luisehahne
97
exit();