any one help me to fix

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    any one help me to fix

    hello masterz please fix this code i have a problem this page working but in next page site name not working for http://sex420.in/files/jar.php?site=demo open folder chk 1,2,3 option site name not working i paste jar.php here please fix it
    <?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)
    {include('zip.php');}
    $site=$_GET['site'];
    $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 "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head>';
    echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">';
    echo "<link rel='shortcut icon' href='/ico.ico'>";

    echo "<title>$site</title>";
    echo'<link rel="stylesheet" href="./style.css" type="text/css"/>
    </head><body>';

    echo "<div class='copy'><center><FONT SIZE=5 color=#990033>$_GET[site]</FONT></center></div>";
    echo "<div class='mes'>";

    if(!$dir)
    {print '';}
    else
    {
    $dir_exp=explode('/',$dir);
    print '<div class="mes">'.transdir($dir_exp[count($dir_exp)-1]).'</div>';
    }
    echo "<div class='copy'><div class='copy'>";
    if($p)
    print ' - Preview image: <b>On.</b> (<a href="jar.php?p=0&amp;sort='.$sort.'&amp;dir='.$di r.'&site='.$site.'"><b>Off?</b></a>)<br/>';
    else
    print ' - Preview image: <b>Off.</b> (<a href="jar.php?p=1&amp;sort='.$sort.'&amp;dir='.$di r.'&site='.$site.'"><b>On?</b></a>)<br/>';
    if($sort)
    print ' - Sort by: <b>date</b> (<a href="jar.php?p='.$p.'&amp;sort=0&amp;dir='.$dir.' &site='.$site.'"><b>name</b></a>)<br/>';
    else
    print ' - Sort by: <b>name</b> (<a href="jar.php?p='.$p.'&amp;sort=1&amp;dir='.$dir.' &site='.$site.'"><b>date</b></a>)<br/>';
    echo "</div></div></div>";
    ?>
    </div><div class='in'><div class='menu1'><div class='text'>
    <center><P align="left" class="redOrder2" STYLE="background-color:#990033; color:#FFFFFF"><strong>&nbsp;</strong><? echo $_GET['site'];?></P></center><div/>
    <?
    $glob_dir=glob('load/'.$dir.'/*',GLOB_ONLYDIR);
    if($glob_dir)
    print '<div/>';
    include("req/sis.php");
    print '<div/>';
    include("req/sisx.php");
    include("req/jad.php");
    print '<div/>';
    print '<br>';

    print'<hr>';

    {
    $count=count($glob_dir);
    $countstr=ceil($count/$dirstr);
    $page=intval(@$_GET['page']);
    if($sort)
    usort($glob_dir, 'sortnew');
    $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 '<img src="dir.gif" alt="[dir]"/>
    <a href="jar.php?dir='.$dirt.'&amp;p='.$p.'&amp;sort= '.$sort.'&site='.$site.'">'.transdir($dir_exp[count($dir_exp)-1]).'</a><div />';
    }

    }


    print '<hr>';
    $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']);
    $site=$_GET['site'];
    $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, 2).' Kb';
    else
    $filesize.=' b';
    /*if(r($glob_file[$i])=='txt')
    {
    $text=file($glob_file[$i]);
    $name=$text[1];
    $opis=$text[2].$text[3].$text[4].$text[5];
    }*/
    echo "";
    $basename=basename($glob_file[$i]);
    if($p and file_exists('skrin/'.$basename.'.gif'))
    {
    print '<img src="pic.php?file=skrin/'.$basename.'.gif" alt="" /><div />';
    }
    elseif($p and file_exists('skrin/'.$basename.'.jpg'))
    {
    print '<img src="pic.php?file=skrin/'.$basename.'.jpg" alt="" /><div />';
    }
    elseif($p and file_exists('skrin/'.$basename.'.png'))
    {
    print '<img src="pic.php?file=skrin/'.$basename.'.png" alt="" /><div />';
    }
    if((r($glob_file[$i])=='jpg' or r($glob_file[$i])=='gif' or r($glob_file[$i])=='png') and $p)
    print '<img src="pic.php?file='.$glob_file[$i].'" alt="" /><div />';
    if((r($glob_file[$i])=='3gp' or r($glob_file[$i])=='mp4' or r($glob_file[$i])=='avi') and $p)


    if((r($glob_file[$i])=='nth' or r($glob_file[$i])=='thm') and $p)

    print '<img src="theme.php?file='.$glob_file[$i].'" alt="" /><div />';
    print ' <strong>'.$name.'</strong><div />';
    //////////if(file_exists('opis/'.$basename.'.txt'))
    ////////$opis=htmlspecialchars(file_get_contents('opis/'.$basename.'.txt'));
    ////////elseif(!isset($opis))
    ////////$opis=false;
    //////if($opis)
    ////////print nl2br(htmlspecialchars($opis)).'<div />';
    //////if(trim(r($glob_file[$i])=='jar'))
    //{
    //}
    /////////////elseif(trim(r($glob_file[$i]))=='txt')
    ///////////print '<a href="txt.php?p='.$p.'&amp;file='.$glob_file[$i].'&amp;sort='.$sort.'">Read</a><div />';
    /*else

    </object>';*/
    print '<a href="'.$glob_file[$i].'">Download</a> ['.$filesize.']<div />';
    include("req/jad.php");
    echo "<hr/> ";
    $dirkomm=str_replace('/', 'D', str_replace('.', 'T', $glob_file[$i]));
    if(!file_exists('komm/'.$dirkomm))
    $countkomm=0;
    else
    $countkomm=count(file('komm/'.$dirkomm));
    }

    }
    if($countstr>1)
    {
    print nav_page($countstr,$page,$dir,$p,$sort,'jar');
    }
    echo "</div>
    ";
    $dir_exp=explode('/',$dir);
    if($dir)
    print '<div class="kin"><div style="text-align: left"><b>Back to:<div/>
    </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]= '<a href="jar.php?dir='.join('/', $j).'&amp;p='.$p.'&amp;sort='.$sort.'">'.transdir( $u).'</a>|</b>';
    }
    }
    for($i=count(@$g)-1; $i>=0; $i--)
    print $g[$i];
    print '';
    }
    if($zip)
    {include('zipf.php');}
    print '<div/>';

    include("req/sis.php");
    include("req/sisx.php");
    print '<div/>';
    include("req/jar.php");
    print '<div/>';
    print '<br>';
    echo "<a href='http://$_GET[site]'>HOME</a><div/>";
    print '';

    ?>
    <p align="center" style="background-color:#990000">
    <center><P align="left" class="redOrder2" STYLE="background-color:#990033; color:#FFFFFF"><strong>&nbsp;</strong><? echo $_GET['site']; ?></P><div/>
    </body></html>

    #2
    pages work for me ....
    but if there not working for you then have to check the function: nav_page() which isnt posted above ^^

    Comment

    Working...
    X