Project

General

Profile

1 1773 Luisehahne
<?php
2
/**
3
 *
4
 * @category        frontend
5
 * @package         account
6
 * @author          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$
13
 * @filesource		$HeadURL$
14
 * @lastmodified    $Date$
15
 *
16
 */
17
18 2063 Luisehahne
$config_file = realpath('../framework/initialize.php');
19
if(file_exists($config_file) && !defined('WB_URL'))
20
{
21
    $sAutoLanguage = 'EN';
22
// detect client language
23
    if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
24
    	if(preg_match('/([a-z]{2})(?:-[a-z]{2})*/i', strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']), $matches)) {
25
    		$sAutoLanguage = strtoupper($matches[1]);
26
    	}
27
    }
28
    $sAutoLanguage=( isset($_SESSION['LANGUAGE'] ) ? $_SESSION['LANGUAGE'] : $sAutoLanguage);
29
    if(!defined('LANGUAGE')) { define('LANGUAGE',$sAutoLanguage); }
30
31
	require_once($config_file);
32
}
33 1924 darkviper
$mLang = Translate::getinstance();
34
$mLang->enableAddon('account');
35 1773 Luisehahne
36 1792 Luisehahne
if(!class_exists('frontend', false)){ include(WB_PATH.'/framework/class.frontend.php'); }
37
38
require_once(WB_PATH.'/framework/functions.php');
39
40 1773 Luisehahne
// Create new frontend object
41 1792 Luisehahne
$wb = new frontend(false);
42 1773 Luisehahne
43
// load module language file
44 1792 Luisehahne
//$sAutoLanguage = isset($_SESSION['LANGUAGE']) ? $_SESSION['LANGUAGE'] : AccountSignup::GetBowserLanguage(DEFAULT_LANGUAGE);
45 1773 Luisehahne
46 1792 Luisehahne
//$langDir = WB_PATH . '/languages/' . LANGUAGE . '.php';
47
//require_once(!file_exists($langDir) ? WB_PATH . '/languages/EN.php' : $langDir );
48
49 1773 Luisehahne
// form faked? Check the honeypot-fields.
50
if(ENABLED_ASP && isset($_POST['username']) && (
51
	(!isset($_POST['submitted_when']) OR !isset($_SESSION['submitted_when']) ) OR
52
		($_POST['submitted_when'] != $_SESSION['submitted_when']) OR
53
			(!isset($_POST['email-address']) OR $_POST['email-address']) OR
54
				(!isset($_POST['name']) OR $_POST['name']) OR
55
					(!isset($_POST['full_name']) OR $_POST['full_name'])
56
	))
57
{
58
	$wb->send_header(WB_URL.'/index.php');
59
}
60
61 1792 Luisehahne
$page_id = defined('REFERRER_ID') ? REFERRER_ID : isset($_SESSION['PAGE_ID']) ? $_SESSION['PAGE_ID'] : 0;
62 1773 Luisehahne
// needed for backlink/cancel
63
$_SESSION['HTTP_REFERER'] = isset($_SESSION['HTTP_REFERER']) ? ($_SESSION['HTTP_REFERER']) : WB_URL.'/';
64
// action modus
65
$_POST['action'] = !isset($_POST['action']) ? 'show' : $_POST['action'];
66
67 1792 Luisehahne
// Required page details
68 1773 Luisehahne
$page_description = '';
69
$page_keywords = '';
70 1792 Luisehahne
// Work out level
71
$level = ($page_id > 0 )? level_count($page_id): $page_id;
72
// Work out root parent
73
$root_parent = ($page_id > 0 )? root_parent($page_id): $page_id;
74
75 1773 Luisehahne
define('PAGE_ID', $page_id);
76 1792 Luisehahne
define('ROOT_PARENT', $root_parent);
77 1773 Luisehahne
define('PARENT', 0);
78 1792 Luisehahne
define('LEVEL', $level);
79 1924 darkviper
define('PAGE_TITLE', $mLang->TEXT_SIGNUP);
80
define('MENU_TITLE', $mLang->TEXT_SIGNUP);
81 1773 Luisehahne
define('MODULE', '');
82
define('VISIBILITY', 'public');
83
84
define('PAGE_CONTENT', WB_PATH.'/account/confirm_form.php');
85
86 1924 darkviper
$mLang->disableAddon();
87 1773 Luisehahne
// Include the index (wrapper) file
88
require(WB_PATH.'/index.php');