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


Viewing file:     reportDataRQTeachp2_excel.php (16.03 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?
header
('Content-type: application/xls');
header('Content-Disposition: attachment; filename="testing.xls"');
include_once 
"../../class/clsDB.php";
include_once 
"../../class/clsConnection.php";
include_once 
"../global.php";
include_once 
"../link/function.php";
include_once 
"../class/clsReg_Program.php";
include_once 
"../class/clsReg_SysSemesterDes.php";
include_once 
"../class/clsOfficerAssess.php";
include_once 
"../class/clsDefineAssessment.php";
include_once 
"../class/clsAssessForm.php";
include_once 
"../class/clsDoAssessmentTeach.php";
include_once 
"../class/clsResultRQTeach.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";

tabChoose();
confirmSubmit();
openWindow();

$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']);

$oProg = new Program($oCR);

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

$oDA = new DefineAssessment($oCA);
$oDA->SearchByDefineid($defineid);
$oDA->GetRecord();
        
$numTeachDoAss 0;
$oDoTe = new DoAssessmentTeach($oCA);
$oDoTe->SearchByDefineid($defineid);
while(
$oDoTe->GetRecord()){
    
$numTeachDoAss++;
}

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

$oOFA = new OfficerAssess($oCA);
$numTeachAll $oOFA->CountTeacherAll();

//ค้นหาคำถามปลายเปิดในแบบประเมินนี้ sectionTQid = 1
$oSA = new SectionAll($oCA);
$CntSTQid $oSA->RSCountSectionTQid($assid);
//echo "sectionTQid = ".$CntSTQid;
?>
<meta http-equiv="Content-Type" content="text/html; charset=tis-620">
<table width="93%" align="center" border="0">
    <tr>                  
        <td> 
<?
            $oSA 
= new SectionAll($oCA);
            
$numSection$oSA->RSCountSectionAll($assid);
            
$oSA->RSByKeyAss($assid);
            
$i 1;
            
$indexSection 1;
            while (
$oSA->GetRecord()){
                
/*---------------- กรณีที่เลือกเป็นคำถามชนิดปลายปิด------------------*/
                
if($oSA->sectionRQid != '0'){
                    
//สร้าง oSRQ แสดงหัวข้อของส่วนการประเมิน
                    
$oSRQ = new SectionRQ($oCA);
                    
$oSRQ->RSSectionRQAll($assid,$oSA->sectionRQid);
                    while(
$oSRQ->GetRecord()){
                        
$oHQ = new HeaderQuestion($oCA);
                        
$oHQ->RSHeaderAllBySection($assid,$oSA->sectionRQid);
                        
$oHQ->GetRecord();                
                        
$oHS = new HeaderScore($oCA);
                        
$oHS->RSHeadSAll($oHQ->HSid);
                        
$oHS->GetRecord();
                
?>
                 
      <table width="100%">
        <tr> 
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr> 
          <td colspan="17" valign="top"><font size="2"><span class = "fontMarkTD1"> 
            <? if($numSection == '1') { echo "คำอธิบาย"; } else { echo "ส่วนที่ ".$indexSection; }?>
            </span> : </font><font size="2"><? echo $oSRQ->topicSectionRQ ?></font></td>
        </tr>
      </table>
                <table width="100%" border="1" align="center">
                  <tr> 
                    <td width="68%" rowspan="3" align="center" bgcolor="<?php echo $GLOBALS["COLOR_BG_TABLE_1"];?>"><font size="2"><b>หัวข้อการประเมิน</b></font></td>
                    <td width="16%" colspan="<? echo $oHS->score_amount*2 ?>" align="center" bgcolor="<?php echo $GLOBALS["COLOR_BG_TABLE_1"];?>"><font size="2"><b>  คะแนนการประเมิน </b></font></td>
                    <td width="6%" align="center" rowspan="3"  bgcolor="<?php echo $GLOBALS["COLOR_BG_TABLE_1"];?>"><font size="2"><b>ค่าเฉลี่ย</b></font></td>
                    <td width="6%" align="center" rowspan="3"  bgcolor="<?php echo $GLOBALS["COLOR_BG_TABLE_1"];?>"><font size="2"><b>S.D.</b></font></td>
                  </tr>
                  <tr> 
        <?        $oDS = new DetailScore($oCA);
                    
$oDS->RSDetailSAll($oHS->HSid);
                    while(
$oDS->GetRecord()){  
        
?>
                    <td height="23" colspan="2" align="center" bgcolor="<?php echo $GLOBALS["COLOR_BG_TABLE_1"];?>"><font size="2"><b>
                      <? echo $oDS->score ?> </b></font></td>
        <?        }
        
?>
                  </tr>
                  <tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_7"];?>"> 
                    <? for($i=0;$i<$oHS->score_amount;$i++){ ?>
                    <td height="22" align="center"><font size="2"><font size="2"><b>จำนวน</b></font></font></td>
                    <td width="4%" height="22" align="center"><font size="2">&nbsp;&nbsp;&nbsp;<b>%</b>&nbsp;&nbsp;&nbsp;</font></td>

                    <? ?>
                  </tr>
<?
                        $index1 
1;
                        
$index2 1;
                        
$index_color1 1;
                        
$index_color2 1;
                        
$j=1;
                        
$k=1;
                        
$m=1;
                        
$n=1;
                        
$sumPointRQ 0;
                        
$sumAvgPointRQ  0;
                        
$CntSubQ 0;
                        
$oRQ = new RadioQuestion($oCA);
                        
$oRQ->RSRadioQByKey($assid,$oSA->sectionRQid,1);
                        
//---------->แสดงคำถามชนิดปลายปิดข้อหลัก
                        
while($oRQ->GetRecord()){
                                
//คิดค่าเฉลี่ยของคำถามข้อหลัก  โดยเริ่มนับค่า point ในแต่ละผู้ประิเมินรายข้อ  แล้วนำมาหารกับจำนวนของผู้ประเมินทั้งหมด
                                
$oRRTe = new ResultRQTeach($oCA);
    
//*                            $sumPointRQ = $oRRTe->SumPointByClassIdOfficerIdRQid($defineid,$classId,$officerId,$oRQ->RQid);
    //*                            $sumAvgPointRQ = $sumPointRQ/$numTeachDoAss; //ได้ค่าเฉลี่ยหรือค่าเอ็กซ์บาร์

                                
$sumPointRQ $oRRTe->SumPointByRQid($defineid,$oRQ->RQid);
                                
//echo "sumPointRQ = ".$sumPointRQ;
                                
$sumAvgPointRQ $sumPointRQ/$numTeachDoAss//ได้ค่าเฉลี่ยหรือค่าเอ็กซ์บาร์        
    
                                //สร้างตัวแปร array เก็บค่าเฉลี่ยที่ได้รายข้อของคำถามข้อหลัก เพื่อนำไปหาผลรวม  โดยไม่นำข้อคำถามข้อหลักที่มีคำถามข้อย่อยไปเก็บ คือที่ CntSubQ = 0
                                
$oCntRQ = new RadioQuestion($oCA);
                                
$CntSubQ $oCntRQ->RSCountSubRQid($assid,$oRQ->RQid,'2');
    
                                
//เก็บค่าผลรวมของค่าเฉลี่ยข้อหลักใส่ array
                                
if($CntSubQ == 0){
                                    
$totalXMQ[$j] = $sumAvgPointRQ;
                                    
//echo "<br> =====> totalXMQ[$j] = ".$totalXMQ[$j];                        
                                    
$j++;                                
                                }
    
                                
$remTmp1 0;
                                
$remTmp2 0;
                                
$sumPow 0;
                                
$sumPowAVG 0;
                                
$numDataM=0;
                                
$SDm 0;
                        
    
//*                            $oRRTe->SearchPointByClassIdOfficerIdRQid($defineid,$classId,$officerId,$oRQ->RQid);
                                
$oRRTe->SearchPointByRQid($defineid,$oRQ->RQid);
                                while(
$oRRTe->GetRecord()){
                                    if(
$CntSubQ == 0){
                                        
//echo "<br> sumAvgPointRQ = ".$sumAvgPointRQ;
                                        //echo "<br> oRRTe->point  = ".$oRRTe->point;
                                        //echo "<br> oRQ->RQid = ".$oRQ->RQid;
                                        //echo "<br> -------------------------";
                                        
$remTmp1 = ($oRRTe->point)*($oRRTe->point);
                                        
//echo "<br> remTmp1 = ".$remTmp1;
                                        
$sumPow$remTmp2 $remTmp1;
                                        
$remTmp2 $sumPow;
                                        
//echo "<br> sumPow = ".$sumPow;
                                        
$numDataM++;        
                                    }
                                }    
//end while oRRTe
                                
                                //ค่าผลรวมของคะแนนข้อหลักแต่ละข้อ หารด้วยจำนวนข้อหลักที่ประเมินรายข้อ
                                
$sumPowAVG $sumPow $numDataM;
                                
//echo "<br> sumPowAVG = ".$sumPowAVG;
                                //echo "<br> sumAvgPointRQ        = ".$sumAvgPointRQ;
                                //ได้ค่า SD จากหารากที่สองของผลต่าง sumPowrAVG และ (sumAvgPointRQ    ) กำลังสอง            
                                
$SDm sqrt($sumPowAVG-(($sumAvgPointRQ)*($sumAvgPointRQ)));
    
                                if(
$CntSubQ == 0){                        
                                        
$totalSDMQ[$m] = $SDm;
                                        
$m++;                                
                                }
    
                                if(
$index_color2%== 0){//EEF2FB
                                    
if($index_color1%== 0){
                                        echo 
'<tr bgcolor="'.$GLOBALS["COLOR_BG_TD_5"].'">';
                                    }else{
                                        echo 
'<tr bgcolor="'.$GLOBALS["COLOR_BG_TD_4"].'">';
                                    }
                                }else{
                                    if(
$index_color1%== 0){
                                        echo 
'<tr bgcolor="'.$GLOBALS["COLOR_BG_TD_4"].'">';
                                    }else{
                                        echo 
'<tr bgcolor="'.$GLOBALS["COLOR_BG_TD_5"].'">';
                                    }
                                }                                    

                    
$oRQst = new RadioQuestion($oCA);
                    
$oRQst->SearchByAssidRQid($assid,$oRQ->RQid);
                    
$oRQst->GetRecord();
                      
?>
                      <td><font size="2"><? echo $index1."." ?> <? echo $oRQ->nameRQ ?></font>
                            <? if($oRQst->subtract == -1) { ?><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_7"]; ?>"> * </font> <? ?>
                      </td>
                     <?
                    
if($oRQst->subtract == -1){
                        
$oDS->RSDetailSAllDESC($oHS->HSid);
                    }else{
                        
$oDS->RSDetailSAll($oHS->HSid);
                    }
                        while(
$oDS->GetRecord()){  
                        
$oCntRRQ = new ResultRQTeach($oCA);
                        
$countPointRQ $oCntRRQ->CountPointJoinByRQidDefineidPoint($oRQ->RQid,$defineid,$oDS->score);
                        
//echo "<br> score_amount = ".$oDS->score;
                        //echo "<br> countPointRQ = ".$countPointRQ;
                        
$AvgCountPointRQ = ($countPointRQ/$numTeachDoAss)*100;
                
?>
                            
                    <td align="center">
                      <? if(($CntSubQ == 0)&&($numTeachDoAss '0')) echo $countPointRQ ?>
                      <? if(($CntSubQ == '0')&&($numTeachDoAss == '0')) echo "-"?>
                    </td>
                        
                    <td align="center"><font size="2">
                      <? if(($CntSubQ == 0)&&($numTeachDoAss '0')) printf ("%.2f",$AvgCountPointRQ); ?>
                      <? if(($CntSubQ == '0')&&($numTeachDoAss == '0')) echo "-"?>
                      </font></td>
                <?
                    
}    // end while oDS
                
?>
                    <td align="center"> 
                      <? if($sumAvgPointRQ != '0'printf ("%.2f",$sumAvgPointRQ); ?>
                      <? if(($CntSubQ == '0')&&($numTeachDoAss == '0')) echo "-"?>
                    </td>
                    <td align="center"> 
                      <? if($sumAvgPointRQ != '0'printf ("%.2f",$SDm); ?>
                      <? if(($CntSubQ == '0')&&($numTeachDoAss == '0')) echo "-"?>
                    </td>
                  </tr>
                  <?
                                $sumPointSubRQ 
0;
                                
$sumAvgPointSubRQ 0;
                                
$ocRQ = new RadioQuestion($oCA);
                                
$ocRQ->RSCheckLevel($assid,$oRQ->RQid);
                                while(
$ocRQ->GetRecord()){
                                            
                                    
//คิดค่าเฉลี่ยของคำถามข้อย่อย  โดยเริ่มนับค่า point ในแต่ละผู้ประิเมินรายข้อ  แล้วนำมาหารกับจำนวนของผู้ประเมินทั้งหมด
                                    
$oRRTe = new ResultRQTeach($oCA);
//*                                    $sumPointSubRQ = $oRRTe->SumPointByClassIdOfficerIdRQid($defineid,$classId,$officerId,$ocRQ->RQid);

                                    
$sumPointSubRQ $oRRTe->SumPointByRQid($defineid,$ocRQ->RQid);
                                    
$sumAvgPointSubRQ $sumPointSubRQ/$numTeachDoAss;
                
                                    
//สร้างตัวแปร array เก็บค่าเฉลี่ยที่ได้รายข้อของคำถามข้อย่อย เพื่อนำไปหาผลรวม
                                    
$totalXSubQ[$k] = $sumAvgPointSubRQ;
                                    
//echo "<br> =====> totalXSubQ[$k] = ".$totalXSubQ[$k];                        
                                    
$k++;
                
                                    
$remTmp3 0;
                                    
$remTmp4 0;
                                    
$sumPowSub 0;
                                    
$sumPowAVGSub 0;
                                    
$numDataSub 0;
                                    
$SDsub 0;
                                            
    
//*                                $oRRTe->SearchPointByClassIdOfficerIdRQid($defineid,$classId,$officerId,$ocRQ->RQid);
                                    
$oRRTe->SearchPointByRQid($defineid,$ocRQ->RQid);
                                    while(
$oRRTe->GetRecord()){
                                        
//คิดค่า S.D. ของแต่ละข้อย่อย
                                        //echo "<br> sumAvgPointRQ = ".$sumAvgPointRQ;
                                        //echo "<br> oRRTe->point  = ".$oRRTe->point;
                                        //echo "<br> oRQ->RQid = ".$oRQ->RQid;
                                        //echo "<br> sumPointRQ = ".$sumPointRQ;
                                        
$remTmp3 = ($oRRTe->point)*($oRRTe->point);
                                        
$sumPowSub $remTmp4 $remTmp3;
                                        
$remTmp4 $sumPowSub;
                                        
$numDataSub++;        
                                    }    
//end while oRRTe
                                            
                                    //echo "<br> numDataSub = ".$numDataSub;
                                    //ค่าผลรวมของคะแนนข้อย่อยแต่ละข้อ หารด้วยจำนวนข้อย่อยที่ประเมินรายข้อ
                                    
$sumPowAVGSub $sumPowSub $numDataSub;
                                    
//echo "<br> sumPowAVGSub = ".$sumPowAVGSub;
                                    //echo "<br> sumAvgPointSubRQ        = ".$sumAvgPointSubRQ;
                                    //ได้ค่า SD จากหารากที่สองของผลต่าง sumPowAVG และ (sumAvgPointRQ    ) กำลังสอง            
                                    
$SDsub sqrt($sumPowAVGSub-(($sumAvgPointSubRQ)*($sumAvgPointSubRQ)));
                                    
//echo "<br> SDsub = ".$SDsub;
                
                                    //สร้างตัวแปร array เก็บค่า SD ที่ได้รายข้อของคำถามข้อย่อย เพื่อนำไปหาผลรวม
                                    
$totalSDSubQ[$n] = $SDsub;
                                    
//echo "<br>************************************************** totalSDSubQ[$n] = ".$totalSDSubQ[$n];                        
                                    
$n++;
                
                                    if(
$index_color1%== 0){//EEF2FB
                                        
if($index_color2%== 0){
                                            echo 
'<tr bgcolor="'.$GLOBALS["COLOR_BG_TD_4"].'">';
                                        }else{
                                            echo 
'<tr bgcolor="'.$GLOBALS["COLOR_BG_TD_5"].'">';
                                        }
                                    }else{
                                        if(
$index_color2%== 0){
                                            echo 
'<tr bgcolor="'.$GLOBALS["COLOR_BG_TD_5"].'">';
                                        }else{
                                            echo 
'<tr bgcolor="'.$GLOBALS["COLOR_BG_TD_4"].'">';
                                        }
                                    }                    

                            
$oRQst = new RadioQuestion($oCA);
                            
$oRQst->SearchByAssidRQid($assid,$ocRQ->RQid);
                            
$oRQst->GetRecord();

                        
?>
                             <td><? echo "&nbsp;&nbsp;&nbsp;&nbsp;".$index1.".".$index2 ?>
                                    <? echo $ocRQ->nameRQ ?>
                                    <? if($oRQst->subtract == -1) { ?><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_7"]; ?>"> * </font> <? ?>
                            </td>
                        <?
                            
if($oRQst->subtract == -1){
                                
$oDS->RSDetailSAllDESC($oHS->HSid);
                            }else{
                                
$oDS->RSDetailSAll($oHS->HSid);
                            }
                            while(
$oDS->GetRecord()){  
                            
$oCntRRQ = new ResultRQTeach($oCA);
                            
$countPointRQ $oCntRRQ->CountPointJoinByRQidDefineidPoint($ocRQ->RQid,$defineid,$oDS->score);
                            
//echo "<br> score_amount = ".$oDS->score;
                            //echo "<br> countPointRQ = ".$countPointRQ;
                            
$AvgCountPointRQ = ($countPointRQ/$numTeachDoAss)*100;
                        
?>
                                 
                    <td align="center"><? if($numTeachDoAss '0') echo $countPointRQ ?>
                      <? if($numTeachDoAss == '0') echo "-"?>
                    </td>
                                
                    <td align="center"><font size="2"><? if($numTeachDoAss '0'printf ("%.2f",$AvgCountPointRQ); ?> 
                      <? if($numTeachDoAss == '0') echo "-"?>
                      </font></td>
                        <?
                            
}    // end while oDS
                        
?>
                          
                    <td align="center"> 
                      <? if($sumAvgPointSubRQ != '0'printf("%.2f",$sumAvgPointSubRQ); ?>
                      <? if($numTeachDoAss == '0') echo "-"?>
                    </td>
                          <td align="center"> 
                            <? if($sumAvgPointSubRQ != '0'printf ("%.2f",$SDsub); ?>
                            <? if($numTeachDoAss == '0') echo "-"?>
                          </td>
                          </tr>
                  <?      $index2++;
                              
$index_color2++;    
                              } 
//end while ocRQ    
                            
$index1++;
                            
$index2 1;
                            
$index_color1++;
                        } 
//end while oRQ
                            
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><br>
        <?    //end while oSRQ
            
// end if oSA
                    
$indexSection++;
        } 
//end while oSA 
        
?>
              <br>
                    
                  <table width="100%" border="0" align="center">
        <tr> 
          <td colspan="17"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_5"];?>"><b>หมายเหตุ 
            :</b>&nbsp;&nbsp; * หมายถึงเป็นคำถามเชิงลบ โดยกรณีที่เป็นคำถามเชิงลบในข้อนั้นๆ 
            ค่าเฉลี่ยและค่า S.D. จะคำนวณโดยกลับค่าให้แล้ว </font><font size="2">&nbsp;</font></td>
        </tr>
        <tr> 
          <td height="24">&nbsp; </td>
        </tr>
      </table>
                  </td>
                 </tr>
               </table><br>   
      </div>
</body>

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