| 53 | | $part = strtok($accessInfo['input'], '/'); |
| 54 | | if (in_array($part, array('resources','plugins','cache','skin','attach','thumbnail'))) { |
| 55 | | $part = ltrim(rtrim($part == 'thumbnail' ? |
| 56 | | preg_replace('/thumbnail/', 'cache/thumbnail', $accessInfo['input'], 1) : |
| 57 | | $accessInfo['input']), '/'); |
| 58 | | $part = (($qpos = strpos($part, '?')) !== false) ? substr($part, 0, $qpos) : $part; |
| 59 | | if(file_exists($part)) { |
| 60 | | require_once ROOT.'/library/function/file.php'; |
| 61 | | dumpWithEtag($part); |
| 62 | | exit; |
| 63 | | } else { |
| 64 | | header("HTTP/1.0 404 Not Found");exit; |
| 65 | | } |
| 66 | | } |
| 67 | | if (strtok($part, '?') == 'setup.php') {require 'setup.php'; exit;} |
| 68 | | $accessInfo['URLfragment'] = explode('/',strtok($accessInfo['input'],'?')); |
| 69 | | unset($part); |
| | 53 | $part = strtok($accessInfo['input'], '/'); |
| | 54 | if (in_array($part, array('resources','plugins','cache','skin','attach','thumbnail'))) { |
| | 55 | $part = ltrim(rtrim($part == 'thumbnail' ? |
| | 56 | preg_replace('/thumbnail/', 'cache/thumbnail', $accessInfo['input'], 1) : |
| | 57 | $accessInfo['input']), '/'); |
| | 58 | $part = (($qpos = strpos($part, '?')) !== false) ? substr($part, 0, $qpos) : $part; |
| | 59 | if(file_exists($part)) { |
| | 60 | require_once ROOT.'/library/function/file.php'; |
| | 61 | dumpWithEtag($part); |
| | 62 | exit; |
| | 63 | } else { |
| | 64 | header("HTTP/1.0 404 Not Found");exit; |
| | 65 | } |
| | 66 | } |
| | 67 | if (strtok($part, '?') == 'setup.php') {require 'setup.php'; exit;} |
| | 68 | $accessInfo['URLfragment'] = explode('/',strtok($accessInfo['input'],'?')); |
| | 69 | unset($part); |