<HTML>
<HEAD>

</HEAD>

<FORM METHOD="POST" id=idContentForm name=idContentForm ACTION="index.php?option=pagemanager&savepage=<?php print "$pageid"; ?>&section=<?php print "$section"; ?>&site=<?php print "$site"; ?>">
<?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: Mark de Haan (mark@starwave.nl)
# Comissioned by: Stadsdeel de Baarsjes, Amsterdam, Netherlands
############################################################################
# editor.php: last changed 07/09/2005  , version: 2.4                                      
#              by Fred Stuurman (fc.stuurman@hccnet.nl)
#$Id: editor.php,v 1.1 2006/10/03 11:21:48 fstuurman Exp $
############################################################################
#                        LICENSE INFORMATION
#
# 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");
}

include ("interface/header.inc.php");
include ("interface/menubar.inc.php");
include ("interface/menustart.inc.php");
include ("interface/menuend.inc.php");
include ("interface/pagestart.inc.php");

$editor_rows = $sas_config['htmlarea_editor_rows'];
?>
                   
<FORM METHOD="POST" ACTION="index.php?option=pagemanager&savepage=<?php print "$pageid"; ?>&section=<?php print "$section"; ?>&site=<?php print "$site"; ?>">
<TABLE class="ToolBar" id="idToolbar" cellSpacing="0" cellPadding="0"  width="600" border="1">
<TBODY>
<TR style="background:ButtonFace">
<TD colSpan=18 height="28" valign="bottom">
<?php

print "<span class=text>&nbsp;" . $sas_lang['title'] . ":&nbsp;</span><input type=\"text\" name=\"title\" size=\"30\" value=\"$title\">
       <span class=text>&nbsp;" . $sas_lang['category'] . ":&nbsp;</span><input type=\"text\" name=\"category\" size=\"20\" value=\"$category\">
       <span class=text>&nbsp;" . $sas_lang['order'] . ":&nbsp;</span><input type=\"text\" name=\"sort\" size=\"1\" value=\"$sort\">";
print "<span class=text>&nbsp;" . $sas_lang['section'] . ":&nbsp;</span><select size=\"1\" name=\"newsection\">\n";
$query = "SELECT id, name FROM $table_sections";
$result = mysql_query($query) or die_script(mysql_error());
while ($section_list = mysql_fetch_array($result))
{
	if ((in_array($section_list[0], $user_sections)) OR ($user_sections[0] == "")) //is user allowed to edit this section?
	{
		if ($section_list[0] == $section)
		{
			print "<option selected value=\"$section_list[0]\">$section_list[1]</option>\n";
		}
		else
		{
			print "<option value=\"$section_list[0]\">$section_list[1]</option>\n";
		}
	}
}
print "</select></TD>
 </TR>
  <TR vAlign=center><td>";
if ($highvisibility == "1")
{
	print "<textarea id=\"content\" name=\"content\" style=\"width:700\" rows=\"$editor_rows\">";
}
else
{
	print "<textarea id=\"content\" name=\"content\" style=\"width:825\" rows=\"$editor_rows\">";
}
print wordwrap("$content");
?>
</textarea></td><tr></table>

<?php

if ($invisible == "yes")
{
	print "<br><input type=\"checkbox\" name=\"invisible\" value=\"yes\" checked>" . $sas_lang['invisible'] . "&nbsp;<img src=graphics/help.gif ONMOUSEOVER=\"popup('" . $sas_lang['invisible_tip'] . "','CCDAEC')\"; ONMOUSEOUT=\"kill()\"><br>";
}
else
{
	print "<br><input type=\"checkbox\" name=\"invisible\" value=\"yes\">" . $sas_lang['invisible'] . "&nbsp;<img src=graphics/help.gif ONMOUSEOVER=\"popup('" . $sas_lang['invisible_tip'] . "','CCDAEC')\"; ONMOUSEOUT=\"kill()\"><br>";
}
print "<br><input type=\"button\" value=\"&nbsp;&nbsp;&nbsp;" . $sas_lang['cancel'] . "\" name=\"backbutton\" onClick=\"javascript:parent.location='index.php?option=pagemanager&section=$section';\" class=\"backbutton\">";
print "&nbsp;<input type=\"submit\" value=\"&nbsp;&nbsp;&nbsp;" . $sas_lang['save'] . "\" name=\"savebutton\" class=\"savebutton\"><br><br></form>";

include ("interface/pageend.inc.php");
include ("interface/footer.inc.php");
?>
