3 * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
\r
4 * Copyright (C) 2002-2009 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-2009 The Nucleus Group
\r
21 require "./config.php";
22 include $DIR_LIBS."ACTION.php";
24 if (isset ($_POST['showform'])&&$_POST['showform']==1) {
31 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
32 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja-JP" lang="ja-JP">
34 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo _CHARSET; ?>" />
35 <title><?php echo CREATE_ACCOUNT_TITLE ?></title>
36 <style type="text/css">@import url(nucleus/styles/manual.css);</style>
40 <h1><?php echo _CREATE_ACCOUNT0?></h1>
43 // show form only if Visitors are allowed to create a Member Account
44 if ($CONF['AllowMemberCreate']==1) {
45 // if the form is shown the first time no POST data
46 // will be added as value for the input fields
50 <form method="post" action="createaccount.php">
53 <input type="hidden" name="showform" value="1" />
54 <input type="hidden" name="action" value="createaccount" />
56 <?php echo _CREATE_ACCOUNT_LOGIN_NAME?>
58 <input name="name" size="20" /> <small>(only a-z, 0-9)</small>
61 <?php echo _CREATE_ACCOUNT_REAL_NAME?>
63 <input name="realname" size="40" />
66 <?php echo _CREATE_ACCOUNT_EMAIL?>
68 <input name="email" size="40" /> <small><?php echo _CREATE_ACCOUNT_EMAIL2?></small>
71 <?php echo _CREATE_ACCOUNT_URL?>
73 <input name="url" size="60" />
76 // add a Captcha challenge or something else
78 $manager->notify('FormExtra', array('type' => 'membermailform-notloggedin'));
82 <input type="submit" value="<?php echo _CREATE_ACCOUNT_SUBMIT?>" />
87 } // close if showfrom ...
89 // after the from is sent it will be validated
90 // POST data will be added as value to treat the user with care (;-))
94 // if createAccount fails it returns an error message
95 $message = $a->createAccount();
97 echo '<span style="font-weight:bold; color:red;">'.htmlspecialchars($message).'</span><br /><br />';
100 <form method="post" action="createaccount.php">
103 <input type="hidden" name="showform" value="1" />
104 <input type="hidden" name="action" value="createaccount" />
106 <?php echo _CREATE_ACCOUNT_LOGIN_NAME?>
108 <input name="name" size="20" <?php if(isset($_POST['name'])){echo 'value="'.htmlspecialchars($_POST['name']).'"';}?>/> <small>(only a-z, 0-9)</small>
111 <?php echo _CREATE_ACCOUNT_REAL_NAME?>
113 <input name="realname" size="40" <?php if(isset($_POST['realname'])){echo 'value="'.htmlspecialchars($_POST['realname']).'"';}?>/>
116 <?php echo _CREATE_ACCOUNT_EMAIL?>
118 <input name="email" size="40" <?php if(isset($_POST['email'])){echo 'value="'.htmlspecialchars($_POST['email']).'"';}?>/> <small><?php echo _CREATE_ACCOUNT_EMAIL2?></small>
121 <?php echo _CREATE_ACCOUNT_URL?>
123 <input name="url" size="60" <?php if(isset($_POST['url'])){echo 'value="'.htmlspecialchars($_POST['url']).'"';}?>/>
126 // add a Captcha challenge or something else
128 $manager->notify('FormExtra', array('type' => 'membermailform-notloggedin'));
132 <input type="submit" value="<?php echo _CREATE_ACCOUNT_SUBMIT?>" />
137 } // close else showform ...
141 echo _CREATE_ACCOUNT1;
142 echo _CREATE_ACCOUNT2;