Revamped upload dir listing - easier to work with

This commit is contained in:
alopexc0de 2012-10-09 02:48:18 -04:00
parent 8e27a62bb5
commit 9dbd07551b
5 changed files with 213 additions and 168 deletions

View File

@ -6,37 +6,37 @@ index of UnPS-GAMA uploads
</HEAD> </HEAD>
<BODY bgcolor="black" text="EEEEEE"> <BODY background="https://si0.twimg.com/profile_background_images/468495900/bg.gif" text="EEEEEE">
<center> <center>
<style type="text/css"> <style type="text/css">
A:link {COLOR:#DDDDDD; TEXT-DECORATION: none}
A:active {COLOR: #FFFFFF; TEXT-DECORATION: none} A:active {COLOR: #FFFFFF; TEXT-DECORATION: none}
A:hover { COLOR: #FFFFFF; TEXT-DECORATION: underline} A:hover { COLOR: #FFFFFF; TEXT-DECORATION: underline}
A:link {COLOR:#DDDDDD; TEXT-DECORATION: none}
A:visited {COLOR: #C0C0C0; TEXT-DECORATION: none} A:visited {COLOR: #C0C0C0; TEXT-DECORATION: none}
.trone { .trone {
background-color: #595959; font-size: 11pt;
font-size: 9pt;
text-indent: 20px;
} }
.trtwo{ .trtwo{
font-size: 11pt;
}
.trto{
background-color: #000000; background-color: #000000;
font-size: 9pt; font-size: 11pt;
text-indent: 20px;
} }
BODY { TEXT-DECORATION: none; BODY { TEXT-DECORATION: none;
font-family:verdana; font-family:verdana;
font-size: 9pt; font-size: 11pt;
text-indent: 20px;
} }
</style> </style>
<br><br> <br><br>
<img src="http://unps-gama.tk/upload/Pictures/header.png"> <img src="http://unps-gama.tk/upload/Pictures/header.png"><br>
<table border=0> <table border=0>
<tr class="trtwo"> <tr class="trto">
<td><center><b>file</b></center></td> <td><center><b>file</b></center></td>
<td><center><b>size</b></center></td> <td><center><b>size</b></center></td>
<td><center><b>last modified</b></center></td> <td><center><b>last modified</b></center></td>
@ -59,33 +59,42 @@ function size($file) {
$trbg = "1"; // which <TR> - background $trbg = "1"; // which <TR> - background
echo "<div class='trone'>
<td width=300><div align='center'><a href='../'>Up One Directory</a></a></div></td>
<td width=100><div align='center'>DIR</div></td>
<td width=300><div align='center'></div></td></div>";
// reading the content and... // reading the content and...
$mydir = dir("./"); $mydir = dir("./");
while ($file=$mydir->read()){ while ($file=$mydir->read()){
$kind = filetype($file); $kind = filetype($file);
// if ($kind != "php"){ // ATTENTION! if you want this file to show subdirectories, remove this query if ($kind != "php"){ // ATTENTION! if you want this file to show subdirectories, remove this query
// if ($kind != '.' && $kind != '..' && $kind != 'index.php'){ if ($file != '.' && $file != '..' && $file != 'index.php' && $file != '.htaccess'){
//... showing the content: //... showing the content:
//<tr> - backgroundcolor //<tr> - backgroundcolor
echo "<tr>"; echo "<tr>";
if ($trbg=="1"){ if ($trbg=="1"){
echo "<tr class=\"trone\">"; echo "<tr class=\"trone\">";
$trbg = "2"; $trbg = "2";
} }
else if ($trbg=="2"){ else if ($trbg=="2"){
echo "<tr class = \"trtwo\">"; echo "<tr class = \"trtwo\">";
$trbg = "1"; $trbg = "1";
} }
//<td> and filename...
//<td> and filename... echo "<td width=300><div align='center'><a href=\"$file\">".$file."</a></div></td>";
echo "<td width=300><a href=\"$file\">".$file."</a></td>"; //...filesize...
//...filesize... if(is_dir($file)){
echo "<td width=100>".size($file)." </td>"; echo "<td width=100><div align='center'>DIR</div></td>";
//... last change... }else{
$change = filemtime($file); echo "<td width=100><div align='center'>".size($file)."</div></td>";
echo "<td width=200>".date("j. - M. - Y; H:i:s",$change)."</td>"; }
} //... last change...
//} $change = filemtime($file);
echo "<td width=300><div align='center'>".date("H:i:s - j M, Y",$change)."</div></td>";
}
}
}
$mydir->close(); $mydir->close();
?> ?>
</tr> </tr>

View File

@ -6,37 +6,37 @@ index of UnPS-GAMA uploads
</HEAD> </HEAD>
<BODY bgcolor="black" text="EEEEEE"> <BODY background="https://si0.twimg.com/profile_background_images/468495900/bg.gif" text="EEEEEE">
<center> <center>
<style type="text/css"> <style type="text/css">
A:link {COLOR:#DDDDDD; TEXT-DECORATION: none}
A:active {COLOR: #FFFFFF; TEXT-DECORATION: none} A:active {COLOR: #FFFFFF; TEXT-DECORATION: none}
A:hover { COLOR: #FFFFFF; TEXT-DECORATION: underline} A:hover { COLOR: #FFFFFF; TEXT-DECORATION: underline}
A:link {COLOR:#DDDDDD; TEXT-DECORATION: none}
A:visited {COLOR: #C0C0C0; TEXT-DECORATION: none} A:visited {COLOR: #C0C0C0; TEXT-DECORATION: none}
.trone { .trone {
background-color: #595959; font-size: 11pt;
font-size: 9pt;
text-indent: 20px;
} }
.trtwo{ .trtwo{
font-size: 11pt;
}
.trto{
background-color: #000000; background-color: #000000;
font-size: 9pt; font-size: 11pt;
text-indent: 20px;
} }
BODY { TEXT-DECORATION: none; BODY { TEXT-DECORATION: none;
font-family:verdana; font-family:verdana;
font-size: 9pt; font-size: 11pt;
text-indent: 20px;
} }
</style> </style>
<br><br> <br><br>
<img src="http://unps-gama.tk/upload/Pictures/header.png"> <img src="http://unps-gama.tk/upload/Pictures/header.png"><br>
<table border=0> <table border=0>
<tr class="trtwo"> <tr class="trto">
<td><center><b>file</b></center></td> <td><center><b>file</b></center></td>
<td><center><b>size</b></center></td> <td><center><b>size</b></center></td>
<td><center><b>last modified</b></center></td> <td><center><b>last modified</b></center></td>
@ -59,32 +59,41 @@ function size($file) {
$trbg = "1"; // which <TR> - background $trbg = "1"; // which <TR> - background
echo "<div class='trone'>
<td width=300><div align='center'><a href='../'>Up One Directory</a></a></div></td>
<td width=100><div align='center'>DIR</div></td>
<td width=300><div align='center'></div></td></div>";
// reading the content and... // reading the content and...
$mydir = dir("./"); $mydir = dir("./");
while ($file=$mydir->read()){ while ($file=$mydir->read()){
$kind = filetype($file); $kind = filetype($file);
// if ($kind != "php"){ // ATTENTION! if you want this file to show subdirectories, remove this query if ($kind != "php"){ // ATTENTION! if you want this file to show subdirectories, remove this query
if ($kind != '.' && $kind != '..' && $kind != 'index.php'){ if ($file != '.' && $file != '..' && $file != 'index.php' && $file != '.htaccess'){
//... showing the content: //... showing the content:
//<tr> - backgroundcolor //<tr> - backgroundcolor
echo "<tr>"; echo "<tr>";
if ($trbg=="1"){ if ($trbg=="1"){
echo "<tr class=\"trone\">"; echo "<tr class=\"trone\">";
$trbg = "2"; $trbg = "2";
} }
else if ($trbg=="2"){ else if ($trbg=="2"){
echo "<tr class = \"trtwo\">"; echo "<tr class = \"trtwo\">";
$trbg = "1"; $trbg = "1";
} }
//<td> and filename...
//<td> and filename... echo "<td width=300><div align='center'><a href=\"$file\">".$file."</a></div></td>";
echo "<td width=300><a href=\"$file\">".$file."</a></td>"; //...filesize...
//...filesize... if(is_dir($file)){
echo "<td width=100>".size($file)." </td>"; echo "<td width=100><div align='center'>DIR</div></td>";
//... last change... }else{
$change = filemtime($file); echo "<td width=100><div align='center'>".size($file)."</div></td>";
echo "<td width=200>".date("j. - M. - Y; H:i:s",$change)."</td>"; }
} //... last change...
$change = filemtime($file);
echo "<td width=300><div align='center'>".date("H:i:s - j M, Y",$change)."</div></td>";
}
}
} }
$mydir->close(); $mydir->close();
?> ?>

View File

@ -6,37 +6,37 @@ index of UnPS-GAMA uploads
</HEAD> </HEAD>
<BODY bgcolor="black" text="EEEEEE"> <BODY background="https://si0.twimg.com/profile_background_images/468495900/bg.gif" text="EEEEEE">
<center> <center>
<style type="text/css"> <style type="text/css">
A:link {COLOR:#DDDDDD; TEXT-DECORATION: none}
A:active {COLOR: #FFFFFF; TEXT-DECORATION: none} A:active {COLOR: #FFFFFF; TEXT-DECORATION: none}
A:hover { COLOR: #FFFFFF; TEXT-DECORATION: underline} A:hover { COLOR: #FFFFFF; TEXT-DECORATION: underline}
A:link {COLOR:#DDDDDD; TEXT-DECORATION: none}
A:visited {COLOR: #C0C0C0; TEXT-DECORATION: none} A:visited {COLOR: #C0C0C0; TEXT-DECORATION: none}
.trone { .trone {
background-color: #595959; font-size: 11pt;
font-size: 9pt;
text-indent: 20px;
} }
.trtwo{ .trtwo{
font-size: 11pt;
}
.trto{
background-color: #000000; background-color: #000000;
font-size: 9pt; font-size: 11pt;
text-indent: 20px;
} }
BODY { TEXT-DECORATION: none; BODY { TEXT-DECORATION: none;
font-family:verdana; font-family:verdana;
font-size: 9pt; font-size: 11pt;
text-indent: 20px;
} }
</style> </style>
<br><br> <br><br>
<img src="http://unps-gama.tk/upload/Pictures/header.png"> <img src="http://unps-gama.tk/upload/Pictures/header.png"><br>
<table border=0> <table border=0>
<tr class="trtwo"> <tr class="trto">
<td><center><b>file</b></center></td> <td><center><b>file</b></center></td>
<td><center><b>size</b></center></td> <td><center><b>size</b></center></td>
<td><center><b>last modified</b></center></td> <td><center><b>last modified</b></center></td>
@ -59,33 +59,42 @@ function size($file) {
$trbg = "1"; // which <TR> - background $trbg = "1"; // which <TR> - background
echo "<div class='trone'>
<td width=300><div align='center'><a href='../'>Up One Directory</a></a></div></td>
<td width=100><div align='center'>DIR</div></td>
<td width=300><div align='center'></div></td></div>";
// reading the content and... // reading the content and...
$mydir = dir("./"); $mydir = dir("./");
while ($file=$mydir->read()){ while ($file=$mydir->read()){
$kind = filetype($file); $kind = filetype($file);
// if ($kind != "php"){ // ATTENTION! if you want this file to show subdirectories, remove this query if ($kind != "php"){ // ATTENTION! if you want this file to show subdirectories, remove this query
// if ($kind != '.' && $kind != '..' && $kind != 'index.php'){ if ($file != '.' && $file != '..' && $file != 'index.php' && $file != '.htaccess'){
//... showing the content: //... showing the content:
//<tr> - backgroundcolor //<tr> - backgroundcolor
echo "<tr>"; echo "<tr>";
if ($trbg=="1"){ if ($trbg=="1"){
echo "<tr class=\"trone\">"; echo "<tr class=\"trone\">";
$trbg = "2"; $trbg = "2";
} }
else if ($trbg=="2"){ else if ($trbg=="2"){
echo "<tr class = \"trtwo\">"; echo "<tr class = \"trtwo\">";
$trbg = "1"; $trbg = "1";
} }
//<td> and filename...
//<td> and filename... echo "<td width=300><div align='center'><a href=\"$file\">".$file."</a></div></td>";
echo "<td width=300><a href=\"$file\">".$file."</a></td>"; //...filesize...
//...filesize... if(is_dir($file)){
echo "<td width=100>".size($file)." </td>"; echo "<td width=100><div align='center'>DIR</div></td>";
//... last change... }else{
$change = filemtime($file); echo "<td width=100><div align='center'>".size($file)."</div></td>";
echo "<td width=200>".date("j. - M. - Y; H:i:s",$change)."</td>"; }
} //... last change...
//} $change = filemtime($file);
echo "<td width=300><div align='center'>".date("H:i:s - j M, Y",$change)."</div></td>";
}
}
}
$mydir->close(); $mydir->close();
?> ?>
</tr> </tr>

View File

@ -6,37 +6,37 @@ index of UnPS-GAMA uploads
</HEAD> </HEAD>
<BODY bgcolor="black" text="EEEEEE"> <BODY background="https://si0.twimg.com/profile_background_images/468495900/bg.gif" text="EEEEEE">
<center> <center>
<style type="text/css"> <style type="text/css">
A:link {COLOR:#DDDDDD; TEXT-DECORATION: none}
A:active {COLOR: #FFFFFF; TEXT-DECORATION: none} A:active {COLOR: #FFFFFF; TEXT-DECORATION: none}
A:hover { COLOR: #FFFFFF; TEXT-DECORATION: underline} A:hover { COLOR: #FFFFFF; TEXT-DECORATION: underline}
A:link {COLOR:#DDDDDD; TEXT-DECORATION: none}
A:visited {COLOR: #C0C0C0; TEXT-DECORATION: none} A:visited {COLOR: #C0C0C0; TEXT-DECORATION: none}
.trone { .trone {
background-color: #595959; font-size: 11pt;
font-size: 9pt;
text-indent: 20px;
} }
.trtwo{ .trtwo{
font-size: 11pt;
}
.trto{
background-color: #000000; background-color: #000000;
font-size: 9pt; font-size: 11pt;
text-indent: 20px;
} }
BODY { TEXT-DECORATION: none; BODY { TEXT-DECORATION: none;
font-family:verdana; font-family:verdana;
font-size: 9pt; font-size: 11pt;
text-indent: 20px;
} }
</style> </style>
<br><br> <br><br>
<img src="http://unps-gama.tk/upload/Pictures/header.png"> <img src="http://unps-gama.tk/upload/Pictures/header.png"><br>
<table border=0> <table border=0>
<tr class="trtwo"> <tr class="trto">
<td><center><b>file</b></center></td> <td><center><b>file</b></center></td>
<td><center><b>size</b></center></td> <td><center><b>size</b></center></td>
<td><center><b>last modified</b></center></td> <td><center><b>last modified</b></center></td>
@ -59,33 +59,42 @@ function size($file) {
$trbg = "1"; // which <TR> - background $trbg = "1"; // which <TR> - background
echo "<div class='trone'>
<td width=300><div align='center'><a href='../'>Up One Directory</a></a></div></td>
<td width=100><div align='center'>DIR</div></td>
<td width=300><div align='center'></div></td></div>";
// reading the content and... // reading the content and...
$mydir = dir("./"); $mydir = dir("./");
while ($file=$mydir->read()){ while ($file=$mydir->read()){
$kind = filetype($file); $kind = filetype($file);
// if ($kind != "php"){ // ATTENTION! if you want this file to show subdirectories, remove this query if ($kind != "php"){ // ATTENTION! if you want this file to show subdirectories, remove this query
// if ($kind != '.' && $kind != '..' && $kind != 'index.php'){ if ($file != '.' && $file != '..' && $file != 'index.php' && $file != '.htaccess'){
//... showing the content: //... showing the content:
//<tr> - backgroundcolor //<tr> - backgroundcolor
echo "<tr>"; echo "<tr>";
if ($trbg=="1"){ if ($trbg=="1"){
echo "<tr class=\"trone\">"; echo "<tr class=\"trone\">";
$trbg = "2"; $trbg = "2";
} }
else if ($trbg=="2"){ else if ($trbg=="2"){
echo "<tr class = \"trtwo\">"; echo "<tr class = \"trtwo\">";
$trbg = "1"; $trbg = "1";
} }
//<td> and filename...
//<td> and filename... echo "<td width=300><div align='center'><a href=\"$file\">".$file."</a></div></td>";
echo "<td width=300><a href=\"$file\">".$file."</a></td>"; //...filesize...
//...filesize... if(is_dir($file)){
echo "<td width=100>".size($file)." </td>"; echo "<td width=100><div align='center'>DIR</div></td>";
//... last change... }else{
$change = filemtime($file); echo "<td width=100><div align='center'>".size($file)."</div></td>";
echo "<td width=200>".date("j. - M. - Y; H:i:s",$change)."</td>"; }
} //... last change...
//} $change = filemtime($file);
echo "<td width=300><div align='center'>".date("H:i:s - j M, Y",$change)."</div></td>";
}
}
}
$mydir->close(); $mydir->close();
?> ?>
</tr> </tr>

View File

@ -6,37 +6,37 @@ index of UnPS-GAMA uploads
</HEAD> </HEAD>
<BODY bgcolor="black" text="EEEEEE"> <BODY background="https://si0.twimg.com/profile_background_images/468495900/bg.gif" text="EEEEEE">
<center> <center>
<style type="text/css"> <style type="text/css">
A:link {COLOR:#DDDDDD; TEXT-DECORATION: none}
A:active {COLOR: #FFFFFF; TEXT-DECORATION: none} A:active {COLOR: #FFFFFF; TEXT-DECORATION: none}
A:hover { COLOR: #FFFFFF; TEXT-DECORATION: underline} A:hover { COLOR: #FFFFFF; TEXT-DECORATION: underline}
A:link {COLOR:#DDDDDD; TEXT-DECORATION: none}
A:visited {COLOR: #C0C0C0; TEXT-DECORATION: none} A:visited {COLOR: #C0C0C0; TEXT-DECORATION: none}
.trone { .trone {
background-color: #595959; font-size: 11pt;
font-size: 9pt;
text-indent: 20px;
} }
.trtwo{ .trtwo{
font-size: 11pt;
}
.trto{
background-color: #000000; background-color: #000000;
font-size: 9pt; font-size: 11pt;
text-indent: 20px;
} }
BODY { TEXT-DECORATION: none; BODY { TEXT-DECORATION: none;
font-family:verdana; font-family:verdana;
font-size: 9pt; font-size: 11pt;
text-indent: 20px;
} }
</style> </style>
<br><br> <br><br>
<img src="http://unps-gama.tk/upload/Pictures/header.png"> <img src="http://unps-gama.tk/upload/Pictures/header.png"><br>
<table border=0> <table border=0>
<tr class="trtwo"> <tr class="trto">
<td><center><b>file</b></center></td> <td><center><b>file</b></center></td>
<td><center><b>size</b></center></td> <td><center><b>size</b></center></td>
<td><center><b>last modified</b></center></td> <td><center><b>last modified</b></center></td>
@ -59,32 +59,41 @@ function size($file) {
$trbg = "1"; // which <TR> - background $trbg = "1"; // which <TR> - background
echo "<div class='trone'>
<td width=300><div align='center'><a href='../'>Up One Directory</a></a></div></td>
<td width=100><div align='center'>DIR</div></td>
<td width=300><div align='center'></div></td></div>";
// reading the content and... // reading the content and...
$mydir = dir("./"); $mydir = dir("./");
while ($file=$mydir->read()){ while ($file=$mydir->read()){
$kind = filetype($file); $kind = filetype($file);
// if ($kind != "php"){ // ATTENTION! if you want this file to show subdirectories, remove this query if ($kind != "php"){ // ATTENTION! if you want this file to show subdirectories, remove this query
if ($kind != '.' && $kind != '..' && $kind != 'index.php'){ if ($file != '.' && $file != '..' && $file != 'index.php' && $file != '.htaccess'){
//... showing the content: //... showing the content:
//<tr> - backgroundcolor //<tr> - backgroundcolor
echo "<tr>"; echo "<tr>";
if ($trbg=="1"){ if ($trbg=="1"){
echo "<tr class=\"trone\">"; echo "<tr class=\"trone\">";
$trbg = "2"; $trbg = "2";
} }
else if ($trbg=="2"){ else if ($trbg=="2"){
echo "<tr class = \"trtwo\">"; echo "<tr class = \"trtwo\">";
$trbg = "1"; $trbg = "1";
} }
//<td> and filename...
//<td> and filename... echo "<td width=300><div align='center'><a href=\"$file\">".$file."</a></div></td>";
echo "<td width=300><a href=\"$file\">".$file."</a></td>"; //...filesize...
//...filesize... if(is_dir($file)){
echo "<td width=100>".size($file)." </td>"; echo "<td width=100><div align='center'>DIR</div></td>";
//... last change... }else{
$change = filemtime($file); echo "<td width=100><div align='center'>".size($file)."</div></td>";
echo "<td width=200>".date("j. - M. - Y; H:i:s",$change)."</td>"; }
} //... last change...
$change = filemtime($file);
echo "<td width=300><div align='center'>".date("H:i:s - j M, Y",$change)."</div></td>";
}
}
} }
$mydir->close(); $mydir->close();
?> ?>