<?php
include_once "library/inc.sesadmin.php";
?>

<table width="60%" border="0" cellpadding="2" cellspacing="1" class="table-border">
  <tr>
    <td colspan="2"  align="center"><h1><b>DATA USER </b></h1></td>
  </tr>
  <tr>
    <td colspan="2"><a href="?page=Add-Userweb" target="_self"><img src="images/btn_add_data2.png" height="25" border="0" /></a></td>
  </tr>
  <tr>
    <td colspan="2">&nbsp;</td>
  </tr>
  <tr>
    <td colspan="2"><table class="table-list" width="100%"  border="1" cellspacing="1" cellpadding="2">
      <tr height="40">
        <th width="50" align="center"bgcolor="#CCCCCC"><b>NO</b></th>
        <th width="200"bgcolor="#CCCCCC"><b>NAMA LENGKAP</b></th>
        <th width="120"bgcolor="#CCCCCC"><b>USER ID </b></th>
        <th width="120"bgcolor="#CCCCCC"><b>LEVEL</b></th>
		<td width="70" align="center" bgcolor="#CCCCCC"><b>EDIT</b></td>
        <td width="50" align="center" bgcolor="#CCCCCC"><b>DELETE</b></td>
      </tr>
      <?php
	$userSql = "SELECT * FROM userweb ORDER BY id ASC";
	$userQry = mysql_query($userSql, $koneksidb)  or die ("Query user salah : ".mysql_error());
	$nomor  = 0;
	while ($userRow = mysql_fetch_array($userQry)) {
	$nomor++;
	$Kode = $userRow['id'];
	?>
      <tr height="35">
        <td align="center"><b><?php echo $nomor; ?></b></td>
        <td align="left	"><?php echo $userRow['nama']; ?></td>
        <td align="center"><?php echo $userRow['userid']; ?></td>
        <td align="center"><?php echo $userRow['level']; ?></td>
        <td align="center"><a href="?page=Edit-Userweb&amp;Kode=<?php echo $Kode; ?>" target="_self" alt="Edit Data"><img src="images/btn_edit.png" width="20" height="20" border="0" /></a></td>
        <td align="center"><a href="?page=Delete-Userweb&amp;Kode=<?php echo $Kode; ?>" target="_self" alt="Delete Data" onclick="return confirm('YAKIN INGIN MENGHAPUS DATA USER INI ... ?')"><img src="images/btn_delete.png" width="20" height="20"  border="0"  alt="Delete Data" /></a></td>
      </tr>
      <?php } ?>
    </table></td>
  </tr>
</table>
