<?
include ("../includes/config.php");
include ("../includes/funciones.php");
//nos conectamos a mysql
$cnx = conectar ();
$nombreTabla = $_GET['nombreTabla'];
$id= $_GET['id'];
if (!tabla_existe($nombreTabla,$DATABASE)){
echo "Lo sentimos, pero esta noticia ya no existe";
$res="";
exit;
}else{
$sql = "SELECT id, titulo, texto, tipoenlace, enlace, tituloenlace FROM ".$nombreTabla." ORDER BY orden ASC";
$res= mysql_query($sql) or die (mysql_error());
$numTotalRegistros = mysql_num_rows($res);
$sql2 = "SELECT id, titulo FROM ".$tabla." WHERE id=".$id." ORDER BY id ASC";
$res2= mysql_query($sql2) or die (mysql_error());
$array_res=mysql_fetch_array ($res2);
$titulo = $array_res['titulo'];
mysql_close($cnx);
}
?>