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


Viewing file:     SearchRepPlaning.php (14.87 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
include("../include/FunctionDB.php");
include(
"admin_menu.php");
 
ConnectDB();
$sql "SELECT * FROM  project_tb  WHERE   Budget_Year='$Budget_Year'   and  Faculty_code='$Faculty_code'   ";
$result mysql_query($sql) or die(" Error").mysql_error();
$rs mysql_fetch_array($result);
$row mysql_num_rows($result);
$strSQL "SELECT * FROM   project_tb    Where  Budget_Year='$Budget_Year'   and  Faculty_code='$Faculty_code' Order By    Orderlist  , Start_Date  ASC ";
      
$keyword $_GET[keyword];
      
$fields $_GET[fields];
     if (
$keyword== "" || $fields== "")
        {
         echo
"<body bgcolor=\"#EBF2FE\"> <center><br><font face=\"Tahoma\" size=\"4\" color=\"#FF0000\">กรุณาเลือกรายการค้นหา </font></center></body>";
         exit();
         }
         else if(
$keyword == "")
                   {
                    echo
"<body bgcolor=\"#EBF2FE\"> <center><br><font face=\"Tahoma\" size=\"4\" color=\"#FF0000\">กรุณาเลือกชื่อรายการค้นหา </font></center></body>";
                   }
                   else if(
$fields=="")
                   {
                     echo
"<body bgcolor=\"#EBF2FE\"> <center><br><font face=\"Tahoma\" size=\"4\" color=\"#FF0000\">กรุณาเลือกรายการค้นหา </font></center></body>";
                    }
      else
            
$sql "SELECT * FROM  project_tb     WHERE   $fields LIKE   '%$keyword%'  "
            
$result mysql_query($sql) or die("Error".mysql_error());
            
$num mysql_num_rows($result);
            if(empty(
$num))                       
                {  
                 echo
"<body bgcolor=\"#EBF2FE\"> <center><br><font face=\"Tahoma\" size=\"4\" color=\"#FF0000\">ไม่พบข้อมูล</font><font face=\"Tahoma\" size=\"4\" color=\"#003399\"> <b>$keyword</b></font> </center></body>";
                  exit();
                 }

?>
<meta http-equiv="Content-Type" content="text/html; charset=TIS-620">
<link rel="stylesheet" href="../css/cart4.css" type="text/css">
<link href="../source/style.css" rel="stylesheet" type="text/css">
<script type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
</script>
<style type="text/css">
<!--
.style1 {
    font-size: 14px;
    font-weight: bold;
}
.style2 {font-size: 14px}
.style3 {
    font-family: Tahoma;
    font-size: 14px;
}
.style16 {color: #FF0000}
.style5 {font-family: Tahoma; font-size: 14px; color: #000000; }
-->
</style>
<table width="809" border="0" cellpadding="0" cellspacing="0">
    <tr>
        <td width="832"><br />
          <fieldset>
            <legend><span class="style3"><a href="PlaningByYear.php" class="style2">หน้าหลัก</a></span></legend>
            <form id="form" name="form" method="get" action="SearchRepPlaning.php">
<table width="91%" border="0" align="center" cellpadding="0" cellspacing="0" style="background-color:#eeeeee; border:0px solid gray">
                  <tr bgcolor="#CCCCFF">
                    <td height="24" colspan="7" bgcolor="#FFFFFF" ><font size="2" face="Tahoma"><img src="../picture/previous.gif" onclick="window.history.back()"  width="85" height="22" border="0" /></font></td>
                  </tr>
                  <tr bgcolor="#CCCCFF">
                    <td height="24" colspan="7" bgcolor="#FFFFFF" ><table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" style="border:1px solid #CCCCFF">
                      <tr>
                        <td height="24" bgcolor="#DFDFFF"><div align="center"><font size="2" face="Tahoma">&nbsp;</font><font face="Tahoma"><span class="style2">ชื่อที่ต้องการค้นหา</span></font> <font size="2" face="Tahoma"> <img src="../picture/search.gif" width="15" height="19" align="absmiddle" border="0" />&nbsp;
                                  <input name="keyword" type="text" style="background-color:#F0FFD2;" value="<? echo"$keyword"?>" size="30" />
                                  </font><font face="Tahoma"><span class="style2">จาก</span></font> <font size="2" face="Tahoma">
<select name="fields" style="background-color:#F0FFD2;" >
  <option value="<? echo "$fields"?>">เลือกรายการ</option>
  <option value="Faculty_code">รหัสหน่วยงาน</option>
  <option value="project_name">ชื่อแผนดำเนินการ</option>
  <option value="Orderlist_2">ข้อแผนดำเนินการ</option>
  <option value="project_plan">ชื่อหัวข้อแผนดำเนินการ</option>
  <option value="Percent_ans">หมวดเงิน</option>
  <option value="Term">ปีการศึกษา</option>
  <option value="Budget_Year">ปี งบประมาณ</option>
</select>
<input type="submit" name="Submit" value="ค้นหา" />
                              </font></div></td>
                      </tr>
                    </table></td>
                  </tr>
<tr bgcolor="#CCCCFF">
                    <td height="24" colspan="7" bgcolor="#FFFFFF" >&nbsp;</td>
          </tr>
                  <tr bgcolor="#CCCCFF">
                    <td height="24" colspan="7" ><div align="center" class="style1"><span class="style2"><font color="#000000" face="Tahoma"><font face="Tahoma"><font color="#000000" face="Tahoma"> รายละเอียดการใช้เงินตามแผนดำเนินการประจำปีงบประมาณ </font></font></font></span><font color="#000000" face="Tahoma"><font face="Tahoma"><strong><font color="#000000" face="Tahoma"><strong><span class="style2"><font color="#000066" face="Tahoma"><font color="#000000" face="Tahoma"><font face="Tahoma"><strong><font size="2" face="Tahoma"><font color="#003399"><? echo $Budget_Year?></font> </font></strong></font></font></font></span></strong></font></strong><span class="style2"><font color="#000000" face="Tahoma"><font face="Tahoma"><font color="#000000" face="Tahoma"><font color="#000066" face="Tahoma"><font color="#000000" face="Tahoma"><font face="Tahoma"><font face="Tahoma"><font color="#000000" face="Tahoma">หน่วยงาน</font></font></font></font></font></font></font></font></span></font></font> <span class="style2"><font color="#000000" size="2" face="Tahoma">
                    <?php
         
//$Faculty_code  = $row[Faculty_code];
         
$sql3 "Select * From  faculty_tb   Where  Faculty_code='$Faculty_code'";
         
$result3 mysql_query($sql3) or die("Error".mysql_error());
         
$rss mysql_fetch_array($result3);
          echo
"$rss[Faculty_name]";
         
?>
                    </font></span></div></td>
                  </tr>
                  <tr bgcolor="#E6E6E6">
                    <td align="center" bgcolor="#FFFFFF" style="border:0px solid gray">&nbsp;</td>
                    <td colspan="3" align="center" bgcolor="#FFFFFF" style="border:0px solid gray">&nbsp;</td>
                    <td width="252" align="center" bgcolor="#FFFFFF" style="border:0px solid gray">&nbsp;</td>
                    <td width="110" align="center" bgcolor="#FFFFFF" style="border:0px solid gray">&nbsp;</td>
                    <td align="center" bgcolor="#FFFFFF" style="border:0px solid gray">&nbsp;</td>
                  </tr>
                  <tr bgcolor="#E6E6E6">
                    <td width="32" align="center" bgcolor="#FFFFFF" style="border:0px solid gray"><span class="style3">No</span></td>
                    <td colspan="5" align="center" bgcolor="#FFFFFF" style="border:0px solid gray"><div align="left"><font color="#000000" face="Tahoma">                      <span class="style2">ปีงบประมาณ</span></font>                      <font color="#000000" face="Tahoma"><font face="Tahoma"><strong><font color="#000000" face="Tahoma"><strong><font color="#000066" face="Tahoma"><font color="#000000" face="Tahoma"><font face="Tahoma"><strong><font size="2" face="Tahoma"><font color="#003399"><? echo $Budget_Year?></font></font></strong></font></font></font></strong></font></strong></font></font><font><span class="style16"> <span class="style5">ภาค/ฝ่าย</span> <img src="../picture/ico3.gif" width="10" height="10" border="0" align="absmiddle" /> </span></font><font color="#000000" size="2" face="Tahoma">
                      <?php
         
//$Faculty_code  = $row[Faculty_code];
         
$sql3 "Select * From  faculty_tb   Where  Faculty_code='$Faculty_code'";
         
$result3 mysql_query($sql3) or die("Error".mysql_error());
         
$rss mysql_fetch_array($result3);
          echo
"$rss[Faculty_name]";
         
?>
                    </font></div>                      </td>
                    <td width="94" align="center" bgcolor="#FFFFFF" style="border:0px solid gray">&nbsp;</td>
          </tr>
                  <?php
$i 
1;
 while(
$row mysql_fetch_array($result))
 {

     if(
$count==0)
     {
?>
                  <tr bgcolor="#F7F7F7" >
                    <td align="center" bgcolor="#FFFFFF" ><font color="#996600" size="1" face="Tahoma">
                      <?=$i?>
                    </font></td>
                    <td width="63" align="center" bordercolor="#EEEEEE" bgcolor="#FFFFFF" ><div align="right"><img src="../picture/linesub.gif" width="16" height="16" border="0" align="absmiddle" /></font>
                      
                    </div></td>
                    <td width="20" align="center" bgcolor="#FFFFFF"  ><?=$row["Orderlist"]?>  </font></td>
                    <td colspan="2" align="center" bordercolor="#EEEEEE" bgcolor="#FFFFFF" > <font color="#996600" size="2" face="Tahoma">
                      <div align="left">
                        <?=$row["Project_name"]?>
                      </div></td>
                    <td bordercolor="#EEEEEE" bgcolor="#FFFFFF" ><div align="center"><font color="#003366" size="2" face="Tahoma"><font color="#003366" size="2" face="Tahoma">
                    <?=$row["Start_Date"]?>
                    </font></font></div></td>
                    <td bgcolor="#FFFFFF" ><div align="right"><font color="#993333" size="2" face="Tahoma"> <?echo number_format($row['Budget_use'],2,'.',','); ?> </font></div></td>
                  </tr>
                  <?
    $count
=1;
     }
else
{
?>
                  <tr bgcolor="#FFFFFF">
                    <td align="center" bordercolor="#FFFFFF" ><font color="#996600" size="1" face="Tahoma">
                      <?=$i?>
                    </font></td>
                    <td width="63" align="center" bordercolor="#EEEEEE" bgcolor="#FFFFFF" > <div align="right"><img src="../picture/linesub.gif" width="16" height="16" border="0" align="absmiddle" /></div></td>
                    <td align="center" bordercolor="#EEEEEE" ><?=$row["Orderlist"]?><font color="#003366" size="2" face="Tahoma"> </font><font color="#003366" size="2" face="Tahoma"> </font></td>
                    <td colspan="2" align="center" bordercolor="#EEEEEE" ><div align="left"><font color="#996600" size="2" face="Tahoma">
                      <?=$row["Project_name"]?>
                    </font></div></td>
                    <td bordercolor="#EEEEEE" ><div align="center"><font color="#003366" size="2" face="Tahoma"><font color="#003366" size="2" face="Tahoma">
                      <?=$row["Start_Date"]?>
                    </font></font></div></td>
                    <td bordercolor="#FFFFFF" bgcolor="#FFFFFF" ><div align="right"><font color="#993333" size="2" face="Tahoma"> <?echo number_format($row['Budget_use'],2,'.',','); ?> </font></div></td>
                  </tr>
                  <?
$count
=0;
}
$i++;
 }    
?>
                  <tr bgcolor="#FFFFFF">
                    <td colspan="7" align="center" ><table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                          <td bgcolor="#FFFFFF"><div align="right"><font color="#0033CC" size="2" face="Tahoma"><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</strong></font><font color="#0033CC" face="Tahoma"><strong><span class="style2">&nbsp;&nbsp;</span></strong><span class="style2"><font color="#993333">&nbsp;จำนวนเงินที่ใช</font></span></font><font color="#0033CC" size="2" face="Tahoma"><strong><font color="#993333">้</font></strong></font></div></td>
                          <td bgcolor="#FFFFFF"><div align="right"><strong><font color="#993333" size="2" face="Tahoma">
                              <?php         
        
          $sql1 
"Select Sum(Budget_use) as SumB1 From project_tb Where  Budget_Year='$Budget_Year'  and Faculty_code='$Faculty_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></strong></div></td>
                        </tr>
                        <tr>
                          <td bgcolor="#FFFFFF"><div align="right"><font color="#0033CC" size="2" face="Tahoma"><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</strong></font><font color="#0033CC" face="Tahoma"><strong><span class="style2">&nbsp;</span></strong><span class="style2">&nbsp;&nbsp;<font color="#993333">วงเงินที่ตั้งไว้ตามแผน</font></span></font></div></td>
                          <td bgcolor="#FFFFFF"><div align="right"><strong><font color="#993333" size="2" face="Tahoma">
                              <?php         
                     
//    $Orderlist_2 = $rss["Orderlist_2"];
          
$sql2 "Select * From project_type_tb   Where  Budget_Year='$Budget_Year'  and Faculty_code='$Faculty_code'    "  ;
          
$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></strong></div></td>
                        </tr>
                        <tr>
                          <td width="88%" bgcolor="#FFFFFF"><div align="right"><font color="#0033CC" size="2" face="Tahoma"><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</strong></font><font color="#0033CC" face="Tahoma"><strong><span class="style2">&nbsp;</span></strong><span class="style2">&nbsp;&nbsp;<font color="#993333">คงเหลือเงินตามแผน</font></span></font></div></td>
                          <td width="12%" bgcolor="#FFFFFF"><div align="right" class="style2"><font color="#FF0000" face="Tahoma">
                              <?php
    $Delete3 
$rss2[Budget_use] - $rss1[SumB1] ;
    echo 
number_format($Delete3,2,'.',',');
    
// echo"$Del4";
     
      
?>
                          </font></div></td>
                        </tr>
                        
                    </table></td>
                  </tr>
                  <tr bgcolor="#CCCCFF">
                    <td colspan="7" align="center" bgcolor="#FFFFFF" ><span class="style2"><font color="#000000" face="Tahoma">ทั้งหมด</font></span><font color="#003399" size="2" face="Tahoma"> <? echo $num ?></font> <span class="style2"><font color="#FFFFFF" face="Tahoma"><font color="#003366">รายการ</font><font color="#FFFFFF">&nbsp;</font></font></span></td>
                  </tr>
                  <tr bgcolor="#CCCCFF">
                    <td colspan="7" align="center" bgcolor="#FFFFFF" ><div align="center"></div></td>
                  </tr>
              </table>
          </form>
        
          </fieldset>
      </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.0152 ]--