$path="../";
include("../data/functions.php");
header("HTTP/1.0: 200 OK\n");
$c="http://".$HTTP_SERVER_VARS['SERVER_NAME'].$HTTP_SERVER_VARS['REQUEST_URI'];
$c=substr($c,strlen($zepath."news/"));
if (substr($c,-5)==".html") $c=substr($c,0,-5);
$query=mysql_query("select * from news where title like '".mysql_escape_string($c)."'");
if (@mysql_num_rows($query)>0) {
$r=mysql_fetch_array($query);
printheader("Neon Drive News | ".$r[title],0);
print_calea ($r[title], 'news|'.$r[title], 'news/index.html|news/'.url($r[title]).'.html');
echo '
'.$r[title].'
'.$r[text];
printfooter();
}
else {
$query=mysql_query("select * from news order by data desc");
printheader("Neon Drive Latest News",0);
print_calea ('Neon Drive Latest News', 'news', 'news/index.html');
echo "
";
while ($r=mysql_fetch_array($query)) {
echo ''.$r[title].'
'.$r[short_description]."
details
";
}
printfooter();
}
?>