| Line | |
|---|
| 1 | <?php |
|---|
| 2 | /* |
|---|
| 3 | * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved. |
|---|
| 4 | * |
|---|
| 5 | * http://www.lockon.co.jp/ |
|---|
| 6 | */ |
|---|
| 7 | |
|---|
| 8 | require_once("../require.php"); |
|---|
| 9 | require_once(DATA_PATH . "include/file_manager.inc"); |
|---|
| 10 | |
|---|
| 11 | // ソースとして表示するファイルを定義(直接実行しないファイル) |
|---|
| 12 | $arrViewFile = array( |
|---|
| 13 | 'html', |
|---|
| 14 | 'htm', |
|---|
| 15 | 'tpl', |
|---|
| 16 | 'php', |
|---|
| 17 | 'css', |
|---|
| 18 | 'js', |
|---|
| 19 | ); |
|---|
| 20 | |
|---|
| 21 | // 拡張子取得 |
|---|
| 22 | $arrResult = split('\.', $_GET['file']); |
|---|
| 23 | $ext = $arrResult[count($arrResult)-1]; |
|---|
| 24 | |
|---|
| 25 | // ファイル内容表示 |
|---|
| 26 | if(in_array($ext, $arrViewFile)) { |
|---|
| 27 | // ファイルを読み込んで表示 |
|---|
| 28 | header("Content-type: text/plain\n\n"); |
|---|
| 29 | print(sfReadFile(USER_PATH.$_GET['file'])); |
|---|
| 30 | } else { |
|---|
| 31 | header("Location: ".USER_URL.$_GET['file']); |
|---|
| 32 | } |
|---|
| 33 | ?> |
|---|
Note: See
TracBrowser
for help on using the repository browser.