<?php

#############################################################################
#                              Site@School
# content1.php: last changed 29/06/2006  , version: 2.4.02
# by Fred Stuurman  (fc.stuurman@hccnet.nl)
#$Id: content1.php,v 1.1 2006/10/03 11:13:16 fstuurman Exp $
# LICENSE INFORMATION: see LICENCE.txt in starnet directory
#############################################################################

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

$query = "SELECT module FROM $table_pages WHERE id='$page'";
$result = mysql_query($query) OR die_script($query, mysql_error());
$module = mysql_result($result, 0);
unset ($query);
unset ($result);

print "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"$content_parm[2]\"><tr><td>";
print "<table border=\"$content_parm[8]\" cellpadding=\"10\" cellspacing=\"0\" style=\"border-collapse: collapse\"  
		bgcolor=\"$content_parm[1]\" width=\"$content_parm[3]\">
		<tr><td height=\"$content_parm[4]\" valign=\"top\" width=\"100%\">
		<span STYLE=\"font-family: $content_parm[5] ;font-size : $content_parm[6] ;color: $content_parm[7]\">";

if (($module != '') AND (substr($module, 0, 5) != "http:") AND (substr($module, 0, 5) != "file:")) //module field not empty and doesn't contain a link
{
	include ("$cmsdir/modules/$module");
}
else
{
	$query = "SELECT content FROM $table_pages WHERE id='$page'";
	$result = mysql_query($query) OR die_script($query, mysql_error());
	$content = mysql_result($result, 0);
	unset ($query);
	unset ($result);
	$content = str_replace("../", "", $content);
	print $content;
}

print "</span></td></tr></table></td><td></td></tr></table>";
?>
