/************************************************* * Page Author: Lisa Obenauf * File Name: index.php * * This file creates a directory listing for various pages in my images subdomain. * It will display all files loaded into the directory except for: '.', '..', * 'index.php', and 'style.css'. Everything else is fair game. The script will also * create a link to the file specified for easy access/viewing. * * Copyright © 2004-2005 Lisa Obenauf * * Update: 08 December 2004: Modified to be XHTML Transitional Compliant. * Update: 01 August 2005: Tweaked certain items to go * with new layout. * Update: 17 February 2006: Changed include statements (sort.php, footer.php) * so they will be compatable across different servers. * ( using $_SERVER['DOCUMENT_ROOT'] ) * Update: 20 February 2006: Modified the if-statement of items not to be included * into the directory list by converting it into a switch statement. Also added * more file names to not be included. Converted the function calls to sort.php * into a switch statement. Modified the session conditional statement to make * it more efficient. *************************************************/ /************************************************* * Verifies the existance of a value for $_SESSION. * If there is no value, then the default is "name". *************************************************/ if (!session_start()) { session_start(); header("Cache-control: private"); $_SESSION["sort"] = "name"; $sort = $_SESSION["sort"]; } //end if else { if ($_GET["sort"] == NULL) { $_SESSION["sort"] = "name"; $sort = $_SESSION["sort"]; } //end if else { $_SESSION["sort"] = $_GET["sort"]; $sort = $_SESSION["sort"]; } //end else } //end else /************************************************* * Pulls the name of the directory and strips out * all the path information before the / of the * current directory. *************************************************/ $directory_name = getcwd(); $directory = $directory_name; $file_list = Array(); $dir = opendir($directory); $directory = substr_replace($directory, "", 0, strrpos($directory, "/")); if ($directory == "/images.julisana.com") $directory = "/"; $root_dir = $_SERVER['DOCUMENT_ROOT']; /************************************************* * Includes the file sort.php so that the functions * contained in that file are available to index.php *************************************************/ include("$root_dir/sort.php"); /************************************************* * this is used to determine the browser being used by the user * so as to choose the appropriate style sheet that is to be used. *************************************************/ //if ((strpos($HTTP_USER_AGENT,'Mozilla/5') === false)) // $style_sheet = "style_IE.css"; //else // $style_sheet = "style_MOZ.css"; $style_sheet = "/style.css" ?> Index of

Index of


    Ascending   File Name   Decending Ascending   File Size   Decending Ascending   Date Modified   Decending