OSDN Git Service

Modified for security.
[nucleus-jp/nucleus-plugins.git] / NP_gallery / trunk / gallery / update / np_gallery_update061.php
index 14298d8..f5adb88 100644 (file)
@@ -1,8 +1,9 @@
 <?php\r
 \r
-include('.\..\..\..\..\config.php');\r
-global $DIR_PLUGINS;\r
-include_once ($DIR_PLUGINS.'gallery/config.php');\r
+require_once('./../../../../config.php');\r
+global $member;\r
+if (!($member->isLoggedIn() && $member->isAdmin())) exit('You are not admin.');\r
+include_once (dirname(__FILE__).'/../config.php');\r
 \r
 //from 0.61a to 0.75\r
 global $NPG_CONF;\r
@@ -167,5 +168,5 @@ if (!NPG_TEMPLATE::exists('default075')) {
 \r
 setNPGoption('currentversion',75);\r
 \r
-include('np_gallery_update075.php');\r
+include(dirname(__FILE__).'/np_gallery_update075.php');\r
 ?>\r