OSDN Git Service

3.65sp1リリースのための修正
[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-2013 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 require_once "./config.php";\r
14 //include $DIR_LIBS."ACTION.php";\r
15 include_libs('ACTION.php',false,false);\r
16 \r
17 sendContentType('text/html', 'createaccount', _CHARSET);\r
18 \r
19 ?>\r
20 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\r
21 <html <?php echo _HTML_XML_NAME_SPACE_AND_LANG_CODE; ?>>\r
22 <head>\r
23         <meta http-equiv="Content-Type" content="text/html; charset=<?php echo _CHARSET; ?>" />\r
24         <title><?php echo _CREATE_ACCOUNT_TITLE; ?></title>\r
25         <style type="text/css">@import url(nucleus/styles/manual.css);</style>\r
26 </head>\r
27 <body>\r
28 \r
29         <h1><?php echo _CREATE_ACCOUNT0; ?></h1>\r
30 <?php\r
31 // show form only if Visitors are allowed to create a Member Account\r
32 if ($CONF['AllowMemberCreate']==1) { \r
33         if (isset($_POST['showform']) && $_POST['showform'] == 1) {\r
34                 // after the from is sent it will be validated\r
35                 // POST data will be added as value to treat the user with care (;-))\r
36         \r
37                 $a = new ACTION();\r
38 \r
39                 // if createAccount fails it returns an error message \r
40                 $message = $a->createAccount();\r
41 \r
42                 echo '<span style="font-weight:bold; color:red;">'.$message.'</span><br /><br />'; \r
43         }\r
44 ?>\r
45                 <form method="post" action="createaccount.php">\r
46                         <div>\r
47                                 <input type="hidden" name="showform" value="1" />\r
48                                 <input type="hidden" name="action" value="createaccount" />\r
49                                 <?php echo _CREATE_ACCOUNT_LOGIN_NAME; ?>\r
50                                 <br />\r
51                                 <input name="name" size="32" maxlength="32" value="<?php echo htmlspecialchars(postVar('name')); ?>" /> <small><?php echo _CREATE_ACCOUNT_LOGIN_NAME_VALID; ?></small>\r
52                                 <br />\r
53                                 <br />\r
54                                 <?php echo _CREATE_ACCOUNT_REAL_NAME; ?>\r
55                                 <br />\r
56                                 <input name="realname" size="40" value="<?php echo htmlspecialchars(postVar('realname')); ?>" />\r
57                                 <br />\r
58                                 <br />\r
59                                 <?php echo _CREATE_ACCOUNT_EMAIL; ?>\r
60                                 <br />\r
61                                 <input name="email" size="40" value="<?php echo htmlspecialchars(postVar('email')); ?>" /> <small><?php echo _CREATE_ACCOUNT_EMAIL2; ?></small>\r
62                                 <br />\r
63                                 <br />\r
64                                 <?php echo _CREATE_ACCOUNT_URL; ?>\r
65                                 <br />\r
66                                 <input name="url" size="60" value="<?php echo htmlspecialchars(postVar('url')); ?>" />\r
67                                 <br />\r
68                 <?php\r
69                 // add extra fields from Plugins, like NP_Profile\r
70                 $param = array(\r
71                         'type'          => 'createaccount.php',\r
72                         'prelabel'      => '',\r
73                         'postlabel'     => '<br />',\r
74                         'prefield'      => '',\r
75                         'postfield'     => '<br /><br />'\r
76                 );\r
77                 $manager->notify('RegistrationFormExtraFields', $param);\r
78                 // add a Captcha challenge or something else\r
79                 $param = array('type' => 'membermailform-notloggedin');\r
80                 $manager->notify('FormExtra', $param);\r
81                 ?>\r
82                 <br />\r
83                 <br />\r
84                 <input type="submit" value="<?php echo _CREATE_ACCOUNT_SUBMIT; ?>" />\r
85         </div>\r
86 \r
87         </form>\r
88 <?php\r
89 } else {\r
90         echo _CREATE_ACCOUNT1;\r
91         echo _CREATE_ACCOUNT2;\r
92 }\r
93 ?>\r
94 </body>\r
95 </html>\r