Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <p>A list of the stuff in your approved folder:</p>
- <?php
- $default_dir = "./approved";
- echo '<div id="link_div"><ul>' . "\r\n\t";
- if(!($dp = opendir($default_dir))) die("Cannot open $default_dir.");
- while($file = readdir($dp))
- {
- if(is_dir($file))
- {
- continue;
- }
- else if($file != '.' && $file != '..')
- {
- $thumb = substr($file, 0, -3);
- $thumb.="gif";
- if(file_exists("./approved/thumbnails/$thumb")
- {
- echo '<img src="./approved/thumbnails/$thumb"/><br><li><a href="' . "./play.php?file=$file". ' " class="link_li" >' . $file . '</a></li>' . "\r\n\t";
- }
- else
- {
- echo '<img src="./approved/thumbnails/nothumbnail.gif"/><br><li><a href="' . "./play.php?file=$file". ' " class="link_li" >' . $file . '</a></li>' . "\r\n\t";
- }
- }
- }
- closedir($dp);
- echo '</ul> </div>';
- ?>
- <p>That's it, boyo.</p>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement