hice lio cuando puse el código, aca listado
Código:
<?php include("../conex.php");
$registros = 8;
if (!$pagina) {
$inicio = 0;
$pagina = 1;
}
else {
$inicio = ($pagina - 1) * $registros;
}
?>
<html>
<head>
<title>LISTADO DE NOTICIAS</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>
<body leftmargin="0" topmargin="0"><table width="100%" height="100%" border="0" cellpadding="8" cellspacing="0">
<table width="100%" height="100%" border="0" cellpadding="8" cellspacing="0">
<tr bgcolor="#99CCCC">
<td height="50" colspan="2"><div align="center"><strong><font size="5"><em>CADENA
SER ARGENTINA</em></font></strong></div></td>
</tr>
<tr>
<td width="21%" valign="top" bordercolor="#CCCCCC" bgcolor="#99CCCC"> <div align="center">
<table width="85%" height="157" border="1" align="left">
<tr>
<td bgcolor="#66CC99"><font size="3"><strong><em>NOTICIAS</em></strong></font></td>
</tr>
<tr>
<td bgcolor="#99CCCC"> <div align="center"><a href="alta_noticias.php">Agregar</a></div></td>
</tr>
<tr>
<td bgcolor="#99CCCC"> <div align="center"><a href="consulta_noticias.php">Consultar</a></div></td>
</tr>
<tr>
<td bgcolor="#66CC99"><font size="3"><strong><em>SECCIONES</em></strong></font></td>
</tr>
<tr>
<td bgcolor="#99CCCC"> <div align="center"><a href="alta_secciones.php">Agregar</a></div></td>
</tr>
<tr>
<td bgcolor="#99CCCC"> <div align="center"><a href="lista_secciones.php">Consultar</a></div></td>
</tr>
<tr>
<td bgcolor="#66CC99"><font size="3"><strong><em>AUTORES</em></strong></font></td>
</tr>
<tr>
<td bgcolor="#99CCCC"> <div align="center"><a href="alta_autor.php">Agregar</a></div></td>
</tr>
<tr>
<td bgcolor="#99CCCC"> <div align="center"><a href="lista_autor.php">Consultar</a></div></td>
</tr>
</table>
</div></td>
<td width="81%" valign="top"> <p align="center"><strong><font size="4"><em>LISTADO
DE NOTICIAS POR FECHA.</em></font></strong> </p>
<p align="center"><a href="consulta_noticias.php">Volver</a> </p>
<table border=1 align="center" cellpadding="5" cellspacing="0">
<tr bgcolor="#99CCCC">
<td width="37" height="40"> <div align="center"><strong>Fecha</strong></div></td>
<td width="48"> <div align="center"><strong>Sección</strong></div></td>
<td width="34"> <div align="center"><strong>Título </strong></div>
<td colspan=2> <div align="center"><strong>Acciones</strong></div></td>
<?php
conectarse();
// CONSULTAMOS TODOS LO REGISTRO PARA SABER CUANTOS TENEMOS
//$result = mysql_query("SELECT notifec,notisec,notitit FROM noti where notifec > " . $desde . " or notifec <" .$hasta. "order by notifec");
// TRAEMOS SOLOS LOS REGISTROS QUE ENTRAN EN EL LIMITE ESPECICADO ARRIBA, OJO DEPENDIENDO DE LA PAGINA DONDE ESTOY
$fecha_inicio=$_POST['fecha_inicio'];
$fecha_fin=$_POST['fecha_fin'];
$result = mysql_query("SELECT * FROM noti WHERE notifec BETWEEN '$fecha_inicio' AND '$fecha_fin'");
$total_paginas = ceil($total_registros / $registros);
$total_registros = mysql_num_rows($result);
if($total_registros) {
echo "<tr bgcolor='#99CCCC'> <font size='4'>";
echo "Sección: -" .$seccide. "- ";
$query = mysql_query("SELECT * FROM secc WHERE seccide = '$seccide'");
while ($myrows = mysql_fetch_array($query)) {
echo $myrows['seccdes'];}
echo "</font></tr><br>";
while ($myrow = mysql_fetch_array($result)) {
echo "<tr>";
echo "<td width='9%' align='center'><font size='2'>";
echo $myrow["notifec"];
echo "</font></td>";
echo "<td align='center'><font size='2'>";
$query = mysql_query("SELECT * FROM secc WHERE seccide = '$seccide'");
while ($myrows = mysql_fetch_array($query)) {
echo $myrows["seccdes"];}
echo "</font></td>";
echo "<td>";
echo $myrow["notitit"];
echo "</td>";
echo "<td>";
echo "<a href=modif_noticias.php?notiide=".$myrow["notiide"] ."&". "seccdes=".$myrow["notitit"] . ">Modificar</a><br>";
echo "</td>";
echo "<td>";
echo "<a href=borrar_secciones.php?seccide=".$myrow["notiide"].">Borrar</a><br>";
echo "</td>";
echo "</tr>";
}
} else {
echo "<tr><td colspan=3><font color='darkgray'>(sin resultados)</font></td></tr>";
}
mysql_free_result($result);
if($total_registros) {
echo "<center>";
if(($pagina - 1) > 0) {
echo "<a href='lista_noticias_x_fecha.php?pagina=".($pagina-1)."¬ifec >" .$desde . "or ¬ifec < " .$hasta."'>< Anterior</a> ";
}
for ($i=1; $i<=$total_paginas; $i++){
if ($pagina == $i) {
echo "<b>".$pagina."</b> ";
}else{
echo "<a href='lista_noticias_x_fecha.php?pagina=$i" . "¬ifec >" .$desde . "or ¬ifec < " .$hasta."'>$i</a> "; }
}
if(($pagina + 1)<=$total_paginas) {
echo " <a href='lista_noticias_x_fecha.php?pagina=".($pagina+1) . "¬ifec >" .$desde . "or ¬ifec < " .$hasta."'>Siguiente ></a>";
}
echo "</center>";
}
?>
</table>
<br>
</td>
</tr>
<tr>
<td valign="top" bordercolor="#CCCCCC" bgcolor="#99CCCC"> </td>
<td valign="top"> </td>
</tr>
</table>
<tr bgcolor="#99CCCC">
<td height="50" colspan="2"><div align="center"></div></td>
</tr>
<tr>
<td width="82%" valign="top"><tr>