<table cellpadding="2" cellspacing="2" border="0" width="400" align="center">
	<tr><td colspan="7" class="lined blue_bcg white_body padded" align="center">Manage eCards Collections</td></tr>
	<?php if(count($data["collections"])){ ?>	
	<form action="index.php" method="post">
	<input type="hidden" name="section" value="ecards">
	<input type="hidden" name="ret_link" value="<?php echo $data["link"]; ?>">
	<input type="hidden" name="action" value="">		
	<tr>
		<td class="list_header" align="center">
		<input type="checkbox" onclick="HS_TickAll('col_id[]',this.form)" name="tick_tracker">
		</td>			
		<td class="list_header" align="center">Collection ID</td>
		<td class="list_header" align="center">Name</td>
		<td class="list_header" align="center">Cards</td>						
		<td class="list_header" align="center">Start</td>
		<td class="list_header" align="center">End</td>
		<td class="list_header" align="center">Action</td>
	</tr>
	<?php
	
		foreach($data["collections"] as $collection){
		?>
		<tr>
			<td class="list_cell" align="center">
			<?php admin_form_element( array ("type" => "checkbox", "name" => "col_id[]", "ovalue" => $collection["col_id"]) ); ?>
			</td>
			<td class="list_cell" align="center"><?php echo $collection["col_id"]; ?></td>
			<td class="list_cell" align="center"><?php echo $collection["name"]; ?></td>
			<td class="list_cell" align="center"><?php echo $collection["cards"]; ?></td>
			<td class="list_cell" align="center"><?php echo $collection["start"]; ?></td>
			<td class="list_cell" align="center"><?php echo $collection["end"]; ?></td>
			<td class="list_cell" align="center"><?php
			if($collection["status"]){
				admin_output_image("buttons/but_ban_small.gif",$collection["deactivate"],0,"deactivate");
			}//if
			else{
				admin_output_image("buttons/but_unban_small.gif",$collection["activate"],0,"activate");
			}//else
			admin_output_image("buttons/but_edit_small.gif",$collection["edit"],0,"edit");
			admin_output_image("buttons/but_delete_small.gif",$collection["delete"],0,"delete");
			?></td>
		</tr>
		<?php
		}//foreach
				
	?>
	<tr>			
		<td colspan="7" align="center"><?php
		admin_form_element( array ("type" => "button", "value" => "Create New Collection", "link" => "index.php?section=ecards&action=create_collection&ret_link=".urlencode($data["link"])) );
		echo "&nbsp;";
		admin_form_element( array ("type" => "button", "value" => "Delete", "bsubmit" => "this.form.action.value='delete_collection';") );
		?></td>			
	</tr>
	<?php } else { ?>
	<tr><td class="body" colspan="7" align="center">No Collections found.</td></tr>
	<tr><td align="center" colspan="7"><?php admin_form_element( array ("type" => "button", "value" => "Create New Collection", "link" => "index.php?section=ecards&action=create_collection&ret_link=".urlencode($data["link"])) ); ?></td></tr>
	<?php } ?>
	<tr><td colspan="7">&nbsp;</td></tr>
</table>