<?php
// -----------------------------------------------------------------------
// This file is part of AROUNDMe
//
// Copyright (C) 2003 - 2007 Barnraiser
// http://www.barnraiser.org/
// info@barnraiser.org
//
// 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, 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 program; see the file COPYING. If not, write to the Free
// Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
// 02110-1301, USA.
// -----------------------------------------------------------------------

?>

<script language="JavaScript" src="<?php echo $template_path_core;?>js/html_gui_editor.js" type="text/javascript"></script>
<script language="JavaScript" src="<?php echo $template_path_core;?>js/colourpicker.js" type="text/javascript"></script>


<table cellspacing="1" cellpadding="0" border="0" width="100%">
	<tr>
		<td width="80%">
			<br />
		</td>
		<?php
		if (isset($custom_stylesheet_elements)) {
		?>
		<td valign="top" align="right">
			<select accesskey="c" name="classes" class="gui_select" onChange="javascript:insertTags('clss', '<?php echo $txtarea;?>', this.value);">
				<option value="0">classes</option>
				<?php
				foreach ($custom_stylesheet_elements as $key => $i):
				?>
				<option value="<?php echo $i['name'];?>"><?php echo $i['title'];?></option>
				<?php
				endforeach;
				?>
			</select><br />
		</td>
		<?php }?>
		<td valign="top" align="right">
			<select accesskey="s" name="styles" class="gui_select" onChange="javascript:insertTags(this.value, '<?php echo $txtarea;?>'); this.value=0;">
				<option value="0">styles</option>
				<option value="b">bold text</option>
				<option value="i">italic text</option>
				<option value="h1">Headline big</option>
				<option value="h2">Headline bigger</option>
				<option value="h3">Headline normal</option>
				<option value="h4">Headline small</option>
				<option value="h5">Headline tiny</option>
				<option value="tt">teletype text</option>
				<option value="code">code</option>
				<option value="ol">ordered list item</option>
				<option value="ul">unordered list item</option>
				<option value="hr">horizontal rule</option>
			</select><br />
		</td>
		<?php
		if (isset($images)) {
		
		if (!isset($module_id)) {
			$module_id = 0;
		}
		?>
		<td valign="top" align="right">
			<select accesskey="i" name="files" class="gui_select" onChange="javascript:insertTags('image', '<?php echo $txtarea;?>', this.value);">
			<option value="">images</option>
			<?php
			foreach ($images as $key => $i):
			?>
			<option value="<?php echo $module_id . "-" . $i['file_md5_name'];?>"><?php echo $i['file_save_name'];?></option>	
			<?php
			endforeach;
			?>
		</td>
		<?php }?>
		<?php
		if (isset($files)) {
		
		if (!isset($module_id)) {
			$module_id = 0;
		}
		?>
		<td valign="top" align="right">
			<select accesskey="i" name="files" class="gui_select" onChange="javascript:insertTags('file', '<?php echo $txtarea;?>', this.value);">
			<option value="">files</option>
			<?php
			foreach ($files as $key => $i):
			?>
			<option value="<?php echo $module_id . "-" . $i['file_md5_name'] . "--" . $i['file_type'];?>"><?php echo $i['file_save_name'];?></option>	
			<?php
			endforeach;
			?>
		</td>
		<?php }?>
	</tr>
</table>


