OSDN Git Service

sync NucleusCMS_en-3-4-RC
[nucleus-jp/nucleus-jp-ancient.git] / utf8 / createaccount.php
1 <?php
2         require "./config.php";
3         include $DIR_LIBS."ACTION.php";
4         
5         if (isset ($_POST['showform'])&&$_POST['showform']==1) {
6                 $showform = 1;
7         }
8         else {
9                 $showform = 0;
10         }
11 ?>
12 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
13 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja-JP" lang="ja-JP">
14 <head>
15         <meta http-equiv="Content-Type" content="text/html; charset=<?php echo _CHARSET; ?>" />
16         <title><?php echo CREATE_ACCOUNT_TITLE ?></title>
17         <style type="text/css">@import url(nucleus/styles/manual.css);</style>
18 </head>
19 <body>
20
21         <h1><?php echo _CREATE_ACCOUNT0?></h1>
22
23 <?php
24         // show form only if Visitors are allowed to create a Member Account
25         if ($CONF['AllowMemberCreate']==1) { 
26                 // if the form is shown the first time no POST data 
27                 // will be added as value for the input fields
28                 if ($showform==0) {
29 ?>
30
31         <form method="post" action="createaccount.php">
32
33         <div>
34         <input type="hidden" name="showform" value="1" />
35         <input type="hidden" name="action" value="createaccount" />
36         
37                 <?php echo _CREATE_ACCOUNT_LOGIN_NAME?>
38                 <br />
39                 <input name="name" size="20" /> <small>(only a-z, 0-9)</small>
40                 <br />
41                 <br />          
42                 <?php echo _CREATE_ACCOUNT_REAL_NAME?>
43                 <br />
44                 <input name="realname" size="40" />
45                 <br />
46                 <br />          
47                 <?php echo _CREATE_ACCOUNT_EMAIL?>
48                 <br />
49                 <input name="email" size="40" /> <small><?php echo _CREATE_ACCOUNT_EMAIL2?></small>
50                 <br />
51                 <br />          
52                 <?php echo _CREATE_ACCOUNT_URL?>
53                 <br />
54                 <input name="url" size="60" />
55                 <br />
56                 <?php
57                 // add a Captcha challenge or something else
58                 global $manager;
59                 $manager->notify('FormExtra', array('type' => 'membermailform-notloggedin'));
60                 ?>
61                 <br />
62                 <br />                                          
63                 <input type="submit" value="<?php echo _CREATE_ACCOUNT_SUBMIT?>" />
64         </div>
65
66         </form>
67 <?php
68                 } // close if showfrom ...
69                 else {
70                 // after the from is sent it will be validated
71                 // POST data will be added as value to treat the user with care (;-))
72         
73                 $a = new ACTION();
74
75                 // if createAccount fails it returns an error message 
76                 $message = $a->createAccount();
77
78                 echo '<span style="font-weight:bold; color:red;">'.htmlspecialchars($message).'</span><br /><br />'; 
79 ?>
80         
81                 <form method="post" action="createaccount.php">
82
83         <div>
84         <input type="hidden" name="showform" value="1" />
85         <input type="hidden" name="action" value="createaccount" />
86         
87                 <?php echo _CREATE_ACCOUNT_LOGIN_NAME?> 
88                 <br />
89                 <input name="name" size="20" <?php if(isset($_POST['name'])){echo 'value="'.htmlspecialchars($_POST['name']).'"';}?>/> <small>(only a-z, 0-9)</small>
90                 <br />
91                 <br />          
92                 <?php echo _CREATE_ACCOUNT_REAL_NAME?> 
93                 <br />
94                 <input name="realname" size="40" <?php if(isset($_POST['realname'])){echo 'value="'.htmlspecialchars($_POST['realname']).'"';}?>/>
95                 <br />
96                 <br />          
97                 <?php echo _CREATE_ACCOUNT_EMAIL?>
98                 <br />
99                 <input name="email" size="40" <?php if(isset($_POST['email'])){echo 'value="'.htmlspecialchars($_POST['email']).'"';}?>/> <small><?php echo _CREATE_ACCOUNT_EMAIL2?></small>
100                 <br />
101                 <br />          
102                 <?php echo _CREATE_ACCOUNT_URL?> 
103                 <br />
104                 <input name="url" size="60" <?php if(isset($_POST['url'])){echo 'value="'.htmlspecialchars($_POST['url']).'"';}?>/>
105                 <br />
106                 <?php
107                 // add a Captcha challenge or something else
108                 global $manager;
109                 $manager->notify('FormExtra', array('type' => 'membermailform-notloggedin'));
110                 ?>
111                 <br />
112                 <br />
113                 <input type="submit" value="<?php echo _CREATE_ACCOUNT_SUBMIT?>" />
114
115
116         </form>
117 <?php
118                 }       // close else showform ...
119
120 }
121 else { 
122         echo _CREATE_ACCOUNT1;
123         echo _CREATE_ACCOUNT2;
124 }
125 ?>
126         
127         
128 </body>
129 </html>