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

<body>
	<table id="reportptb" class="display cell-border compact row-border table table-striped table-bordered" cellspacing="0" width="100%">
          <thead>
              <tr>	
                  <th>ชื่อรายงาน</th>
              </tr>
          </thead>
          
          <tbody>
         <?
		  	include "../../Connections/connect_mysql.php";
			$sql=" select * from report_tb order by repID; ";
			$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']);
				$repID = $record['repID'];
				$repName = $record['repName'];

		 ?>
         
          	<tr id="r<?=$repID?>" onClick="javascript:showreport(<?=$repID?>);">	
                <td><?=$repName?></td>
                
            </tr>
         <?		
				$rowint = $rowint + 1;
			}//while
		 ?>
          </tbody>
     </table>
</body>
</html>
<?
	mysql_close($c);
?>