This is the page for my downloads right...
Nothing rong with it, it works fine...
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>
///////////////////////////////////Quintin's Downloads
else if($action=="quintin_downloads")
{
addonline(getuid_sid($sid),"At Quintin's Downloads","");
include ("wapbuddy_settings.php");
echo "<card id=\"main\" title=\"Quintin's Downloads\">";
echo "<p align=\"center\">";
echo "<img src=\"images/quintin.gif\" alt=\"Downloads\"/>
";
echo "Quintin's Downloads";
echo "</p>";
echo "
";
////////////////////////////////////////////////////////////////////
echo "<a href=\"downloads/pictures/index.php?action=main&sid=$sid\">»Pictures</a>
";
echo "<a href=\"downloads/anamations/index.php?action=main&sid=$sid\">»Anamations</a>
";
echo "<a href=\"downloads/mp3s/index.php?action=main&sid=$sid\">»Mp3's</a>
";
echo "<a href=\"downloads/afrikaanse_mp3s/index.php?action=main&sid=$sid\">»Afrikaanse mp3's</a>
";
echo "<a href=\"downloads/poly_ringtones/index.php?action=main&sid=$sid\">»Poly ringtones</a>
";
echo "<a href=\"downloads/afrikaanse_polys/index.php?action=main&sid=$sid\">»Afrikaanse polys</a>
";
echo "<a href=\"downloads/java_games/index.php?action=main&sid=$sid\">»Java games</a>
";
echo "<a href=\"downloads/my_pimped_mxits_(v3)/index.php?action=main&sid=$sid\">»My pimped mxits</a>
";
echo "<a href=\"downloads/afrikaanse_mxits/index.php?action=main&sid=$sid\">»Afrikaanse mxits</a>
";
echo "<a href=\"downloads/3gp_clips/index.php?action=main&sid=$sid\">»3gp clips</a>
";
echo "<a href=\"downloads/3gp_music_videos/index.php?action=main&sid=$sid\">»3gp music videos</a>
";
echo "<a href=\"downloads/afrikaanse_music_videos/index.php?action=main&sid=$sid\">»Afrikaanse music videos</a>
";
echo "<a href=\"downloads/funny_tones/index.php?action=main&sid=$sid\">»Funny tones</a>
";
/////////////////////////////////////////////////////
echo "</p>";
echo "<p align=\"center\">";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo "</card>";
}
///////////////////////////////////
</div>
But now, how do i get this page to work right with my script
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>
<?
header("Content-type: text/vnd.wap.wml");
echo "<?xml version=\"1.0\"?>";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\""." \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
include("../wapbuddy_settings.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);
?>
<wml>
<card id="card1" title="<? echo $conf["site_name"] ?>">
<p mode="nowrap">
<do type="option" label="Home"><go href="../index.php"/></do>
<? echo "<a href=\"../index.php\">Home</a>
"; ?>
<?
if ($file_count > 0)
{
$first_record = $page * $conf["items_per_page"];
$last_record = $first_record + $conf["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);
}
}
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 " (" . round($total/1024,1) . "kb)";
echo "
<a href=\"../index.php\">Home</a>";
}
closedir($dp);
?>
</p>
</card>
</wml>
</div>
Please, someone please help me, just want this page to work right with the script
Nothing rong with it, it works fine...
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>
///////////////////////////////////Quintin's Downloads
else if($action=="quintin_downloads")
{
addonline(getuid_sid($sid),"At Quintin's Downloads","");
include ("wapbuddy_settings.php");
echo "<card id=\"main\" title=\"Quintin's Downloads\">";
echo "<p align=\"center\">";
echo "<img src=\"images/quintin.gif\" alt=\"Downloads\"/>
";
echo "Quintin's Downloads";
echo "</p>";
echo "
";
////////////////////////////////////////////////////////////////////
echo "<a href=\"downloads/pictures/index.php?action=main&sid=$sid\">»Pictures</a>
";
echo "<a href=\"downloads/anamations/index.php?action=main&sid=$sid\">»Anamations</a>
";
echo "<a href=\"downloads/mp3s/index.php?action=main&sid=$sid\">»Mp3's</a>
";
echo "<a href=\"downloads/afrikaanse_mp3s/index.php?action=main&sid=$sid\">»Afrikaanse mp3's</a>
";
echo "<a href=\"downloads/poly_ringtones/index.php?action=main&sid=$sid\">»Poly ringtones</a>
";
echo "<a href=\"downloads/afrikaanse_polys/index.php?action=main&sid=$sid\">»Afrikaanse polys</a>
";
echo "<a href=\"downloads/java_games/index.php?action=main&sid=$sid\">»Java games</a>
";
echo "<a href=\"downloads/my_pimped_mxits_(v3)/index.php?action=main&sid=$sid\">»My pimped mxits</a>
";
echo "<a href=\"downloads/afrikaanse_mxits/index.php?action=main&sid=$sid\">»Afrikaanse mxits</a>
";
echo "<a href=\"downloads/3gp_clips/index.php?action=main&sid=$sid\">»3gp clips</a>
";
echo "<a href=\"downloads/3gp_music_videos/index.php?action=main&sid=$sid\">»3gp music videos</a>
";
echo "<a href=\"downloads/afrikaanse_music_videos/index.php?action=main&sid=$sid\">»Afrikaanse music videos</a>
";
echo "<a href=\"downloads/funny_tones/index.php?action=main&sid=$sid\">»Funny tones</a>
";
/////////////////////////////////////////////////////
echo "</p>";
echo "<p align=\"center\">";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo "</card>";
}
///////////////////////////////////
</div>
But now, how do i get this page to work right with my script
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>
<?
header("Content-type: text/vnd.wap.wml");
echo "<?xml version=\"1.0\"?>";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\""." \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
include("../wapbuddy_settings.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);
?>
<wml>
<card id="card1" title="<? echo $conf["site_name"] ?>">
<p mode="nowrap">
<do type="option" label="Home"><go href="../index.php"/></do>
<? echo "<a href=\"../index.php\">Home</a>
"; ?>
<?
if ($file_count > 0)
{
$first_record = $page * $conf["items_per_page"];
$last_record = $first_record + $conf["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);
}
}
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 " (" . round($total/1024,1) . "kb)";
echo "
<a href=\"../index.php\">Home</a>";
}
closedir($dp);
?>
</p>
</card>
</wml>
</div>
Please, someone please help me, just want this page to work right with the script


Comment