any one can fix jump page box to get result of number of the page
PHP Code:
<?php
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")."GMT");
header ("Content-type: application/xhtml+xml; charset=UTF-8");
$mt=microtime(1);
include('setup.php');
include('func.php');
if($zip)
$p=intval(@$_GET['p']);
$sort=intval(@$_GET['sort']);
if($sort>1 or $sort<0)
$sort=0;
$dir=htmlspecialchars((@$_GET['dir']));
while(substr($dir,0,1)=='/')
$dir=substr($dir,1,strlen($dir));
if(strstr($dir,'..') or !is_dir('load/'.$dir)or strstr($dir,'http://') or strstr($dir,'ftp://'))
$dir='';
else
{
ob_start();
}
header('Content-type:text/html; charset=utf-8');
echo '<!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><meta http-equiv="content-type" content="text/html;charset=utf-8" /><html><head>';
echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">';
{include('h.php');}
if(!$dir)
{print '';}
else
{
}
$glob_dir=glob('load/'.$dir.'/*',GLOB_ONLYDIR);
if($glob_dir)
print '';
{
$count=count($glob_dir);
$countstr=ceil($count/$dirstr);
$page=intval(@$_GET['page']);
if($sort)
;
$start = $page * $dirstr;
if($start>=$count or $start<0)
$start=0;
$end = $start + $dirstr;
if($end>=$count)
$end = $count;
for($i=$start; $i<$end; $i++)
{
$dirt=str_replace('load/','',$glob_dir[$i]);
$dir_exp=explode('/',$dirt);
$count=countf($dirt);
print '<hr/><img style="width: 16px; height: 16px;" alt=""
src="r.png"><a href="index.php?dir='.$dirt.'&p='.$p.'&sort='.$sort.'">'.transdir($dir_exp[count($dir_exp)-1]).'</a>';
}
}
print '';
$glob_file=glob('load/'.$dir.'/*.{'.$allfile.'}',GLOB_BRACE);
if($glob_file)
{
if($sort)
usort($glob_file, 'sortnew');
$count=count($glob_file);
$countstr=ceil($count/$filestr);
$page=intval(@$_GET['page']);
if($sort)
usort($glob_file, 'sortnew');
$start = $page * $filestr;
if($start>=$count or $start<0)
$start=0;
$end = $start + $filestr;
if($end>=$count)
$end = $count;
for($i=$start; $i<$end; $i++)
{
$name=translit($glob_file[$i]);
$filesize=filesize($glob_file[$i]);
if($filesize>1024)
$filesize=round($filesize/1024,1).'KB';
else
$filesize.=' b';
if((r($glob_file[$i])=='3gp' or r($glob_file[$i])=='mp4' or r($glob_file[$i])=='avi') and $p)
print '<hr><small><b>'.$name=str_replace($many,'',$name).'</b></small><br />';
print '<img src="pre.php?file='.$glob_file[$i].'" alt="" /><br />';
$many= array("(www.AxeMob.com)", "(Axemob.com)", ".midi", ".wav", ".3gp");
print '<small><a href="file.php?p='.$p.'&file='.$glob_file[$i].'&sort='.$sort.'"><b>Download</b></a></small><small>('.$filesize.')</small><br />';
echo "
";
}
}
print ' <hr><small><b> ';
if($countstr>1)
{
print nav_page($countstr,$page,$dir,$p,$sort,'index');
}
echo "</b></small>
";
$dir_exp=explode('/',$dir);
if($dir)
print '<hr><div style="text-align: left"><b>Back to:</b>
<b>|</b>';
if(($countj=count(explode('/',$dir)))>1)
{
$j=explode('/',$dir);
for($i=0; $i<=$countj; $i++)
{
$u=@$j[count($j)-2];
if($u)
{
unset($j[count($j)-1]);
$g[$i]= '<small><b><a href="index.php?dir='.join('/', $j).'&p='.$p.'&sort='.$sort.'">'.transdir($u).'</a></b></small><b>|</b></div>';
}
}
for($i=count(@$g)-1; $i>=0; $i--)
print $g[$i];
print '';
}
{
echo "
<form action=\"".$_SERVER["PHP_SELF"]."\" method=\"get\">";
echo "Jump to Page: <input name=\"page\" title=\"Page:\" size=\"3\" maxlength=\"2\"/>";
echo "<input type=\"submit\" value=\"Go\"/>";
echo "</form>";
}
{include('f.php');}
?>