<table width="100%" cellpadding="5" cellspacing="0" border="0">
	<tr><td class="nav"><a href="index.php?section=home">Home</a>&nbsp;&gt;&nbsp;<a href="index.php?section=forms&theme=<?php echo $data["theme"] ?>">Forms</a>&nbsp;&gt;&nbsp;<a href="index.php?section=forms&action=edit&theme=<?php echo $data["theme"] ?>&form=<?php echo $data["form"]; ?>"><?php echo $data["form_name"]; ?></a></td></tr>
	<tr><td>
	<table cellpadding="2" cellspacing="2" border="0" width="600" align="center">
	<tr><td colspan="3" class="lined blue_bcg white_body padded" align="center">Form Fields</td></tr>
	<tr>
		<td class="list_header" align="center">Field Label</td>
		<td class="list_header" align="center">Field Type</td>
		<td class="list_header" align="center">Action</td>
	</tr>
	<?php
	foreach($data["items"] as $item){
		?><tr>
			<td class="list_cell"><?php echo $item["label"]; ?></td>
			<td class="list_cell"><?php echo $item["field"]; ?></td>
			<td class="list_cell" align="center"><?php
			admin_output_image("buttons/but_edit_small.gif",$item["edit"],0,"edit");
			if($item["move_up"])
				admin_output_image("buttons/but_up_small.gif",$item["move_up"],0,"move up");
			else
				admin_output_image("buttons/but_up_small_disabled.gif");
				
			if($item["move_down"])
				admin_output_image("buttons/but_down_small.gif",$item["move_down"],0,"move down");
			else
				admin_output_image("buttons/but_down_small_disabled.gif");
			?></td>
		</tr><?php
	}//foreach 
	?>
	<tr><td colspan="3" class="lined blue_bcg white_body padded" align="center">Form Buttons</td></tr>
	<tr>
		<td class="list_header" align="center">Button Text</td>
		<td class="list_header" align="center">Button Image</td>
		<td class="list_header" align="center">Action</td>
	</tr>
	<?php
	foreach($data["buttons"] as $button){
		?><tr>
			<td class="list_cell"><?php echo $button["text"]; ?></td>
			<td class="list_cell"><?php 
			if($button["image"] && file_exists(DOC_ROOT."/themes/".$data["theme"]."/gfx/".$button["image"])){
				admin_output_image($button["image"],0,"themes/".$data["theme"]."/gfx");
			}//if
			else{
				echo "&nbsp;";
			}//else
			 ?></td>
			<td class="list_cell" align="center"><?php
			admin_output_image("buttons/but_edit_small.gif",$button["edit"],0,"edit");
			?></td>
		</tr><?php
	}//foreach 
	?>
	<tr><td colspan="3" class="lined blue_bcg white_body padded" align="center">Form Pages</td></tr>
	<tr><td colspan="3" class="form_cell">		
		<table cellpadding="0" cellspacing="3" border="0" align="center">
		<form action="index.php" method="post" name="form_edit">
		<input type="hidden" name="section" value="forms">
		<input type="hidden" name="action" value="save_pages">
		<input type="hidden" name="theme" value="<?php echo $data["theme"]; ?>">
		<input type="hidden" name="form" value="<?php echo $data["form"]; ?>">
		<input type="hidden" name="form_pages" value="">
			<tr>
				<td class="highlight" align="center">Site Pages</td>
				<td>&nbsp;</td>
				<td class="highlight" align="center">Form Pages</td>
			</tr>
			<tr>
				<td><?php
				admin_form_element( array ("type" => "select", "name" => "m_npages", "size" => 10, "options" => array(), "width" => 230, "multiple" => 1) );
				?></td>
				<td align="center" class="padded">
					<table cellpadding="0" cellspacing="0" border="0">
					<tr><td><?php
					admin_form_element( array ("type" => "button", "value" => "&gt;&gt;", "onclick" => "HS_MoveOptions(document.form_edit.m_npages,document.form_edit.m_pages)") );
					?></td></tr>
					<tr><td height="5"><?php
					admin_output_image("spacer_blue.gif");
					?></td></tr>
					<tr><td><?php 						
					admin_form_element( array ("type" => "button", "value" => "&lt;&lt;", "onclick" => "HS_MoveOptions(document.form_edit.m_pages,document.form_edit.m_npages)") );
					?></td></tr>
					</table>
				<td><?php
				admin_form_element( array ("type" => "select", "name" => "m_pages", "size" => 10, "options" => array(), "width" => 230, "multiple" => 1) );
				?></td>
			</tr>
			<tr><td colspan="3">&nbsp;</td></tr>
			<tr><td colspan="3" align="center"><?php
				admin_form_element( array ("type" => "button", "value" => "Back", "link" => $data["link"]) );
				echo "&nbsp;";
				admin_form_element( array ("type" => "button", "value" => "Update", "onclick" => "HS_PrepareData(document.form_edit.m_pages,document.form_edit.form_pages);document.form_edit.submit();") );
			?></td></tr>
		</form>
		</table>
	</td></tr>
	</table>
	</td></tr>
</table>