<?php

if (!defined('IN_HK') || !IN_HK)
{
	exit;
}

if (!HK_LOGGED_IN || !$users->hasFuse(USER_ID, 'fuse_sysadmin'))
{
	exit;
}

if (isset($_POST['hatext']))
{
	fMessage('ok', 'Message sent:<br />"' . clean($_POST['hatext']) . '"');
	$core->Mus('ha', clean($_POST['hatext']));
}

require_once "top.php";

?>			

<h1>Staffs Application</h1>

<br />

<p>
	Please read the applications below, To see for any new application that had been send by the users.</i>
</p>

<br />
<table class="widefat post fixed" >
<thead><tr>
	
<th scope="col" id="title" class="manage-column column-title">ID</th>
	
		
<th scope="col" id="title" class="manage-column column-title">User Id</th>
	
<th scope="col" id="title" class="manage-column column-title">Usernam</th>
<th scope="col" id="title" class="manage-column column-title">Status</th>
<th scope="col" id="title" class="manage-column column-title">Age</th>
<th scope="col" id="title" class="manage-column column-title">Country</th>
<th scope="col" id="title" class="manage-column column-title">T-Zone</th>
<th scope="col" id="title" class="manage-column column-title">R Name</th>
	
<th scope="col" id="title" class="manage-column column-title">Mod-N</th>
<th scope="col" id="title" class="manage-column column-title">Time</th>
<th scope="col" id="title" class="manage-column column-title">Exp</th>
<th scope="col" id="title" class="manage-column column-title">Msg 1</th>
<th scope="col" id="title" class="manage-column column-title">Msg 2</th>
<th scope="col" id="title" class="manage-column column-title">Msg 3</th>
<th scope="col" id="title" class="manage-column column-title">Users</th>
<th scope="col" id="title" class="manage-column column-title">IP</th>	 
</thead>


	<?php

	$get = dbquery("SELECT id,userid,username,appstatus,age,country,timezone,realname,modname,time,experience,message1,message2,message3,users,visitoripaddy FROM applications ORDER BY id ASC");

	while ($user = mysql_fetch_assoc($get))
	{
		echo '<tr>';
          echo '<td>' . $user['id'] . '</td>';
		echo '<td>' . $user['userid'] . '</td>';
		echo '<td>' . $user['username'] . ' </td>';
		echo '<td>' . $user['appstatus'] . ' </td>';
		echo '<td>' . $user['age'] . ' </td>';
		echo '<td>' . $user['country'] . ' </td>';
		echo '<td>' . $user['timezone'] . ' </td>';
		echo '<td>' . $user['realname'] . ' </td>';
		echo '<td>' . $user['modname'] . ' </td>';
		echo '<td>' . $user['time'] . ' </td>';
		echo '<td>' . $user['experience'] . ' </td>';
		echo '<td>' . $user['message1'] . ' </td>';
		echo '<td>' . $user['message2'] . ' </td>';
		echo '<td>' . $user['message3'] . ' </td>';
		echo '<td>' . $user['users'] . ' </td>';
		echo '<td>' . $user['visitoripaddy'] . ' </td>';
		echo '</tr>';
	}

	?>
	</table>

</div>

<p>
<?php if (isset($_POST['hatext'])) { ?>
<h1 style="padding: 15px;">Message Sent <span style="border: 2px dotted gray; padding: 10px; margin: 5px; font-size: 70%; font-weight: normal;"><?php echo clean($_POST['hatext']); ?></span><input type="button" value="Send new message?" onclick="document.location = 'index.php?_cmd=ha';"></h1>
<?php } else { ?>
</p>
<?php
}

require_once "bottom.php";

?>