Revision 1773
Added by Dietmar about 12 years ago
signup.php | ||
---|---|---|
3 | 3 |
* |
4 | 4 |
* @category frontend |
5 | 5 |
* @package account |
6 |
* @author WebsiteBaker Project |
|
7 |
* @copyright 2004-2009, Ryan Djurovich |
|
8 |
* @copyright 2009-2011, Website Baker Org. e.V. |
|
6 |
* @author Ryan Djurovich, WebsiteBaker Project |
|
7 |
* @copyright 2009-2012, WebsiteBaker Org. e.V. |
|
9 | 8 |
* @link http://www.websitebaker2.org/ |
10 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
11 | 10 |
* @platform WebsiteBaker 2.8.x |
... | ... | |
19 | 18 |
require_once('../config.php'); |
20 | 19 |
ini_set('display_errors','0'); |
21 | 20 |
|
22 |
if(!( intval(FRONTEND_SIGNUP) && ( 0 == (isset($_SESSION['USER_ID']) ? intval($_SESSION['USER_ID']) : 0) ))) |
|
21 |
require_once(WB_PATH.'/framework/class.admin.php'); |
|
22 |
|
|
23 |
// Create new frontend object |
|
24 |
$wb = new admin(); |
|
25 |
|
|
26 |
//require_once(dirname(__FILE__).'/MySignUp.php'); |
|
27 |
//print '<pre style="text-align: left;"><strong>function '.__FUNCTION__.'( '.$page_id.' );</strong> basename: '.basename(__FILE__).' line: '.__LINE__.' -> <br />'; |
|
28 |
//print_r( dirname(__FILE__) ); print '</pre>'; |
|
29 |
|
|
30 |
// |
|
31 |
if( ( (intval(FRONTEND_SIGNUP)==0) && |
|
32 |
( 0 == (isset($_SESSION['USER_ID']) ? intval($_SESSION['USER_ID']) : 0) ))) |
|
23 | 33 |
{ |
24 |
if(INTRO_PAGE) { |
|
25 |
header('Location: '.WB_URL.PAGES_DIRECTORY.'/index.php'); |
|
26 |
exit(0); |
|
27 |
} else { |
|
28 |
header('Location: '.WB_URL.'/index.php'); |
|
29 |
exit(0); |
|
30 |
} |
|
34 |
$wb->send_header(WB_URL.'/index.php'); |
|
35 |
// if(INTRO_PAGE) { |
|
36 |
// } else { |
|
37 |
// header('Location: '.WB_URL.'/index.php'); |
|
38 |
// exit(0); |
|
39 |
// } |
|
31 | 40 |
} |
32 | 41 |
|
33 |
if(ENABLED_ASP && isset($_POST['username']) && ( // form faked? Check the honeypot-fields. |
|
34 |
(!isset($_POST['submitted_when']) OR !isset($_SESSION['submitted_when'])) OR |
|
35 |
($_POST['submitted_when'] != $_SESSION['submitted_when']) OR |
|
36 |
(!isset($_POST['email-address']) OR $_POST['email-address']) OR |
|
37 |
(!isset($_POST['name']) OR $_POST['name']) OR |
|
38 |
(!isset($_POST['full_name']) OR $_POST['full_name']) |
|
39 |
)) { |
|
40 |
exit(header("Location: ".WB_URL.PAGES_DIRECTORY."")); |
|
42 |
// form faked? Check the honeypot-fields. |
|
43 |
if(ENABLED_ASP && isset($_POST['username']) && ( |
|
44 |
(!isset($_POST['submitted_when']) OR !isset($_SESSION['submitted_when']) ) OR |
|
45 |
// ($_POST['submitted_when'] != $_SESSION['submitted_when']) OR |
|
46 |
(!isset($_POST['email-address']) OR $_POST['email-address']) OR |
|
47 |
(!isset($_POST['name']) OR $_POST['name']) OR |
|
48 |
(!isset($_POST['full_name']) OR $_POST['full_name']) |
|
49 |
)) |
|
50 |
{ |
|
51 |
$wb->send_header(WB_URL.'/index.php'); |
|
41 | 52 |
} |
42 | 53 |
|
43 | 54 |
// Load the language file |
44 |
if(!file_exists(WB_PATH.'/languages/'.DEFAULT_LANGUAGE.'.php')) {
|
|
45 |
exit('Error loading language file '.DEFAULT_LANGUAGE.', please check configuration');
|
|
46 |
} else { |
|
47 |
require_once(WB_PATH.'/languages/'.DEFAULT_LANGUAGE.'.php');
|
|
48 |
$load_language = false; |
|
49 |
} |
|
55 |
//if(!file_exists(WB_PATH.'/languages/'.LANGUAGE.'.php')) {
|
|
56 |
// exit('Error loading language file '.LANGUAGE.', please check configuration');
|
|
57 |
//} else {
|
|
58 |
// require_once(WB_PATH.'/languages/'.LANGUAGE.'.php');
|
|
59 |
// $load_language = false;
|
|
60 |
//}
|
|
50 | 61 |
|
51 |
$page_id = (isset($_SESSION['PAGE_ID']) && ($_SESSION['PAGE_ID']!='') ? $_SESSION['PAGE_ID'] : 0); |
|
62 |
$lang = WB_PATH . '/languages/' . LANGUAGE . '.php'; |
|
63 |
require_once(!file_exists($lang) ? WB_PATH . '/languages/EN.php' : $lang ); |
|
64 |
|
|
52 | 65 |
$_SESSION['display_form'] = true; |
53 | 66 |
|
54 |
// Required page details
|
|
55 |
// $page_id = 0; |
|
67 |
$page_id = isset($_SESSION['PAGE_ID']) ? intval($_SESSION['PAGE_ID']) : 0;
|
|
68 |
|
|
56 | 69 |
$page_description = ''; |
57 | 70 |
$page_keywords = ''; |
58 | 71 |
define('PAGE_ID', $page_id); |
... | ... | |
65 | 78 |
define('VISIBILITY', 'public'); |
66 | 79 |
|
67 | 80 |
define('PAGE_CONTENT', WB_PATH.'/account/signup_form.php'); |
68 |
/* |
|
69 |
// Set the page content include file |
|
70 |
if(isset($_POST['username'])) { |
|
71 |
define('PAGE_CONTENT', WB_PATH.'/account/signup2.php'); |
|
72 |
} else { |
|
73 |
define('PAGE_CONTENT', WB_PATH.'/account/signup_form.php'); |
|
74 |
} |
|
75 |
*/ |
|
81 |
|
|
76 | 82 |
// Set auto authentication to false |
77 | 83 |
$auto_auth = false; |
78 | 84 |
|
Also available in: Unified diff
! account split html and code
+ add signup activation registering
+ add missing icons in themes