OSDN Git Service

Merge branch 'skinnable-master'
[nucleus-jp/nucleus-next.git] / nucleus / index.php
index 8c40df6..fed8f8d 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2012 The Nucleus Group
+ * Copyright (C) 2002-2009 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
  */
 /**
  * @license http://nucleuscms.org/license.txt GNU General Public License
+<<<<<<< HEAD
  * @copyright Copyright (C) 2002-2012 The Nucleus Group
  * @version $Id: index.php 1748 2012-04-13 13:27:57Z sakamocchi $
+=======
+ * @copyright Copyright (C) 2002-2009 The Nucleus Group
+ * @version $Id: index.php 1888 2012-06-17 08:38:54Z sakamocchi $
+>>>>>>> skinnable-master
  */
 
 // we are using admin stuff:
@@ -44,7 +49,6 @@ if ( $CONF['alertOnSecurityRisk'] == 1 )
        }
        if ( sizeof($aFound) > 0 )
        {
-               sendContentType('text/html', 'startUpError');
                startUpError(
                        _ERRORS_STARTUPERROR1. implode($aFound, '</li><li>')._ERRORS_STARTUPERROR2,
                        _ERRORS_STARTUPERROR3
@@ -79,12 +83,24 @@ if ( $bNeedsLogin )
        $action = 'showlogin';
 }
 
-/* FIXME: Skin class also output this HTTP1.1 headers
-sendContentType('text/html', 'admin-' . $action);
-*/
-
 if ( !Admin::initialize() )
 {
+       /* TODO: this is a bad way... */
+       sendContentType('text/html', 'admin-' . $action);
+       
+       $skin =& $manager->getSkin(0, 'AdminActions', 'AdminSkin');
+       if ( $bNeedsLogin )
+       {
+               $skin->parse('fileparse', $DIR_SKINS . 'admin/showlogin.skn');
+       }
+       else if ($action == 'adminskinieimport' )
+       {
+               Admin::action($action);
+       }
+       else
+       {
+               $skin->parse('importAdmin', $DIR_SKINS . 'admin/defaultimporter.skn');
+       }
        /* TODO: something to handling errors */
        exit;
 }