<?php\r
/*\r
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)\r
- * Copyright (C) 2002-2010 The Nucleus Group\r
+ * Copyright (C) 2002-2011 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
* The code for the Nucleus admin area\r
*\r
* @license http://nucleuscms.org/license.txt GNU General Public License\r
- * @copyright Copyright (C) 2002-2010 The Nucleus Group\r
+ * @copyright Copyright (C) 2002-2011 The Nucleus Group\r
* @version $Id$\r
* @version $NucleusJP: ADMIN.php,v 1.21.2.4 2007/10/30 19:04:24 kmorimatsu Exp $\r
*/\r
$password = postVar('password');\r
$repeatpassword = postVar('repeatpassword');\r
\r
- if ($password != $repeatpassword)\r
+ if (!$password) {
+ return $this->_showActivationPage($key, _ERROR_PASSWORDMISSING);\r
+ }\r
+ \r
+ if ($password != $repeatpassword) {\r
return $this->_showActivationPage($key, _ERROR_PASSWORDMISMATCH);\r
-\r
- if ($password && (strlen($password) < 6))\r
+ }\r
+ \r
+ if (strlen($password) < 6) {\r
return $this->_showActivationPage($key, _ERROR_PASSWORDTOOSHORT);\r
+ }\r
\r
- if ($password) {\r
- $pwdvalid = true;\r
- $pwderror = '';\r
- global $manager;\r
- $manager->notify('PrePasswordSet',array('password' => $password, 'errormessage' => &$pwderror, 'valid' => &$pwdvalid));\r
- if (!$pwdvalid) {\r
- return $this->_showActivationPage($key,$pwderror);\r
- }\r
+ $pwdvalid = true;\r
+ $pwderror = '';\r
+ \r
+ global $manager;\r
+ $manager->notify('PrePasswordSet',array('password' => $password, 'errormessage' => &$pwderror, 'valid' => &$pwdvalid));\r
+ \r
+ if (!$pwdvalid) {\r
+ return $this->_showActivationPage($key,$pwderror);\r
}\r
+ \r
$error = '';\r
$manager->notify('ValidateForm', array('type' => 'activation', 'member' => $mem, 'error' => &$error));\r
if ($error != '')\r
<?php if ($msg) echo "<p>"._MESSAGE.": $msg</p>";\r
?>\r
\r
-\r
+ <div style="width:100%;">\r
<form method="post" action="index.php">\r
<div>\r
\r
echo '<br />' . _SKINEDIT_ALLOWEDTEMPLATESS;\r
$query = 'SELECT tdname as name, tddesc as description FROM '.sql_table('template_desc');\r
showlist($query,'table',array('content'=>'shortnames'));\r
- echo '</div></form>';\r
+ echo '</div></form></div>';\r
$this->pagefoot();\r
}\r
\r
$this->updateConfig('CookiePrefix', postVar('CookiePrefix'));\r
$this->updateConfig('DebugVars', postVar('DebugVars'));\r
$this->updateConfig('DefaultListSize', postVar('DefaultListSize'));\r
+ $this->updateConfig('AdminCSS', postVar('AdminCSS'));\r
\r
// load new config and redirect (this way, the new language will be used is necessary)\r
// note that when changing cookie settings, this redirect might cause the user\r
<head>\r
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo _CHARSET ?>" />\r
<title><?php echo htmlspecialchars($CONF['SiteName'])?> - Admin</title>\r
- <link rel="stylesheet" title="Nucleus Admin Default" type="text/css" href="<?php echo $baseUrl?>styles/admin.css" />\r
+ <link rel="stylesheet" title="Nucleus Admin Default" type="text/css" href="<?php echo $baseUrl?>styles/admin_<?php echo $CONF["AdminCSS"]?>.css" />\r
<link rel="stylesheet" title="Nucleus Admin Default" type="text/css"\r
href="<?php echo $baseUrl?>styles/addedit.css" />\r
\r
echo '<a href="' . $checkURL . '" title="' . _ADMIN_SYSTEMOVERVIEW_VERSIONCHECK_TITLE . '">Nucleus CMS ' . $nucleus['version'] . $codenamestring . '</a>';\r
$newestVersion = getLatestVersion();\r
$newestCompare = str_replace('/','.',$newestVersion);\r
- $newestCompare = intval($newestCompare);\r
$currentVersion = str_replace(array('/','v'),array('.',''),$nucleus['version']);\r
if ($newestVersion && version_compare($newestCompare,$currentVersion) > 0) {\r
- echo '<br /><a style="color:red" href="http://nucleuscms.org/upgrade.php" title="'._ADMIN_SYSTEMOVERVIEW_LATESTVERSION_TITLE.'">'._ADMIN_SYSTEMOVERVIEW_LATESTVERSION_TEXT.$newestVersion.'</a>';\r
+ echo '<br /><a style="color:red" href="'._ADMINPAGEFOOT_OFFICIALURL.'upgrade.php" title="'._ADMIN_SYSTEMOVERVIEW_LATESTVERSION_TITLE.'">'._ADMIN_SYSTEMOVERVIEW_LATESTVERSION_TEXT.$newestVersion.'</a>';\r
}\r
} else {\r
echo 'Nucleus CMS ' . $nucleus['version'] . $codenamestring;\r
\r
}\r
\r
- /**\r
- * @todo document this\r
- */\r
+/*\r
+ * @todo document this\r
+ */\r
function action_pluginlist() {\r
global $member, $manager;\r
\r
if (($plug->supportsFeature('HelpPage') > 0) && (@file_exists($helpFile))) {\r
@readfile($helpFile);\r
} else {\r
- echo '<p>Error: ', _ERROR_PLUGNOHELPFILE,'</p>';\r
+ echo '<p>' . _ERROR .': ', _ERROR_PLUGNOHELPFILE,'</p>';\r
echo '<p><a href="index.php?action=pluginlist">(',_BACK,')</a></p>';\r
}\r
\r