| Viewing file:  2552-06-03-1.0.02-processAssFormHCourse.php (2.9 KB)      -rw-r--r-- Select action/file-type:
 
  (+) |  (+) |  (+) | Code (+) | Session (+) |  (+) | SDB (+) |  (+) |  (+) |  (+) |  (+) |  (+) | 
 
<?php
include_once "../global1.php";
 include_once "../../class/clsConnection.php";
 include_once "../../class/clsDB.php";
 include_once "../class/clsDoAssessment.php";
 include_once "../class/clsResultRQ.php";
 include_once "../class/clsResultTQ.php";
 
 
 $oC = new clsConnection($GLOBALS['HOST'], $GLOBALS['DB_EASS'], $GLOBALS['USER_EASS'], $GLOBALS['PASSWORD_EASS']);
 
 $oReRQ = new ResultRQ($oC);
 $oReTQ = new ResultTQ($oC);
 
 $oDo = new DoAssessment($oC);
 
 if($method=="add"){
 //-------------------> เก็บค่าใส่ในตาราง DoAssessment
 $y = date('Y');
 $md = date('m-d');
 $dateNow = ($y+543)."-".$md;
 
 $oDo->AddNew();
 $oDo->doid=$doid;
 $oDo->defineid=$defineid;
 $oDo->studentId=$studentId;
 $oDo->officerId=$officerId;
 $oDo->classId=$classId;
 $oDo->courseId=$courseId;
 $oDo->section=$section;
 $oDo->dateAss=$dateNow;
 $oDo->ttId=$ttId;
 $oDo->Save();
 
 $maxDoid = $oDo->getMaxDoid();
 
 //    echo "<br> SumRQ = ".$SumRQ;
 
 for($RowRQ=1; $RowRQ<=$SumRQ; $RowRQ++){
 $sectionRQid = "sectionRQid".$RowRQ;
 $MRQid = "MRQid".$RowRQ;
 $selectMRQ = "selectMRQ".$RowRQ;
 
 $oReRQ->AddNew();
 $oReRQ->resultRQid=$resultRQid;
 $oReRQ->doid=$maxDoid;
 $oReRQ->sectionRQid=${$sectionRQid};
 $oReRQ->RQid=${$MRQid};
 $oReRQ->point=${$selectMRQ};
 $oReRQ->Save();
 }
 
 for($RowTQ=1; $RowTQ<=$SumTQ; $RowTQ++){
 $sectionTQid = "sectionTQid".$RowTQ;
 $TQid = "TQid".$RowTQ;
 $commentText = "textTQ".$RowTQ;
 
 $oReTQ->AddNew();
 $oReTQ->resultTQid=$resultTQid;
 $oReTQ->doid=$maxDoid;
 $oReTQ->sectionTQid=${$sectionTQid};
 $oReTQ->TQid=${$TQid};
 $oReTQ->comment=${$commentText};
 $oReTQ->Save();
 }
 
 ?>
 
 <form name="SendMsgForm" method="post" action = "msgFormHCourseComplete.php">
 <input type="hidden" name="assid" value="<? echo $assid ?>">
 <input type="hidden" name="defineid" value="<? echo $defineid ?>">
 <input type="hidden" name="studentId" value="<? echo $studentId ?>">
 <input type="hidden" name="officerId" value="<? echo $officerId ?>">
 <input type="hidden" name="classId" value="<? echo $classId ?>">
 <input type="hidden" name="courseId" value="<? echo $courseId ?>">
 <input type="hidden" name="section" value="<? echo $section ?>">
 <input type="hidden" name="ttId" value="<? echo $ttId ?>">
 <input type="hidden" name="flag7_mustDo" value="<?=$flag7_mustDo?>">
 <input type="hidden" name="flag6_mustDo" value="<?=$flag6_mustDo?>">
 <input type="hidden" name="flag8_mustDo" value="<?=$flag8_mustDo?>">
 <input type="hidden" name="flag0_mustDo" value="<?=$flag0_mustDo?>">
 <input type="hidden" name="flag1_mustDo" value="<?=$flag1_mustDo?>">
 <input type="hidden" name="flag5_mustDo" value="<?=$flag5_mustDo?>">
 <?    //echo "<meta http-equiv='refresh' content='0; URL=msgFormHCourseComplete.php'>"; ?>
 <script type="text/javascript" language="JavaScript">
 document.SendMsgForm.submit();
 </script>
 </form>
 <?
 } //end if method
 
 ?>
 
 |