=1){?> หน่วยงานที่เกี่ยวข้อง หน่วยงานที่เกี่ยวข้อง

=TO_DAYS(NOW()) ) OR (TO_DAYS(".$mod_tb_root."_sdate)<=TO_DAYS(NOW()) AND ". $mod_tb_root."_edate='0000-00-00 00:00:00' ) OR (TO_DAYS(".$mod_tb_root."_sdate)<=TO_DAYS(NOW()) AND TO_DAYS(".$mod_tb_root."_edate)>=TO_DAYS(NOW()) )) AND ".$mod_tb_root."_masterkey='".$masterkey."' AND ".$mod_tb_root."_language='".$txtLanguage."'"; $sql_wl.=" AND ".$mod_tb_root."_status !='Disable'"; if($g>=1){ $sql_wl.=" AND ".$mod_tb_root."_gid ='".$g."'"; } if($gg>=1){ $sql_wl.=" AND ".$mod_tb_root."_sgid ='".$gg."'"; } $query_cms=mysql_query($sql_wl); $TotalRecordCount=mysql_num_rows($query_cms); if($TotalRecordCount>$PageSize) { $NoOfPage= ceil($TotalRecordCount/$PageSize); } else { $NoOfPage=1; } # Select only paging range ######################### if($PageShow>$NoOfPage) { $PageShow=$NoOfPage; } $RecordStart = ($PageShow-1)*$PageSize; $sql_wl.=" ORDER BY ".$mod_tb_root."_order DESC LIMIT $RecordStart,$PageSize"; $query_cms=mysql_query($sql_wl); // echo"
". $sql_wl; $count_row_cms=mysql_num_rows($query_cms); if($count_row_cms>=1){ ?> 1) { ?>
  • First
  • First
  • $NoOfPage) { $maxpage=$NoOfPage; } if($maxpage<$txtMaxCountPage) { $maxpage=$txtMaxCountPage; } if($maxpage-$minpage<=$txtMaxCheckPageA) { $minpage=$maxpage-$txtMaxCheckPageB; } if($NoOfPage<$txtMaxCountPage) { $maxpage=$NoOfPage; } for($i=$minpage;$i<=$maxpage;$i++) { if($i==$PageShow){ ?>
  • Last
  • Last
1) { ?>
  • First
  • First
  • $NoOfPage) { $maxpage=$NoOfPage; } if($maxpage<$txtMaxCountPage) { $maxpage=$txtMaxCountPage; } if($maxpage-$minpage<=$txtMaxCheckPageA) { $minpage=$maxpage-$txtMaxCheckPageB; } if($NoOfPage<$txtMaxCountPage) { $maxpage=$NoOfPage; } for($i=$minpage;$i<=$maxpage;$i++) { if($i==$PageShow){ ?>
  • Last
  • Last