403Webshell
Server IP : 104.21.80.248  /  Your IP : 172.71.28.156
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 :  /Inetpub/www/myoffice/2564/modules/tkk2/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /Inetpub/www/myoffice/2564/modules/tkk2/addlakha.php
<?
CheckUser($_SESSION['user_user'], $_SESSION['user_pwd']);
?>
<script type="text/javascript">
function myoffice(val, group_num)
{
if(val==true)
{
	document.getElementById("group"+group_num+"").style.display="";
}
else
{
	document.getElementById("group"+group_num+"").style.display="none";
}

}
</script>
<script language="JavaScript">

//******************************************
function checkregis() {
if(document.myform.rdo1.checked == false && document.myform.rdo2.checked == false && document.myform.rdo3.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 align=center cellSpacing=0 cellPadding=0 width=1005 height=500 border=0>
      <TBODY>
        <TR>
          <TD >
				<TABLE width="800" align=center cellSpacing=0 cellPadding=0 border=0 background="images/1234.jpg">
				<TR>
					<TD>
<?
 if($_GET[op] == "tkk2_edit" AND $_GET[action] == "edit"){
	//////////////////////////////////////////// กรณีเพิ่ม Database
	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]);
		if (!$_POST[CATEGORY]OR !$_POST[DETAIL]){
			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_TKK2,array(
			"category"=>"$_POST[CATEGORY]",
			"edit"=>"$_POST[EDIT]",
			"laysen"=>"$_POST[LAYSEN]",
			"namecom"=>"$_POST[NAMECOM]",
			"post_date"=>"".TIMESTAMP."",
			"update_date"=>"".TIMESTAMP."",
			"enable_comment"=>"0"
		)," id=$_GET[id] ");
		$db->closedb ();

} else {
		//ทำการแก้ไขข้อมูลลงดาต้าเบส
			$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
			$db->update_db(TB_TKK2,array(
			"category"=>"$_POST[CATEGORY]",
			"edit"=>"$_POST[EDIT]",
			"laysen"=>"$_POST[LAYSEN]",
			"namecom"=>"$_POST[NAMECOM]",
			"post_date"=>"".TIMESTAMP."",
			"update_date"=>"".TIMESTAMP."",
			"enable_comment"=>"0"
		)," id=$_GET[id] ");
		$db->closedb ();
}

		//ทำการสร้างไฟล์ text ของข่าวสาร
		$Filename = TIMESTAMP.".txt";
		$txt_name = "data/tkk2text/".$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=\"1 ;url=?name=tkk2&op=tkk2_read&category=".$arr[user][id]."\">";
		$ProcessOutput .= "</CENTER>";
		$ProcessOutput .= "<BR><BR>";
	
	echo $ProcessOutput ;
}
else if($_GET[op] == "tkk2_edit"){
	//////////////////////////////////////////// กรณีแก้ไข Form
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[tkk2] = $db->select_query("SELECT * FROM ".TB_TKK2." WHERE id='".$_GET[id]."' ");
		$arr[tkk2] = $db->fetch($res[tkk2]);
		?>
<FORM NAME="myform" METHOD=POST ACTION="?name=tkk2&file=addlakha&op=tkk2_edit&action=edit&id=<?=$_GET[id];?>" enctype="multipart/form-data">
<table width="100%" border="0" cellspacing="0" cellpediting="0">
 <tr> 
	<INPUT TYPE="hidden" NAME="NAMECOM" VALUE="<?=$arr[user][id];?>" readonly style=\"color: #FF0000">
	<INPUT TYPE="hidden" NAME="LAYSEN" VALUE="<?=$arr[user][id];?>" readonly style=\"color: #FF0000"><br>
    <td width="800"colspan="3"><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;<FONT COLOR="#000000" size=4><B>บันทึกข้อความ</B></FONT></td>
  </tr>
  <tr>
  <td colspan="3">
<br>
	<B>ส่วนราชการ  </B><?=WEB_TITLE;?>
	<br>
	<B>ที่</B>..............................................................................วันที่.........................................................................
	<br>
	<B>เรื่อง </B> <?echo thainumDigit($arr[tkk2][topic]);?><hr /></td>
  </tr> 
  <tr>
  <td>
<CENTER>
<?
include("FCKeditor/fckeditor.php") ;
$oFCKeditor = new FCKeditor('DETAIL') ;
$oFCKeditor->BasePath	= 'FCKeditor/' ;
$oFCKeditor->Width	= '100%' ;
$oFCKeditor->Height	= '300' ;
$oFCKeditor->Value		= $TextContent ;
$oFCKeditor->Create() ;
?>
<?
		$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]);
?>
(<?=$arr[user][category_name];?>)
<BR>
<?=$arr[user][posit];?>
<BR>
	</CENTER>
<?
					 if ($arr[tkk2][full_text]){ 	  
?>
รายการเอกสาร : 
| <a href="data/tkk2/<?=$arr[tkk2][full_text];?>" target="_blank"><font color=red>หนังสือนำ</font></A> |
		  <? } else {
		 echo "";
	 }?>
<?
					 if($arr[tkk2][full_texts]){ 	  
?>
<a href="data/tkk2/<?=$arr[tkk2][full_texts];?>" target="_blank"><font color=red>สิ่งที่ส่งมาด้วย 1</font></A> |
		  <? } else {
		 echo "";
	 }?>
	 <?
					 if($arr[tkk2][full_textu]){ 	  
?>
<a href="data/tkk2/<?=$arr[tkk2][full_textu];?>" target="_blank"><font color=red>สิ่งที่ส่งมาด้วย 2</font></A> |
		  <? } else {
		 echo "";
	 }?>
	 <?
					 if($arr[tkk2][full_texto]){ 	  
?>
<a href="data/tkk2/<?=$arr[tkk2][full_texto];?>" target="_blank"><font color=red>สิ่งที่ส่งมาด้วย 3</font></A> |
		  <? } else {
		 echo "";
	 }?>
	</td>
  </tr> 
 <table width="100%" align=center border="0" cellspacing="0" cellpediting="0">
 <tr>
 <td align="center">
&nbsp;&nbsp;<input type="checkbox" name="EDIT"  id="chk2" VALUE="เสนอผู้อำนวยการ"  onclick="myoffice(this.checked, '1')" /><font color="green">เสนอผู้อำนวยการ</font>
<input type="checkbox" NAME="EDIT" id="chk3" VALUE="เสนอรักษาการ"onclick="myoffice(this.checked, '2')" /><font color="red">เสนอรักษาการ ผอ.</font>
	  <!--กำหนดเมนูย่อยของเมนู1-->
<div id="group1" style="display:none;">
<table width="30%" align="center" border="0"   cellspacing="0" cellpadding="0">
<tr>
<?
$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
$res[user] = $db->select_query("SELECT * FROM ".TB_user." WHERE work='2' and status='1' ");
while ($arr[user] = $db->fetch($res[user])){
?>
<td width="30%"  valign="top">
<input type="radio" name="CATEGORY" value="<?=$arr[user][id];?>"><b> <font color="blue"><?=$arr[user][category_name];?></font></b>
<?
$count++;

if (($count%2) == 0) { echo "<TR><TD colspan=3 height=\"1\" class=\"dotline\"></TD></TR>"; $count=0; 
} else{
	echo "</TD>";
} 
}
$db->closedb ();
?>
</td></tr>
  </table>
</div>
	  <!--กำหนดเมนูย่อยของเมนู1-->
<div id="group2" style="display:none;">
<table width="30%" align="center" border="0"   cellspacing="0" cellpadding="0">
<tr>
<?
$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
$res[user] = $db->select_query("SELECT * FROM ".TB_user." WHERE odpr='D2'  ");
while ($arr[user] = $db->fetch($res[user])){
?>
<td width="30%"  valign="top">
<input type="radio" name="CATEGORY" value="<?=$arr[user][id];?>"><b> <font color="blue"><?=$arr[user][category_name];?></font></b>
<?
$count++;

if (($count%2) == 0) { echo "<TR><TD colspan=3 height=\"1\" class=\"dotline\"></TD></TR>"; $count=0; 
} else{
	echo "</TD>";
} 
}
$db->closedb ();
?>
</td></tr>
  </table>
</div>
 </td>
 </tr>
	  <tr> 
      <td colspan="4"><div align="center">
	<INPUT TYPE="submit" value=" บันทึกเอกสาร" name="submit" onClick="this.form.submit();this.disabled=true;this.value=' Wait... '">
	</div></td>
    </tr>
    </tr>
  </table>
</FORM>
<?
	
	}else{
		//กรณีไม่ผ่าน
		$ProcessOutput = $PermissionFalse ;
	}
	echo $ProcessOutput ;
}
?>
					</TD>
				</TR>
			</TABLE>
			<!-- user -->
		  </TD>
        </TR>
      </TBODY>
    </TABLE>

Youez - 2016 - github.com/yon3zu
LinuXploit