OSDN Git Service

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