We Recommend

Wicked Cool PHP: Real-World Scripts That Solve Difficult Problems Wicked Cool PHP: Real-World Scripts That Solve Difficult Problems
Wicked Cool PHP contains a wide variety of scripts to process credit cards, check the validity of email addresses, template HTML, and serve dynamic images and text.


Posted By

sk8rjess on 05/20/08


Tagged


Versions (?)


space


Published in: PHP 


  1. function read_imagesinpages($dir) {
  2. $path = opendir($dir);
  3. $file1 = str_replace (" ","%20", $file1);
  4. while (false !== ($file1 = readdir($path))) {
  5. if(($file1 !== ".") and ($file1 !== "..") and ($file1 !== "kop1.php")) {
  6. if(is_file($dir."/".$file1))
  7. $files[]=$file1;
  8. else
  9. $dirs[]=$dir."/".$file1;
  10. }
  11. }
  12. if($files) {
  13. natcasesort($files);
  14. foreach ($files as $file1) {
  15. //Include Translation data
  16. include ("data/settings/langpref.php");
  17. include ("data/inc/lang/en.php");
  18. include ("data/inc/lang/$langpref");
  19. echo "<div class=\"menudiv\" style=\"width: 200px; margin: 2px;\">
  20. <table>
  21. <tr>
  22. <td>
  23. <img src=\"data/image/image_small.png\" border=\"0\" alt=\"\">
  24. </td>
  25. <td style=\"font-size: 14px;\">
  26. <span style=\"font-size: 16px;\"><a href=\"$dir/$file1\" target=\"_blank\"\">$file1</a></span><br>
  27. <a href=\"#\" onclick=\"tinyMCE.execCommand('mceInsertContent',false,'<a href=$dir/$file1>$file1</a>');return false;\">$lang_page9</a>
  28.  
  29. </td>
  30. </tr>
  31. </table>
  32. </div>"; }
  33. }
  34. closedir($path);
  35. }

Report this snippet 

You need to login to post a comment.