include('config.php'); ?>
include('page.php'); ?>
โครงการสถานศึกษา วิทยาลัยเทคโนโลยีจรัสพิชากร
|
|
|
$strSQL2 = "SELECT * FROM username a INNER JOIN pgroup b ON (a.ugroup = b.id_pgroup) where username != 'admin'";
$objQuery2 = mysql_query($strSQL2) or die ("Error Query [".$strSQL2."]");
$Num_Rows = mysql_num_rows($objQuery2);
$Per_Page = 20; // Per Page
$Page = $_GET["Page"];
if(!$_GET["Page"])
{
$Page=1;
}
$Prev_Page = $Page-1;
$Next_Page = $Page+1;
$Page_Start = (($Per_Page*$Page)-$Per_Page);
if($Num_Rows<=$Per_Page)
{
$Num_Pages =1;
}
else if(($Num_Rows % $Per_Page)==0)
{
$Num_Pages =($Num_Rows/$Per_Page) ;
}
else
{
$Num_Pages =($Num_Rows/$Per_Page)+1;
$Num_Pages = (int)$Num_Pages;
}
$strSQL2 .=" LIMIT $Page_Start , $Per_Page";
$objQuery2 = mysql_query($strSQL2);
$a=1;
?>
ผู้ใช้ระบบ |
|
|
|
|
ลำดับ |
ชื่อ-สกุล |
ฝ่าย |
while($objResult2 = mysql_fetch_array($objQuery2))
{
?>
|
|
|
$a++; }?>
|
|
Total
Record
$pages = new Paginator;
$pages->items_total = $Num_Rows;
$pages->mid_range = 10;
$pages->current_page = $Page;
$pages->default_ipp = $Per_Page;
$pages->url_next = $_SERVER["PHP_SELF"]."?QueryString=value&Page=";
$pages->paginate();
echo $pages->display_pages()
?>
|
|
|
include('foot.php'); ?> |
|