if(!$_GET["id_news"])
{
$valori="new=1";
$mostra="NUOVA NEWS";
include("admin_apri_popup_news.php");
}
?>
if($id_news) $query = "SELECT id, titolo, testo, data FROM news WHERE id='$id_news'";
else $query = "SELECT id, titolo, testo, data FROM news ORDER BY data DESC";
$result = mysql_query($query) or die('Error, query failed. ' . mysql_error());
while($row = mysql_fetch_array($result)) {
list($id_news, $titolo_news, $testo_news, $data) = $row;
?>
if($_GET["id_news"]) { ?>
$mostra="MODIFICA NEWS";
$azione="modifica";
$valori="id=$id_news&modifica=1";
include("admin_apri_popup_news.php");
?>
echo date("d/m/Y",$data)?>
} else { ?>
-
[...]
} // fine else id_news ?>
} // fine while ?>