<?php

#############################################################################
#                              Site@School
# Site@School is a website management system designed for schools.
#
# About Site@School:
# Original Idea: Mark de Haan (mark@starwave.nl)
# PHP coding & Design: Fred Stuurman (fc.stuurman@hccnet.nl) 
# Comissioned by: Stadsdeel de Baarsjes, Amsterdam, Netherlands
#############################################################################
# include.php: last changed 19/09/2006  , version: 2.4.10
#            by Fred Stuurman  (fc.stuurman@hccnet.nl)
#$Id: include.php,v 1.2 2006/10/15 19:08:54 fstuurman Exp $
############################################################################
#                        LICENSE INFORMATION
# Copyright (C) 2002 - 2006 Municipality of Amsterdam, City District
#  'de Baarsjes', Amsterdam, the Netherlands.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
##############################################################################
if (!defined('IN_SAS'))
{
	die("Hacking attempt");
}

load_language($cmsdir . '/', 'include'); //load language file

$file_name = $sas_config['include_module_path'] . "/$pagetitle";

if (file_exists("$file_name.html"))
{
	include ("$file_name.html");
}
else
	if (file_exists($file_name . htm))
	{
		include ("$file_name.htm");
	}
	else
		if (file_exists($file_name . php))
		{
			include ("$file_name.php");
		}
		else
		{
			$path = str_replace("%file%", $file_name, $sas_lang['include_module_not_exists']);
			print "<p><p>" . $path;
		}
?>
