Musicisti

0 ) { $criterio = " AND MX_albums.uscita = ".$_GET["genere"]; $querio = "&anno=".$_GET["genere"]; } $querystart = "SELECT MX_formazioni.id, MX_formazioni.nome, MX_formazioni.zona, MX_formazioni.testimonianza, MX_formazioni.francobollo". " FROM MX_formazioni". " WHERE MX_formazioni.id <> 1000000000 AND MX_formazioni.pubblicato = 1".$criterio; $query = $querystart." ORDER BY MX_formazioni.nome ASC". " LIMIT $offset, $rowsPerPage"; //echo $query; $result = mysql_query($query) or die('Error, query 1 failed'); // print the random numbers $sfondo = false; while($row = mysql_fetch_array($result)) { if ( $sfondo == true ) { $style = " style=\"background: #f0f7fa;\""; $sfondo = false; } else if ( $sfondo == false ) { $style = ""; $sfondo = true; } /* if ( strlen($row['francobollo']) > 0 ) { $francobollo = "media/jpeg/"."media/jpeg/".$row['francobollo']; } else { $francobollo = "media/gif/1x1.gif"; }*/ echo "\t\t\t\t\t\t\t". "\t\t\t\t\t\t\t

". "\t\t\t\t\t\t\t\t". "\t\t\t\t\t\t\t\t\t\"".$row['nome']."\"". "\t\t\t\t\t\t\t\t". "\t\t\t\t\t\t\t\t".$row['zona']." - ". "\t\t\t\t\t\t\t\t". "\t\t\t\t\t\t\t\t\t".$row['nome']. "\t\t\t\t\t\t\t\t". "\t\t\t\t\t\t\t

". "\t\t\t\t\t\t\t

".charactersfill($row['testimonianza'],160)."
 

". "\t\t\t\t\t\t\t"; } // how many rows we have in database $query = $querystart; $result = mysql_query($query) or die('Error, query 2 failed'); while($row = mysql_fetch_array($result)) { $numrows++; } // how many pages we have when using paging? $maxPage = ceil($numrows/$rowsPerPage); // print the link to access each page $self = $_SERVER['PHP_SELF']; $nav = ''; for($page = 1; $page <= $maxPage; $page++) { if ($page == $pageNum) { $nav .= " $page "; // no need to create a link to current page } else { $nav .= " $page "; } } // creating previous and next link // plus the link to go straight to // the first and last page if ($pageNum > 1) { $page = $pageNum - 1; $prev = " [ < ] "; $first = " [ |< ] "; } else { $prev = ' '; // we're on page one, don't print previous link $first = ' '; // nor the first page link } if ($pageNum < $maxPage) { $page = $pageNum + 1; $next = " [ > ] "; $last = " [ >| ] "; } else { $next = ' '; // we're on the last page, don't print next link $last = ' '; // nor the last page link } // print the navigation link echo "
".$first.$prev.$nav.$next.$last."
"; ?>