OSDN Git Service

Modify PHP parse error.
[nucleus-jp/nucleus-jp-ancient.git] / utf8 / createaccount.php
index 9976428..728d077 100644 (file)
@@ -1,7 +1,7 @@
 <?php\r
 /*\r
  * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)\r
- * Copyright (C) 2002-2009 The Nucleus Group\r
+ * Copyright (C) 2002-2010 The Nucleus Group\r
  *\r
  * This program is free software; you can redistribute it and/or\r
  * modify it under the terms of the GNU General Public License\r
  * Create account form\r
  *\r
  * @license http://nucleuscms.org/license.txt GNU General Public License\r
- * @copyright Copyright (C) 2002-2009 The Nucleus Group\r
+ * @copyright Copyright (C) 2002-2010 The Nucleus Group\r
  * @version $Id$\r
  */\r
-
-       require "./config.php";
-       include $DIR_LIBS."ACTION.php";
-       
-       if (isset ($_POST['showform'])&&$_POST['showform']==1) {
-               $showform = 1;
-       }
-       else {
-               $showform = 0;
-       }
-?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja-JP" lang="ja-JP">
-<head>
-       <meta http-equiv="Content-Type" content="text/html; charset=<?php echo _CHARSET; ?>" />
-       <title><?php echo CREATE_ACCOUNT_TITLE ?></title>
-       <style type="text/css">@import url(nucleus/styles/manual.css);</style>
-</head>
-<body>
-
-       <h1><?php echo _CREATE_ACCOUNT0?></h1>
-
-<?php
-       // show form only if Visitors are allowed to create a Member Account
-       if ($CONF['AllowMemberCreate']==1) { 
-               // if the form is shown the first time no POST data 
-               // will be added as value for the input fields
-               if ($showform==0) {
-?>
-
-       <form method="post" action="createaccount.php">
-
-       <div>
-       <input type="hidden" name="showform" value="1" />
-       <input type="hidden" name="action" value="createaccount" />
-       
-               <?php echo _CREATE_ACCOUNT_LOGIN_NAME?>
-               <br />
-               <input name="name" size="20" /> <small>(only a-z, 0-9)</small>
-               <br />
-               <br />          
-               <?php echo _CREATE_ACCOUNT_REAL_NAME?>
-               <br />
-               <input name="realname" size="40" />
-               <br />
-               <br />          
-               <?php echo _CREATE_ACCOUNT_EMAIL?>
-               <br />
-               <input name="email" size="40" /> <small><?php echo _CREATE_ACCOUNT_EMAIL2?></small>
-               <br />
-               <br />          
-               <?php echo _CREATE_ACCOUNT_URL?>
-               <br />
-               <input name="url" size="60" />
-               <br />
-               <?php
-               // add a Captcha challenge or something else
-               global $manager;
-               $manager->notify('FormExtra', array('type' => 'membermailform-notloggedin'));
-               ?>
-               <br />
-               <br />                                          
-               <input type="submit" value="<?php echo _CREATE_ACCOUNT_SUBMIT?>" />
-       </div>
-
-       </form>
-<?php
-               } // close if showfrom ...
-               else {
-               // after the from is sent it will be validated
-               // POST data will be added as value to treat the user with care (;-))
-       
-               $a = new ACTION();
-
-               // if createAccount fails it returns an error message 
-               $message = $a->createAccount();
-
-               echo '<span style="font-weight:bold; color:red;">'.htmlspecialchars($message).'</span><br /><br />'; 
-?>
-       
-               <form method="post" action="createaccount.php">
-
-       <div>
-       <input type="hidden" name="showform" value="1" />
-       <input type="hidden" name="action" value="createaccount" />
-       
-               <?php echo _CREATE_ACCOUNT_LOGIN_NAME?> 
-               <br />
-               <input name="name" size="20" <?php if(isset($_POST['name'])){echo 'value="'.htmlspecialchars($_POST['name']).'"';}?>/> <small>(only a-z, 0-9)</small>
-               <br />
-               <br />          
-               <?php echo _CREATE_ACCOUNT_REAL_NAME?> 
-               <br />
-               <input name="realname" size="40" <?php if(isset($_POST['realname'])){echo 'value="'.htmlspecialchars($_POST['realname']).'"';}?>/>
-               <br />
-               <br />          
-               <?php echo _CREATE_ACCOUNT_EMAIL?>
-               <br />
-               <input name="email" size="40" <?php if(isset($_POST['email'])){echo 'value="'.htmlspecialchars($_POST['email']).'"';}?>/> <small><?php echo _CREATE_ACCOUNT_EMAIL2?></small>
-               <br />
-               <br />          
-               <?php echo _CREATE_ACCOUNT_URL?> 
-               <br />
-               <input name="url" size="60" <?php if(isset($_POST['url'])){echo 'value="'.htmlspecialchars($_POST['url']).'"';}?>/>
-               <br />
-               <?php
-               // add a Captcha challenge or something else
-               global $manager;
-               $manager->notify('FormExtra', array('type' => 'membermailform-notloggedin'));
-               ?>
-               <br />
-               <br />
-               <input type="submit" value="<?php echo _CREATE_ACCOUNT_SUBMIT?>" />
-
-
-       </form>
-<?php
-               }       // close else showform ...
-
-}
-else { 
-       echo _CREATE_ACCOUNT1;
-       echo _CREATE_ACCOUNT2;
-}
-?>
-       
-       
-</body>
-</html>
+\r
+require_once "./config.php";\r
+//include $DIR_LIBS."ACTION.php";\r
+include_libs('ACTION.php',false,false);\r
+\r
+if (isset ($_POST['showform'])&&$_POST['showform']==1) {\r
+       $showform = 1;\r
+}\r
+else {\r
+       $showform = 0;\r
+}\r
+?>\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\r
+<html <?php echo _HTML_XML_NAME_SPACE_AND_LANG_CODE; ?>>\r
+       <head>\r
+               <meta http-equiv="Content-Type" content="text/html; charset=<?php echo _CHARSET; ?>" />\r
+               <title><?php echo _CREATE_ACCOUNT_TITLE ?></title>\r
+               <style type="text/css">@import url(nucleus/styles/manual.css);</style>\r
+       </head>\r
+       <body>\r
+\r
+       <h1><?php echo _CREATE_ACCOUNT0; ?></h1>\r
+<?php\r
+// show form only if Visitors are allowed to create a Member Account\r
+if ($CONF['AllowMemberCreate']==1) { \r
+       if (isset($_POST['showform']) && $_POST['showform'] == 1) {\r
+               include $DIR_LIBS . 'ACTION.php';\r
+               // after the from is sent it will be validated\r
+               // POST data will be added as value to treat the user with care (;-))\r
+               $a = new ACTION();\r
+               // if createAccount fails it returns an error message \r
+               $message = '<span style="font-weight:bold; color:red;">' . htmlspecialchars($a->createAccount()) . '</span><br /><br />';\r
+               if (isset($_POST['name']))\r
+                       $name    = 'value="' . htmlspecialchars($_POST['name']) . '" ';\r
+               if (isset($_POST['realname']))\r
+                       $realname = 'value="' . htmlspecialchars($_POST['realname']) . '" ';\r
+               if (isset($_POST['email']))\r
+                       $email  = 'value="' . htmlspecialchars($_POST['email']) . '" ';\r
+               if (isset($_POST['url']))\r
+                       $url      = 'value="' . htmlspecialchars($_POST['url']) . '" ';\r
+//             $showform = 1;\r
+//     } else {\r
+//             $showform = 0;\r
+               echo $message;\r
+       }\r
+?>\r
+               <form method="post" action="createaccount.php">\r
+                       <div>\r
+                               <input type="hidden" name="showform" value="1" />\r
+                               <input type="hidden" name="action" value="createaccount" />\r
+                               <?php echo _CREATE_ACCOUNT_LOGIN_NAME; ?>\r
+                               <br />\r
+                               <input name="name" size="32" maxlength="32" <?php echo $name; ?>/> <small><?php echo _CREATE_ACCOUNT_LOGIN_NAME_VALID; ?></small>\r
+                               <br />\r
+                               <br />\r
+                               <?php echo _CREATE_ACCOUNT_REAL_NAME; ?>\r
+                               <br />\r
+                               <input name="realname" size="40" <?php echo $realname; ?>/>\r
+                               <br />\r
+                               <br />\r
+                               <?php echo _CREATE_ACCOUNT_EMAIL; ?>\r
+                               <br />\r
+                               <input name="email" size="40" <?php echo $email; ?>/> <small><?php echo _CREATE_ACCOUNT_EMAIL2; ?></small>\r
+                               <br />\r
+                               <br />\r
+                               <?php echo _CREATE_ACCOUNT_URL; ?>\r
+                               <br />\r
+                               <input name="url" size="60" <?php echo $url; ?>/>\r
+                               <br />\r
+<?php\r
+               global $manager;\r
+               // add extra fields from Plugins, like NP_Profile\r
+               $data = array(\r
+                       'type'    => 'createaccount.php',\r
+                       'prelabel'  => '',\r
+                       'postlabel' => '<br />',\r
+                       'prefield'  => '',\r
+                       'postfield' => '<br /><br />'\r
+               );\r
+               $manager->notify('RegistrationFormExtraFields', $data);\r
+               // add a Captcha challenge or something else\r
+               $manager->notify('FormExtra', array('type' => 'membermailform-notloggedin'));\r
+?>\r
+                               <br />\r
+                               <br />\r
+                               <input type="submit" value="<?php echo _CREATE_ACCOUNT_SUBMIT; ?>" />\r
+                       </div>\r
+               </form>\r
+<?php\r
+       }       // close else showform ...\r
+}\r
+else {\r
+       echo _CREATE_ACCOUNT1;\r
+       echo _CREATE_ACCOUNT2;\r
+}\r
+?>\r
+</body>\r
+</html>\r