<?
/************************************
Script : Free (BULK / MASS EMAILER
Website : http://www.agrizlive.com
Script is provided Under GPU Non-Commercial License
Agrizlive.com doesn't provide any WARRANTY for this script
**************************************/
if(defined('AGRIZ_FREE_SCRIPTS') && AGRIZ_FREE_SCRIPTS == 'agrizlive.com'){
}
else{
exit;
}
include_once("functions/users.php");
$total_users = getTotalUsers();
$total_pages = ceil($total_users / 10);
if(isset($_REQUEST['page'])){
$page = $_REQUEST['page'];
$limit = ($page-1) * 10;
}
else{
$page = 1;
$limit = ($page-1) * 10;
}
$result = getUsers($limit);
?>
<div id="box">
<h3>Users</h3>
<table width="100%">
<thead>
<tr>
<th width="40px"><a href="#">ID<img src="img/icons/arrow_down_mini.gif" width="16" height="16" align="absmiddle" /></a></th>
<th><a href="#">User Name</a></th>
<th width="90px"><a href="#">Email</a></th>
<th width="60px"><a href="#">Action</a></th>
</tr>
</thead>
<tbody>
<?
while($value = mysql_fetch_array($result))
{
?>
<tr>
<td class="a-center"><?=$value['user_id']?></td>
<td><?=stripslashes($value['user_name'])?></td>
<td><?=$value['user_email']?></td>
<td>
<a href="?content=users&value=edit&id=<?=$value['user_id']?>"><img src="img/icons/user_edit.png" title="Edit User" width="16" height="16" /></a>
<a href="?content=users&value=delete&id=<?=$value['user_id']?>" onclick="return confirm('Do you want to delete?')"><img src="img/icons/user_delete.png" title="Delete User" width="16" height="16" /></a>
</td>
</tr>
<?
}
?>
</tbody>
</table>
<div id="pager">
Page <?if($page > 1){?><a href="index.php?content=users&page=<?=$page-1?>" alt="Prev"><img src="img/icons/arrow_left.gif" width="16" height="16" /></a><?}?>
<input size="1" value="<?=$page?>" type="text" name="page" id="page" />
<?if($total_pages < $page){?>
<a href="index.php?content=users&page=<?=$page+1?>" alt="Next"><img src="img/icons/arrow_right.gif" width="16" height="16" /></a><?}?>
of <?=$total_pages?> pages | Total <strong><?=$total_users?></strong> records found
</div>
</div>