I`ve downloaded WapTT Upload scrip, configured and uploaded it on my host...
After a file is uploaded... in upload folder (Upload Index), eg. http://site.adress/mp3/index.php/, the files are shown orderd by name...
What must I edit in index.php to make the page to show uploaded files by date??
Here`s the code in /mp3/index.php
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'><?
/*
-------------------------------------------------------
Upload Wap xHTML Sistem
Version: 1.0
Last update: 3.Apr.2006
-------------------------------------------------------
Written by Dan Adrian (wapavo)
Script homepage: WapTT
WWW: http://waptt.uv.ro
Email: wapavo@yahoo.com
Copyright Wapavo. All right reserved.
-------------------------------------------------------
Get more free PHP Wap scripts at Wapavo Website
-------------------------------------------------------
*/
header("Content-type: text/html; charset=ISO-8859-1");
echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>\n";
echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\"
\"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">\n";
echo "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n";
echo "<head>\n";
include("../config.php");
if (!isset($page)) {$page = 0;}
$total = 0;
if(!($dp = opendir("./"))) die ("Cannot open ./");
$file_array = array();
while ($file = readdir ($dp))
{
if(substr($file,0,1) != '.' and $file != "index.php")
{
$file_array[] = $file;
}
}
$file_count = count ($file_array);
sort ($file_array);
echo "<head>\n";
echo "<title>$pagename</title>";
echo "</head>\n";
echo "<body bgcolor=\"#FF9933\" link=\"#0000CC\" vlink=\"#0000CC\" alink=\"#0000CC\">";
echo "<center>";
echo "MP3 Uploads List
";
if ($file_count > 0)
{
$first_record = $page * $items_per_page;
$last_record = $first_record + $items_per_page;
while (list($fileIndexValue, $file_name) = each ($file_array))
{
if (($fileIndexValue >= $first_record) AND ($fileIndexValue < $last_record))
{
echo "<a href=\"$file_name\">$file_name</a> ". round(filesize($file_name)/1024,1) . "kb
";
$total = $total + filesize($file_name);
}
}
echo "
";
if (($file_count > 0) AND ($page != 0))
{
// previous button
$prev_page = $page -1;
echo "<a href=\"".$_SERVER["PHP_SELF"]."?page=$prev_page\">< Prev</a> ";
}
if (($file_count > 0) AND ($last_record < $file_count))
{
// next button
$next_page = $page + 1;
echo " <a href=\"".$_SERVER["PHP_SELF"]."?page=$next_page\">Next ></a>";
}
echo "
Directory: $file_count ";
if ($file_count == 1)
{echo "file";}
else
{echo "files";}
}
echo "
";
echo "
<a href=\"../index.php\">Upload Index</a>
";
closedir($dp);
echo "<a href=\"$homepage_url\">[ACASA]</a>
";
echo "
";
echo "</center>";
echo "</body>";
echo "</html>";
?></div>
10x 4 ur help
After a file is uploaded... in upload folder (Upload Index), eg. http://site.adress/mp3/index.php/, the files are shown orderd by name...
What must I edit in index.php to make the page to show uploaded files by date??
Here`s the code in /mp3/index.php
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'><?
/*
-------------------------------------------------------
Upload Wap xHTML Sistem
Version: 1.0
Last update: 3.Apr.2006
-------------------------------------------------------
Written by Dan Adrian (wapavo)
Script homepage: WapTT
WWW: http://waptt.uv.ro
Email: wapavo@yahoo.com
Copyright Wapavo. All right reserved.
-------------------------------------------------------
Get more free PHP Wap scripts at Wapavo Website
-------------------------------------------------------
*/
header("Content-type: text/html; charset=ISO-8859-1");
echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>\n";
echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\"
\"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">\n";
echo "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n";
echo "<head>\n";
include("../config.php");
if (!isset($page)) {$page = 0;}
$total = 0;
if(!($dp = opendir("./"))) die ("Cannot open ./");
$file_array = array();
while ($file = readdir ($dp))
{
if(substr($file,0,1) != '.' and $file != "index.php")
{
$file_array[] = $file;
}
}
$file_count = count ($file_array);
sort ($file_array);
echo "<head>\n";
echo "<title>$pagename</title>";
echo "</head>\n";
echo "<body bgcolor=\"#FF9933\" link=\"#0000CC\" vlink=\"#0000CC\" alink=\"#0000CC\">";
echo "<center>";
echo "MP3 Uploads List
";
if ($file_count > 0)
{
$first_record = $page * $items_per_page;
$last_record = $first_record + $items_per_page;
while (list($fileIndexValue, $file_name) = each ($file_array))
{
if (($fileIndexValue >= $first_record) AND ($fileIndexValue < $last_record))
{
echo "<a href=\"$file_name\">$file_name</a> ". round(filesize($file_name)/1024,1) . "kb
";
$total = $total + filesize($file_name);
}
}
echo "
";
if (($file_count > 0) AND ($page != 0))
{
// previous button
$prev_page = $page -1;
echo "<a href=\"".$_SERVER["PHP_SELF"]."?page=$prev_page\">< Prev</a> ";
}
if (($file_count > 0) AND ($last_record < $file_count))
{
// next button
$next_page = $page + 1;
echo " <a href=\"".$_SERVER["PHP_SELF"]."?page=$next_page\">Next ></a>";
}
echo "
Directory: $file_count ";
if ($file_count == 1)
{echo "file";}
else
{echo "files";}
}
echo "
";
echo "
<a href=\"../index.php\">Upload Index</a>
";
closedir($dp);
echo "<a href=\"$homepage_url\">[ACASA]</a>
";
echo "
";
echo "</center>";
echo "</body>";
echo "</html>";
?></div>
10x 4 ur help