     <table width="100%"  border="0" cellspacing="1" cellpadding="1">
      <tr>
        <td class="verddeu"><p><img src="img/titol3.gif" width="465" height="27"></p></td>
      </tr>
      <tr>
        <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="31%" bgcolor="#EEEFF1" class="docegrana"><a href="inicio.php?page=notis1"><div class="docegrana"><img src="img/icon.gif" width="12" height="8" border="0">&Uacute;ltimes noticies</div></a></td>
            <td width="20%" bgcolor="#EEEFF1" class="docegrana">&nbsp;</td>
            <td width="26%" bgcolor="#EEEFF1" class="docegrana">&nbsp;</td>
            <td width="23%" bgcolor="#EEEFF1" class="docegrana"><a href="inicio.php?page=notis1">Mes noticies &gt;&gt; </a></td>
          </tr>
          <tr>
            <td colspan="4" valign="top"><table width="100%" cellpadding="2" cellspacing="2" class="tabbajo">
              <tr>
                <td width="33%" valign="top" class="verddeu"><p align="justify"><a href="javascript:history.back();">&lt;&lt;Tornar</a></p></td>
                <td width="33%" valign="top" class="verddeu"><div align="center"><strong>Noticies
<?php
  $result=mysql_query("select count(id) from news where estado='1' and (tipo_contenido='2' or tipo_contenido='".$current_valid."')",$link);
  $row=mysql_fetch_array($result);
  $total=$row["count(id)"];
  mysql_free_result($result);
  $pnum=sprintf("%d",$pnum);
  $num1=$pnum+1;
  $num2=$pnum+$plim;
  if($num2>$total) $num2=$total;
  echo $num1." - ".$num2." de ".$total;
?>
</strong></div></td>
		<td width="33%" valign="top" class="verddeu"></td>
                </tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td height="364" valign="top">
<?php
  $pmin=0;
  $pant=$pnum-$plim;
  if($pant<$pmin) $pant=$pmin;
  $pmax=((int)(($total-1)/$plim))*$plim;
  $psig=$pnum+$plim;
  if($psig>$pmax) $psig=$pmax;
  $result=mysql_query("select * from news where estado='1' and (tipo_contenido='2' or tipo_contenido='".$current_valid."') order by fecha desc limit ".$pnum.",".$plim,$link);
  while($row=mysql_fetch_array($result)) {
?>
        <table width="100%"  border="0" cellpadding="1" cellspacing="1" bgcolor="#EEEFF1">
          <tr>
            <td width="66%" height="19"><span class="docegrana"><a href="inicio.php?page=notis2&id=<?php echo $row["id"]; ?>"><span class="docegrana"><img src="img/icon4.gif" width="12" height="8" border="0"><?php echo $row["titulo"]; ?></span></a></td>
            <td width="17%"><a href="inicio.php?page=notis2&id=<?php echo $row["id"]; ?>" class="verddeu">llegir mes</a></td>
            <td width="17%" class="verddeu"><div align="right"><?php echo convert_date($row["fecha"]); ?></div></td>
          </tr>
        </table>
          <br>
<?php
  }
  mysql_free_result($result);
  if($total>$plim) {
?>
          <table width="100%"  border="0" cellpadding="1" cellspacing="1" bgcolor="#EEEFF1">
    <TR>
      <TD align=left class=nolink height="19"><span class="docegrana">
<?php if($pnum>0) { ?>
        <A href="inicio.php?page=notis1&pnum=<?php echo $pmin; ?>"><img src="images/primero.jpg" border="0" alt="Anar a la plana inicial" title="Anar a la plana inicial"></A>
        <A href="inicio.php?page=notis1&pnum=<?php echo $pant; ?>"><img src="images/ant.jpg" border="0" alt="Anar a la plana anterior" title="Anar a la plana anterior"></A>
<?php } ?>
      </span></TD>
      <TD align=right class=nolink height="19"><span class="docegrana">
<?php if($pnum<$pmax) { ?>
        <A href="inicio.php?page=notis1&pnum=<?php echo $psig; ?>"><img src="images/sig.jpg" border="0" alt="Anar a la plana següent" title="Anar a la plana següent"></A>
        <A href="inicio.php?page=notis1&pnum=<?php echo $pmax; ?>"><img src="images/ultimo.jpg" border="0" alt="Anar a la darrera plana" title="Anar a la darrera plana"></A>
<?php } ?>
      </span></TD>
    </TR>
          </table>
          <br>
<?php } ?>
          <a href="javascript:history.back();" class="verddeu">&lt;&lt;Tornar</a></td>
      </tr>
    </table>
