X-Git-Url: http://git.sourceforge.jp/view?p=nucleus-jp%2Fnucleus-jp-ancient.git;a=blobdiff_plain;f=utf8%2Fnucleus%2Findex.php;h=7693bd6b9ec9ef5b3f80607ffef80c4776681314;hp=7efc2568230629b42f393d095ce502a3a686942e;hb=3d13686214a9827665239fc1b3dcb5b0d0b88433;hpb=02ef663776459a9704a30f1a15a21f814f7d6239 diff --git a/utf8/nucleus/index.php b/utf8/nucleus/index.php index 7efc256..7693bd6 100755 --- a/utf8/nucleus/index.php +++ b/utf8/nucleus/index.php @@ -1,74 +1,77 @@ - 'install.sql should be deleted', - '../install.php' => 'install.php should be deleted', - 'upgrades' => 'nucleus/upgrades directory should be deleted', - 'convert' => 'nucleus/convert directory should be deleted' - ); - $aFound = array(); - foreach($aFiles as $fileName => $fileDesc) - { - if (@file_exists($fileName)) - array_push($aFound, $fileDesc); - } - if (@is_writable('../config.php')) { - array_push($aFound, 'config.php should be non-writable (chmod to 444)'); - } - if (sizeof($aFound) > 0) - { - startUpError( - '

One or more of the Nucleus installation files are still present on the webserver, or are writable.

You should remove these files or change their permissions to ensure security. Here are the files that were found by Nucleus

If you don\'t want to see this error message again, without solving the problem, set $CONF[\'alertOnSecurityRisk\'] in globalfunctions.php to 0, or do this at the end of config.php.

', - 'Security Risk' - ); - } - } - - $bNeedsLogin = false; - $bIsActivation = in_array($action, array('activate', 'activatesetpwd')); - - if ($action == 'logout') - $bNeedsLogin = true; - - if (!$member->isLoggedIn() && !$bIsActivation) - $bNeedsLogin = true; - - // show error if member cannot login to admin - if ($member->isLoggedIn() && !$member->canLogin() && !$bIsActivation) { - $error = _ERROR_LOGINDISALLOWED; - $bNeedsLogin = true; - } - - if ($bNeedsLogin) - { - setOldAction($action); // see ADMIN::login() (sets old action in POST vars) - $action = 'showlogin'; - } - - sendContentType('application/xhtml+xml', 'admin-' . $action); - - $admin = new ADMIN(); - $admin->action($action); -?> + 'install.sql should be deleted', + '../install.php' => 'install.php should be deleted', + 'upgrades' => 'nucleus/upgrades directory should be deleted', + 'convert' => 'nucleus/convert directory should be deleted' + ); + $aFound = array(); + foreach($aFiles as $fileName => $fileDesc) + { + if (@file_exists($fileName)) + array_push($aFound, $fileDesc); + } + if (@is_writable('../config.php')) { + array_push($aFound, 'config.php should be non-writable (chmod to 444)'); + } + if (sizeof($aFound) > 0) + { + startUpError( + '

One or more of the Nucleus installation files are still present on the webserver, or are writable.

You should remove these files or change their permissions to ensure security. Here are the files that were found by Nucleus

If you don\'t want to see this error message again, without solving the problem, set $CONF[\'alertOnSecurityRisk\'] in globalfunctions.php to 0, or do this at the end of config.php.

', + 'Security Risk' + ); + } + } + + $bNeedsLogin = false; + $bIsActivation = in_array($action, array('activate', 'activatesetpwd')); + + if ($action == 'logout') + $bNeedsLogin = true; + + if (!$member->isLoggedIn() && !$bIsActivation) + $bNeedsLogin = true; + + // show error if member cannot login to admin + if ($member->isLoggedIn() && !$member->canLogin() && !$bIsActivation) { + $error = _ERROR_LOGINDISALLOWED; + $bNeedsLogin = true; + } + + if ($bNeedsLogin) + { + setOldAction($action); // see ADMIN::login() (sets old action in POST vars) + $action = 'showlogin'; + } + + sendContentType('text/html', 'admin-' . $action); + + $admin = new ADMIN(); + $admin->action($action); +?> \ No newline at end of file