!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/director/   drwxr-xr-x
Free 52.61 GB of 127.8 GB (41.17%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     AddPlanIn.php (23.12 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
include("../include/FunctionDB.php");
include("../include/Function.php");
include("admin_menu.php");
 ConnectDB();
$Username = $valid_user;
$sql = "SELECT * FROM  user_tb WHERE Username='$Username'";
$res = mysql_query($sql);
$rs1 = mysql_fetch_array($res);
$sql1 =  " SELECT * FROM  project_type_tb   Where   Budget_Year='$Budget_Year'  and   Faculty_code='$Faculty_code'  and  ProjectId='$ProjectId'   ";
$result= mysql_query($sql1) or die("Select Has Error").mysql_error();
$rs = mysql_fetch_array($result);
?>
<meta http-equiv="Content-Type" content="text/html; charset=TIS-620">
<link href="../source/style.css" rel="stylesheet" type="text/css">
<link href="css/main.css" type="text/css" rel="stylesheet">
 
<script language="JavaScript" src="../calendar/ew.js"></script> 
<script language="JavaScript" src="../calendar/popcalendar.js"></script>
<script language="JavaScript" type="text/JavaScript">
function MM_reloadPage(init) {  //reloads the window if Na v4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->

}
var highlightcolor="lightyellow"
var ns6=document.getElementById&&!document.all
var previous=''
var eventobj
//Regular expression to highlight only form elements
var intended=/INPUT|TEXTAREA|SELECT|OPTION/

//Function to check whether element clicked is form element
function checkel(which){
if (which.style&&intended.test(which.tagName)){
if (ns6&&eventobj.nodeType==3)
eventobj=eventobj.parentNode.parentNode
return true
}
else
return false
}

</script>
<style type="text/css">
<!--
.style1 {
	font-size: 14px;
	font-family: Tahoma;
}
.style3 {font-family: Tahoma}
.style5 {font-size: 14px; color: #FF0000; font-family: Tahoma;}
.style5 {font-size: 14px; color: #FF0000; font-family: Tahoma;}
.style6 {font-size: 14px; font-family: Tahoma; }
.style7 {font-size: 14px}
-->
</style> 
<table width="807" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td width="807"><br>
		  <fieldset>
			<legend><font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><span class="style1"><a href="PlaningByYear.php">หน้าหลัก </a><img src="../picture/ico3.gif" width="10" height="10" border="0" align="absmiddle" /><a href="PlaningByYear.php?Budget_Year=<?php echo $rs[Budget_Year] ?>&amp;Faculty_code=<?php echo $rs[Faculty_code] ?> ">ข้อมูลแผนดำเนินงาน </a></span></font><font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><span class="style6"><a href="PlaningByYear.php"> </a><img src="../picture/ico3.gif" width="10" height="10" border="0" align="absmiddle" /><a href="DetailRepPlaning.php?ProjectId=<? echo $rs[ProjectId]?>&Orderlist=<?php echo $rs[Orderlist]?>&Project_code=<? echo $rs[Project_code]?>&Faculty_code=<? echo $rs[Faculty_code]?> ">รายงานการใช้เงินตามข้อย่อยแผน </a></span></font> <font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><span class="style1"><img src="../picture/ico3.gif" width="10" height="10" border="0" align="absmiddle" /><a href="FrmeditPlanIn.php?ProjectId=<? echo $rs[ProjectId] ?>&Budget_Year=<?php echo $rs[Budget_Year] ?>&Faculty_code=<?php echo $rs[Faculty_code] ?>">เ</a>พิ่มข้อมูลแผน/โครงการดำเนินการ (ข้อย่อย)</span></font></legend>
			<label><div align="center"><br />
			  <form id="form1" name="form1" method="post" action="InsertPlaningIn.php">
			    <p align="left"><font size="2" face="Tahoma"><img src="../picture/previous.gif" onclick="window.history.back()"  width="85" height="22" border="0" /></font></p>
			    <table width="91%" border="0" align="center" cellpadding="0" cellspacing="0" style=" border:0px solid gray"size="12">
                  
                  
                  <tr>
                    <td height="43" ><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#E0E0E0">
                      
                      <tr bgcolor="#EEEEEE">
                        <td width="26%" bgcolor="#FFFFFF"><div align="center" class="style1"><font color="#003366" face="Tahoma">รหัสหน่วยงาน</font></div></td>
                        <td width="1%" bordercolor="#006699" bgcolor="#FFFFFF">&nbsp;</td>
                        <td width="73%" bordercolor="#006699" bgcolor="#FFFFFF"><font color="#0033CC" size="2" face="Tahoma">
                          <?php
		 $Faculty_code =  $rs["Faculty_code"];
		 $sql = "Select * From faculty_tb Where Faculty_code='$Faculty_code' ";
          $result1 = mysql_query($sql) or die("Error".mysql_error());
		  $rss = mysql_fetch_array($result1);
                echo "$rss[Faculty_code] - $rss[Faculty_name]";
		 ?>
                        </font></td>
                      </tr>
                      <tr bgcolor="#EEEEEE">
                        <td bgcolor="#FFFFFF"><div align="center" class="style1"><font color="#003366" face="Tahoma">รหัสแผน</font></div></td>
                        <td bordercolor="#006699" bgcolor="#FFFFFF">&nbsp;</td>
                        <td bordercolor="#006699" bgcolor="#FFFFFF"><font color="#0033CC" size="2" face="Tahoma"><? echo $rs[Orderlist];?></font></td>
                      </tr>
                      <tr bgcolor="#EEEEEE">
                        <td bgcolor="#FFFFFF"><div align="center" class="style1"><font color="#000066" face="Tahoma">ชื่อแผนงานโครงการ</font></div></td>
                        <td bordercolor="#006699" bgcolor="#FFFFFF">&nbsp;</td>
                        <td bordercolor="#006699" bgcolor="#FFFFFF"><font color="#0033CC" size="2" face="Tahoma"><? echo $rs[Project_plan];?></font></td>
                      </tr>
                      <tr bgcolor="#EEEEEE">
                        <td bgcolor="#FFFFFF"><div align="center" class="style1"><font color="#003366" face="Tahoma">วัตถุประสงค์</font></div></td>
                        <td bordercolor="#006699" bgcolor="#FFFFFF">&nbsp;</td>
                        <td bordercolor="#006699" bgcolor="#FFFFFF"><font color="#0033CC" size="2" face="Tahoma"><? echo $rs[Orderlist_2];?></font></td>
                      </tr>
                      <tr bgcolor="#EEEEEE">
                        <td height="32" bgcolor="#FFFFFF"><div align="center" class="style6"><font color="#000066" face="Tahoma">รายละเอียดของแผนดำเนินการ</font></div></td>
                        <td bordercolor="#006699" bgcolor="#FFFFFF">&nbsp;</td>
                        <td bordercolor="#006699" bgcolor="#FFFFFF"><font color="#0000FF" size="2" face="Tahoma">
                          <input name="Project_name" type="text" id="Project_name" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" size="65" />
                        </font></td>
                      </tr>
                      
                      
                      <tr bordercolor="#99CCFF">
                        <td height="25" bgcolor="#FFFFFF"><div align="center" class="style15 style1"><font face="Tahoma, MS Sans Serif">หลักสูตร</font></div></td>
                        <td bgcolor="#FFFFFF"><div align="center"><font color="#FF0000" size="4" face="Tahoma"><strong>*</strong></font></div></td>
                        <td bgcolor="#FFFFFF"><select name="programId" id="programId">
                          <?php
		    $strSQL = "SELECT * FROM  Program   Where  programStatus ='Y'   ";
			$result1 = mysql_query($strSQL);
			      while( $rss = mysql_fetch_array($result1))
				{
				   echo"<option value=\"$rss[programId]\" ><b>$rss[programName]</b></option>\n";
				}
	      ?>
                        </select>
                          <font color="#000000" size="2" face="Tahoma">ปี
                            <input name="Year" type="text" id="Year" size="2" maxlength="1" />
                        </font></td></tr>
                      <tr bgcolor="#EEEEEE">
                        <td height="30" bgcolor="#FFFFFF"><div align="center" class="style1"><font color="#003366" face="Tahoma">หมวดเงิน</font></div></td>
                        <td bordercolor="#006699" bgcolor="#FFFFFF">&nbsp;</td>
                        <td bordercolor="#006699" bgcolor="#FFFFFF"><select name="MoneyS_C" id="MoneyS_C">
                          <?php
			$MoneyS_C  = $rs[MoneyS_C];	
			$strSQL1 = "SELECT * FROM  money_source_tb  Where  MoneyS_C='$MoneyS_C'   ";
			$result1 = mysql_query($strSQL1);
		   $strSQL2 = "SELECT * FROM  money_source_tb  Order By  MoneyS_C ";
			$result2 = mysql_query($strSQL2);
				 while( $rs1 = mysql_fetch_array($result1))
				{
				        echo"<option value=\"$rs1[MoneyS_C]\" ><b>$rs1[MoneyS_M]</b></option>\n";
				 while( $rs2 = mysql_fetch_array($result2))
					{
                        echo"<option value=\"$rs2[MoneyS_C]\" ><b>$rs2[MoneyS_M]</b></option>\n";
				 }
				}
						
		    ?>
                        </select></td>
                      </tr>
                      <tr bgcolor="#EEEEEE">
                        <td bgcolor="#FFFFFF"><div align="center" class="style1"><font color="#003366" face="Tahoma">ประเภทหมวดค่าใช้จ่าย</font></div></td>
                        <td bordercolor="#006699" bgcolor="#FFFFFF">&nbsp;</td>
                        <td bordercolor="#006699" bgcolor="#FFFFFF"><select name="MoneyId" id="MoneyId">
             <?php
			//$MoneyId  = $rs[MoneyId];			 
			$strSQL2 = "SELECT * FROM   money_tb    ";
			$result2= mysql_query($strSQL2);  
			     while( $rs2 = mysql_fetch_array($result2))
				{
				echo"<option value=\"$rs2[MoneyId]\" ><b>$rs2[MoneyName]</b></option>\n";
				} 
				
						
		    ?>
                        </select></td>
                      </tr>
                      <tr bgcolor="#EEEEEE">
                        <td height="27" bgcolor="#FFFFFF"><div align="center" class="style1"><font color="#003366" face="Tahoma">วันที่เริ่มดำเนินการ</font></div></td>
                        <td bgcolor="#FFFFFF">&nbsp;</td>
                        <td bgcolor="#FFFFFF"><div align="left"> <font size="2" face="Tahoma">วันเริ่มต้น </font> <font color="#0033CC" size="2" face="Tahoma"><? echo $rs[Date_start];?></font><font size="2" face="Tahoma">&nbsp;&nbsp;วันสิ้นสุด </font><font color="#0033CC" size="2" face="Tahoma"><? echo $rs[Date_finish];?></font></div></td>
                      </tr>
                      <tr bgcolor="#EEEEEE">
                        <td bgcolor="#FFFFFF"><div align="center" class="style1"><font color="#003366" face="Tahoma">ปีงบประมาณ พ.ศ.</font></div></td>
                        <td bordercolor="#006699" bgcolor="#FFFFFF">&nbsp;</td>
                        <td bordercolor="#006699" bgcolor="#FFFFFF"><font color="#003366" size="2" face="Tahoma">&nbsp; </font><font color="#0033CC" size="2" face="Tahoma"><? echo $rs[Budget_Year];?></font><font color="#003366" size="2" face="Tahoma">&nbsp; </font></td>
                      </tr>
                      
                      <tr bgcolor="#FFFFFF">
                        <td height="127"><div align="center" class="style1"><font color="#003366" face="Tahoma">จำนวนเงินที่ตั้งงบประมาณรายเดือน</font></div></td>
                        <td bordercolor="#006699">&nbsp;</td>
                        <td bordercolor="#006699"><table width="449" border="0" cellpadding="0" cellspacing="0">
                            <tr>
                              <th width="99" class="style1" scope="col"><div align="center"> 
                                <div align="left" class="style1">
                                  <div align="center" class="style3">
                                    <div align="left" class="style1">มกราคม</div>
                                  </div>
                                </div>
                              </div></th>
                              <th width="121" scope="col"><div align="left" class="style14 style1"> <font color="#0033CC" face="Tahoma"><? echo $rs[January]?></font></div></th>
                              <th width="110" scope="col"><div align="center" class="style15 style1">
                                <div align="left" class="style1">
                                  <div align="left"><font face="Tahoma">กรฏาคม</font></div>
                                </div>
                              </div></th>
                              <th width="100" scope="col"><div align="left" class="style14 style1"> <font color="#0033CC" face="Tahoma"><? echo $rs[July]?></font></div></th>
                            </tr>
                            <tr>
                              <th class="style1" scope="col"><div align="center" class="style15 style1 ">
                                <div align="left" class="style1">
                                  <div align="center" class="style3">
                                    <div align="left">กุมภาพันธ์</div>
                                  </div>
                                </div>
                              </div></th>
                              <th scope="col"><div align="left" class="style14 style1"> <font color="#0033CC" face="Tahoma"><? echo $rs[February]?></font></div></th>
                              <th scope="col"><div align="center" class="style15 style1">
                                <div align="left" class="style1">
                                  <div align="left"><font face="Tahoma">สิงหาคม</font></div>
                                </div>
                              </div></th>
                              <th scope="col"><div align="left" class="style14 style1"> <font color="#0033CC" face="Tahoma"><? echo $rs[Augus]?></font></div></th>
                            </tr>
                            <tr>
                              <th class="style1" scope="col"><div align="center" class="style15 style1 ">
                                <div align="center" class="style3">
                                  <div align="left">มีนาคม</div>
                                </div>
                              </div></th>
                              <th scope="col"><div align="left" class="style14 style1"> <font color="#0033CC" face="Tahoma"><? echo $rs[March]?></font></div></th>
                              <th scope="col"><div align="center" class="style15 style1">
                                <div align="left" class="style1">
                                  <div align="left"><font face="Tahoma">กันยายน</font></div>
                                </div>
                              </div></th>
                              <th scope="col"><div align="left" class="style14 style1"> <font color="#0033CC" face="Tahoma"><? echo $rs[September]?></font></div></th>
                            </tr>
                            <tr>
                              <th class="style1" scope="col"><div align="center" class="style15 style1 ">
                                <div align="center" class="style3">
                                  <div align="left">เมษายน</div>
                                </div>
                              </div></th>
                              <th scope="col"><div align="left" class="style14 style1"> <font color="#0033CC" face="Tahoma"><? echo $rs[April]?></font></div></th>
                              <th scope="col"><div align="center" class="style15 style1">
                                <div align="left" class="style1">
                                  <div align="left"><font face="Tahoma">ตุลาคม</font></div>
                                </div>
                              </div></th>
                              <th scope="col"><div align="left" class="style14 style1"> <font color="#0033CC" face="Tahoma"><? echo $rs[October]?></font></div></th>
                            </tr>
                            <tr>
                              <th class="style1" scope="col"><div align="center" class="style15 style1 ">
                                <div align="center" class="style3">
                                  <div align="left">พฤษภาคม</div>
                                </div>
                              </div></th>
                              <th scope="col"><div align="left" class="style14 style1"> <font color="#0033CC" face="Tahoma"><? echo $rs[May]?></font></div></th>
                              <th scope="col"><div align="center" class="style15 style1">
                                <div align="left" class="style1">
                                  <div align="left"><font face="Tahoma">พฤศจิกายน</font></div>
                                </div>
                              </div></th>
                              <th scope="col"><div align="left" class="style14 style1"> <font color="#0033CC" face="Tahoma"><? echo $rs[November]?></font></div></th>
                            </tr>
                            <tr>
                              <th height="20" class="style1" scope="col"><div align="center" class="style15 style1 ">
                                  <div align="center" class="style3">
                                    <div align="left">มิถุนายน</div>
                                  </div>
                              </div></th>
                              <th scope="col"><div align="left" class="style14 style1"> <font color="#0033CC" face="Tahoma"><? echo $rs[June]?></font></div></th>
                              <th scope="col"><div align="center" class="style15 style1">
                                  <div align="left" class="style1">
                                    <div align="left"><font face="Tahoma">ธันวาคม</font></div>
                                  </div>
                              </div></th>
                              <th scope="col"><div align="left" class="style14 style1"> <font color="#0033CC" face="Tahoma"><? echo $rs[December]?></font></div></th>
                            </tr>
                            <tr>
                              <th height="20" colspan="2" class="style1 style3" scope="col"><div align="center" class="style1"><font color="#003366" face="Tahoma">ยอดรวมจำนวนเงินทั้งหมด</font></div></th>
                              <th colspan="2" scope="col"><div align="left" class="style14 style1">
                                <div align="center"><strong><font color="#0033CC" face="Tahoma" class="style17"><span class="style18"><font color="#0033CC" face="Tahoma"><? echo $rs[Budget_use]?></font></span> </font></strong></div>
                              </div></th>
                            </tr>
                        </table></td>
                      </tr>
                      
                      
                      <tr bgcolor="#eeeeee">
                        <td bordercolor="#99CC99" bgcolor="#FFFFFF"><div align="center" class="style7"><font color="#003366" face="Tahoma">ผู้รับใช้เงิน</font></div></td>
                        <td bordercolor="#CCCCCC" bgcolor="#FFFFFF">&nbsp;</td>
                        <td bordercolor="#CCCCCC" bgcolor="#FFFFFF"><select name="Teacher_code" id="Teacher_code">
                          <?php
		   $strSQL1 = "SELECT * FROM   personal_tb  Order by Teacher_name ";
			$result1 = mysql_query($strSQL1);
		   				 while( $rs1 = mysql_fetch_array($result1))
				{
				       echo"<option value=\"$rs1[Teacher_code]\" ><b>$rs1[Teacher_name]&nbsp;$rs1[Teacher_lastname]</b></option>\n";
					
				 				}
						CloseDB();  
		    ?>
                        </select></td>
                      </tr>
                      <tr bgcolor="#eeeeee">
                        <td bordercolor="#99CC99" bgcolor="#FFFFFF"><div align="center"><span class="style7"><font color="#003366" face="Tahoma">ตัวบงชี้ตาม QA ข้อที่ </font></span></div></td>
                        <td bordercolor="#CCCCCC" bgcolor="#FFFFFF">&nbsp;</td>
                        <td bordercolor="#CCCCCC" bgcolor="#FFFFFF"><strong><font color="#003366" size="2" face="Tahoma">
                          <input name="Ind" type="text" id="Ind" size="10" maxlength="10" />
                        </font></strong></td>
                      </tr>
                      <tr bgcolor="#eeeeee">
                        <td bordercolor="#99CC99" bgcolor="#FFFFFF"><div align="center" class="style1"><font color="#000066" face="Tahoma">วัน/เดือน/ปี 
                        (ที่</font><font face="Tahoma">ดำเนินการ</font><font color="#000066" face="Tahoma">)</font></div></td>
                        <td bordercolor="#CCCCCC" bgcolor="#FFFFFF"><font color="#FF0000" size="4" face="Tahoma"><strong>*</strong></font></td>
                        <td bordercolor="#CCCCCC" bgcolor="#FFFFFF"><input name="Start_Date" type="text" id="Start_Date" size="8"  />
                            <?php include("../calendar/phpmkrfn.php") ?>
                            <strong>
                            <input name="image" type="image" onclick="popUpCalendar(this, this.form.Start_Date,'yyyy-mm-dd');return false;" src="../images/mysql_calendar.gif" alt="Pick a Date" align="middle" width="16" height="16" />
                        </strong></td>
                      </tr>
                      <tr bgcolor="#EEEEEE">
                        <td height="22" bgcolor="#FFFFFF"><div align="center" class="style1"><font color="#003366" face="Tahoma">จำนวนเงินที่ใช้</font></div></td>
                        <td bordercolor="#006699" bgcolor="#FFFFFF"><font color="#FF0000" size="4" face="Tahoma"><strong>*</strong></font></td>
                        <td align="center" bordercolor="#006699" bgcolor="#FFFFFF"><div align="left"><strong><font color="#003366" size="2" face="Tahoma">
                            <input name="Budget_use" type="text" id="Budget_use" size="10" />
                        </font></strong><font color="#003366" face="Tahoma">  <span class="style1">บาท </span></font> <span class="style5">*ไม่ต้องพิมพ์เครื่องหมาย comma (,)</span></div></td>
                      </tr>
                      <tr bgcolor="#ECD9C6">
                        <td colspan="3" bgcolor="#FFFFFF"><div align="center">
                          <input name="ProjectId" type="hidden" id="ProjectId" value="<? echo $rs[ProjectId]?>" />
                          <input name="Project_code" type="hidden" id="Project_code" value="<? echo $rs[Project_code]?>" />
                          <input name="Faculty_code" type="hidden" id="Faculty_code" value="<? echo $rs[Faculty_code]?>" />
                          <input name="Orderlist" type="hidden" id="Orderlist" value="<? echo $rs[Orderlist]?>" />
                          <input name="Project_plan" type="hidden" id="Project_plan" value="<? echo $rs[Project_plan]?>" />
                            <input name="Budget_Year" type="hidden" id="Budget_Year" value="<? echo $rs[Budget_Year]?>" />
                             <input type="submit" name="Submit3" value="    เพิ่ม    " />
                          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                          <input type="reset" name="Submit22" value="  เริ่มใหม่ " />
                        </div></td>
                      </tr>
                    </table></td>
                  </tr>
                </table>
			  </form>
			  </div>
			</label>
		</fieldset><br>
		<font color="<?php echo $GLOBALS["COLOR_FONT_3"];?>" size="2"><b>หมายเหตุ :</b> ใช้เมาส์คลิกที่ชื่อ<br>
	  </font></td>
	</tr>
</table>

:: 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 ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: 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.0067 ]--