
<!--/span-->				<div class="span12"><script type="text/javascript">
	function newAccount(){
		d = document.Account;
		d.account.value = "";
		d.name.value = "";
		d.email.value = "";
		d.action.value ="new";
		d.submitAccount.value ="New Account";
		document.getElementById("form-tab").innerHTML ="New Account";
		show("formAccount");
		location.href = "#formAccount";
	}	
	function editAccount(account, name, email){
		d = document.Account;
		d.account.value = account;
		d.name.value = name;
		d.email.value = email;
		d.action.value ="edit";
		d.submitAccount.value ="Update Account";
		document.getElementById("form-tab").innerHTML ="Update Account";
		show("formAccount");
		location.href = "#formAccount";
	}	
</script>

<div class="page-header">
	Accounts (Logon to Post) are disabled, please go to the settings to enable this feature.<br />	<h1>Accounts list</h1>
	<button class="btn btn-primary pull-right" onclick="newAccount();return false;">
		<i class="icon-pencil icon-white"></i>
		New Account	</button>		
</div>

<div id="formAccount" style="display:none;">
	<div id="form-tab" class="form-tab"></div>
	<form class="well" name="Account" action="" method="post" onsubmit="return checkForm(this);">
		<fieldset>
			<p>
				<label>Name</label>
				<input name="name" type="text" class="text-long" lang="false" onblur="validateText(this);" xml:lang="false" />
			</p>
			<p>
				<label>Email</label>
				<input name="email" type="text" class="text-long" lang="false" onblur="validateText(this);" xml:lang="false" />
			</p>
			<input id="submitAccount" type="submit" value="Submit" class="btn btn-primary" />
			<input type="submit" value="Cancel" class="btn" onclick="hide('formAccount');return false;" />
			<input type="hidden" name="account" value="" />
			<input type="hidden" name="action" value="" />
		</fieldset>
	</form>
</div>

<table class="table table-bordered">
	<thead>
	<tr>
		<th>ID</th>
		<th>Name</th>
		<th>Email</th>
                <th>Active</th>
		<th>Date Created</th>
		<th>&nbsp;</td>
	</tr>
	</thead>
	<tbody>
	<?php if(count($users) == 0){ ?>
	<p>Nothing found</p>    
	<?php }else{ 
	foreach($users as $user){	
	?>
	<tr>
	<td><?php echo $user->id;?></td>
	<td><?php echo $user->name;?></td>
	<td><?php echo $user->email;?></td>
        <td><?php if($user->verified==0){echo 'No';}else{ echo 'Yes';}?></td>
	<td><?php echo formatDate($user->dt_created);?></td>
	</tr>
	<?php }} ?>	
	</tbody>
</table>
<div class="pagination"><?php echo $links;?>
</div>
<h4>Search</h4>
<form name="ocForm" class="well" id="ocForm" action="" method="get">
	<fieldset>
        <p>
        	<label>Name</label>
            <input name="name" type="text" class="text-long" value="" />
		</p>
		<p>
        	<label>Email</label>
            <input name="email" type="text" class="text-long" value="" />
		</p>
		<input type="submit" value="Search" class="btn" />
	</fieldset>
</form>
</div><!--/span--> 
		
