• Help
  • Search
  • Login
  • Register
  • Home

Forum: web design and graphics community

Celestial Star Forum > Español (Spanish Only) > Código / Desarrollo web > paginacion??
Pages: [1]
« previous next »
  Print  
Author Topic: paginacion??  (Read 884 times)
souma--kun
Angeling
*
Posts: 2


owo


View Profile
paginacion??
« on: September 06, 2007, 01:47:37 PM »

Hola bueno es que tengo una duda sbre hacer paginacion tengo este codigo
gallery.php
Code:
<?php
function gallery($dir) {
    
$col = 0;
    
$max_col = 3; //<===== NUMERO DE COLUMNAS <======
    
$handle=opendir($dir);
    while(
$file = readdir($handle)) {
        if(
is_file($dir.'/'.$file)) {
            
$file_ext = strtolower(substr($file, -4));//Selecciona extension (4 últimos caracteres)
            
$file_extless = str_replace($file_ext,'',$file); //elimina la extensión (reemplaza $file_ext por '')
            
if($file_ext == ".jpg" || $file_ext == ".gif" || $file_ext == ".png") {
                if(
$col < $max_col) {
                    echo 
'<td><a href="ver.php?&img='.$dir.'/'.$file.'" target="_blank"><img src="thumb.php?image='.$dir.'/'.$file.'&w=100" alt="'.Ampliar.'" class="thumb"></a></td>'."\n";
                    
$col++;
                } else {
                    echo 
'</tr><tr><td><a href="ver.php?&img='.$dir.'/'.$file.'" target="_blank"><img src="thumb.php?image='.$dir.'/'.$file.'&w=100" alt="'.Ampliar.'" class="thumb"></a></td>'."\n";
                    
$col = 1;
                }
            
            }
        }
    }
    
    while(
$col < $max_col) {
        echo 
"<td>&nbsp;</td>";
        
$col++;
    }
  }
 
?>


pero por mas que busco tutoriales no hay para hacer paginacion a ese script sin base de datos   Sad alguien me podria ayudar o.o
bueno muchas gracias
Logged

Pages: [1]
  Print  
« previous next »
 
Jump to:  

  • Welcome, Guest
  • Members login
  • Register for free

General

  • General
  • New members
  • Announcements
  • Support / Suggestions

Art boards

  • Creative mediums
  • Requests and offers
  • Tutorials
  • Celestial Star tutorials

Web development

  • Coding
  • Web design
  • Advertisements / affiliation

Off-topic

  • The non-sense
  • Ententainment

Go up
eXTReMe Tracker
  • Valid XHTML
  • Valid CSS
Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC | Seo4Smf v0.2 © Webmaster's Talks
Loading...