if (numeros($_GET["noticia"]) and $_GET["noticia"] != "") {
$noticia = mysql_query("select * from pagina_editable where id='$_GET[noticia]'");
if ($row = mysql_fetch_array($noticia)) {
?>
| |
|
echo "$row[titulo]
"; ?> echo htmlcode($row[contenido]); ?> |
| |
| |
| Volver » |
| |
}
} else {
?>
$limite="6";
$noresul=" No existen artículos
";
$orden="id";
$pag=$_GET[pag];
$k2 = mysql_query("select id from pagina_editable");
$contar = mysql_num_rows($k2);
if ($contar <= "0") {
echo $noresul;
} else {
$division= ceil($contar/$limite);
if (!$_GET[pag] or $_GET[pag] > $division or ereg('[^0-9]', $_GET[pag])) { $comienzo="0";} else {
$pagz = $pag - 1;
$comienzo= $limite * $pagz; }
$con = "select * from pagina_editable order by $orden desc limit $comienzo,$limite";
$k = mysql_query($con);
echo "";
while ($row = mysql_fetch_array($k)) {
// contenido sitio
?>
 "> |
echo "$row[titulo]"; ?>
$noticia = htmlcode($row[noticia]);
$notice = substr($noticia,0,340);
echo $notice;
echo " ";
?>
|
// end contenido
}
echo " | ";
echo "Páginas";
if ($pag > $division or !$pag) $pag="1";
if ($pag > 1) { $ant = $pag-1; echo "« Anterior ";}
for ($i=0;$i < $division;$i++) { ++$pa;
if ($pa == $pag) {echo "$pa "; } else { echo "$pa ";}}
if ($pag < $division) { $sig = $pag+1; echo " Siguiente » ";}
}
echo "
";
?>
}
?>
|
| |
Comercial Gastrotec Chile Ltda.
Av.La Dehesa 1822 Of.514
Lo Barnechea / Santiago, Chile
Tel.(56 2) 2245 6715 Cel.(56 9) 9258 0618 |
|