session_start(); include("includes/common/reset.php"); $page="order"; $selected=$page."Selected"; $$selected="selected"; $step1 = "on"; function dirList ($directory) { // create an array to hold directory list $results = array(); // create a handler for the directory $handler = opendir($directory); // keep going until all files in directory have been read while ($file = readdir($handler)) { // if $file isn't this directory or its parent, // add it to the results array if ($file != '.' && $file != '..' && $file != 'large' && $file != '_archive') $results[] = $file; } // tidy up: close the handler closedir($handler); // done! return $results; } function fList($myCategory){ $tempCategory = $myCategory; $tempFileArray = dirList("images/templates/$tempCategory/"); echo('