3 * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
\r
4 * Copyright (C) 2002-2011 The Nucleus Group
\r
6 * This program is free software; you can redistribute it and/or
\r
7 * modify it under the terms of the GNU General Public License
\r
8 * as published by the Free Software Foundation; either version 2
\r
9 * of the License, or (at your option) any later version.
\r
10 * (see nucleus/documentation/index.html#license for more info)
\r
14 * Create account form
\r
16 * @license http://nucleuscms.org/license.txt GNU General Public License
\r
17 * @copyright Copyright (C) 2002-2011 The Nucleus Group
\r
21 require_once "./config.php";
\r
22 //include $DIR_LIBS."ACTION.php";
\r
23 include_libs('ACTION.php',false,false);
\r
25 sendContentType('text/html', 'createaccount', _CHARSET);
\r
28 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
\r
29 <html <?php echo _HTML_XML_NAME_SPACE_AND_LANG_CODE; ?>>
\r
31 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo _CHARSET; ?>" />
\r
32 <title><?php echo _CREATE_ACCOUNT_TITLE; ?></title>
\r
33 <style type="text/css">@import url(nucleus/styles/manual.css);</style>
\r
37 <h1><?php echo _CREATE_ACCOUNT0; ?></h1>
\r
39 // show form only if Visitors are allowed to create a Member Account
\r
40 if ($CONF['AllowMemberCreate']==1) {
\r
41 if (isset($_POST['showform']) && $_POST['showform'] == 1) {
\r
42 // after the from is sent it will be validated
\r
43 // POST data will be added as value to treat the user with care (;-))
\r
47 // if createAccount fails it returns an error message
\r
48 $message = $a->createAccount();
\r
50 echo '<span style="font-weight:bold; color:red;">'.$message.'</span><br /><br />';
\r
53 <form method="post" action="createaccount.php">
\r
55 <input type="hidden" name="showform" value="1" />
\r
56 <input type="hidden" name="action" value="createaccount" />
\r
57 <?php echo _CREATE_ACCOUNT_LOGIN_NAME; ?>
\r
59 <input name="name" size="32" maxlength="32" value="<?php echo htmlspecialchars(postVar('name')); ?>" /> <small><?php echo _CREATE_ACCOUNT_LOGIN_NAME_VALID; ?></small>
\r
62 <?php echo _CREATE_ACCOUNT_REAL_NAME; ?>
\r
64 <input name="realname" size="40" value="<?php echo htmlspecialchars(postVar('realname')); ?>" />
\r
67 <?php echo _CREATE_ACCOUNT_EMAIL; ?>
\r
69 <input name="email" size="40" value="<?php echo htmlspecialchars(postVar('email')); ?>" /> <small><?php echo _CREATE_ACCOUNT_EMAIL2; ?></small>
\r
72 <?php echo _CREATE_ACCOUNT_URL; ?>
\r
74 <input name="url" size="60" value="<?php echo htmlspecialchars(postVar('url')); ?>" />
\r
77 // add extra fields from Plugins, like NP_Profile
\r
78 $manager->notify('RegistrationFormExtraFields', array('type' => 'createaccount.php', 'prelabel' => '', 'postlabel' => '<br />', 'prefield' => '', 'postfield' => '<br /><br />'));
\r
79 // add a Captcha challenge or something else
\r
80 $manager->notify('FormExtra', array('type' => 'membermailform-notloggedin'));
\r
84 <input type="submit" value="<?php echo _CREATE_ACCOUNT_SUBMIT; ?>" />
\r
90 echo _CREATE_ACCOUNT1;
\r
91 echo _CREATE_ACCOUNT2;
\r