Changeset 16264 for branches/feature-module-update
- Timestamp:
- 2007/10/05 16:53:32 (16 years ago)
- Location:
- branches/feature-module-update
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/feature-module-update/html/admin/contents/file_view.php
r15532 r16264 6 6 */ 7 7 8 // {{{ requires 8 9 require_once("../require.php"); 9 require_once( DATA_PATH . "include/file_manager.inc");10 require_once(CLASS_PATH . "page_extends/admin/contents/LC_Page_Admin_Contents_FileView_Ex.php"); 10 11 11 // ソースとして表示するファイルを定義(直接実行しないファイル) 12 $arrViewFile = array( 13 'html', 14 'htm', 15 'tpl', 16 'php', 17 'css', 18 'js', 19 ); 12 // }}} 13 // {{{ generate page 20 14 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 } 15 $objPage = new LC_Page_Admin_Contents_FileView_Ex(); 16 $objPage->init(); 17 $objPage->process(); 18 register_shutdown_function(array($objPage, "destroy")); 33 19 ?>
Note: See TracChangeset
for help on using the changeset viewer.