photo.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <html>
  2. <head>
  3. <meta charset="UTF-8">
  4. <link rel="stylesheet" href="script/tocas.min.css">
  5. <title>ArOZ System</title>
  6. </head>
  7. <body>
  8. <br>
  9. <div class="ts container">
  10. <h1>IMUS Laboratory</h1><br>
  11. <h2>ArOZ Photo Station</h2>
  12. <div class="ts pointing secondary big menu">
  13. <a class="item" href="index.php">Index</a>
  14. <a class="item" href="music.php">Music</a>
  15. <a class="item" href="video.php">Video</a>
  16. <a class="active item" href="photo.php">Photo</a>
  17. <a class="item" href="upload/">Upload</a>
  18. <a class="item" href="upload/uploads/">Upload Dir</a>
  19. </div>
  20. <h2> Previews </h2><br>
  21. <div class="ts grid">
  22. <!-- Preview Bar -->
  23. <?php
  24. $photodir = "upload/uploads/photo/";
  25. $path = $photodir;
  26. $files = array_diff(scandir($path), array('.', '..'));
  27. foreach($files as $file){
  28. $filename = hex2bin(str_replace("inith","",pathinfo($file)['filename']));
  29. $ext = pathinfo($file)['extension'];
  30. $shortenname = mb_strimwidth($filename, 0, 25, "...");
  31. echo '<div class="four wide column">';
  32. echo '<div class="ts segment" style="height:250px">';
  33. echo '<p>'.$shortenname. "." . $ext . '</p>';
  34. echo '<a href="'.$photodir . $file.'" class="ts link medium image">
  35. <img src="'.$photodir . $file.'">
  36. </a>';
  37. echo '</div>';
  38. echo '</div>';
  39. }
  40. ?>
  41. </div>
  42. </div>
  43. </div>
  44. </body>
  45. </html>