Ciao =)
Sapreste trovarmi l'errore in questo script ? Non mi da i risultati :(
Codice PHP:
<h1>HOME</h1>
<p>
<?
$var = array_reverse( file("news.txt") );
?>
</p>
<table width="100%">
<?
$pag=$_GET[pag];
if($pag==0){
$pag=1;
}
$mn=6;
$zm=$pag*$mn;
$zxm=$zm-$mn;
$xk=1;
$cnt=count($var);
for($i=$zxm;$i<$zm;$i++){
if ( trim($riga) != "" ) {
$lista = explode("|",$var[$i]);
if($xk==1){
$xk=0;
}else{
$xk=1;
}
?>
<tr>
<td width="80%"><?=$lista[1]; ?></td>
<td width="20%"> </td>
</tr>
<tr>
<td width="80%">POSTATO DA <em><?=$lista[2]; ?></em>
IL <em><?=$lista[3]; ?></em></td>
<td width="20%"> </td>
</tr>
<tr>
<td width="80%"><?=$lista[5]; ?></td>
<td width="20%" align="right" valign="bottom"><?=$lista[4]; ?></td>
</tr>
<tr>
<td height="50"> </td>
<td align="right" valign="bottom"> </td>
</tr>
<?
}
}
$npg=$cnt/$mn;
if(is_int($npg)){
$nxp=$npg;
}else{
settype($npg,"int");
$nxp=$npg+1;
}
?>
</table>
<p>
<?
for($x=1;$x<=$nxp;$x++){
echo "<a href=\"./?pag=$x\"> [$x] </a>";
}
?>
</p>
Grazie :)