index_new.php 876 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. if (!empty($_REQUEST['path'])) {
  3. $path = $_REQUEST['path'];
  4. if (is_readable($path) && !empty($_REQUEST['raw'])) {
  5. header('content-type: image/jpeg');
  6. print file_get_contents($path);
  7. exit;
  8. }
  9. }
  10. else {
  11. die('File not found');
  12. }
  13. ?>
  14. <!DOCTYPE html>
  15. <html>
  16. <head>
  17. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  18. <title>fotorama</title>
  19. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
  20. <link href="http://cdnjs.cloudflare.com/ajax/libs/fotorama/4.6.2/fotorama.css" rel="stylesheet"> <!-- 3 KB -->
  21. <script src="http://cdnjs.cloudflare.com/ajax/libs/fotorama/4.6.2/fotorama.js"></script> <!-- 16 KB -->
  22. </head>
  23. <body>
  24. <div class="fotorama">
  25. <img src="/view/file/?path=<?=$path?>&raw=true" />
  26. </div>
  27. </body>
  28. </html>