<?php
	require_once ('authorize1.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">

<head>
<title>Moreno Travel</title>
<script src="sorttable.js"></script>
    <link href="style.css" rel="stylesheet" type="text/css" />
    <meta http-equiv="content-type"
        content="text/html; charset=utf-8" />



</head>




<?php include 'admin_header.php'; ?>

<h1>Attraction Pictures</h1>
<i><font color="#C11B17" size="0.5px">Click <a href="admin_infouploadimage.php" target="blank">here</a> to upload a new attraction picture.</i></font><br><br>

<ul>
<p>The following is a listing of attraction pictures saved on the server with their corresponding filenames:</p>




<?php 

$dirFiles = array(); 
// opens images folder 

if ($handle = opendir('infoimg/')) {     
while (false !== ($file = readdir($handle))) {          
// strips files extensions               
$crap   = array(".jpg", ".jpeg", ".JPG", ".JPEG", ".png", ".PNG", ".gif", ".GIF", ".bmp", ".BMP", "_", "-");              
$newstring = str_replace($crap, " ", $file );             
//asort($file, SORT_NUMERIC); - doesnt work :(          
// hides folders, writes out ul of images and thumbnails from two folders          
if ($file != "." && $file != ".." && $file != "index.php" && $file != "Thumbnails") {                 
$dirFiles[] = $file;         
}    
 }     
closedir($handle); 
}  

sort($dirFiles); 
foreach($dirFiles as $file) 
{     
echo "<div class=\"figure5\"><img src=\"infoimg/$file\"  width=\"182px\" height=\"158px\"><br>".$file."</div>";
}  

  
?>
<br><br>




</ul><br><br><br>
</div>


</div>

</body>

</html>