Noutati'; if (isset($_GET['id'])) { $res = mysql_query('SELECT * FROM `news` WHERE `UID` = \''.mysql_real_escape_string($_GET['id']).'\' LIMIT 1',$link); if ($r = mysql_fetch_array($res)) { echo '
'; echo '

'.date('d',$r['DATA']).' '.$luni[intval(date('m',$r['DATA']))].' '.date('Y',$r['DATA']).'
'.$r['TEXT'].'

'; } include('footer.php'); die(''); } $res = mysql_query('SELECT * FROM `news` ORDER BY `DATA` DESC LIMIT 5',$link); if (mysql_num_rows($res)) { while ($r = mysql_fetch_array($res)) { echo '
'; echo '

'.date('d',$r['DATA']).' '.$luni[intval(date('m',$r['DATA']))].' '.date('Y',$r['DATA']).'
'.$r['TEXT'].'

'; } } else { echo '
Nu exista nicio noutate adaugata
'; } include('footer.php'); ?>