OSDN Git Service

Update history.html
[nucleus-jp/nucleus-jp-ancient.git] / utf8 / nucleus / index.php
index fffd6d7..62a750b 100755 (executable)
@@ -1,7 +1,7 @@
 <?php
 /*
  * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2009 The Nucleus Group
+ * Copyright (C) 2002-2010 The Nucleus Group
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -11,7 +11,7 @@
  */
 /**
  * @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2009 The Nucleus Group
+ * @copyright Copyright (C) 2002-2010 The Nucleus Group
  * @version $Id$
  * $NucleusJP: index.php,v 1.8.2.1 2007/09/07 07:36:09 kimitake Exp $
  */
        $CONF['UsingAdminArea'] = 1;
 
        // include the admin code
-       include('../config.php');
+       require_once('../config.php');
 
-       if ($CONF['alertOnSecurityRisk'] == 1) {
+       if ($CONF['alertOnSecurityRisk'] == 1)
+       {
                // check if files exist and generate an error if so
                $aFiles = array(
-                       '../install.sql' => _ERRORS_INSTALLSQL,\r
-                       '../install.php' => _ERRORS_INSTALLPHP,\r
+                '../install' => _ERRORS_INSTALLDIR,
                        'upgrades'       => _ERRORS_UPGRADESDIR,\r
                        'convert'        => _ERRORS_CONVERTDIR\r
                );
                $aFound = array();
-               foreach($aFiles as $fileName => $fileDesc) {
+               foreach($aFiles as $fileName => $fileDesc)
+               {
                        if (@file_exists($fileName))
                                array_push($aFound, $fileDesc);
                }
                if (@is_writable('../config.php')) {
                        array_push($aFound, _ERRORS_CONFIGPHP);
                }
-               if (sizeof($aFound) > 0) {
+               if (sizeof($aFound) > 0)
+               {
                        startUpError(
                                _ERRORS_STARTUPERROR1. implode($aFound, '</li><li>')._ERRORS_STARTUPERROR2,\r
                                _ERRORS_STARTUPERROR3\r
        $bNeedsLogin   = false;
        $bIsActivation = in_array($action, array('activate', 'activatesetpwd'));
 
-       if ($action == 'logout') {
+       if ($action == 'logout')
                $bNeedsLogin = true;\r
-       }
 
-       if (!$member->isLoggedIn() && !$bIsActivation) {
+       if (!$member->isLoggedIn() && !$bIsActivation)
                $bNeedsLogin = true;\r
-       }
 
        // show error if member cannot login to admin
        if ($member->isLoggedIn() && !$member->canLogin() && !$bIsActivation) {
@@ -63,7 +63,8 @@
                $bNeedsLogin = true;
        }
 
-       if ($bNeedsLogin) {
+       if ($bNeedsLogin)
+       {
                setOldAction($action);  // see ADMIN::login() (sets old action in POST vars)
                $action = 'showlogin';
        }