・で表示した際はいちいちブラウザの「戻る」ボタンでお戻りください。
また、ダウンロードした資料、写真などについては、著作権、プライバシー等にご配慮の上お使いください。';
$Title4 = ''; // 下段apacheロゴ前に表示。
$ResumeOption = TRUE; // 中断・再開、部分ダウンロードの対応。TRUEでする、FALSEでしない。動作を充分確認していないので安全を期するならFALSEに。
// ファイル情報一覧。独自のもあるようで必ずしも最適ではないかも。なんとWindowsとMacで同じ拡張子で中身がちがうのがある!
// iconはapache標準のものをそのまま使います。httpd.confの/icons/エイリアスにアイコンフォルダが指定されている必要があります。
$FileInfo = array(
// '' => array('icon' => '', 'type' => '', 'info' => ''),
// とりあえずよく使うものだけ。
'avi' => array('icon' => 'movie.gif', 'type' => 'video/msvideo', 'info' => 'Windows Aviフォーマット動画'),
'bmp' => array('icon' => 'image2.gif', 'type' => 'image/bmp', 'info' => 'ビットマップ形式画像'),
'css' => array('icon' => 'text.gif', 'type' => 'text/css', 'info' => 'カスケーディングスタイルシート'),
'doc' => array('icon' => 'layout.gif', 'type' => 'application/msword', 'info' => 'Microsoft Word 書類'),
'docx' => array('icon' => 'layout.gif', 'type' => 'application/msword', 'info' => 'Microsoft Word 書類'),
'gif' => array('icon' => 'image2.gif', 'type' => 'image/gif', 'info' => 'GIF形式画像'),
'gz' => array('icon' => 'compressed.gif', 'type' => 'application/x-tar', 'info' => 'Tar圧縮ファイル'),
'htm' => array('icon' => 'layout.gif', 'type' => 'text/html', 'info' => 'HTML Web Page'),
'html' => array('icon' => 'layout.gif', 'type' => 'text/html', 'info' => 'HTML Web Page'),
'ico' => array('icon' => 'image2.gif', 'type' => 'image/x-ico', 'info' => 'ビットマップ形式アイコン画像'),
'jpg' => array('icon' => 'image2.gif', 'type' => 'image/jpeg', 'info' => 'JPEG形式画像'),
'jpeg' => array('icon' => 'image2.gif', 'type' => 'image/jpeg', 'info' => 'JPEG形式画像'),
'js' => array('icon' => 'text.gif', 'type' => 'text/plain', 'info' => 'JavaScriptソース'),
'log' => array('icon' => 'text.gif', 'type' => 'text/plain', 'info' => 'ログファイル'),
'lzh' => array('icon' => 'compressed.gif', 'type' => 'application/lha', 'info' => 'LHA形式圧縮ファイル'),
'mid' => array('icon' => 'sound2.gif', 'type' => 'audio/x-midi', 'info' => 'MIDI音楽ファイル'),
'mov' => array('icon' => 'movie.gif', 'type' => 'video/mov', 'info' => 'Quicktime動画'),
'm3u' => array('icon' => 'sound2.gif', 'type' => 'text/plain', 'info' => 'MP3再生リスト'),
'mp3' => array('icon' => 'sound2.gif', 'type' => 'audio/mp3', 'info' => 'MP3形式音楽ファイル'),
'mp4' => array('icon' => 'movie.gif', 'type' => 'video/mp4', 'info' => 'MP4形式動画'),
'mpeg' => array('icon' => 'movie.gif', 'type' => 'video/mpeg', 'info' => 'MPEG形式動画'),
'mpg' => array('icon' => 'movie.gif', 'type' => 'video/mpeg', 'info' => 'MPEG形式動画'),
'pdf' => array('icon' => 'pdf.gif', 'type' => 'application/pdf', 'info' => 'PDFファイル'),
'php' => array('icon' => 'p.gif', 'type' => 'text/plain', 'info' => 'PHPスクリプト'),
'pl' => array('icon' => 'p.gif', 'type' => 'text/plain', 'info' => 'Perlスクリプト'),
'png' => array('icon' => 'image2.gif', 'type' => 'image/png', 'info' => 'PNG形式画像'),
'sh' => array('icon' => 'script.gif', 'type' => 'text/plain', 'info' => 'シェルスクリプト'),
'tar' => array('icon' => 'compressed.gif', 'type' => 'application/x-tar', 'info' => 'TAR形式書庫ファイル'),
'tgz' => array('icon' => 'compressed.gif', 'type' => 'application/x-tar', 'info' => 'TAR形式圧縮書庫ファイル'),
'tif' => array('icon' => 'image2.gif', 'type' => 'image/tiff', 'info' => 'TIFF形式画像'),
'txt' => array('icon' => 'text.gif', 'type' => 'text/plain', 'info' => '一般的なテキスト文書'),
'wav' => array('icon' => 'sound1.gif', 'type' => 'audio/x-wav', 'info' => 'WAVE形式サウンド'),
'wma' => array('icon' => 'sound1.gif', 'type' => 'audio/x-ms-wma', 'info' => 'Windows Media Audioファイル'),
'wmv' => array('icon' => 'movie.gif', 'type' => 'video/msvideo', 'info' => 'Windows Media Videoファイル'),
'xls' => array('icon' => 'layout.gif', 'type' => 'application/vnd.ms-excel', 'info' => 'Microsoft Excel 書類'),
'xlsx' => array('icon' => 'layout.gif', 'type' => 'application/vnd.ms-excel', 'info' => 'Microsoft Excel 書類'),
'zip' => array('icon' => 'compressed.gif', 'type' => 'application/zip', 'info' => 'ZIP形式圧縮ファイル'),
/*
'ai' => array('icon' => 'ps.gif', 'type' => 'application/postscript', 'info' => 'Adobe Illustrator Document'),
'asp' => array('icon' => 'script.gif', 'type' => 'text/plain', 'info' => 'ASP Script'),
'aspx' => array('icon' => 'script.gif', 'type' => 'text/plain', 'info' => 'ASP.NET Script'),
'bin' => array('icon' => 'binary.gif', 'type' => 'application/octet-stream', 'info' => 'Binary Data'),
'bm' => array('icon' => 'image2.gif', 'type' => 'image/bmp', 'info' => 'Bitmap Image'),
'c' => array('icon' => 'c.gif', 'type' => 'text/plain', 'info' => 'C Source'),
'cpp' => array('icon' => 'c.gif', 'type' => 'text/plain', 'info' => 'CPP Source'),
'divx' => array('icon' => 'movie.gif', 'type' => 'video/divx', 'info' => 'Video Divx'),
'dll' => array('icon' => 'binary.gif', 'type' => 'application/octet-stream', 'info' => 'Dynamic link library'),
'eps' => array('icon' => 'ps.gif', 'type' => 'application/postscript', 'info' => 'Encapsulated PostScript'),
'exe' => array('icon' => 'binary.gif', 'type' => 'application/octet-stream', 'info' => 'Windows Executable'),
'fla' => array('icon' => 'image3.gif', 'type' => 'application/x-flash', 'info' => 'Flash Document'),
'flv' => array('icon' => 'movie.gif', 'type' => 'video/flash', 'info' => 'Flash Video'),
'indd' => array('icon' => 'ps.gif', 'type' => 'application/postscript', 'info' => 'Indesign Document'),
'iso' => array('icon' => 'diskimg.gif', 'type' => 'application/octet-stream', 'info' => 'Disk Image'),
'java' => array('icon' => 'text.gif', 'type' => 'text/plain', 'info' => 'Java Source'),
'odb' => array('icon' => 'generic.gif', 'type' => 'application/vnd.oasis.opendocument.database', 'info' => 'Oasis database'),
'odf' => array('icon' => 'generic.gif', 'type' => 'application/vnd.oasis.opendocument.formula', 'info' => 'Oasis form'),
'odg' => array('icon' => 'generic.gif', 'type' => 'application/vnd.oasis.opendocument.graphics', 'info' => 'Oasis graphics'),
'odp' => array('icon' => 'generic.gif', 'type' => 'application/vnd.oasis.opendocument.presentation','info' => 'Oasis presentation'),
'ods' => array('icon' => 'generic.gif', 'type' => 'application/vnd.oasis.opendocument.spreadsheet', 'info' => 'Oasis spreadsheet'),
'odt' => array('icon' => 'generic.gif', 'type' => 'application/vnd.oasis.opendocument.text', 'info' => 'Oasis text'),
'ogg' => array('icon' => 'box1.gif', 'type' => 'application/ogg', 'info' => 'Ogg media container'),
'otf' => array('icon' => 'a.gif', 'type' => 'application/x-font-TrueType', 'info' => 'OpenType Font'),
'ppt' => array('icon' => 'image3.gif', 'type' => 'application/vnd.ms-powerpoint', 'info' => 'Powerpoint Presentation'),
'pptx' => array('icon' => 'image3.gif', 'type' => 'application/vnd.ms-powerpoint', 'info' => 'Powerpoint Presentation'),
'ps' => array('icon' => 'ps.gif', 'type' => 'application/postscript', 'info' => 'PostScript'),
'psd' => array('icon' => 'image3.gif', 'type' => 'x-vnd.adobe.photoshop', 'info' => 'Photoshop Image'),
'qt' => array('icon' => 'movie.gif', 'type' => 'video/quicktime', 'info' => 'Quicktime Video'),
'ra' => array('icon' => 'sound1.gif', 'type' => 'audio/vnd.rn-realaudio', 'info' => 'RealAudio'),
'rar' => array('icon' => 'compressed.gif', 'type' => 'application/zip', 'info' => 'Rar Archive'),
'rss' => array('icon' => 'generic.gif', 'type' => 'text/xml', 'info' => 'RSS'),
'rtf' => array('icon' => 'layout.gif', 'type' => 'application/rtf', 'info' => 'Rich Text File'),
'smil' => array('icon' => 'image3.gif', 'type' => 'application/smil', 'info' => 'Synchronized Multimedia Integration Language'),
'sql' => array('icon' => 'box2.gif', 'type' => 'text/plain', 'info' => 'SQL'),
'swf' => array('icon' => 'movie.gif', 'type' => 'application/x-shockwave-flash', 'info' => 'Flash Animation'),
'tex' => array('icon' => 'tex.gif', 'type' => 'application/x-tex', 'info' => 'TeX File'),
'tmp' => array('icon' => 'unknown.gif', 'type' => 'application/octet-stream', 'info' => 'Temporary file'),
'ttf' => array('icon' => 'a.gif', 'type' => 'application/x-font-TrueType', 'info' => 'TrueType Font'),
'url' => array('icon' => 'world1.gif', 'type' => 'text/plain', 'info' => 'URL'),
'xml' => array('icon' => 'layout.gif', 'type' => 'text/xml', 'info' => 'XML Document'),
*/
);
function showindex($dirpath)
{
global $Encoding, $Title2, $Title3, $Title4;
$rootdir = mb_ereg_replace('/[^/]*$', '/', $_SERVER['SCRIPT_NAME']);
$Title1 = 'Index of http://'.$_SERVER['SERVER_NAME'].$rootdir.($dirpath ? "?dir=$dirpath" : '');
echo('
Name(→Download) | View | Last modified | Size | Description | ||
---|---|---|---|---|---|---|
'); if($dirpath) { $parent_dir = mb_ereg_replace('/?[^/]*$', '', $dirpath); echo(' | Parent Directory | '); } else { echo('Parent Directory | '); } echo('- | |||
'.$filename.' | '.date('Y-m-d H:i', filemtime($filepath)).' | - | '.description($filepath, 1).' | |||
'.$filename.' | '); // プレビューアイコンとリンク $viewlink = ''; if(mb_ereg('text/', contenttype($filename))) { $viewlink = ''; } elseif(mb_ereg('image/', contenttype($filename))) { $viewlink = ''; } echo(''.$viewlink.' | '); echo(''.date('Y-m-d H:i', filemtime($filepath)).' | '.number_format(filesize($filepath)).' | '.description($filepath, 1).' | ||
'); if($dirpath) { $parent_dir = mb_ereg_replace('/?[^/]*$', '', $dirpath); echo(' | Parent Directory | '); } else { echo('Parent Directory | '); } echo('- | |||
要求された URL は本サーバでは見つかりませんでした。
あるいは読み出すことができません。
もし手入力で URL を入力した場合は、綴りを確認して再度お試し下さい。
サーバーの障害と思われる場合は、ウェブ管理者までご連絡ください。