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


Viewing file:     MISFormAWord.php (16.03 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
header('Content-type: application/ms-doc');
header('Content-Disposition: attachment; filename="testing.doc"');
include("../include/FunctionDB.php");
include("../include/Function.php");
include("../link/function.php");

 ConnectDB();
$strSQL = "Select * FROM  project_tb   WHERE   ProjectId='$ProjectId'    and  Teacher_code='$Teacher_code'   ";
$result = mysql_query($strSQL); 
$num = mysql_num_rows($result );
?>
<meta http-equiv="Content-Type" content="text/html; charset=TIS-620">

<style type="text/css">
<!--
.style2 {font-size: 14px}
.style6 {font-size: 14px; color: #000000; }
.style8 {font-size: 14px; font-family: Tahoma; }
.style9 {font-family: Tahoma}
.style11 {font-size: 16px; font-family: Tahoma; font-weight: bold; }
-->
</style>
<script type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
</script>
<table width="652" align="center">
	<tr>
	  <td width="644">
		  
			<form id="form1" name="form1" method="post" action="">
			  <table width="98%" align="center" >
                <tr>
                  <td colspan="3" ><div align="center" class="style11">บันทึกใช้เงินตามแผน</div></td>
                </tr>
                <tr>
                  <td >&nbsp;</td>
                  <td colspan="2" >&nbsp;</td>
                </tr>
                <tr>
                  <td >&nbsp;</td>
                  <td colspan="2" >&nbsp;</td>
                </tr>
                <tr>
                  <td ><span class="style8">เลขที่ ......... </span> </td>
                  <td colspan="2" ><div align="right"><font size="1" face="Tahoma"><span class="style2"><font face="Tahoma">วันที่</font><span class="style9"><font face="Tahoma"></font></span></span>
                    <?php 
	   $sday = $rs[Start_Date];
	$yearthai = explode("-",$sday);
    $day =      intval($yearthai[2]);
    $month =  intval($yearthai[1]);
    $year =     intval($yearthai[0]);	 
		  //////////////////
 //   $yearthai =  $day ;
  $m = getThaiSubMonth($month);
	 //echo"$day"." "."$m"." "."$year";
    echo abbreDate(date("d-m-Y"));
	?>
                  </font></div></td>
                </tr>
                <tr >
                  <td colspan="3" align="center" ><div align="left"><span class="style8">ชื่อ</span><font color="#000000" size="2" face="Tahoma">
                      <?php
		// $Teacher_code  = $rs[Teacher_code];
		 $sql3 = "Select * From  personal_tb  Where Teacher_code='$Teacher_code'";
		 $result3 = mysql_query($sql3) or die("Error".mysql_error());
		 $rss = mysql_fetch_array($result3);
		  echo" $rss[Teacher_name]  $rss[Teacher_lastname] ";
		 ?>
                    </font></div>
                      <div align="left"></div></td>
                </tr>
			    <tr >
                  <td width="466" height="27" align="center" ><div align="left"><span class="style2"><font color="#000000" face="Tahoma">ข้อแผน</font><font color="#000000" size="2" face="Tahoma">
                      <?php
		 //$Faculty_code  = $row[Faculty_code];
		 $sql3 = "Select * From projectStdPlan_tb    Where  Project_code='$Project_code'";
		 $result3 = mysql_query($sql3) or die("Error".mysql_error());
		 $rss = mysql_fetch_array($result3);
		  echo"$rss[Orderlist]";
		 ?>
                      <?php
		 //$Faculty_code  = $row[Faculty_code];
		 $sql3 = "Select * From project_type_tb     Where  ProjectId='$ProjectId'    "  ;
		 $result3 = mysql_query($sql3) or die("Error".mysql_error());
		 $rss = mysql_fetch_array($result3);
		  echo" $rss[Project_plan]";
		 ?>
                  </font></span></div></td>
			      <td width="86" align="center" ><span class="style2"><font color="#000000" face="Tahoma">วันที่ดำเนินการ</font><font color="#000000" face="Tahoma"></font></span><font color="#000000" size="2" face="Tahoma"></td>
			      <td width="63" align="center" ><span class="style2"><font color="#000000" face="Tahoma">จำนวนเงิน</font></span></td>
		        </tr>
                <?php
$i = 1;
 while($row = mysql_fetch_array($result))
 {

	 if($count==0)
	 {
?>
                <tr >
                  <td align="center" ><div align="left"><font size="2" face="Tahoma">
                      <?=$row["Orderlist"]?>
                      </font><font size="2" face="Tahoma">
                      <?=$row["Training_name"]?>
                      </font><font color="#000000" size="2" face="Tahoma">(
                        <?php
		  $MoneyS_C  = $row[MoneyS_C];
		 $sql3 = "Select * From   money_source_tb Where  MoneyS_C='$MoneyS_C'";
		 $result3 = mysql_query($sql3) or die("Error".mysql_error());
		 $rss = mysql_fetch_array($result3);
		  echo" $rss[MoneyS_M]";
		 ?>
                        ) </font></div></td>
                  <td ><div align="center"><font color="#003366">
                    <?php 
	   $sday = $row[Date];
	$yearthai = explode("-",$sday);
    $day =      intval($yearthai[2]);
    $month =  intval($yearthai[1]);
    $year =     intval($yearthai[0]);	 
		  //////////////////
 //   $yearthai =  $day ;
  $m = getThaiSubMonth($month);
	 echo"$day"." "."$m"." "."$year";
    ?>
                  </font></div></td>
                  <td ><div align="right"><font color="#000000" size="2" face="Tahoma"> <?echo number_format($row['Budget_use'],2,'.',','); ?> </font></div></td>
                </tr>
                <?
	$count=1;
	 }
else
{
?>
                <tr>
                  <td align="center" ><div align="right">
                      <div align="left"><font size="2" face="Tahoma">
                        <?=$row["Orderlist"]?>
                        </font> <font size="2" face="Tahoma">
                        <?=$row["Training_name"]?>
                        </font>&nbsp;<font color="#000000" size="2" face="Tahoma">(
                          <?php
		  $MoneyS_C  = $row[MoneyS_C];
		 $sql3 = "Select * From   money_source_tb Where  MoneyS_C='$MoneyS_C'";
		 $result3 = mysql_query($sql3) or die("Error".mysql_error());
		 $rss = mysql_fetch_array($result3);
		  echo" $rss[MoneyS_M]";
		 ?>
                          )</font></div>
                  </div></td>
                  <td><div align="center"><font color="#003366">
                    <?php 
	   $sday = $row[Date];
	$yearthai = explode("-",$sday);
    $day =      intval($yearthai[2]);
    $month =  intval($yearthai[1]);
    $year =     intval($yearthai[0]);	 
		  //////////////////
 //   $yearthai =  $day ;
  $m = getThaiSubMonth($month);
	 echo"$day"." "."$m"." "."$year";
    ?>
                  </font></div></td>
                  <td><div align="right"><font color="#000000" size="2" face="Tahoma"> <?echo number_format($row['Budget_use'],2,'.',','); ?> </font></div></td>
                </tr>
                <?
$count=0;
}
$i++;
 }	
?>
                <tr >
                  <td colspan="2" align="center" ><div align="right"><font face="Tahoma"><span class="style6">รวมเงิน</span></font></div></td>
                  <td align="center" ><div align="right"><font color="#000000" size="2" face="Tahoma">
                      <?php         
	    
		  $sql1 = "Select Sum(Budget_use) as SumB1 From project_tb   Where    ProjectId='$ProjectId' and  Teacher_code='$Teacher_code' "  ; 
		  $result1 = mysql_query($sql1) or die("Erro".mysql_error());
		  $rss1 = mysql_fetch_array($result1);
		   echo number_format($rss1[SumB1],2,'.',',');
		   //echo"$rss1[SumC1]";
		   ?>
                  </font></div></td>
                </tr>
                <tr>
                  <td colspan="2" align="center" ><div align="right"><font face="Tahoma"><strong><span class="style6">&nbsp;</span></strong><span class="style6">&nbsp;จำนวนเงินรวมบุคลากรใช้ทั้งหมด</span></font></div></td>
                  <td align="center" ><div align="right"><font color="#000000" size="2" face="Tahoma">
                      <?php         
	    
		  $sql1 = "Select Sum(Budget_use) as SumB1 From project_tb   Where    ProjectId='$ProjectId' "  ; 
		  $result1 = mysql_query($sql1) or die("Erro".mysql_error());
		  $rss1 = mysql_fetch_array($result1);
		   echo number_format($rss1[SumB1],2,'.',',');
		   //echo"$rss1[SumC1]";
		   ?>
                  </font></div></td>
                </tr>
                <tr >
                  <td colspan="2" align="center" ><div align="right"><font face="Tahoma"><span class="style6">จำนวนเงินที่ตั้งไว้ตามแผน</span></font></div></td>
                  <td align="center" ><div align="right"><font color="#000000" size="2" face="Tahoma">
                      <?php         
	                 //    $Orderlist_2 = $rss["Orderlist_2"];
		  $sql2 = "Select * From project_type_tb  Where    ProjectId='$ProjectId' "  ; 
		  $result2 = mysql_query($sql2) or die("Erro".mysql_error());
		  $rss2 = mysql_fetch_array($result2);
		  echo number_format($rss2[Budget_use],2,'.',',');
		// echo"$rss2[Budget_use]";
		   ?>
                  </font></div></td>
                </tr>
                <tr >
                  <td colspan="2" align="center" ><div align="right"><font face="Tahoma"><span class="style6">จำนวนเงินคงเหลือเงินตามแผน</span></font></div></td>
                  <td align="center" ><div align="right"><font color="#000000" size="2" face="Tahoma">
                      <?php
    $Delete3 = $rss2[Budget_use] - $rss1[SumB1] ;
	echo number_format($Delete3,2,'.',',');
	// echo"$Del4";
	 	  ?>
                  </font></div></td>
                </tr>
                
                
                <tr >
                  <td colspan="3" align="center" ><div align="center"><span class="style2"><font color="#000000" face="Tahoma">ทั้งหมด</font></span><font color="#003399" size="2" face="Tahoma"> <? echo $num ?></font> <span class="style6"><font face="Tahoma">รายการ&nbsp;</font></span></div></td>
                </tr>
              </table>
	          <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" >
                <?php
$i = 1;
 while($row = mysql_fetch_array($result))
 {

	 if($count==0)
	 {
?>
                <?
	$count=1;
	 }
else
{
?>
                <?
$count=0;
}
$i++;
 }	
?>
                <tr >
                  <td colspan="7" align="center" bgcolor="#FFFFFF" >&nbsp;</td>
                </tr>
                <tr >
                  <td width="83" align="center" bgcolor="#FFFFFF" ><span class="style8">เรียน ผ.อ </span></td>
                  <td width="105" align="center" bgcolor="#FFFFFF" >&nbsp;</td>
                  <td colspan="2" align="center" bgcolor="#FFFFFF" ><div align="right"><span class="style8">ตรวจสอบแล้ว</span></div></td>
                  <td width="165" align="center" bgcolor="#FFFFFF" >&nbsp;</td>
                  <td width="6" align="center" bgcolor="#FFFFFF" >&nbsp;</td>
                </tr>
                <tr >
                  <td align="center" bgcolor="#FFFFFF" ><div align="right">
                      <input name="checkbox3" type="checkbox" class="style8" id="checkbox2" value="checkbox" />
                  </div></td>
                  <td align="center" bgcolor="#FFFFFF" ><div align="center">.................................</div></td>
                  <td align="center" bgcolor="#FFFFFF" ><div align="left" class="style8"></div></td>
                  <td width="123" align="center" bgcolor="#FFFFFF" ><input name="checkbox22" type="checkbox" class="style8" id="checkbox2" value="checkbox" /></td>
                  <td align="center" bgcolor="#FFFFFF" ><div align="left"> ...............................
                    <label></label>
                  </div></td>
                </tr>
                <tr>
                  <td align="center" bgcolor="#FFFFFF" >&nbsp;</td>
                  <td align="center" bgcolor="#FFFFFF" >&nbsp;</td>
                  <td align="center" bgcolor="#FFFFFF" >&nbsp;</td>
                  <td align="center" bgcolor="#FFFFFF" >&nbsp;</td>
                  <td align="center" bgcolor="#FFFFFF" >&nbsp;</td>
                </tr>
                <tr >
                  <td align="center" bgcolor="#FFFFFF" >&nbsp;</td>
                  <td align="center" bgcolor="#FFFFFF" ><div align="center"><span class="style8">หัวหน้าาค/ฝ่าย</span></div></td>
                  <td align="center" bgcolor="#FFFFFF" >&nbsp;</td>
                  <td align="center" bgcolor="#FFFFFF" ><span class="style8">ฝ่ายบริหาร</span></td>
                  <td align="center" bgcolor="#FFFFFF" >&nbsp;</td>
                </tr>
                <tr >
                  <td align="center" bgcolor="#FFFFFF" >&nbsp;</td>
                  <td align="center" bgcolor="#FFFFFF" >&nbsp;</td>
                  <td align="center" bgcolor="#FFFFFF" >&nbsp;</td>
                  <td align="center" bgcolor="#FFFFFF" >&nbsp;</td>
                  <td align="center" bgcolor="#FFFFFF" >&nbsp;</td>
                </tr>
                <tr >
                  <td align="center" bgcolor="#FFFFFF" >&nbsp;</td>
                  <td align="center" bgcolor="#FFFFFF" ><div align="right">
                      <label></label>
                      <input name="checkbox22" type="checkbox" class="style8" id="checkbox2" value="checkbox" />
                  </div></td>
                  <td align="center" bgcolor="#FFFFFF" ><div align="left" class="style8"> อนุมัติ </div></td>
                  <td align="center" bgcolor="#FFFFFF" >&nbsp;</td>
                  <td align="center" bgcolor="#FFFFFF" >&nbsp;</td>
                </tr>
                <tr >
                  <td align="center" bgcolor="#FFFFFF" >&nbsp;</td>
                  <td align="center" bgcolor="#FFFFFF" ><div align="right" class="style8"></div></td>
                  <td colspan="2" align="center" bgcolor="#FFFFFF" ><div align="left"><span class="style8">หมายเหต</span>..................................</div></td>
                  <td align="center" bgcolor="#FFFFFF" >&nbsp;</td>
                </tr>
                <tr >
                  <td align="center" bgcolor="#FFFFFF" >&nbsp;</td>
                  <td align="center" bgcolor="#FFFFFF" >&nbsp;</td>
                  <td align="center" bgcolor="#FFFFFF" >&nbsp;</td>
                  <td align="center" bgcolor="#FFFFFF" >&nbsp;</td>
                  <td align="center" bgcolor="#FFFFFF" >&nbsp;</td>
                </tr>
                <tr >
                  <td align="center" bgcolor="#FFFFFF" >&nbsp;</td>
                  <td align="center" bgcolor="#FFFFFF" >&nbsp;</td>
                  <td align="center" bgcolor="#FFFFFF" >...................................</td>
                  <td align="center" bgcolor="#FFFFFF" >&nbsp;</td>
                  <td align="center" bgcolor="#FFFFFF" >&nbsp;</td>
                </tr>
                <tr >
                  <td align="center" bgcolor="#FFFFFF" >&nbsp;</td>
                  <td align="center" bgcolor="#FFFFFF" >&nbsp;</td>
                  <td align="center" bgcolor="#FFFFFF" ><span class="style8">ผู้อำนวยการ</span></td>
                  <td align="center" bgcolor="#FFFFFF" >&nbsp;</td>
                  <td align="center" bgcolor="#FFFFFF" >&nbsp;</td>
                </tr>
                <tr >
                  <td align="center" bgcolor="#FFFFFF" >&nbsp;</td>
                  <td align="center" bgcolor="#FFFFFF" >&nbsp;</td>
                  <td align="center" bgcolor="#FFFFFF" >&nbsp;</td>
                  <td align="center" bgcolor="#FFFFFF" >&nbsp;</td>
                  <td align="center" bgcolor="#FFFFFF" >&nbsp;</td>
                </tr>
                <tr >
                  <td align="center" bgcolor="#FFFFFF" >&nbsp;</td>
                  <td align="center" bgcolor="#FFFFFF" >&nbsp;</td>
                  <td width="162" align="center" bgcolor="#FFFFFF" >&nbsp;</td>
                  <td align="center" bgcolor="#FFFFFF" >&nbsp;</td>
                  <td align="center" bgcolor="#FFFFFF" >&nbsp;</td>
                </tr>
                <tr >
                  <td colspan="7" align="center" bgcolor="#FFFFFF" ><div align="center"></div></td>
                </tr>
              </table>
        </form>	  </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.0059 ]--