]> git.vanrenterghem.biz Git - www.vanrenterghem.biz.git/blobdiff - phpBB2/admin/xs_install.php
Verwijder verouderde bestanden.
[www.vanrenterghem.biz.git] / phpBB2 / admin / xs_install.php
diff --git a/phpBB2/admin/xs_install.php b/phpBB2/admin/xs_install.php
deleted file mode 100644 (file)
index 45dc976..0000000
+++ /dev/null
@@ -1,179 +0,0 @@
-<?php\r
-\r
-/***************************************************************************\r
- *                              xs_install.php\r
- *                              --------------\r
- *   copyright            : (C) 2003 - 2005 CyberAlien\r
- *   support              : http://www.phpbbstyles.com\r
- *\r
- *   version              : 2.3.1\r
- *\r
- *   file revision        : 72\r
- *   project revision     : 78\r
- *   last modified        : 05 Dec 2005  13:54:54\r
- *\r
- ***************************************************************************/\r
-\r
-/***************************************************************************\r
- *\r
- *   This program is free software; you can redistribute it and/or modify\r
- *   it under the terms of the GNU General Public License as published by\r
- *   the Free Software Foundation; either version 2 of the License, or\r
- *   (at your option) any later version.\r
- *\r
- ***************************************************************************/\r
-\r
-define('IN_PHPBB', 1);\r
-$phpbb_root_path = "./../";\r
-$no_page_header = true;\r
-require($phpbb_root_path . 'extension.inc');\r
-require('./pagestart.' . $phpEx);\r
-\r
-// check if mod is installed\r
-if(empty($template->xs_version) || $template->xs_version !== 8)\r
-{\r
-       message_die(GENERAL_ERROR, isset($lang['xs_error_not_installed']) ? $lang['xs_error_not_installed'] : 'eXtreme Styles mod is not installed. You forgot to upload includes/template.php');\r
-}\r
-\r
-define('IN_XS', true);\r
-include_once('xs_include.' . $phpEx);\r
-\r
-$template->assign_block_vars('nav_left',array('ITEM' => '&raquo; <a href="' . append_sid('xs_install.'.$phpEx) . '">' . $lang['xs_install_styles'] . '</a>'));\r
-\r
-$lang['xs_install_back'] = str_replace('{URL}', append_sid('xs_install.'.$phpEx), $lang['xs_install_back']);\r
-$lang['xs_goto_default'] = str_replace('{URL}', append_sid('xs_styles.'.$phpEx), $lang['xs_goto_default']);\r
-\r
-// remove timeout. useful for forum with 100+ styles\r
-@set_time_limit(XS_MAX_TIMEOUT);\r
-\r
-// install style\r
-if(!empty($HTTP_GET_VARS['style']) && !defined('DEMO_MODE'))\r
-{\r
-       $style = stripslashes($HTTP_GET_VARS['style']);\r
-       $num = intval($HTTP_GET_VARS['num']);\r
-       $res = xs_install_style($style, $num);\r
-       if(defined('REFRESH_NAVBAR'))\r
-       {\r
-               $template->assign_block_vars('left_refresh', array(\r
-                               'ACTION'        => append_sid('index.' . $phpEx . '?pane=left')\r
-                       ));\r
-       }\r
-       if($res)\r
-       {\r
-               if(defined('XS_MODS_CATEGORY_HIERARCHY'))\r
-               {\r
-                       cache_themes();\r
-               }\r
-               xs_message($lang['Information'], $lang['xs_install_installed'] . '<br /><br />' . $lang['xs_install_back'] . '<br /><br />' . $lang['xs_goto_default']);\r
-       }\r
-       xs_error($lang['xs_install_error'] . '<br /><br />' . $lang['xs_install_back']);\r
-}\r
-\r
-// install styles\r
-if(!empty($HTTP_POST_VARS['total']) && !defined('DEMO_MODE'))\r
-{\r
-       $tpl = array();\r
-       $num = array();\r
-       $total = intval($HTTP_POST_VARS['total']);\r
-       for($i=0; $i<$total; $i++)\r
-       {\r
-               if(!empty($HTTP_POST_VARS['install_'.$i]))\r
-               {\r
-                       $tpl[] = stripslashes($HTTP_POST_VARS['install_'.$i.'_style']);\r
-                       $num[] = intval($HTTP_POST_VARS['install_'.$i.'_num']);\r
-               }\r
-       }\r
-       if(count($tpl))\r
-       {\r
-               for($i=0; $i<count($tpl); $i++)\r
-               {\r
-                       xs_install_style($tpl[$i], $num[$i]);\r
-               }\r
-               if(defined('REFRESH_NAVBAR'))\r
-               {\r
-                       $template->assign_block_vars('left_refresh', array(\r
-                                       'ACTION'        => append_sid('index.' . $phpEx . '?pane=left')\r
-                               ));\r
-               }\r
-               if(defined('XS_MODS_CATEGORY_HIERARCHY'))\r
-               {\r
-                       cache_themes();\r
-               }\r
-               xs_message($lang['Information'], $lang['xs_install_installed'] . '<br /><br />' . $lang['xs_install_back'] . '<br /><br />' . $lang['xs_goto_default']);\r
-       }\r
-}\r
-\r
-\r
-// get all installed styles\r
-$sql = 'SELECT themes_id, template_name, style_name FROM ' . THEMES_TABLE . ' ORDER BY template_name';\r
-if(!$result = $db->sql_query($sql))\r
-{\r
-       xs_error($lang['xs_no_style_info'], __LINE__, __FILE__);\r
-}\r
-$style_rowset = $db->sql_fetchrowset($result);\r
-\r
-// find all styles to install\r
-$res = @opendir('../templates/');\r
-$styles = array();\r
-while(($file = readdir($res)) !== false)\r
-{\r
-       if($file !== '.' && $file !== '..' && @file_exists('../templates/'.$file.'/theme_info.cfg') && @file_exists('../templates/'.$file.'/'.$file.'.cfg'))\r
-       {\r
-               $arr = xs_get_themeinfo($file);\r
-               for($i=0; $i<count($arr); $i++)\r
-               {\r
-                       if(isset($arr[$i]['template_name']) && $arr[$i]['template_name'] === $file)\r
-                       {\r
-                               $arr[$i]['num'] = $i;\r
-                               $style = $arr[$i]['style_name'];\r
-                               $found = false;\r
-                               for($j=0; $j<count($style_rowset); $j++)\r
-                               {\r
-                                       if($style_rowset[$j]['style_name'] == $style)\r
-                                       {\r
-                                               $found = true;\r
-                                       }\r
-                               }\r
-                               if(!$found)\r
-                               {\r
-                                       $styles[$arr[$i]['style_name']] = $arr[$i];\r
-                               }\r
-                       }\r
-               }\r
-       }\r
-}\r
-closedir($res);\r
-\r
-if(!count($styles))\r
-{\r
-       xs_message($lang['Information'], $lang['xs_install_none'] . '<br /><br />' . $lang['xs_goto_default']);\r
-}\r
-\r
-ksort($styles);\r
-\r
-$j = 0;\r
-foreach($styles as $var => $value)\r
-{\r
-       $row_class = $xs_row_class[$j % 2];\r
-       $template->assign_block_vars('styles', array(\r
-                       'ROW_CLASS'     => $row_class,\r
-                       'STYLE'         => htmlspecialchars($value['template_name']),\r
-                       'THEME'         => htmlspecialchars($value['style_name']),\r
-                       'U_INSTALL'     => append_sid('xs_install.'.$phpEx.'?style='.urlencode($value['template_name']).'&num='.$value['num']),\r
-                       'CB_NAME'       => 'install_'.$j,\r
-                       'NUM'           => $value['num'],\r
-               )\r
-       );\r
-       $j++;\r
-}\r
-\r
-$template->assign_vars(array(\r
-       'U_INSTALL'             => append_sid('xs_install.'.$phpEx),\r
-       'TOTAL'                 => count($styles)\r
-       ));\r
-\r
-$template->set_filenames(array('body' => XS_TPL_PATH . 'install.tpl'));\r
-$template->pparse('body');\r
-xs_exit();\r
-\r
-?>
\ No newline at end of file