plz any kind hearted help me to put pagging tag

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

    plz any kind hearted help me to put pagging tag

    Plz How can i add a pagging tag here plz add it for me
    PHP Code:
    {
    $name=translit($glob_file[$i]);
    $filesize=filesize($glob_file[$i]);
    if(
    $filesize>1024)
    $filesize=round($filesize/10242).' 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="" />';
    }
    elseif(
    $p and file_exists('skrin/'.$basename.'.jpg'))
    {
    print 
    '<img src="pic.php?file=skrin/'.$basename.'.jpg" alt="" />';
    }
    elseif(
    $p and file_exists('skrin/'.$basename.'.png'))
    {
    print 
    '<img src="pic.php?file=skrin/'.$basename.'.png" alt="" />';
    }
    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="" />';
    if((
    r($glob_file[$i])=='3gp' or r($glob_file[$i])=='mp4' or r($glob_file[$i])=='avi') and $p)
    print 
    '<img src="pre.php?file='.$glob_file[$i].'" alt="" />';

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

    print 
    '<img src="theme.php?file='.$glob_file[$i].'" alt="" />';
    print 
    '<div class="borderw"><a href="file.php?p='.$p.'&amp;file='.$glob_file[$i].'&amp;sort='.$sort.'"><table cellspacing="0" class="block"> <tbody> <tr> <td class="img"> </td>';
    print 
    '<td><img src="ar.gif" alt="" />'.$name.'<br/><font color="#282828"> <img src="ar.gif" alt="" />'.$filesize.'<br/></font> </td> </tr> </tbody> </table> </a></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)).'<br />';
    //////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><br />';
    /*else

    echo '<object type="applzication/x-shockwave-flash" data="musiqs.swf?mp3='.$glob_file[$i].'" width="60" height="20">
    <param name="FlashVars" value="musiqs.swf?mp3='.$glob_file[$i].'" />

    </object>';*/

    $dirkomm=str_replace('/''D'str_replace('.''T'$glob_file[$i]));
    if(!
    file_exists('komm/'.$dirkomm))
    $countkomm=0;
    else
    $countkomm=count(file('komm/'.$dirkomm));
    }
    }
     
    ?> 

    #2
    do you mean pagination? ..... if so you need to show the full script as this script has no loop

    Comment


      #3
      Yes bro i mean pagination

      ok bro here is the full code and i have attached it also so plz help bro...
      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("Site Updated On : ".gmdate("D, d M Y H:i:s")."GMT");
      header ("Content-type: application/xhtml+xml; charset=UTF-8");
      ////////Coded by ER///
      $mt=microtime(1);
      include(
      'setup.php');
      include(
      'func.php');
      if(
      $zip)
      {include(
      'zip.php');}
      $p=intval(@$_GET['p']);
      $sort=intval(@$_GET['sort']);
      if(
      $sort>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>'
      ;
      echo 
      '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">';
      echo 
      "<link rel='shortcut icon' href='icon.ico'>";
      echo 
      "<title>$sites</title>";
      echo
      '<link rel="stylesheet" href="./style.css" type="text/css"/>
      </head><body>'
      ;
      include(
      'banner.php');
      print 
      '<div class="center">'; print(Date("l F d, Y"));
      echo 
      "</div>";
      print 
      '<div class="center"><div class="borderbottom">';
      if(
      $sort)
      print 
      ' <b>New to Old</b> | <a href="index.php?p='.$p.'&amp;sort=0&amp;dir='.$dir.'">><b>A to Z</b></a><br/>';
      else
      print 
      ' <b>A to Z</b> | <a href="index.php?p='.$p.'&amp;sort=1&amp;dir='.$dir.'"><b>New to old</b></a><br/>';
      echo 
      "</div></div>";

      if(!
      $dir)
      {print 
      '<div align="center" class="Coolsky">Download Menu<br/></div>';}
      else
      {
      $dir_exp=explode('/',$dir);
      print 
      '<div class="navlow"><div align="center" class="Coolsky"><b>'.transdir($dir_exp[count($dir_exp)-1]).'</b></div></div>';
      }

      $glob_dir=glob('load/'.$dir.'/*',GLOB_ONLYDIR);
      if(
      $glob_dir)

      {
      $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 
      '<div class="menuitem"><img src="folder.gif" alt="-" /><a href="index.php?dir='.$dirt.'&amp;p='.$p.'&amp;sort='.$sort.'"><b>'.transdir($dir_exp[count($dir_exp)-1]).'</b></a></div>';
      }
      }

      $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']);
      $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/10242).' 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="" />';
      }
      elseif(
      $p and file_exists('skrin/'.$basename.'.jpg'))
      {
      print 
      '<img src="pic.php?file=skrin/'.$basename.'.jpg" alt="" />';
      }
      elseif(
      $p and file_exists('skrin/'.$basename.'.png'))
      {
      print 
      '<img src="pic.php?file=skrin/'.$basename.'.png" alt="" />';
      }
      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="" />';
      if((
      r($glob_file[$i])=='3gp' or r($glob_file[$i])=='mp4' or r($glob_file[$i])=='avi') and $p)
      print 
      '<img src="pre.php?file='.$glob_file[$i].'" alt="" />';

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

      print 
      '<img src="theme.php?file='.$glob_file[$i].'" alt="" />';
      print 
      '<div class="borderw"><a href="file.php?p='.$p.'&amp;file='.$glob_file[$i].'&amp;sort='.$sort.'"><table cellspacing="0" class="block"> <tbody> <tr> <td class="img"> </td>';
      print 
      '<td><img src="ar.gif" alt="" />'.$name.'<br/><font color="#282828"> <img src="ar.gif" alt="" />'.$filesize.'<br/></font> </td> </tr> </tbody> </table> </a></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)).'<br />';
      //////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><br />';
      /*else

      echo '<object type="applzication/x-shockwave-flash" data="musiqs.swf?mp3='.$glob_file[$i].'" width="60" height="20">
      <param name="FlashVars" value="musiqs.swf?mp3='.$glob_file[$i].'" />

      </object>';*/

      $dirkomm=str_replace('/''D'str_replace('.''T'$glob_file[$i]));
      if(!
      file_exists('komm/'.$dirkomm))
      $countkomm=5;
      else
      $countkomm=count(file('komm/'.$dirkomm));
      }
      }
       
      ?>

      <div class="Coolsky" align="center">Fun Menu!</div>
      <div class="menuitem"><img src="book.png" alt="-" /> 
      <a href="http://wapo.biz/gb/?mrsatya54" >Guest Book</a>   [<font color='green'>Request Your Games Here</font>]</div>
      <div class="menuitem"><img src="pack.png" alt="-" /> 
      <a href="http://wapo.biz/games/?mrsatya54" >Online Games</a></div>
      <div class="menuitem"><img src="bot.png" alt="-" /> 
      <a href="http://wapo.biz/chatbot/?mrsatya54" >Chat with Bot</a></div>
      <div class="menuitem"><img src="contact.png" alt="-" /> 
      <a href="contact.php" >Contact Us</a></div>
      <div class="menuitem"><img src="dis.png" alt="-" /> 
      <a href="disclaimer.php" >Disclaimer</a></div>
      <? 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 class="atwo" href="index.php?dir='.join('/', $j).'&amp;p='.$p.'&amp;sort='.$sort.'">'.transdir($u).'</a> ';
      }
      }
      for($i=count(@$g)-1; $i>=0; $i--)
      print $g[$i];
      print '';
      }
      if($zip)
      {include('zipf.php');}
      echo "</div></div></div></body></html>";
      echo "<div align='center' class='Coolsky'><img src='home.gif'/><a href='./index.php'>Home</a>"; echo "</div></div>";
      ?>
      <center><script type="text/javascript" src="http://daylogs.com/dw.js"></script><div id="_dlpu"></div><script type="text/javascript">var _dlpu=new _dlw();_dlpu.show('small','2723107j','pu');</script></center>
      Attached Files

      Comment


        #4
        it would be on the lines of:
        PHP Code:
        echo "<a href=\"index.php?page=1\">1 </a>";

        for(
        $i=$start+1$i<=ceil($count/$filestr); $i++) 
        {
           echo 
        "<a href=\"index.php?page=$i\">$i </a>";

        Last edited by something else; 29.02.12, 00:57.

        Comment

        Working...
        X