<table width="100%" cellpadding="0" cellspacing="0" border="0">
	<tr><td class="nav"><a href="index.php?section=home">Home</a>&nbsp;&gt;&nbsp;<a href="index.php?section=manage_members&action=members">Manage Members</a>&nbsp;&gt;&nbsp;Edit Member</td></tr>
	<tr><td>
		<table cellpadding="0" cellspacing="3" border="0" width="450" align="center">
		<form action="index.php" method="post">
		<input type="hidden" name="section" value="manage_members">
		<input type="hidden" name="action" value="do_edit_member">
		<input type="hidden" name="mem_id" value="<?php echo $data["values"][mem_id]; ?>">
		<input type="hidden" name="ret_link" value="<?php echo $data["link"]; ?>">
		<?php if(is_array($data["packages"])){ ?>
		<tr><td class="body" width="50%" align="right">Membership Level</td>
		<td class="highlight" valign="top"><?php
		admin_form_element( array ("type" => "select", "name" => "membership", "options" => $data["packages"], "value" => $data["member_info"][membership]) );
		?></td></tr>
		<tr><td class="body" align="right" valign="top">Access Ends:</td><td class="highlight"><table cellpadding="0" cellspacing="2" border="0">
			<tr><td><?php
			admin_form_element ( array ("type" => "radio", "name" => "access_type", "ovalue" => "unlimited", "value" => $data["access_end"][type] ) );
			?></td><td class="highlight" colspan="2"> unlimited </td></tr><tr><td><?php
			admin_form_element ( array ("type" => "radio", "name" => "access_type", "ovalue" => "date", "value" => $data["access_end"][type] ) );
			?></td><td class="highlight"> date (d/m/Y) </td><td><?php
			admin_form_element ( array ("type" => "input", "name" => "access_end", "size" => 10, "value" => $data["access_end"][date] ) );
			?></td></tr>
		</table></td></tr>
		<tr><td colspan="2" style="background-color:#CCCCCC"><?php
		admin_output_image("spacer.gif");
		?></td></tr>
		<?php }//if ?>
		<?php
		foreach($GLOBALS["forms"] as $form){
			while(list($key,$val) = each($form["labels"])){
				if(!eregi("type=\"password\"",$form["elements"][$key])){
					if(!eregi("</textarea>",$form["elements"][$key])){
					?><tr><td class="body" valign="top" width="50%" align="right"><?php echo $val; ?></td><?php
					?><td class="highlight" valign="top"><?php echo $form["elements"][$key]; ?></td></tr><?php
					}//if
					else{
					?><tr><td colspan="2" class="body" align="center"><?php echo $val; ?></td></tr><?php
					?><tr><td colspan="2" class="highlight" align="center"><?php echo $form["elements"][$key]; ?></td></tr><?php
					}//else
				}//if				
			}//while
			?><tr><td colspan="2" style="background-color:#CCCCCC"><?php
			admin_output_image("spacer.gif");
			?></td></tr><?php
		}//foreach
		?>
		<tr><td colspan="2" align="center"><?php
		admin_form_element( array ("type" => "button", "value" => "Back", "link" => $data["link"]) );
		echo "&nbsp;";
		admin_form_element( array ("type" => "button", "value" => "Update") );
		?></td></tr>
		</form>
		</table>
	</td></tr>
	<tr><td>&nbsp;</td></tr>
	<?php if(count($data["photos"]) > 0): ?>
	<tr><td>		
		<table align="center" cellpadding="2" cellspacing="2" border="0" width="400">
		<tr>
			<td class="list_header" align="center">Photo</td>
			<td class="list_header" align="center" width="100%">Caption</td>
			<td class="list_header" align="center">Action</td>
		</tr>
		<?php
		
			foreach($data["photos"] as $photo){
			?>
			<tr>
				<td class="list_cell"><?php admin_output_image($photo["photo"],$photo["edit"],"photos"); ?></td>
				<td class="list_cell"><?php echo $photo["caption"]; ?></td>
				<td class="list_cell"><?php
					admin_output_image("buttons/but_edit_small.gif",$photo["edit"],0,"edit");
					admin_output_image("buttons/but_delete_small.gif",$photo["delete"],0,"delete");
				?></td>
			</tr>
			<?php
			}//foreach
					
		?>
		</table>
	</td></tr>
	<?php endif; ?>
</table>