| Server IP : 122.155.17.190 / Your IP : 216.73.216.182 Web Server : Apache/2 System : Linux cat17190.thaihostserver.com 5.10.0-21-amd64 #1 SMP Debian 5.10.162-1 (2023-01-21) x86_64 User : t1bnc ( 1042) PHP Version : 5.6.40 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 MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/t1bnc/domains/t1bnc.ac.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;
}
if($_GET["c_id"])
{
$c_id = $_GET["c_id"];
}else
{
$c_id = $_POST["c_id"];
}
if(!isset($c_id) || empty($c_id))
{
die;exit;
}
include("../include/config.php");
include("../include/function.php");
include("../include/config_db.php");
$sql = "select * from `contact_admin_detail` where (`id`='$c_id')";
$dbquery = mysql_query($sql) or die("Can't send query !C");
$num_rows = mysql_num_rows($dbquery);
$c_con_id = 0;
$c_con_name = '';
$c_con_email = '';
$c_con_phone = '';
$c_con_idcard = '';
$c_con_title = '';
$c_con_message = '';
$c_con_date = '';
$c_con_ip_connect = '';
$c_con_send = '';
$c_con_send_name = '';
$c_con_send_email = '';
$c_con_send_message = '';
$c_con_send_date = '';
if($num_rows>0)
{
$c_con_id = mysql_result($dbquery, 0,"con_id");
$c_con_name = mysql_result($dbquery, 0,"con_name");
$c_con_email = mysql_result($dbquery, 0,"con_email");
$c_con_phone = mysql_result($dbquery, 0,"con_phone");
$c_con_idcard = mysql_result($dbquery, 0,"con_idcard");
$c_con_title = mysql_result($dbquery, 0,"con_title");
$c_con_message = mysql_result($dbquery, 0,"con_message");
$c_con_date = mysql_result($dbquery, 0,"con_date");
$c_con_ip_connect = mysql_result($dbquery, 0,"con_ip_connect");
$c_con_send = mysql_result($dbquery, 0,"con_send");
$c_con_send_name = mysql_result($dbquery, 0,"con_send_name");
$c_con_send_email = mysql_result($dbquery, 0,"con_send_email");
$c_con_send_message = mysql_result($dbquery, 0,"con_send_message");
$c_con_send_date = mysql_result($dbquery, 0,"con_send_date");
}
mysql_free_result($dbquery);
unset($dbquery);
$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);
?>
<!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 rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<!--font -->
<link href="../fonts/styles.css" rel="stylesheet" type="text/css" />
<link href="../fonts/stylesheet.css" rel="stylesheet" type="text/css"/>
<!--font -->
<!--font-->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="specimen_files/easytabs.js" type="text/javascript" charset="utf-8"></script>
<link rel="stylesheet" href="specimen_files/specimen_stylesheet.css" type="text/css" charset="utf-8" />
<link rel="stylesheet" href="stylesheet.css" type="text/css" charset="utf-8" />
<!--font-->
<!--cssbutton-->
<style>
.button {
background-color: #4CAF50; /* Green */
border: none;
color: white;
padding: 16px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
transition-duration: 0.4s;
cursor: pointer;
}
.button1 {
background-color: white;
color: black;
border: 2px solid #4CAF50;
}
.button1:hover {
background-color: #4CAF50;
color: white;
}
.button2 {
background-color: white;
color: black;
border: 2px solid #008CBA;
}
.button2:hover {
background-color: #008CBA;
color: white;
}
.button3 {
background-color: white;
color: black;
border: 2px solid #f44336;
}
.button3:hover {
background-color: #f44336;
color: white;
}
.button4 {
background-color: white;
color: black;
border: 2px solid #e7e7e7;
}
.button4:hover {background-color: #e7e7e7;}
.button5 {
background-color: white;
color: black;
border: 2px solid #555555;
}
.button5:hover {
background-color: #555555;
color: white;
}
.button1 {width: 250px;}
.button2 {width: 50%;}
.button3 {width: 100%;}
</style>
<!--cssbutton-->
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</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;
}
.style5 {color: #000000; font-weight: bold; }
.style6 {color: #000000}
-->
</style></head>
<body background="../images/0bg1-1.jpg" style="background-repeat:no-repeat; background-position:top" font-family: 'Sarabun', sans-serif;>
<!-- content -->
<div align="center">
<table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="715" align="center" valign="top"><img src="../images/00nopic.png" width="1000" height="715" /></td>
</tr>
<tr>
<td align="center" valign="top"><div align="right"><a href="/index.php"><img src="../images/1menutop_02.png" width="107" height="46" border="0"></a></div></td>
</tr>
<tr>
<th align="center" valign="top" scope="col"> </th>
</tr>
<tr>
<th align="center" valign="top" scope="col">
<table width="960" border="0" align="center" cellpadding="0" cellspacing="0">
<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="toppage"></a></td>
</tr>
<tr>
<td><div align="center"></div></td>
</tr>
<tr class="styles2">
<td ><div align="right"><a href="../admin/main.php" class="styles2">หน้า Admin </a>| <a href="admin.php#top_page">หน้าหลักโรงเรียน </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> ".$c_con_category." </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">
<tr>
<td colspan="2" height="15"></td>
</tr>
<tr>
<td align="right" width="19%"><font class="textblackb">ระบุข้อมูลที่ต้องการแจ้ง*</font><font class="textblack"> :</font> </td>
<td width="81%"><font class="textgray"><?=$c_con_name;?></font></td>
</tr>
<tr>
<td align="right"><font class="textblackb">หมายเลขบัตรประชาชน* :</font> </td>
<td><font class="textgray"><?=$c_con_idcard;?></font></td>
</tr>
<tr>
<td align="right"><font class="textblackb">โทรศัพท์ :</font> </td>
<td><font class="textgray"><?=$c_con_phone;?></font></td>
</tr>
<tr>
<td align="right"><font class="textblackb">อีเมล์ผู้ส่ง :</font> </td>
<td><font class="textgray"><?=$c_con_email;?></font></td>
</tr>
<tr>
<td align="right"><font class="textblackb">เรื่อง :</font> </td>
<td><font class="textgray"><?=$c_con_title;?></font></td>
</tr>
<tr>
<td align="right" valign="top"><font class="textblackb">ระบุข้อมูลที่ต้องการแจ้ง* :</font> </td>
<td><div style="width:600px; text-align: justify; text-justify: inter-word;" class="textgray"><?=$c_con_message;?></div></td>
</tr>
<tr>
<td align="right"><font class="textblackb">ส่งจาก IP :</font> </td>
<td ><font class="textgray"><?=$c_con_ip_connect;?></font></td>
</tr>
<tr>
<td align="right"><font class="textblackb">เมื่อวันที่ :</font> </td>
<td ><font class="textgray"><? echo dateThai_MM($c_con_date);?></font></td>
</tr>
<tr>
<td colspan="2" height="10"></td>
</tr>
<?
$sql = "select * from `contact_admin_userfiles` where (`cad_id`='".$c_id."')";
$dbquery = mysql_query($sql) or die("Can't send query !C");
$num_rows = mysql_num_rows($dbquery);
$c_caf_file1 = '';$c_caf_file2 = '';$c_caf_file3 = '';$c_caf_file4 = '';$c_caf_file5 = '';
if($num_rows>0)
{
$c_caf_file1 = mysql_result($dbquery, 0,"caf_file1");
$c_caf_file2 = mysql_result($dbquery, 0,"caf_file2");
$c_caf_file3 = mysql_result($dbquery, 0,"caf_file3");
$c_caf_file4 = mysql_result($dbquery, 0,"caf_file4");
$c_caf_file5 = mysql_result($dbquery, 0,"caf_file5");
mysql_free_result($dbquery);
unset($dbquery);
}
if($num_rows>0){
?>
<tr>
<td> </td>
<td><font class="textblackb">เอกสารประกอบ</font> </td>
</tr>
<tr>
<td> </td>
<td >
<?if($c_caf_file1 != ''){?>
<div>เอกสารประกอบ 1. <a href="<?echo "./userattachfiles/".$c_caf_file1;?>" class="textgray" title="" target="_blank"><? echo $c_caf_file1;?></a></div>
<?}?>
<?if($c_caf_file2 != ''){?>
<div>เอกสารประกอบ 2. <a href="<?echo "./userattachfiles/".$c_caf_file2;?>" class="textgray" title="" target="_blank"><? echo $c_caf_file2;?></a></div>
<?}?>
<?if($c_caf_file3 != ''){?>
<div>เอกสารประกอบ 3. <a href="<?echo "./userattachfiles/".$c_caf_file3;?>" class="textgray" title="" target="_blank"><? echo $c_caf_file3;?></a></div>
<?}?>
<?if($c_caf_file4 != ''){?>
<div>เอกสารประกอบ 4. <a href="<?echo "./userattachfiles/".$c_caf_file4;?>" class="textgray" title="" target="_blank"><? echo $c_caf_file4;?></a></div>
<?}?>
<?if($c_caf_file5 != ''){?>
<div>เอกสารประกอบ 5. <a href="<?echo "./userattachfiles/".$c_caf_file5;?>" class="textgray" title="" target="_blank"><? echo $c_caf_file5;?></a></div>
<?}?> </td>
</tr>
<tr>
<td colspan="2" height="10"></td>
</tr>
<?}?>
<tr>
<td> </td>
<td align="left"><a href="answer.php?c_id=<?=$c_id;?>#toppage" title="ตอบ"><img src="answer.png" alt="" border="0" /></a></td>
</tr>
<tr>
<td colspan="2" height="10"></td>
</tr>
<?
if($c_con_send>0)
{
?>
<tr>
<td align="center" colspan="2"><font size="3"><b>:: ตอบกลับเรื่องนี้แล้ว ::</b></font> </td>
</tr>
<tr>
<td align="right" width="19%"><font class="textblackb">โดย :</font> </td>
<td><font class="textgray"><?=$c_con_send_name;?></font></td>
</tr>
<tr>
<td align="right"><font class="textblackb">อีเมล์ผู้ตอบ :</font> </td>
<td><font class="textgray"><?=$c_con_send_email;?></font></td>
</tr>
<tr>
<td align="right" valign="top"><font class="textblackb">ข้อความที่ตอบ :</font> </td>
<td><div style="width:600px; text-align: justify; text-justify: inter-word;" class="textgray"><?=$c_con_send_message;?></div></td>
</tr>
<tr>
<td align="right"><font class="textblackb">วันที่ตอบ :</font> </td>
<td ><font class="textgray"><?=$c_con_send_date;?></font></td>
</tr>
<tr>
<td colspan="2" height="10"></td>
</tr>
<?
$sql = "select * from `contact_admin_adminfiles` where (`cad_id`='$c_id')";
$dbquery = mysql_query($sql) or die("Can't send query !C");
$num_rows = mysql_num_rows($dbquery);
$c_caf_file1 = '';$c_caf_file2 = '';$c_caf_file3 = '';$c_caf_file4 = '';$c_caf_file5 = '';
if($num_rows>0)
{
$c_caf_file1 = mysql_result($dbquery, 0,"caf_file1");
$c_caf_file2 = mysql_result($dbquery, 0,"caf_file2");
$c_caf_file3 = mysql_result($dbquery, 0,"caf_file3");
$c_caf_file4 = mysql_result($dbquery, 0,"caf_file4");
$c_caf_file5 = mysql_result($dbquery, 0,"caf_file5");
mysql_free_result($dbquery);
unset($dbquery);
}
if($num_rows>0){
?>
<tr>
<td> </td>
<td><font class="textblackb">เอกสารประกอบการตอบ</font> </td>
</tr>
<tr>
<td align="right"> </td>
<td >
<?if($c_caf_file1 != ''){?>
<div>เอกสารประกอบ 1. <a href="<?echo "./adminattachfiles/".$c_caf_file1;?>" class="textgray" title="" target="_blank"><? echo $c_caf_file1;?></a></div>
<?}?>
<?if($c_caf_file2 != ''){?>
<div>เอกสารประกอบ 2. <a href="<?echo "./adminattachfiles/".$c_caf_file2;?>" class="textgray" title="" target="_blank"><? echo $c_caf_file2;?></a></div>
<?}?>
<?if($c_caf_file3 != ''){?>
<div>เอกสารประกอบ 3. <a href="<?echo "./adminattachfiles/".$c_caf_file3;?>" class="textgray" title="" target="_blank"><? echo $c_caf_file3;?></a></div>
<?}?>
<?if($c_caf_file4 != ''){?>
<div>เอกสารประกอบ 4. <a href="<?echo "./adminattachfiles/".$c_caf_file4;?>" class="textgray" title="" target="_blank"><? echo $c_caf_file4;?></a></div>
<?}?>
<?if($c_caf_file5 != ''){?>
<div>เอกสารประกอบ 5. <a href="<?echo "./adminattachfiles/".$c_caf_file5;?>" class="textgray" title="" target="_blank"><? echo $c_caf_file5;?></a></div>
<?}?> </td>
</tr>
<tr>
<td colspan="2" height="10"></td>
</tr>
<?
}
}
?>
</table>
</div>
</div> </td>
</tr>
<tr>
<td valign="top"> </td>
</tr>
</table> </td>
</tr>
</table> </th>
</tr>
</table></div></th>
</tr>
</table></td>
</tr>
<tr>
<td align="center" valign="top"><table width="980" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="1000" height="250" valign="top" background="../images/bg/images/bg_04.png" style="background-repeat:no-repeat ; background-position:top"><div align="center">
<table width="1000" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div align="left"><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></div></td>
</tr>
</table>
</div></td>
</tr>
</table></td>
</tr>
</table>
</th>
</tr>
</table>
</div>
<!-- end_content -->
</body>
</html>
<?include("../include/close_db.php");?>