403Webshell
Server IP : 182.53.201.61  /  Your IP : 216.73.217.175
Web Server : Apache/2.2.15 (Fedora)
System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686
User : apache ( 48)
PHP Version : 5.3.3
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/reportservice/3/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/reportservice/3/car_requestold070268.php
<?php
$ebits = ini_get('error_reporting');
error_reporting($ebits ^ E_NOTICE);
?>

<?php
ob_start() ;
include( "function.php" );
include( "dbconfig.php" );
?>
<?php
//global $HTTP_POST_VARS;

if ( $cmdSubmit == "บันทึกการขออนุมัติซ่อม" ) {
if ( empty( $station ) )	{ 
echo"<script>alert('กรุณาใส่หน่วยงานด้วยครับ!!');window.location='javascript:history.back()';</script>";
    break;
	}
	if ( empty( $user_id ) )  { 
echo"<script>alert('กรุณาใส่ชื่อผู้ขอซ่อมด้วยครับ!!');window.location='javascript:history.back()';</script>";
	break;
	}
	if ( empty( $kn_car_department ) )  { 
echo"<script>alert('กรุณาใส่แผนกด้วยครับ!!');window.location='javascript:history.back()';</script>";
	break;
	}		
	if ( empty( $target ) )	{ 
echo"<script>alert('กรุณาใสพัสดุที่ต้องการซ่อมด้วยครับ!!');window.location='javascript:history.back()';</script>";
    break;
	}
		if ( empty( $brand ) )	{ 
echo"<script>alert('กรุณาใส่รุ่น/ยี่ห้อ/อยุการใช้งานด้วยครับ!!');window.location='javascript:history.back()';</script>";
    break;
	}
		if ( empty( $brand ) )	{ 
echo"<script>alert('กรุณาใส่อาการที่ชำรุดด้วยครับ!!');window.location='javascript:history.back()';</script>";
    break;
	}
setcookie ("cookie_id", $user_id);
	
//@$link = mysql_connect("localhost","root","") or die("can't connect");
		
mysql_select_db($__dbwp__);
mysql_query(" SET NAMES 'tis620'; ");	   
$query = "select  kn_car_department_nameTH from  kn_car_department where kn_car_department_id='".$kn_car_department."' " ;
$res = mysql_query($query ) or die(mysql_error());
$row = mysql_fetch_object($res);
$dept_name_thai = $row->kn_car_department_nameTH;


mysql_select_db($__db__);
mysql_query(" SET NAMES 'tis620'; ");	   
	$maxsql = "select  no from  tran " ;
	$maxqury = mysql_query($maxsql ) or die(mysql_error());
	while (@$maxobject = mysql_fetch_array($maxqury)) {
		$max = $maxobject["no"]+1  ;	
	}	   
	$datedb = formatDateDB($date);
	$datedb1 = formatDateDB($date1);
	$datedb2 = formatDateDB($date2);
	if ($con == "CON" )
	{
		$dd = substr($date1,0,2);
		$mm = substr($date1,3,2);
		$yy = substr($date1,6,4) -543 ;
		$dd2 = substr($date2,0,2);
		$mm2 = substr($date2,3,2);
		$yy2 = substr($date2,6,4) -543 ;
		echo "$dd/$mm/$yy  ถึงวันที่ $dd2/ $mm2/$yy2<br><hr>" ;
			for ($i=0;$i<=31;$i++)
			{
			echo $i. "<br>" ;		
				//  your command here
			 	$day_con = ($yy+543)."-".$mm."-".$dd ;
				$sql = "insert into tran (no,target,user_id, person,reason,date,date1,time1,date2,time2,time,";
				$sql .= "dept_h_full_name, dept_id, dept_name, station, stationno, assetno, brand, com) values  ('$max','$target','$user_id','$person',";
				$sql .= "'$reason','$datedb','$datedb1','$time1','$datedb2','$time2','$time',''";
				$sql .= "'$dept_header_name_thai', '$kn_car_department', '$dept_name_thai', '$station', '$stationno', '$assetno', '$brand', '$com')";

				$result = mysql_query($sql ) or die(mysql_error());
				//end;
							if  ($i<=31)
							{
							 $dd=$dd+1 ;
								if  (!checkdate($mm,$dd,$yy))
								{
									$dd=1;
									$mm=$mm+1;
									if  ($mm==13)
									{
										$yy=$yy+1;
										$mm=1;
									}
								}
								$max = $max+1 ;
								//if ($dd == $dd2 and $mm ==  $mm2 and $yy == $yy2 ) 	$i = 30;
								if (($dd == $dd2) and ($mm ==  $mm2) and ($yy == $yy2 )) 	{ $i = 30  ; }
								
				         	}
			} // end for
	} // end if(continue)
	else 
	{
	$sql = "insert into tran (no,target,user_id, person,reason,date,date1,time1,date2,time2,time,";
	$sql .= "dept_h_full_name, dept_id, dept_name, station, stationno, assetno, brand, com) values  ('$max','$target','$user_id','$person',";
	$sql .= "'$reason','$datedb','$datedb1','$time1','$datedb2','$time2','$time',";
	$sql .= "'$dept_header_name_thai', '$kn_car_department', '$dept_name_thai', '$station', '$stationno', '$assetno', '$brand', '$com')";

	$result = mysql_query($sql ) or die(mysql_error());
	}

	echo "<script language='JavaScript'>";
	echo "alert('บันทึกข้อมูลเรียบร้อยแล้ว  รอการอนุมัติ  ถ้าอนุมัติแล้วจะดำเนินการให้ ในหน้าแรก');";
	echo "location='index.php';";
	echo "</script>" ;		
	setcookie ("cookie", $user_id);

} else {
?>


<html>
<head>
<title>ระบบขออนุมัติซ่อมบำรุงพัสดุ</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
<LINK href="style.css" rel=stylesheet>
<STYLE type=text/css>
a:link{color:white;text-decoration:none;font-family:ms sans serif;}
a:visited{color:white;text-decoration:none;font-family:ms sans serif;}
a:hover{color:yellow;text-decoration:none;font-family:ms sans serif;}
td{font-size:10pt;font-family:ms sans serif;}
.style1 {
	font-size: 18;
	color: #FF0000;
}
.style2 {
	color: #FF0000;
	font-weight: bold;
}
.style4 {font-size: 16pt;
	color: #3399FF;
}
.style5 {font-family: Verdana, Arial, Helvetica, sans-serif}
.style6 {	font-size: 16pt;
	color: #FFFFFF;
}
.style9 {
	font-size: 2pt;
	font-family: "MS Sans Serif";
}
.style10 {
	font-family: "Microsoft Sans Serif";
	font-size: 16px;
}
.style11 {color: #FF0000}
</STYLE>


<script language="JavaScript1.2">
<!--
/*
Auto Maximize Window Script- By Nick Lowe (nicklowe@ukonline.co.uk)
*/
/*top.window.moveTo(0,0);
if (document.all) {
top.window.resizeTo(screen.availWidth,screen.availHeight);
}
else if (document.layersdocument.getElementById) {
if (top.window.outerHeight<screen.availHeighttop.window.outerWidth<screen.availWidth){
top.window.outerHeight = screen.availHeight;
top.window.outerWidth = screen.availWidth;
}
}*/
//-->
</script>
</head>
<body>
<STYLE type=text/css>A.no_de:hover {
	TEXT-DECORATION: none
}
</STYLE>
<TABLE height=47 cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
    <TR>
      <TD style="BACKGROUND-COLOR: #f0f7ff" colSpan=2></TD>
    </TR>
    <TR bgColor=#c7d2e7>
      <TD width="8%" height=21 bgcolor="#FFFFFF" class=thwbold><div align="center"><img src="../img/service_icon.jpg" width="102" height="111"></div></TD>
      <TD width="92%" height=21 align=right vAlign=center bgColor=#FFFFFF class=thsans><A 
      href=""></A>
          <table width="41%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td><div align="center"><span class="style4">บันทึกการขอซ่อม</span></div></td>
            </tr>
        </table>
        <A href=""></A> <A 
      href=""></A>&nbsp; </TD>
    </TR>
    <TR>
      <TD style="BACKGROUND-COLOR: black" colSpan=2></TD>
    </TR>
    <TR>
      <TD style="BACKGROUND-COLOR: #f0f8ff" colSpan=2></TD>
    </TR>
    <TR vAlign=center bgColor=#216289>
      <TD height=20 colSpan=2 bgcolor="#00CCCC" class=thwbold><a href="index.php" target="_parent"> <span class="style5"><font color="#FFFFFF" size="4">หน้าแรก</font></span></a><span class="style5"><span class="style6">&nbsp; ||</span></span></TD>
      </TD>
    </TR>
    <TR>
      <TD style="BACKGROUND-COLOR: black; heigth: 1" 
colSpan=2></TD>
    </TR>
  </TBODY>
</TABLE>
<form name="form1" method="post" action="car_request.php">
  <TABLE cellSpacing=0 cellPadding=3 width="100%" align=center border=0>
    <TBODY>
      <TR> 
        <TD height="126" vAlign=top> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
            <TBODY>
              <TR> 
                <TD width="100%" colSpan=2> <TABLE width="100%" border=0>
                    <TBODY>
                      <TR> 
                        <TD 
                      style="BACKGROUND-IMAGE: url(pointsmall.gif); BACKGROUND-REPEAT: repeat-x"></TD>
                      </TR>
                    </TBODY>
                  </TABLE>
                  <DIV class=thtahomasmall 
                  style="PADDING-RIGHT: 2px; PADDING-LEFT: 2px; PADDING-BOTTOM: 2px; PADDING-TOP: 2px" 
                  align=right> </DIV>
                  <DIV id=news_newyear 
                  style="BORDER-RIGHT: #c7d2e7 1px solid; PADDING-RIGHT: 3px; BORDER-TOP: #c7d2e7 1px solid; PADDING-LEFT: 3px; MARGIN-BOTTOM: 3px; PADDING-BOTTOM: 3px; BORDER-LEFT: #c7d2e7 1px solid; PADDING-TOP: 3px; BORDER-BOTTOM: #c7d2e7 1px solid; BACKGROUND-COLOR: #f0f8ff"> 
                    <table width="95%" border="0" cellpadding="0" cellspacing="2">
                      <tr> 
                        <td width="6%" height="25"><br></td>
                        <td width="94%"> <div align="right">
                          <p>
                            <input name="date" type="hidden" id="date" value="<? echo date("d/m/").(date("Y")+543); ?>" size="12" maxlength="12" readonly>
                            <input name="time" type="hidden" id="date2" value="<? echo date("H:i:s"); ?>" size="8" readonly>
                          </p>
                          <p align="left" class="style1">                            <br>
                        </div></td>
                      </tr>
                      <tr> 
                        <td height="10" colspan="2"><p class="style9"><span class="style10"><strong>ด้วยหน่วยงาน</strong>&nbsp;</span> 
						  <select name="station" type="text" id="station"  onChange="select_dept_header(this.value)"  >
                          <option value=""></option>
                          <?
						  mysql_select_db($__dbwp__);
						mysql_query(" SET NAMES 'tis620'; ");	   
						
						$sql_select = "SELECT * FROM kn_car_department  kcd " ;
						$sql_select .= "	INNER JOIN  kn_car_duser kcu ON kcu.kn_car_duser_id=kcd.kn_car_department_leader_id  
						                        WHERE kn_car_department_nameTH LIKE 'ก%' ";
						$kn_result = mysql_query($sql_select) or die(mysql_error());
						$akn_result = array();
						
						while($row=mysql_fetch_object($kn_result) ){
							$akn_result[] = $row;
						}
								foreach($akn_result as $rres ){
									echo "<option value=".$rres->kn_car_department_id.">".$rres->kn_car_department_nameTH."</option>\n";
								}
						  ?>
                        </select>
						  <span class="style2"><font size="2" face="Microsoft Sans Serif, MS Sans Serif, sans-serif">
						  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						  ชื่อผู้ขออนุมัติซ่อม&nbsp;&nbsp;&nbsp;</font></span>
						  <font size="2" face="Microsoft Sans Serif, MS Sans Serif, sans-serif">
						  <? 
						$cid = $cookie_id ;
						
						mysql_select_db($__dbwp__);
						mysql_query(" SET NAMES 'tis620'; ");
						$cquery="select  id,name from  user where id = '$cid' "; //not sure it's work
						$cresult=mysql_query($cquery);
						$rs = mysql_fetch_array($cresult);
						$cname = $rs["name"];
						  ?>
						  </font>
						  <select name="user_id" id="select3">
                          <option value=""></option>
                          <? 
						mysql_select_db($__dbwp__);
						mysql_query(" SET NAMES 'tis620'; ");
						$plquery="select  id,name from  user where  status ='1'  ORDER BY name ASC, class ASC ";
						$plresult=mysql_query($plquery);
				
						while ($plobject = mysql_fetch_object($plresult))
						{
							echo "<OPTION VALUE =".$plobject ->id.">" .$plobject ->name."</Option>" ;
						}

						?>
                        </select>
                        </p>
                          <p>&nbsp;</p></td>
                      </tr>
                      <tr>
                        <td height="11" colspan="2">
                        <? //------------------------------------------------------------------------------ kn_edit------------------------------------------------------------------------------- ?>
                        <?
#ดึงรายชื่อแผนกมาจาก DB

mysql_select_db($__dbwp__);
mysql_query(" SET NAMES 'tis620'; ");	   

$sql_select = "SELECT * FROM kn_car_department  kcd " ;
$sql_select .= "	INNER JOIN  kn_car_duser kcu ON kcu.kn_car_duser_id=kcd.kn_car_department_leader_id  
                        WHERE kn_car_department_nameTH LIKE 'ง%'  OR kn_car_department_nameTH LIKE 'ค%' OR kn_car_department_nameTH LIKE 'อ%' ";
$kn_result = mysql_query($sql_select) or die(mysql_error());
$akn_result = array();
while($row=mysql_fetch_object($kn_result) ){
   //$_SESSION['id']=$row['id_dept'];
	$akn_result[] = $row;
}


?>
                        <script type="text/javascript">
							function select_dept_header(id) {
								var adept_ihname = new Array();
								<?
										foreach($akn_result as $rres ){
											echo "adept_ihname[".$rres->kn_car_department_id."]=\"".$rres->kn_car_duser_prefix_nameTH." ".$rres->kn_car_duser_fnameTH." ".$rres->kn_car_duser_lnameTH."\";\r\n";//kn_car_duser_fnameTH 	kn_car_duser_lameTH 	kn_car_duer_prefix_nameTH
											//adept_ihname[1]="นางสาว นิตยา ยวงเดชกล้า";
										}
									?>
								text = adept_ihname[id];
								document.getElementById("dept_header_name_thai").value=text;
								
								var adept_ihname2 = new Array();
								<?
										foreach($akn_result as $rres2 ){
											echo "adept_ihname2[".$rres2->kn_car_department_id."]=\"".$rres2->id_dept."\";\r\n";//kn_car_duser_fnameTH 	kn_car_duser_lameTH 	kn_car_duer_prefix_nameTH
											//adept_ihname[1]="นางสาว นิตยา ยวงเดชกล้า";
										}
									?>
								text = adept_ihname2[id];
								document.getElementById("stationno").value=text;
								
							}
						</script>
                        <strong>&nbsp;&nbsp;&nbsp;&nbsp;แผนก&nbsp;&nbsp;&nbsp;&nbsp;</strong>
                        <select name="kn_car_department" id="kn_car_department" onChange="select_dept_header(this.value)"  >
                          <option value=""></option>
						    
                          <? 
								foreach($akn_result as $rres ){
									echo "<option value=".$rres->kn_car_department_id.">".$rres->kn_car_department_nameTH."</option>\n";
								}
								
						  ?>
                        </select>
                        <strong>&nbsp;&nbsp;&nbsp;&nbsp;หัวหน้าแผนก&nbsp;&nbsp;&nbsp;&nbsp;</strong>
                        <input type="text" name="dept_header_name_thai" id="dept_header_name_thai" value="" />
						
						<span class="style10"><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;รหัสหน่วยงาน</strong>&nbsp;</span>
                          <input name="stationno" type="text" id="stationno" size="3" value="">
                        <? //------------------------------------------------------------------------------ kn_edit------------------------------------------------------------------------------- ?></td>
                      </tr>
                      <tr> 
                        <td height="20" colspan="2"><p>&nbsp;</p>
                          <p><font size="2" face="Microsoft Sans Serif, MS Sans Serif, sans-serif"><strong>พัสดุที่ต้องการซ่อม&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            </strong></font> 
                             <input name="target" type="text" id="target" size="70">
							 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input name="com" type="checkbox" id="com" value="computer"> 
                             หากพัสดุที่ต้องการซ่อมเป็น <span class="style11">คอมพิวเตอร์</span> กรุณาติ๊ก <img src="check-mark-md.png " width="20" height="20">							 </p>
                             <font size="2" face="Microsoft Sans Serif, MS Sans Serif, sans-serif"><strong> &nbsp;&nbsp; หมายเลขครุภัณฑ์  &nbsp;&nbsp;&nbsp;</strong></font>
                             <input name="assetno" type="text" id="assetno" size="35">
                             </p>
                          <p><font size="2" face="Microsoft Sans Serif, MS Sans Serif, sans-serif"><strong>รุ่น/ยี่ห้อ/อายุการใช้งาน&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</strong></font>
                             <input name="brand" type="text" id="brand" size="50">
                          </p></td>
                      </tr>
                      <tr> 
                        <td ><p>&nbsp;<br></p>
                          <p><strong><font size="2" face="Microsoft Sans Serif, MS Sans Serif, sans-serif">อาการที่ชำรุด    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font></strong> </p>
                          <p>&nbsp;</p>
                          <p>&nbsp;</p></td>
						  <td><br>
                            <textarea name="reason" type="text" id="code22" rows=5 cols=40 > </textarea>                         </td>
                      </tr>
                      <tr> 
                        <td height="31" colspan="2"><p>&nbsp;</p>
                          <p><font size="2" face="Microsoft Sans Serif, MS Sans Serif, sans-serif"><strong>แจ้งซ่อมเมื่อวันที่ 
                            </strong></font> 
                            <input name="date1" type="text" id="date22" value="<? echo date("d/m/").(date("Y")+543); ?>" size="8" maxlength="12" readonly> 
                            <strong>เวลา</strong> 
                            <input name="time1" type="text" id="time1"value="<? echo date("H:i:s"); ?>" size="5" readonly>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p></td>
                      </tr>
                      <tr> 
                        <td height="35">&nbsp;</td>
                        <td>&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;</td>
                      </tr>
                      <tr> 
                        <td height="20">&nbsp;</td>
                        <td>&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;</td>
                      </tr>
                      <tr> 
                        <td height="20" >&nbsp;</td>
                        <td >&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;กรอกรายละเอียดครบแล้ว 
                          คลิ๊กปุ่มนี้ &gt;&gt; <input name="cmdSubmit" type="submit" id="cmdSubmit2" value="บันทึกการขออนุมัติซ่อม">                        </td>
                      </tr>
                      <tr> 
                        <td height="39">&nbsp;</td>
                        <td> <div align="center"> </div></td>
                      </tr>
                    </table>
                  </DIV></TD>
              </TR>
            </TBODY>
          </TABLE>
          <BR> </TD>
      </TR>
    </TBODY>
  </TABLE>
</form>
<blockquote>
  <p>&nbsp;</p>
</blockquote>
</body>
</html>


<? ob_flush() ;?>

<? } ?>

Youez - 2016 - github.com/yon3zu
LinuXploit