OSDN Git Service

FIX: PHP5/MySQL5における文法違反コードの修正
[nucleus-jp/nucleus-jp-ancient.git] / createaccount.php
1 <?php\r
2 /*\r
3  * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)\r
4  * Copyright (C) 2002-2011 The Nucleus Group\r
5  *\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
11  */\r
12 \r
13 /**\r
14  * Create account form\r
15  *\r
16  * @license http://nucleuscms.org/license.txt GNU General Public License\r
17  * @copyright Copyright (C) 2002-2011 The Nucleus Group\r
18  * @version $Id$\r
19  */\r
20 \r
21 require_once "./config.php";\r
22 //include $DIR_LIBS."ACTION.php";\r
23 include_libs('ACTION.php',false,false);\r
24 \r
25 sendContentType('text/html', 'createaccount', _CHARSET);\r
26 \r
27 ?>\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
30 <head>\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
34 </head>\r
35 <body>\r
36 \r
37         <h1><?php echo _CREATE_ACCOUNT0; ?></h1>\r
38 <?php\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
44         \r
45                 $a = new ACTION();\r
46 \r
47                 // if createAccount fails it returns an error message \r
48                 $message = $a->createAccount();\r
49 \r
50                 echo '<span style="font-weight:bold; color:red;">'.$message.'</span><br /><br />'; \r
51         }\r
52 ?>\r
53                 <form method="post" action="createaccount.php">\r
54                         <div>\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
58                                 <br />\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
60                                 <br />\r
61                                 <br />\r
62                                 <?php echo _CREATE_ACCOUNT_REAL_NAME; ?>\r
63                                 <br />\r
64                                 <input name="realname" size="40" value="<?php echo htmlspecialchars(postVar('realname')); ?>" />\r
65                                 <br />\r
66                                 <br />\r
67                                 <?php echo _CREATE_ACCOUNT_EMAIL; ?>\r
68                                 <br />\r
69                                 <input name="email" size="40" value="<?php echo htmlspecialchars(postVar('email')); ?>" /> <small><?php echo _CREATE_ACCOUNT_EMAIL2; ?></small>\r
70                                 <br />\r
71                                 <br />\r
72                                 <?php echo _CREATE_ACCOUNT_URL; ?>\r
73                                 <br />\r
74                                 <input name="url" size="60" value="<?php echo htmlspecialchars(postVar('url')); ?>" />\r
75                                 <br />\r
76                 <?php\r
77                 // add extra fields from Plugins, like NP_Profile\r
78                 $param = array(\r
79                         'type'          => 'createaccount.php',\r
80                         'prelabel'      => '',\r
81                         'postlabel'     => '<br />',\r
82                         'prefield'      => '',\r
83                         'postfield'     => '<br /><br />'\r
84                 );\r
85                 $manager->notify('RegistrationFormExtraFields', $param);\r
86                 // add a Captcha challenge or something else\r
87                 $param = array('type' => 'membermailform-notloggedin');\r
88                 $manager->notify('FormExtra', $param);\r
89                 ?>\r
90                 <br />\r
91                 <br />\r
92                 <input type="submit" value="<?php echo _CREATE_ACCOUNT_SUBMIT; ?>" />\r
93         </div>\r
94 \r
95         </form>\r
96 <?php\r
97 } else {\r
98         echo _CREATE_ACCOUNT1;\r
99         echo _CREATE_ACCOUNT2;\r
100 }\r
101 ?>\r
102 </body>\r
103 </html>\r