Project

General

Profile

1
<?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: confirm.php 2070 2014-01-03 01:21:42Z darkviper $
13
 * @filesource		$HeadURL: svn://isteam.dynxs.de/wb-archiv/branches/2.8.x/wb/account/confirm.php $
14
 * @lastmodified    $Date: 2014-01-03 02:21:42 +0100 (Fri, 03 Jan 2014) $
15
 *
16
 */
17

    
18
$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
$mLang = Translate::getinstance();
34
$mLang->enableAddon('account');
35

    
36
if(!class_exists('frontend', false)){ include(WB_PATH.'/framework/class.frontend.php'); }
37

    
38
require_once(WB_PATH.'/framework/functions.php');
39

    
40
// Create new frontend object
41
$wb = new frontend(false);
42

    
43
// load module language file
44
//$sAutoLanguage = isset($_SESSION['LANGUAGE']) ? $_SESSION['LANGUAGE'] : AccountSignup::GetBowserLanguage(DEFAULT_LANGUAGE);
45

    
46
//$langDir = WB_PATH . '/languages/' . LANGUAGE . '.php';
47
//require_once(!file_exists($langDir) ? WB_PATH . '/languages/EN.php' : $langDir );
48

    
49
// 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
$page_id = defined('REFERRER_ID') ? REFERRER_ID : isset($_SESSION['PAGE_ID']) ? $_SESSION['PAGE_ID'] : 0;
62
// 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
// Required page details
68
$page_description = '';
69
$page_keywords = '';
70
// 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
define('PAGE_ID', $page_id);
76
define('ROOT_PARENT', $root_parent);
77
define('PARENT', 0);
78
define('LEVEL', $level);
79
define('PAGE_TITLE', $mLang->TEXT_SIGNUP);
80
define('MENU_TITLE', $mLang->TEXT_SIGNUP);
81
define('MODULE', '');
82
define('VISIBILITY', 'public');
83

    
84
define('PAGE_CONTENT', WB_PATH.'/account/confirm_form.php');
85

    
86
$mLang->disableAddon();
87
// Include the index (wrapper) file
88
require(WB_PATH.'/index.php');
89

    
(2-2/22)