!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/person/   drwxr-xr-x
Free 51 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:     AbsentList.php (15.67 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" );
        require_once( 
"../calendar/check.php" );
        require_once( 
"../calendar/cal_func.php" );
        require_once( 
"../link/function.php" );
        
/**  Create Database Object  */
        
$dbObj = new DBConn;
        
        
/**  Config Table for This Page  */
        
$myTable "personal_tb";
        
$myTable1 "history_absent_tb";
        
        
$Username $valid_user;

        
$query " SELECT *, prefixName as First_name FROM personal_tb LEFT JOIN prefix ON personal_tb.First_name = prefix.prefixId WHERE Teacher_code='$Teacher_code' ";
        
$resultS $dbObj->execQuery($query);
        
$rss $dbObj->fetchArray($resultS);
    
       
$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
 
?>
<!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=windows-874" />
<link href="../css/default.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="../js/utilities.js"></script>
<title>ศูนย์พัฒนาบุคลากร - ข้อมูลประวัติบุคลากร</title>
</head>

<body topmargin="0" rightmargin="0" bottommargin="0" leftmargin="0">

<table width="548" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="548" align="center" valign="top" style="padding:10px 0px 5px 10px"><fieldset>
    <br />
      <table width="94%" border="0" cellpadding="1" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#FFFFFF" style="background-color:#eeeeee; border:0px solid gray">
        <tr onmouseover="this.style.backgroundColor='#FCFCF3'" onmouseout="this.style.backgroundColor='#EEEEEE'" >
          <td height="30" colspan="3" align="center" bgcolor="#F8F8F8" class="PATRON">ประวัติการลา <span class="TEXT-DARK-BLUE10"><? echo $rss['First_name'];?><? echo $rss['Teacher_name'?> &nbsp;<? echo $rss['Teacher_lastname'?></span> &nbsp; ประจำปีงบประมาณ <span class="NOTE"><? echo $Year?></span></td>
        </tr>
        <tr onmouseover="this.style.backgroundColor='#FCFCF3'" onmouseout="this.style.backgroundColor='#EEEEEE'" >
          <td width="6%" bgcolor="#FFFFFF" align="center" class="PADDING-TOP-3"><img src="../images/icons/arrow_rd.gif" width="21" height="21" /></td>
          <td width="77%" bgcolor="#FFFFFF" class="PADDING-LEFT-5 PADDING-TOP-3"><?php
                            $sql2 
" SELECT * From history_absent_tb  WHERE Teacher_code='$Teacher_code'  AND  Absent_code='1'  AND  Year='$Year' ";
                            
$result2 $dbObj->execQuery($sql2);
                            
$num01 $dbObj->_numrows;
                        
?>
            <?php if( $num01 ) { ?><strong>
             ข้อมูลลากิจ</strong>
            <?php } else { ?>
            ข้อมูลลากิจ
            <?php ?></td>
          <td width="17%" bgcolor="#FFFFFF" align="center"><?php if( $num01 ) echo '<font color=red>ยังไม่ข้อมูล</font>'; elseif( $num01 ) echo '<font color=green>'$num01 .'</font> ระเบียน'?>            </span></td>
        </tr>
              <?php
                $no 
1+($display-1)*$limit;
                while( 
$rs2 $dbObj->fetchArray($result2) ) { 
                
                    
$bgColor = ( $bgColor == "#FFFFFF" ) ? "#F9FBFB" "#FFFFFF";
              
?>
        <tr onmouseover="this.style.backgroundColor='#FCFCF3'" onmouseout="this.style.backgroundColor='#EEEEEE'" >
          <td bgcolor="#FFFFFF" align="center"><?=$no;?>
            </span></td>
          <td bgcolor="#FFFFFF" class="PADDING-LEFT-5"><?php 
                $sday 
$rs2['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 
$rs2['Date_finish'];
                
$yearthai explode("-",$sday);
                
$day intval($yearthai[2]);
                
$month =  intval($yearthai[1]);
                
$year intval($yearthai[0]);     
                
$m getThaiSubMonth($month);
                    echo 
"$day"." "."$m"." "."$year";
            
?>
            </span></td>
          <td bgcolor="#FFFFFF" align="center"><?=$rs2['Absent_times']; ?>&nbsp;<?= วัน?></td>
          <?php 
                       
# while 
                    
?>
        </tr>
        <tr onmouseover="this.style.backgroundColor='#FCFCF3'" onmouseout="this.style.backgroundColor='#EEEEEE'" >
          <td bgcolor="#FFFFFF" align="center"><img src="../images/icons/arrow_rd.gif" width="21" height="21" /></td>
          <td bgcolor="#FFFFFF" class="PADDING-LEFT-5"><?php
                            $sql 
" SELECT * From history_absent_tb  WHERE Teacher_code='$Teacher_code'  AND  Absent_code='2'  AND  Year='$Year' ";
                            
$result3 $dbObj->execQuery($sql);
                            
$num02 $dbObj->_numrows;
                        
?>
            <?php if( $num02 ) { ?><strong>
           ข้อมูลลาป่วย </strong>
            <?php } else { ?>
            ข้อมูลลาป่วย
            <?php ?></td>
          <td bgcolor="#FFFFFF" align="center"><?php if( $num02 ) echo '<font color=red>ยังไม่ข้อมูล</font>'; elseif( $num02 ) echo '<font color=green>'$num02 .'</font> ระเบียน'?></td>
        </tr>
        <?php
                $no 
1+($display-1)*$limit;
                while( 
$rs3$dbObj->fetchArray($result3) ) { 
                
                    
$bgColor = ( $bgColor == "#FFFFFF" ) ? "#F9FBFB" "#FFFFFF";
              
?>
        <tr onmouseover="this.style.backgroundColor='#FCFCF3'" onmouseout="this.style.backgroundColor='#EEEEEE'" >
          <td bgcolor="#FFFFFF" align="center"><?=$no;?></td>
          <td bgcolor="#FFFFFF" class="PADDING-LEFT-5"><?php 
                $sday 
$rs3['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 
$rs3['Date_finish'];
                
$yearthai explode("-",$sday);
                
$day intval($yearthai[2]);
                
$month =  intval($yearthai[1]);
                
$year intval($yearthai[0]);     
                
$m getThaiSubMonth($month);
                    echo 
"$day"." "."$m"." "."$year";
            
?>
            </span></td>
          <td bgcolor="#FFFFFF" align="center"><?=$rs3['Absent_times']; ?>
            &nbsp;
            <?= วัน?></td>
          <?php
                 $no
++;
               } 
# while 
                  
?>
        </tr>
        <tr onmouseover="this.style.backgroundColor='#FCFCF3'" onmouseout="this.style.backgroundColor='#EEEEEE'" >
          <td bgcolor="#FFFFFF" align="center"><img src="../images/icons/arrow_rd.gif" width="21" height="21" /></td>
          <td bgcolor="#FFFFFF" class="PADDING-LEFT-5"><?php
                            $sql2 
" SELECT * From history_absent_tb  WHERE Teacher_code='$Teacher_code'  AND  Absent_code='3'  AND  Year='$Year' ";
                            
$result4$dbObj->execQuery($sql2);
                            
$num03 $dbObj->_numrows;
                        
?>
            <?php if( $num03 ) { ?><strong>
            ข้อมูลลาพักผ่อน </strong>
            <?php } else { ?>
            ข้อมูลลาพักผ่อน
            <?php ?></td>
          <td bgcolor="#FFFFFF" align="center"><?php if( $num03 ) echo '<font color=red>ยังไม่ข้อมูล</font>'; elseif( $num03 ) echo '<font color=green>'$num03 .'</font> ระเบียน'?></td>
        </tr>
        <?php
                $no 
1+($display-1)*$limit;
                while( 
$rs4$dbObj->fetchArray($result4) ) { 
                
                    
$bgColor = ( $bgColor == "#FFFFFF" ) ? "#F9FBFB" "#FFFFFF";
              
?>
        <tr onmouseover="this.style.backgroundColor='#FCFCF3'" onmouseout="this.style.backgroundColor='#EEEEEE'" >
          <td bgcolor="#FFFFFF" align="center"><?=$no;?></td>
          <td bgcolor="#FFFFFF" class="PADDING-LEFT-5"><?php 
                $sday 
$rs4['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 
$rs4['Date_finish'];
                
$yearthai explode("-",$sday);
                
$day intval($yearthai[2]);
                
$month =  intval($yearthai[1]);
                
$year intval($yearthai[0]);     
                
$m getThaiSubMonth($month);
                    echo 
"$day"." "."$m"." "."$year";
            
?>
            </span></td>
          <td bgcolor="#FFFFFF" align="center"><?=$rs4['Absent_times']; ?>
            &nbsp;
            <?= วัน?></td>
          <?php
                        $no
++;
                          } 
#wihile
                
?>
        </tr>
        <tr onmouseover="this.style.backgroundColor='#FCFCF3'" onmouseout="this.style.backgroundColor='#EEEEEE'" >
          <td bgcolor="#FFFFFF" align="center"><img src="../images/icons/arrow_rd.gif" width="21" height="21" /></td>
          <td bgcolor="#FFFFFF" class="PADDING-LEFT-5"><?php
                            $sql2 
" SELECT * From history_absent_tb  WHERE Teacher_code='$Teacher_code'  AND  Absent_code='4'  AND  Year='$Year' ";
                            
$result5 $dbObj->execQuery($sql2);
                            
$num04 $dbObj->_numrows;
                        
?>
            <?php if( $num04 ) { ?><strong>
            ข้อมูลลาคลอด </strong>
            <?php } else { ?>
            ข้อมูลลาคลอด
            <?php ?></td>
          <td bgcolor="#FFFFFF" align="center"><?php if( $num04 ) echo '<font color=red>ยังไม่ข้อมูล</font>'; elseif( $num04 ) echo '<font color=green>'$num04 .'</font> ระเบียน'?></td>
        </tr>
        <?php
                      $no 
1+($display-1)*$limit;
                      while( 
$rs5$dbObj->fetchArray($result5) ) { 
                
                    
$bgColor = ( $bgColor == "#FFFFFF" ) ? "#F9FBFB" "#FFFFFF";
                      
?>
        <tr onmouseover="this.style.backgroundColor='#FCFCF3'" onmouseout="this.style.backgroundColor='#EEEEEE'" >
          <td bgcolor="#FFFFFF" align="center"><?=$no;?></td>
          <td bgcolor="#FFFFFF" class="PADDING-LEFT-5"><?php 
                $sday 
$rs5['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 
$rs5['Date_finish'];
                
$yearthai explode("-",$sday);
                
$day intval($yearthai[2]);
                
$month =  intval($yearthai[1]);
                
$year intval($yearthai[0]);     
                
$m getThaiSubMonth($month);
                    echo 
"$day"." "."$m"." "."$year";
            
?>
            </span></td>
          <td bgcolor="#FFFFFF" align="center"><?=$rs5['Absent_times']; ?>
            &nbsp;
            <?= วัน?></td>
          <?php
                        $no
++;
                          } 
#wihile
                         
?>
        </tr>
        <tr onmouseover="this.style.backgroundColor='#FCFCF3'" onmouseout="this.style.backgroundColor='#EEEEEE'" >
          <td bgcolor="#FFFFFF" align="center"><img src="../images/icons/arrow_rd.gif" width="21" height="21" /></td>
          <td bgcolor="#FFFFFF" class="PADDING-LEFT-5"><?php
                            $sql2 
" SELECT * From history_absent_tb  WHERE Teacher_code='$Teacher_code'  AND  Absent_code='5'  AND  Year='$Year' ";
                            
$result6 $dbObj->execQuery($sql2);
                            
$num05 $dbObj->_numrows;
                        
?>
            <?php if( $num05 ) { ?><strong>
            ข้อมูลลาอุปสมบท </strong>
            <?php } else { ?>
            ข้อมูลลาอุปสมบท
            <?php ?></td>
          <td bgcolor="#FFFFFF" align="center"><?php if( $num05 ) echo '<font color=red>ยังไม่ข้อมูล</font>'; elseif( $num05 ) echo '<font color=green>'$num05 .'</font> ระเบียน'?></td>
        </tr>
        <?php
                      $no 
1+($display-1)*$limit;
                      while( 
$rs6$dbObj->fetchArray($result6) ) { 
                
                        
$bgColor = ( $bgColor == "#FFFFFF" ) ? "#F9FBFB" "#FFFFFF";
                      
?>
        <tr onmouseover="this.style.backgroundColor='#FCFCF3'" onmouseout="this.style.backgroundColor='#EEEEEE'" >
          <td bgcolor="#FFFFFF" align="center"><?=$no;?></td>
          <td bgcolor="#FFFFFF" class="PADDING-LEFT-5"><?php 
                $sday 
$rs6['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 
$rs6['Date_finish'];
                
$yearthai explode("-",$sday);
                
$day intval($yearthai[2]);
                
$month =  intval($yearthai[1]);
                
$year intval($yearthai[0]);     
                
$m getThaiSubMonth($month);
                    echo 
"$day"." "."$m"." "."$year";
            
?>
            </span></td>
          <td bgcolor="#FFFFFF" align="center"><?=$rs6['Absent_times']; ?>
            &nbsp;
            <?= วัน?></td>
          <?php
                        $no
++;
                          } 
#wihile
                         
?>
        </tr>
        <tr onmouseover="this.style.backgroundColor='#FCFCF3'" onmouseout="this.style.backgroundColor='#EEEEEE'" >
          <td bgcolor="#FFFFFF" align="center"><img src="../images/icons/arrow_rd.gif" width="21" height="21" /></td>
          <td bgcolor="#FFFFFF" class="PADDING-LEFT-5"><?php
                            $sql2 
" SELECT * From history_absent_tb  WHERE Teacher_code='$Teacher_code'  AND  Absent_code='6'  AND  Year='$Year' ";
                            
$result7 $dbObj->execQuery($sql2);
                            
$num06 $dbObj->_numrows;
                        
?>
            <?php if( $num06 ) { ?><strong>
            ข้อมูลลาปฏิบัติธรรม </strong>
            <?php } else { ?>
            ข้อมูลลาปฏิบัติธรรม
            <?php ?></td>
          <td bgcolor="#FFFFFF" align="center"><?php if( $num06 ) echo '<font color=red>ยังไม่ข้อมูล</font>'; elseif( $num06 ) echo '<font color=green>'$num06 .'</font> ระเบียน'?></td>
        </tr>
        <?php
                      $no 
1+($display-1)*$limit;
                      while( 
$rs7$dbObj->fetchArray($result7) ) { 
                
                        
$bgColor = ( $bgColor == "#FFFFFF" ) ? "#F9FBFB" "#FFFFFF";
                      
?>
        <tr onmouseover="this.style.backgroundColor='#FCFCF3'" onmouseout="this.style.backgroundColor='#EEEEEE'" >
          <td bgcolor="#FFFFFF" align="center"><?=$no;?></td>
          <td bgcolor="#FFFFFF" class="PADDING-LEFT-5"><?php 
                $sday 
$rs7['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 
$rs7['Date_finish'];
                
$yearthai explode("-",$sday);
                
$day intval($yearthai[2]);
                
$month =  intval($yearthai[1]);
                
$year intval($yearthai[0]);     
                
$m getThaiSubMonth($month);
                    echo 
"$day"." "."$m"." "."$year";
            
?>
            </span></td>
          <td bgcolor="#FFFFFF" align="center"><?=$rs7['Absent_times']; ?>
            &nbsp;
            <?= วัน?></td>
          <?php
                        $no
++;
                          } 
#wihile
                         
?>
        </tr>
      </table>
      <br />
    </fieldset></td>
  </tr>
</table>

</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 ::
 
[ 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.0193 ]--