Minahito
minah****@users*****
2005年 12月 30日 (金) 17:22:20 JST
Index: xoops2jp/html/modules/base/admin/css.php diff -u /dev/null xoops2jp/html/modules/base/admin/css.php:1.1.2.1 --- /dev/null Fri Dec 30 17:22:20 2005 +++ xoops2jp/html/modules/base/admin/css.php Fri Dec 30 17:22:20 2005 @@ -0,0 +1,34 @@ +<?php + +require_once "../../../mainfile.php"; +require_once XOOPS_ROOT_PATH . "/header.php"; + + +$theme = isset($_GET['theme']) ? trim($_GET['theme']) : null; +$file = trim($_GET['file']); + +if (strpos($file, "..") !== false) { + exit(); +} + +$smarty = new Legacy_AdminSmarty(); + +if ($theme !=null && !file_exists(XOOPS_THEME_PATH . "/" . $theme . "/" . $file)) { + exit(); +} + +if($theme!=null) { + $path = XOOPS_THEME_PATH . "/" . $theme; +} +else { + $path = LEGACY_ADMIN_RENDER_FALLBACK_PATH; +} + +$smarty->template_dir = $path; +$smarty->setModulePrefix('_css_'.$theme); +$result=$smarty->fetch("file:" . $file); + +header('Content-Type:text/css;'); +print $result; + +?> \ No newline at end of file