Forgot about them... was sending them to my sis since she doesn't have time to watch Prison Break at school. (and its copyrighted to Americans the laws are different here then in the USA we are aloud to download TV shows music etc.)
anyway the index.php code is: (anyone know what i need to add to get what I requested in it?
<?php
/*
############################################################
# e-Directory Index #
############################################################
# Software Version : 1.4 #
# Project started : October 18th, 2003 #
# Distrobuted by : http://www.eblah.com #
# License Agreement : http://www.eblah.com/?v=license #
############################################################
# Copyright (c) 2003/4 e-dir - all rights reserved. #
############################################################
*/
// Setup the basic script configuration below
$directory = "./"; // This is the directory in which you wish to index files (no forward slash)
$password = ""; // Leave blank for none (this is recommended if you want to limit directory browsing)
// It is recommeded to leave this feature OFF. If on the PW will be in every URL
$dirdate = "F d Y g:i:s a"; // This is the way the date will be parsed (use: http://us4.php.net/date for help)
$images = "/images"; // Directory where you images are located (without trailing slash)
$dirpath = 1; // Show "Dir Index Path"? 1 = yes, 0 = no
// Color Setup
$bgcolor = "#000000"; // Main Background color (#000000 default)
$textcolor = "#FFFFFF"; // Main text color (#FFFFFF)
$linkcolor = "#C0C0C0"; // Link color (#C0C0C0)
$tabbg = "#CFCFCF"; // Table BG color (#0F0F0F)
$tilcolor = "#0A0A0A"; // Table Title Color (#0A0A0A)
$dipcol = "#2F2F2F"; // "Files in DIR" Color (#2F2F2F)
$listcol = "#0F0F0F"; // Files List color (#0F0F0F)
// Everything else runs to script, if you know what you're doing, you can edit ... if not, leave it alone
$d = $_GET[d];
$s = $_GET[s];
$r = $_GET[r];
$passwordli = $_GET[passwordli];
if($password) { $pw = $passwordli; }
function fsize($file) {
global $totsize;
$sizes = filesize("$file");
$sizez = number_format(($sizes/1024), 2, '.', '');
if($sizez > 1024) { $sizez = number_format((($sizes/1024)/1024), 1, '.', '')." MB"; }
else { $sizez .= " KB"; }
$totsize = $totsize+$sizes;
return($sizez);
}
// Lets format the directory structure correctly!
$testd = preg_split("/\//", $d);
$d = '';
foreach($testd as $begood) {
if($begood != '' && $begood != '.') {
$d .= "$begood/";
$oldbegood .= "$fdir/";
$fdir = $begood;
}
}
$d = ereg_replace("\/$", "", $d);
$oldbegood = ereg_replace("^\/", "", $oldbegood);
$oldbegood = ereg_replace("\/$", "", $oldbegood);
if(is_dir("$directory/$d")) { $directory .= "/$d"; $nd = $d; }
$dirlist = dir($directory);
if($passwordli) { $pwseed = "&passwordli=$passwordli"; }
if(!$fdir) { $fdir = "Home Directory"; }
else { $updir = "<b><a href=\"?d=$oldbegood&s=$s&r=$r$pwseed\"> Parent Directory</a></b>"; $updir2 = "<img src=\"$images/updir.gif\">"; }
// Should we reverse it?
if(!$r && !$s) { $rev1 = 1; }
elseif(!$r && $s == 'date') { $rev2 = 1; }
elseif(!$r && $s == 'size') { $rev3 = 1; }
if($s == 'date') { $sortedby = 'date last modified'; }
elseif($s == 'size') { $sortedby = 'size'; }
else { $sortedby = 'name'; }
if($r) { $reversedq = "reversed"; }
else { $reversedq = "chronological"; }
$dircnt = 0;
$filecnt = 0;
while(false !== ($entry = $dirlist->read())) {
$icon = '';
if($entry != '.' && $entry != '..' && $entry != 'index.php' && $entry != '.htaccess' && $entry != '.htpassword') {
if($nd != '') { $curdir = "$nd/"; }
if(is_dir("$dirlist->path/$entry")) {
$size = "-"; $sizet = "-"; $icon = "folder"; $url = "?d=$curdir$entry&s=$s&r=$r$pwseed"; $oz = 1; ++$dircnt;
} else {
if(preg_match ("/(.jpg|.jpeg|.gif|.bmp|.png)/i",$entry)) { $icon = "image"; }
elseif(preg_match("/(.mp3|.wav|.m3u|.wma)$/i",$entry)) { $icon = "audio"; }
elseif(preg_match ("/(.htm|.html)$/i",$entry)) { $icon = "html"; }
elseif(preg_match ("/(.exe|.pl|.php)$/i",$entry)) { $icon = "apps"; }
elseif(preg_match ("/(.pdf)$/i",$entry)) { $icon = "pdf"; }
elseif(preg_match ("/(.mpg|.mpeg|.mov|.wmv|.ram|.avi)$/i",$entry)) { $icon = "video"; }
elseif(preg_match ("/(.zip|.ace|.tar)$/i",$entry)) { $icon = "zip"; }
else { $icon = "default"; }
$size = filesize("$dirlist->path/$entry");
$url = "$curdir$entry";
$oz = 2;
++$filecnt;
$sizet = fsize("$dirlist->path/$entry");
}
$modified = date ($dirdate, filemtime("$dirlist->path/$entry"));
++$cnt;
if($s == 'size') { $array[$cnt] = "$oz|$size|$entry|$url|$icon|$modified|$sizet"; }
elseif($s == 'date') { $array[$cnt] = filemtime("$dirlist->path/$entry")."|$entry|$size|$url|$icon|$modified|$sizet"; }
else { $array[$cnt] = "$oz|$entry|$size|$url|$icon|$modified|$sizet"; }
}
}
$totsize2 = number_format(($totsize/1024), 2, '.', '');
if($totsize2 > 1024) { $totsize2 = number_format((($totsize/1024)/1024), 2, '.', '')." MB"; }
else { $totsize2 .= " KB"; }
if($dirpath) {
$dirpath2 = <<<EOT
<tr>
<td width="200"><b>Directory Index Path:</b></td>
<td>$dirlist->path</td>
</tr>
EOT;
$rowspan = "3";
} else { $rowspan = "2"; }
// This is the main template used (header)
echo <<<EOT
<html>
<head>
<STYLE type="text/css">
/* Global Table Settings */TR { font-family: Verdana, Arial; font-size: 11px; }
/* Links */A:link { color:$linkcolor; text-decoration:none; }A:visited { color:$linkcolor; text-decoration:none; }A:active { color:$linkcolor; text-decoration:none; }A:hover { color:$linkcolor; text-decoration:none; }
</style>
<title>$fdir</title>
</head>
<body bgcolor="$bgcolor" text="$textcolor">
<table cellpadding="4" cellspacing="1" bgcolor="$tabbg" width="100%">
<tr>
<td bgcolor="$tilcolor">
<table width="100%" valign="top">
<tr>
<td width="200" valign="top"><b>Friendly Directory:</b></td>
<td valign="top">$fdir</td>
<td align="right" rowspan="$rowspan" valign="top">Directories <b>$dircnt</b><br>Files <b>$filecnt</b><br>Total directory size is <b>$totsize2</b></td>
</tr>$dirpath2<tr>
<td>
<table cellpadding="3">
<tr>
<td width="20" align="center">$updir2</td>
<td>$updir</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr><tr>
<td bgcolor="$dipcol">
<table width="100%">
<tr>
<td><b><i>Files in this Directory</b></i></td>
<td align="right">Sorted by <b>$sortedby</b> in <b>$reversedq</b> order.</td>
</tr>
</table>
</td>
</tr><tr>
<td bgcolor="$listcol">
<table cellpadding="3">
<tr>
<td width="20" align="center"></td><td width="50%"><b><a href="?d=$d&r=$rev1$pwseed">Name</a></b></td>
<td width="25%"><b><a href="?d=$d&s=date&r=$rev2$pwseed">Date Last Modified</a></b></td>
<td width="25%" align="right"><b><a href="?d=$d&s=size&r=$rev3$pwseed">Size</a></b></td>
</tr>
EOT;
if($password && $pw != $password) {
echo <<<EOT
<tr>
<form action="?" method="post"><td colspan="4" align="center"><br><b>There was an error</b><br>You must be logged in<br><br><input type="password" name="passwordli" value=""><br><input type="submit" value="Login"><br><br></td></form>
</tr>
EOT;
foot_exit();
}
if(preg_match("/\.\./",$dirlist->path)) {
echo <<<EOT
<tr>
<td colspan="4" align="center"><br><b>There was an error</b><br>You have been denied access to: "$dirlist->path"<br><br></td>
</tr>
EOT;
foot_exit();
}
if(!$array) {
echo <<<EOT
<tr>
<td colspan="4" align="center"><br><b>There was an error</b><br>There are no files in this directory<br><br></td>
</tr>
EOT;
foot_exit();
}
natcasesort($array);
if($r) { $array = array_reverse($array); }
foreach($array as $shown) {
if($s == 'size') { list($t,$sizef,$entry,$url,$icon,$modified,$size)= split ("\|", $shown, 7); }
else { list($t,$entry,$sizef,$url,$icon,$modified,$size)= split ("\|", $shown, 7); }
echo <<<EOT
<tr>
<td width="25" align="center"><img src="$images/$icon.gif"></td><td><a href="$url">$entry</a></td>
<td>$modified</td>
<td align="right">$size</td>
</tr>
EOT;
}
$dirlist->close();
foot_exit();
function foot_exit() {
echo <<<EOT
</table>
</td>
</tr>
</table>
</body>
</html>
EOT;
exit;
}
?>