<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<script>
$(document).ready(function() {
	$('#userptb').DataTable({
		"dom": 'f', //กำหนดส่วนหัวเอง
		"scrollY": '50vh', //"200px",
  		"scrollCollapse": true,
  		"paging": false
	});
	
});
</script>
</head>

<body>
	<table id="userptb" class="display cell-border compact row-border table table-striped table-bordered" cellspacing="0" width="100%">
          <thead>
              <tr>	
                  <th>ชื่อผู้ใช้งาน</th>
              </tr>
          </thead>
          
          <tbody>
         <?
		 
		 	/*
			SELECT Orders.OrderID, Customers.CustomerName, Orders.OrderDate
			FROM Orders
			INNER JOIN Customers ON Orders.CustomerID=Customers.CustomerID;
			LEFT (OUTER) JOIN
			RIGHT (OUTER) JOIN
			FULL (OUTER) JOIN
			*/
		  	include "../../Connections/connect_mysql.php";
			$sql=" select * from user_tb where statustrans='N' order by userid; ";
			$result = mysql_query($sql) or die(mysql_error());
			$rowint = 1;
			while($record=mysql_fetch_array($result)){
				//$emp_id = $record['emp_id'];
				//$emp_begin_name = iconv('tis-620','utf-8',$record['emp_begin_name']);
				$userid_rs = $record['userid'];
				$usercode_rs = $record['usercode'];
				$usernameth_rs = $record['usernameth'];
				$userlnameth_rs = $record['userlnameth'];
				$userloginname_rs = $record['userloginname'];
		 ?>
         
          	<tr id="r<?=$userid_rs?>" onClick="addusertogroup(<?=$userid_rs?>);">	
                <td><?=$usernameth_rs?>,<?=$userlnameth_rs?></td>
            </tr>
         <?		
				$rowint = $rowint + 1;
			}//while
		 ?>
          </tbody>
     </table>
</body>
</html>
<?
	mysql_close($c);
?>