session_start();
header("Cache-control: private"); //IE 6 Fix
require("pagini.inc.php");
$homepage = new Page();
$homepage -> Display();
function stiri()
{
require('mysql.inc.php');
$homepage=new Page();
if($_SESSION[en])
{
$titlu='news, events';
$arhiva='News archive';
}
else
{
$titlu='stiri, evenimente, noutati';
$arhiva='Arhiva stiri';
}
$limita=3;
$s_str="SELECT * from stiri order by ordine asc";
$q_str=mysql_query($s_str);
$i=0;
$tabel='
';
$tabel.=''.$nume_tabel.' |
';
$tabel.=''.$form_add.' |
';
$max=mysql_result(mysql_query("SELECT count(id) FROM stiri"),0);
while($str = mysql_fetch_array($q_str))
{
$s_domenii="select id from stiri where id=\"$str[id]\" and domenii like '%,".DOMENIU.",%'";
$q_domenii=mysql_query($s_domenii) or die($s_domenii.'
'.mysql_error().'
'.__FILE__.':'.__LINE__);
$domenii=mysql_fetch_array($q_domenii);
if($domenii[id])
{
$stire='stire'.$_SESSION[en];
$i++;
$tabel.='
- '.$str[$stire].'
'.$str[data].'
|
| |
|
';
}
}
// if(!$i)
// {
// $tabel.='Nu sunt stiri inregistrate |
';
// }
// $tabel.='
';
mysql_close();
$continut='
';
echo $homepage->header_tabel($titlu,$continut,$latime,$align);
echo $homepage->footer_tabel(NULL);
}
stiri();
$homepage -> DisplayFooter();
?>