|
|
<?php
|
|
|
$html_select_pag = '<select onchange="window.location='.chr(39).'index.php?option=com_users&controller=Users&action=getUsers&inicio='.chr(39).'+this.value">';
|
|
|
|
|
|
$j = count($paginas);
|
|
|
for($i=0;$i<$j;$i++){
|
|
|
$html_select_pag .= "<option value='".$paginas[$i]."'";
|
|
|
if($inicio == $paginas[$i]){
|
|
|
$html_select_pag .= "selected='selected'";
|
|
|
}
|
|
|
$html_select_pag .= ">";
|
|
|
$html_select_pag .= "".($i+1)."/".$j."</option>";
|
|
|
}
|
|
|
$html_select_pag .= "</select>";
|
|
|
|
|
|
$html_pagination = '<ul class="mnu_pagination">';
|
|
|
$html_pagination .= '<li><a href="index.php?option=com_users&controller=Users&action=getUsers&inicio='.$navegador["fin"].'">';
|
|
|
$html_pagination .= "Last</a></li>";
|
|
|
$html_pagination .= '<li><a href="index.php?option=com_users&controller=Users&action=getUsers&inicio='.$navegador["siguiente"].'">';
|
|
|
$html_pagination .= "Next</a></li>";
|
|
|
$html_pagination .= '<li class="pages">Page'.$html_select_pag.'</li>';
|
|
|
$html_pagination .= '<li><a href="index.php?option=com_users&controller=Users&action=getUsers&inicio='.$navegador["anterior"].'">';
|
|
|
$html_pagination .= "Prev</a></li>";
|
|
|
$html_pagination .= '<li><a href="index.php?option=com_users&controller=Users&action=getUsers&inicio='.$navegador["inicio"].'">';
|
|
|
$html_pagination .= "Start</a></li>";
|
|
|
$html_pagination .= '</ul><div style="clear:both"></div>';
|
|
|
?>
|
|
|
<script type="text/javascript">
|
|
|
$().ready(function() {
|
|
|
$(".btn_delUser").click(function(){
|
|
|
var _id = $(this).attr("alt");
|
|
|
if(confirm("Are you sure to delete this user?")){
|
|
|
window.location = "index.php?option=com_users&controller=Users&action=remove&user="+_id;
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
</script>
|
|
|
<span class="etiqueta">Users</span>
|
|
|
<div id="div_info_user">
|
|
|
<div class="toolbar_right">
|
|
|
<ul><li><a href="index.php?option=com_users&controller=Users&action=newUser">
|
|
|
<img src="templates/images/add_user.png" alt="Add" border="0" /></a></li></ul>
|
|
|
</div>
|
|
|
<div style="clear:both; overflow: hidden"></div>
|
|
|
<div class="div_pagination_right">
|
|
|
<?php echo $html_pagination; ?>
|
|
|
</div>
|
|
|
<div style="clear:both; overflow: hidden"></div>
|
|
|
<div id="content_user" class="content_list">
|
|
|
<table width="100%" cellpadding="0" cellspacing="0">
|
|
|
<thead>
|
|
|
<tr>
|
|
|
<th align="center" width="5%">N°</th>
|
|
|
<th align="center" width="10%" colspan="2"></th>
|
|
|
<th align="center">Username</th>
|
|
|
<th align="center">Lastname</th>
|
|
|
<th align="center">Firstname</th>
|
|
|
<th align="center">State</th>
|
|
|
</tr>
|
|
|
</thead>
|
|
|
<tbody>
|
|
|
<?php
|
|
|
$numeracion = 1;
|
|
|
|
|
|
$num_rows = $listUsers->rowCount();
|
|
|
|
|
|
if($num_rows > 0){
|
|
|
while($datos_usuario = $listUsers->fetch()){
|
|
|
?>
|
|
|
<tr>
|
|
|
<td align="center" width="5%"><?php echo ($numeracion+$inicio); ?></td>
|
|
|
<td width="5%" align="center">
|
|
|
<a href="index.php?option=com_users&controller=Users&action=editUser&user=<?php echo $datos_usuario['iduser']; ?>">
|
|
|
<img src="../imagenes/b_edit.png" alt="Edit" style="border: 0" />
|
|
|
</a>
|
|
|
</td>
|
|
|
<td width="5%" align="center">
|
|
|
<a href="#" class="btn_delUser" alt="<?php echo $datos_usuario['iduser']; ?>">
|
|
|
<img src="../imagenes/b_drop.png" alt="Delete" style="border: 0" />
|
|
|
</a>
|
|
|
</td>
|
|
|
<td align="center">
|
|
|
<a href="index.php?option=com_users&controller=Users&action=view&user=<?php echo $datos_usuario['iduser']; ?>">
|
|
|
<?php echo $datos_usuario['username']; ?>
|
|
|
</a>
|
|
|
</td>
|
|
|
<td align="center"><?php echo $datos_usuario['lastname']; ?></td>
|
|
|
<td align="center"><?php echo $datos_usuario['firstname']; ?></td>
|
|
|
<td align="center">
|
|
|
<?php if($datos_usuario['state'] == 1){ ?>
|
|
|
<img src="../imagenes/usractive.jpeg" alt="Active" border="0" />
|
|
|
<?php } ?>
|
|
|
<?php if($datos_usuario['state'] == 2){ ?>
|
|
|
<img src="../imagenes/b_locked.png" alt="Locked" border="0" />
|
|
|
<?php } ?>
|
|
|
<?php
|
|
|
switch($datos_usuario['state']){
|
|
|
case 3: echo 'Deleted';
|
|
|
break;
|
|
|
case 4: echo 'FLogin';
|
|
|
break;
|
|
|
case 5: echo 'Reset';
|
|
|
break;
|
|
|
}
|
|
|
?>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<?php
|
|
|
$numeracion ++;
|
|
|
}
|
|
|
} else {
|
|
|
?>
|
|
|
<tr><td colspan="7" align="center">Users not found.</td></tr>
|
|
|
<?php } ?>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
</div>
|
|
|
<div class="div_pagination_right">
|
|
|
<?php echo $html_pagination; ?>
|
|
|
</div>
|
|
|
<div style="clear:both; overflow: hidden"></div>
|
|
|
</div>
|