Im started to get piss off by this wapbuddy directory list that im using.
Just recently, the next page page link doesnt want to work anymore. No matter how many times i click it, its still in page 1. I dont what the problem is cause it was workin fine in my local server. But when i upload it and test it to my webhost, doesnt work. The Jump to Page option doesnt work also. I encounter this same problem but i was able to solve it by putting this snippet register_globals = On in my php.ini file (I know its a security threat turning it on) but now, doesnt work. I have emailed my webhost already and waiting for their response but i want some insights also from pro coders. Anyway heres my snippet of wapbuddy.
Just recently, the next page page link doesnt want to work anymore. No matter how many times i click it, its still in page 1. I dont what the problem is cause it was workin fine in my local server. But when i upload it and test it to my webhost, doesnt work. The Jump to Page option doesnt work also. I encounter this same problem but i was able to solve it by putting this snippet register_globals = On in my php.ini file (I know its a security threat turning it on) but now, doesnt work. I have emailed my webhost already and waiting for their response but i want some insights also from pro coders. Anyway heres my snippet of wapbuddy.
PHP Code:
<?php
include '../../../core.php';
//header('Content-Type: application/xhtml+xml');
$conf['items_per_page'] = 8;
echo "<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE html PUBLIC '-//WAPFORUM//DTD XHTML Mobile 1.0//EN' 'http://www.wapforum.org/DTD/xhtml-mobile10.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'><head>
<title>";
echo $site;
echo "</title>
<meta http-equiv='cache-Control' content='no-cache'/>
<link rel='shortcut icon' href='/images/favicon.ico' type='image/x-icon'/>
<style type=\"text/css\">";
include ('../../../css.php');
if(isset($npage))$page=$npage-1;
$total = 0;
if(!($dp = opendir("./"))) die ("Cannot open ./");
$file_array = array();
while ($file = readdir ($dp))
{
if(substr($file,0,1) != '.' and $file != "index.php" and $file!="php.ini")
{
$file_array[] = $file;
}
}
$file_count = count ($file_array);
sort ($file_array);
echo "</style></head><body>
<div><a accesskey='top' id='top'></a></div>
<div class=\"adt\">";
buzz();
echo '<br/>';
random();
echo "</div>
<div class=\"center\">Racing Games "
.'('.($page+1).'/'.ceil($file_count/$conf["items_per_page"]).')</div>'
."<div class=\"left\">";
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 strip_ext($file_name)."<br />
<a href=\"$file_name\">Download (". round(filesize($file_name)/1024,1) . "kb)</a><br /><br />";
$total = $total + filesize($file_name);
}
}
{
echo '</div>'
.'<div class="center"><br />';
admob();
echo '<br />';
}
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 "<br />$file_count ";
if ($file_count == 1)
{echo "File";}
else
{echo "Files";}
if (($file_count > 0) AND ($last_record < $file_count))
{
echo '<br /><form action="'.$_SERVER["PHP_SELF"].'" method="get">
Jump to Page: <input class="box" name="npage" title="Jump to Page:" size="3" value="" maxlength="3"/>
<input type="submit" value="Go"/></form>';
}
echo '</div>
<div class="adb">';
buzz2();
echo "</div>
<div class='footl'>";
include'../../../foot.php';
echo "<a href=\"../index.php\"><img alt=\"<\" src=\"../../../images/back.png\"/>Games</a>";
echo "</div>
</body>";
}
closedir($dp);
echo "</html>";
exit();
?>
Comment