<?php
if (!defined('IN_SAS'))
{
	die("Hacking attempt");
}

print $sas_config['news_welcome_text'] . "<br>";

print "<br>";
if (IsSet ($_SESSION['site'])) //are we on protected area
{
	$query = "SELECT id, title, date, category, content 
					  FROM $news_articletable WHERE archive = 0 AND public = 1 ORDER BY id DESC";
}
else
{
	$query = "SELECT id, title, date, category, content 
					  FROM $news_articletable WHERE archive = 0 AND public = 0 ORDER BY id DESC";
}

$result = mysql_query($query) or die_script($query, mysql_error());
print "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#00000\" width=\"90%\">";
print "<tr>
           <td width=100><b>" . $sas_lang['date'] . "</b></td>
           <td><b>" . $sas_lang['news_module_content'] . "</b></td>
       </tr>";

while ($article_list = mysql_fetch_array($result))
{

	$date1 = strftime($date_format, $ad_list[4]);

	print "<tr>
					   <td><b>$article_list[2]</b></td><td><b>$article_list[4]</b></td>
				   </tr>";
}
print "</table><br>";
?>
