Advertisement
Guest User

Untitled

a guest
Mar 29th, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. <?php
  2. $id = $_GET['id'];
  3. if (empty($id)) {
  4. $clientname = 'tazz';
  5. } else {
  6. $clientname = $_GET['id'];
  7. }
  8.  
  9. $total = $_GET['limit'];
  10. if (empty($total)) {
  11. $limit = '100';
  12. } else {
  13. $limit = $_GET['limit'];
  14. }
  15.  
  16. $basefolder = "client/client-galleries/";
  17. $dirname = $basefolder.$clientname."/";
  18.  
  19. $images = scandir($dirname);
  20. sort($images);
  21. //shuffle($images);
  22. $ignore = array(".", "..");
  23. $output = array_splice($ignore, 0, $limit);
  24.  
  25. foreach($images as $curimg) {
  26. if(!in_array($curimg, $output)) {
  27.  
  28. echo "
  29. <div class='gallery'>
  30. <img src='[[pThumb? &input=`$dirname$curimg` &options=`&w=300&h=300&zc=1&q=95&fltr[]=wmi|./client/images/gallery-watermark-white.png|BL|50|25|200`]]' alt='$curimg'>
  31. <div class='desc'></div>
  32. </div>n ";
  33.  
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement