403Webshell
Server IP : 172.67.187.206  /  Your IP : 172.71.28.155
Web Server : Apache/2.4.25 (Win32) OpenSSL/1.0.2j PHP/5.6.30
System : Windows NT WIN-ECQAAA40806 6.2 build 9200 (Windows Server 2012 Standard Edition) i586
User : SYSTEM ( 0)
PHP Version : 5.6.30
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  E:/Inetpub/www/myoffice/2564/modules/tkk1_backup/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : E:/Inetpub/www/myoffice/2564/modules/tkk1_backup/addedit.php
<?
CheckUser($_SESSION['user_user'], $_SESSION['user_pwd']);
?>
<link href="style_web.css" rel="stylesheet" type="text/css" />
<script language="JavaScript">
//******************************************
function checkregis() {
if(document.myform.rdo1.checked == false && document.myform.rdo2.checked == false && document.myform.rdo3.checked == false&& document.myform.rdo4.checked == false  )   
{        
alert('กรุณาเลือกประเภท ');       
return false;    
}    
if(document.myform.KOM.value=="") {
alert("กรุณาเลือกกลุ่ม") ;
document.myform.KOM.select() ;
return false ;
}

if(document.myform.TOPIC.value=="") {
alert("กรุณากรอกเรื่อง") ;
document.myform.TOPIC.select() ;
return false ;
}

//********************************************
}
</script>
	<TABLE cellSpacing=0 cellPadding=0 width=100% height=500 border=0>
      <TBODY>
        <TR>
          <TD  vAlign=top>
				<TABLE width="70%"  align=center cellSpacing=0 cellPadding=0 border=0 background="images/124.jpg">
				<TR>
					<TD>
 <?
 if($_GET[op] == "tkk1_edit" AND $_GET[action] == "edit"){
	//////////////////////////////////////////// กรณีแก้ไข Database Edit
	if(CheckLevelUser($_SESSION['user_user'],$_GET[op])){
		//	CheckUser($_SESSION['user_user']);
		$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
		$res[user] = $db->select_query("SELECT * FROM ".TB_user." WHERE username='".$_SESSION['user_user']."' ");
		$arr[user] = $db->fetch($res[user]);
		//ดึงค่า
		$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
		$res[tkk1] = $db->select_query("SELECT * FROM ".TB_TKK1." WHERE id='".$_GET[id]."' ");
		$arr[tkk1] = $db->fetch($res[tkk1]);
		
		if (!$_POST[CATEGORY]){
			echo "<script language='javascript'>" ;
			echo "alert('กรุณากรอกข้อมูลต่างๆให้ครบถ้วน')" ;
			echo "</script>" ;
			echo "<script language='javascript'>javascript:history.back()</script>";
			exit();
}
//ทำการแก้ไขข้อมูลลงดาต้าเบส
		$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
		$db->update_db(TB_TKK1,array(
			"category"=>"$_POST[CATEGORY]",
			"topic"=>"$_POST[TOPIC]",
			"num"=>"$_POST[NUM]",
			"edit"=>"15",
			"comment1"=>"รอเสนอแฟ้ม",
			"namecom"=>"",
			"posted"=>"$_POST[POSTED]",
			"post_date"=>"".TIMESTAMP."",
			"update_date"=>"",
			"enable_comment"=>"1"
		)," id=$_GET[id] ");
		$db->closedb ();
} else {
//ทำการแก้ไขข้อมูลลงดาต้าเบส
		$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
		$db->update_db(TB_TKK1,array(
			"category"=>"$_POST[CATEGORY]",
			"topic"=>"$_POST[TOPIC]",
			"num"=>"$_POST[NUM]",
			"edit"=>"15",
			"comment1"=>"รอเสนอแฟ้ม",
			"namecom"=>"",
			"post_date"=>"".TIMESTAMP."",
			"posted"=>"$_POST[POSTED]",
			"update_date"=>"",
			"enable_comment"=>"1"
		)," id=$_GET[id] ");
		$db->closedb ();

}
//ทำการสร้างไฟล์ text ของข่าวสาร
		$Filename = TIMESTAMP.".txt";
		$txt_name = "data/tkk1text/".$Filename."";
		$txt_open = @fopen("$txt_name", "w");
		@fwrite($txt_open, "".$_POST[DETAIL]."");
		@fclose($txt_open);
		
		$ProcessOutput .= "<BR><BR>";
		$ProcessOutput .= "<CENTER><IMG SRC=\"images/icon/login-welcome.gif\" BORDER=\"0\"></A><BR><BR>";
		$ProcessOutput .= "<FONT COLOR=\"#336600\"><B>ได้ทำการแก้ไข เรียบร้อยแล้ว</B></FONT><BR><BR>";
		$ProcessOutput .= "<meta http-equiv=\"refresh\" content=\"2 ;url=?name=tkk1&file=bookperson&op=tkk1_read&category=".$arr[user][id]."\">";
		$ProcessOutput .= "</CENTER>";
		$ProcessOutput .= "<BR><BR>";

	echo $ProcessOutput ;
}
else if($_GET[op] == "tkk1_edit"){
	//////////////////////////////////////////// กรณีแก้ไข Form
	if(CheckLevelUser($_SESSION['user_user'],$_GET[op])){
		//ดึงค่า
		$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
		$res[tkk1] = $db->select_query("SELECT * FROM ".TB_TKK1." WHERE id='".$_GET[id]."' ");
		$arr[tkk1] = $db->fetch($res[tkk1]);
		$db->closedb ();

		//อ่านค่าจากไฟล์ Text เพื่อแก้ไข
		$Filetkk1Topic = "data/tkk1text/".$arr[tkk1][post_date].".txt";
		$file_open = @fopen($Filetkk1Topic, "r");
		$TextContent = @fread ($file_open, @filesize($Filetkk1Topic));
		@fclose ($file_open);
		$TextContent = stripslashes($TextContent);
//	CheckUser($_SESSION['user_user']);
		$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
		$res[user] = $db->select_query("SELECT * FROM ".TB_user." WHERE username='".$_SESSION['user_user']."' ");
		$arr[user] = $db->fetch($res[user]);
		?>

<FORM NAME="myform" METHOD=POST ACTION="?name=tkk1&file=addedit&op=tkk1_edit&action=edit&id=<?=$_GET[id];?>" enctype="multipart/form-data" onSubmit="return checkregis()">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
 <tr> 
 <td>
<IMG SRC="images/crut.png">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B><FONT COLOR="#000000" size=5>บันทึกข้อความ</FONT></B>
</td>
 </tr>
 <tr> 
  <td >
  <br>
<B>ส่วนราชการ </B><INPUT TYPE="text" NAME="KOM" size="30" VALUE="<?=$arr[tkk1][kom];?>" > <?=WEB_TITLE;?> 
<br>
<br>
<B>ที่........................................................................</B><?echo ThaiTimeConvert($arr[tkk1][post_date],'1','');?>
<br>
<br>
<B>เรื่อง:</B><INPUT TYPE="text" NAME="TOPIC" size="80" VALUE="<?=$arr[tkk1][topic];?>" >
<br>
<br>
<B>เรียน:</B>
<select NAME="NUM">
     <option >ผู้อำนวยการ<?=WEB_TITLE;?></option>
     <option >รองผู้อำนวยการ<?=WEB_TITLE;?></option>
     <option >รอง ผอ.สพป.ชัยภูมิ เขต 2/ผอ.กลุ่ม/ผอ.หน่วย</option>
	</SELECT>
<BR>					
<B>รายละเอียด :</B>
<BR>
<?
include("FCKeditor/fckeditor.php") ;
$oFCKeditor = new FCKeditor('DETAIL') ;
$oFCKeditor->BasePath	= 'FCKeditor/' ;
$oFCKeditor->Width	= '100%' ;
$oFCKeditor->Height	= '300' ;
$oFCKeditor->Value = $TextContent ;
$oFCKeditor->Create() ;
?>
	</td>
	 </tr>
	 </table>
	<table width="750" border="0" cellspacing="0" cellpadding="0">
	  <tr> 
      <td colspan="500"><div align="center"><br>
 <?
		$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
		$res[user] = $db->select_query("SELECT * FROM ".TB_user." WHERE username='".$_SESSION['user_user']."' ");
		$arr[user] = $db->fetch($res[user]);
?>
		<INPUT TYPE="hidden" NAME="CATEGORY" VALUE="<?=$arr[user][id];?>" readonly style=\"color: #FF0000" >
		<INPUT TYPE="hidden" NAME="POSTED" VALUE="<?=$arr[user][id];?>" readonly style=\"color: #FF0000">
		<table width="750" align="center" border="0" cellspacing="0" cellpadding="0">
		<tr>
		<td align="center">
		<IMG SRC="laysen/<?=$arr[user][id];?>.jpg">
		<BR>
		(<?=$arr[user][category_name];?>)
		<BR>
		<?=$arr[user][posit];?>
		<?
			if($arr[user][level]=='6'){ 	  
		?>
		<?=$arr[user][school];?>
		<? }?>
		</td>
		</tr>
		<tr>
		<td colspan="2" align="center">
		<INPUT TYPE="submit" value=" บันทึกแก้ไข " name="submit"> 
		</td>
		</tr>
		</table>
</FORM>
<?
	}else{
		//กรณีไม่ผ่าน
		$ProcessOutput = $PermissionFalse ;
	}
	echo $ProcessOutput ;
}
?>
					</TD>
				</TR>
			</TABLE>
		  </TD>
        </TR>
      </TBODY>
    </TABLE>

Youez - 2016 - github.com/yon3zu
LinuXploit