Mira este es el codigo del archivo que muestra los encabezados:
Código PHP:
<?php require_once('Connections/noticias.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$maxRows_ultimas = 10;
$pageNum_ultimas = 0;
if (isset($_GET['pageNum_ultimas'])) {
$pageNum_ultimas = $_GET['pageNum_ultimas'];
}
$startRow_ultimas = $pageNum_ultimas * $maxRows_ultimas;
mysql_select_db($database_noticias, $noticias);
$query_ultimas = "SELECT * FROM noticias";
$query_limit_ultimas = sprintf("%s LIMIT %d, %d", $query_ultimas, $startRow_ultimas, $maxRows_ultimas);
$ultimas = mysql_query($query_limit_ultimas, $noticias) or die(mysql_error());
$row_ultimas = mysql_fetch_assoc($ultimas);
if (isset($_GET['totalRows_ultimas'])) {
$totalRows_ultimas = $_GET['totalRows_ultimas'];
} else {
$all_ultimas = mysql_query($query_ultimas);
$totalRows_ultimas = mysql_num_rows($all_ultimas);
}
$totalPages_ultimas = ceil($totalRows_ultimas/$maxRows_ultimas)-1;
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
<style type="text/css">
<!--
.bordenegro {border:1px solid black;border-bottom:1px solid black}
.notihead {font-family: "Segoe UI", Arial; color: #000000; font-size: 11px;}
.notititle {font-family: "Segoe UI", Arial; color: #000000; font-size: 11px; text-align:center; font-weight:bold}
-->
</style>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=0,width=640,height=480,left = 365,top = 160');");
}
// End -->
</script>
</head>
<body>
<?php do { ?>
<table width="100%" align="center" cellpadding="0" cellspacing="2" onmouseover="this.style.background = '#EEEEEE';" onmouseout="this.style.background = '#FFFFFF';" style=" border-bottom:2px solid #cccccc ">
<tr>
<td width="65%"><div class="notititle"><?php echo $row_ultimas['titulo']; ?></div>
<div align="center"></div></td>
</tr>
<tr>
<td valign="top"><div class="notihead">
<?php echo $row_ultimas['imagen']; ?><img src="<?php echo $row_ultimas['ruta']; ?>" width="130" height="120" hspace="5" vspace="5" align="left" />
-->
<?php echo $row_ultimas['resumen']; ?></div></td>
</tr>
<tr>
<td valign="top"> <?php echo "
<div align=right><a href=\"javascript:popUp('http://www.elcapitolio.net/noticias/notas.php?id=$row_ultimas[id]; ')\"><img src=\"/images/vernota2.gif\" width=66 height=15 border=0 /></a></div>
"?>
</td>
</tr>
</table>
<?php } while ($row_ultimas = mysql_fetch_assoc($ultimas)); ?>
<p> </p>
<?php
echo "
<table width=403 height=127 border=0 cellpadding=2 cellspacing=2>
<tr>
<td width=63> </td>
<td width=51 colspan=2> </td>
</tr>
<tr>
<td height=23 colspan=3><div align=center>$row_ultimas[titulo]</div></td>
</tr>
<tr>
<td height=23 colspan=3>$row_ultimas[contenido]</td>
</tr>
<tr>
<td height=42 colspan=3>
</td>
</tr>
</table>
";
?>
</body>
</html>
<?php
mysql_free_result($ultimas);
?>