Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function MakeGallery( $albumname ){
- $files = scandir( "images/gallery/$albumname" );
- if($files === FALSE){
- echo "Gallery $albumname not found!";
- }else{
- echo '<div id="content">
- <div id="'.$albumname.'">
- <div class="tn3 album">
- <ol>';
- foreach( $files as $file ){
- if($file != "." && $file != ".."){
- echo '<li>';
- echo '<h4>'.basename($file).'</h4>';
- echo '<div class="tn3 description">'.basename($file).'</h4>';
- echo '<a href="images/gallery/'.$albumname.'/'.$file.'" alt="'.$file.'">';
- echo '<img src="images/gallery/'.$albumname.'" />';
- echo '</a>';
- echo '</li>';
- }
- }
- echo '</ol>
- </div>
- </div>
- <div id="desc">
- <p>derp</p>
- </div>
- </div>';
- echo '<script type="text/javascript">
- var GALLERYNAME = "'.$albumname.'";
- </script>';
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement