<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_albumss&action=albums">Manage Albums</a></td></tr>
	<tr><td>&nbsp;</td></tr>
	<tr>
		<td>
			<table cellpadding="2" cellspacing="3" border="0" align="center">
			<form action="index.php" method="post">
			<input type="hidden" name="section" value="manage_albums">
			<input type="hidden" name="action" value="albums">
				<tr>
					<td class="form_cell">
						<table cellspacing="2" cellpadding="0" border="0">
							<tr>
								<td class="body">Search For:</td>
							</tr>							
							<tr>
								<td><?php admin_form_element(array ("type" => "input", "name" => "search_text", "size" => 20, "value" => $data["values"][search_text])); ?></td>
							</tr>
							<tr>
								<td><?php
									$search_for = array (
										"type" => "select",
										"name" => "search_for",
										"options" => array (
											"" => "Please, select...",
											"title" => "Title",
											"mem_id" => "Member ID",
											"email" => "E-mail",
											"fname" => "First Name",
											"lname" => "Last Name"
										),
										"value" => $data["values"][search_for]
										);
									admin_form_element($search_for);?>
								</td>
							</tr>
						</table>
					</td>
					<td class="form_cell">
						<table cellspacing="2" cellpadding="0" border="0">
							<tr>
								<td class="body">Sort By:</td>
							</tr>
							<tr>
								<td><?php
									$sort_by = array (
										"type" => "select",
										"name" => "sort_by",
										"options" => array (
											"" => "Please, select...",
											"title" => "Title",
											"mem_id" => "Member",
										),
										"value" => $data["values"][sort_by]
										);
									admin_form_element($sort_by); ?>
								</td>
							</tr>
							<tr>
								<td><?php
									$sort_order = array (
										"type" => "select",
										"name" => "sort_order",
										"options" => array (
											"asc" => "ascending",
											"desc" => "descending"
										),
										"value" => $data["values"][sort_order]
									);
								admin_form_element($sort_order);
								?>
								</td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td colspan="3" align="center"><?php admin_form_element( array ("type" => "button", "value" => "Show")); ?></td>
				</tr>
			</form>
			</table>
		</td>
	</tr>		
	<tr><td>&nbsp;</td></tr>
	<tr><td>		
		<table align="center" cellpadding="2" cellspacing="2" border="0" width="500">
		<form action="index.php" method="post">
		<input type="hidden" name="section" value="manage_albums">
		<input type="hidden" name="ret_link" value="<?php echo $data["link"]; ?>">
		<input type="hidden" name="action" value="">
		<input type="hidden" name="pro" value="">
		<tr>
			<td class="list_header" align="center">
			<input type="checkbox" onclick="HS_TickAll('mem_id[]',this.form)" name="tick_tracker">
			</td>
			<td class="list_header" align="left">Member ID</td>
			<td class="list_header" align="left">Member Name</td>
			<td class="list_header" align="left">Album Title</td>
			<td class="list_header" align="center">Active</td>
			<td class="list_header" align="center">Action</td>
		</tr>
		<?php
		
			foreach($data["cards"] as $card){
			?>
			<tr>
				<td class="list_cell"><?php
				admin_form_element(array ("type" => "checkbox", "name" => "alb_id[]", "ovalue" => $card["alb_id"]));
				?></td>
				<td class="list_cell"><?php echo $card["mem_id"]; ?></td>
				<td class="list_cell"><a href="<?php echo $card["member_edit"]; ?>"><?php echo $card["name"]; ?></a></td>				
				<td class="list_cell"><?php echo $card["title"]; ?></td>
				<td class="list_cell"><?php
				if($card["active"])
					echo "Yes";
				else
					echo "No";
				?></td>
				<td class="list_cell"><table cellpadding="0" cellspacing="0" border="0"><?php
					?><tr><td><?php admin_output_image("buttons/but_view_small.gif",$card["view"],0,"view",1); ?></td>
					<td><?php admin_output_image("buttons/but_edit_small.gif",$card["edit"],0,"edit"); ?></td>
					<td><?php admin_output_image("buttons/but_delete_small.gif",$card["delete"],0,"delete"); ?></td></tr>					
				</table></td>
			</tr>
			<?php
			}//foreach
					
		?>
		<tr>			
			<td colspan="6" align="center"><?php
			admin_form_element( array ("type" => "button", "value" => "Delete", "bsubmit" => "this.form.action.value='delete_album';") );
			echo "&nbsp;";
			admin_form_element( array ("type" => "button", "value" => "Email", "bsubmit" => "this.form.action.value='send';this.form.section.value='mailbox';") );
			echo "&nbsp;";
			admin_form_element( array ("type" => "button", "value" => "Email All", "bsubmit" => "this.form.action.value='send';this.form.section.value='mailbox';this.form.pro.value='all';") );
			?></td>			
		</tr>		
		</form>
		</table>
	</td></tr>
	<tr><td>&nbsp;</td></tr>
	<?php if(is_array($data["pages"][numbers])): ?>
	<tr>
		<td class="pages_line">
			<table cellpadding="0" cellspacing="0" border="0" align="center" height="20">
				<tr>					
					<td align="center" class="pages_body">
					<?php
						if($data["pages"][prev]){
							?><a href="<?php echo $data["pages"][prev]; ?>">&lt;&lt;</a>&nbsp;<?php
						}//if
						while(list($page,$link) = each($data["pages"][numbers])){
							?><a href="<?php echo $link; ?>"><?php echo ($page == $data["pages"][current]) ? "<b>".$page."</b>" : $page ; ?></a>&nbsp;<?php
						}//while
						if($data["pages"][next]){
							?><a href="<?php echo $data["pages"][next]; ?>">&gt;&gt;</a>&nbsp;<?php
						}//if
					?>
					</td>
			</table>			
		</td>
	</tr>
	<?php endif; ?>
</table>