<?php require_once('./page_header.php'); ?> <table cellpadding="4" cellspacing="1" border="0" width="100%"> <tr> <th>Filename</th> <th>File Size</th> <th>Date uploaded</th> <?php if(extension_loaded("mime_magic")) { echo "<th>Mime type</th>\n"; } ?> <th>File permission</th> <th>Download</th> </tr> <?php $path = $_CONFIG['path']; $file_count = 0; $dh = opendir($path); while (false !== ($filename = readdir($dh))) { $files[] = $filename; } sort($files); foreach ($files as $file) { $full = $path.$file; if(strlen($file)>30) { $file = substr($file, 0, 30) . '...'; } if($file != '.' && $file != '..' && $file != 'index.php' && $file != 'index.html' && $file != "Thumbs.db"){ $file_count++; if($class == "row1"){ $class = "row2"; }else{ $class = "row1"; } $extension = file_type($file); if($extension == "bmp" || $extension == "ico"){ $thumb = $full; }else{ $thumb = $_CONFIG['tpath'].$file; } ?> <tr> <?php if(extension_loaded('gd2') || extension_loaded('gd')){ switch($_CONFIG['dir_view']){ case 'thumb': echo '<td class="'.$class.'" align="left"><center><a href="viewer.php?file='.$file.'"><img src="'.$thumb.'" width="'.$_CONFIG['thumb_w'].'" height="'.$_CONFIG['thumb_h'].'" alt="'.$file.'" /></a></center></td>'; break; case 'links': echo '<td class="'.$class.'" align="left"><a href="viewer.php?file='.$file.'"><b>'.$file.'</b></a></td>'; break; default: echo '<td class="'.$class.'" align="left"><center><a href="viewer.php?file='.$file.'"><img src="'.$thumb.'" width="'.$_CONFIG['thumb_w'].'" height="'.$_CONFIG['thumb_h'].'" alt="'.$file.'" /></a></center></td>'; } }else{ echo '<td class="'.$class.'" align="left"><a href="viewer.php?file='.$file.'"><b>'.$file.'</b></a></td>'; } ?> <td class="<?php echo $class; ?>" align="left"><?php echo num2com(round(filesize($full) / 1024)); ?> KB</td> <td class="<?php echo $class; ?>" align="left"><?php echo date ("M d Y h:i:s A", filemtime($full)); ?></td> <?php if(extension_loaded("mime_magic")) { echo '<td class="'.$class.'" align="left">'.mime_content_type($full).'</td>'; } ?> <td class="<?php echo $class; ?>" align="left"><?php echo substr(sprintf('%o', fileperms($full)), -4); ?></td> <td class="<?php echo $class; ?>" align="left"><a href="download.php?file=<?php echo basename($full); ?>"><b>Download file</b></a></td> </tr> <?php } } ?> </table> <?php if($file_count<1){ echo "<br>"; generror("Directory is empty!"); } require_once('./page_footer.php'); ?>
if(substr($thumb,-3)=='rar'){ รูปแทน rar }else{ รูป }
if(substr($thumb,-3)=='rar'){ http://www.downloadhunt.com/images/stories/topic-img-5/4249a84bdaf63c34332d1988244fb089.jpg }else{ http://www.downloadhunt.com/images/stories/topic-img-5/4249a84bdaf63c34332d1988244fb089.jpg }
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง