Viewing file: processAssFormHStd.php (1.87 KB) -rwxr-xr-x 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/clsDoAssessmentHStd.php";
include_once "../class/clsResultRQHStd.php";
include_once "../class/clsResultTQHStd.php";
$oC = new clsConnection($GLOBALS['HOST'], $GLOBALS['DB_EASS'], $GLOBALS['USER_EASS'], $GLOBALS['PASSWORD_EASS']);
$oRRH = new ResultRQHStd($oC);
$oRTH = new ResultTQHStd($oC);
$oDoHS = new DoAssessmentHStd($oC);
if($method=="add"){
//-------------------> เก็บค่าใส่ในตาราง DoAssessment
$y = date('Y');
$md = date('m-d');
$dateNow = ($y+543)."-".$md;
$oDoHS->AddNew();
$oDoHS->doidHSid=$doidHSid;
$oDoHS->defineid=$defineid;
$oDoHS->studentId=$studentId;
$oDoHS->dateAss=$dateNow;
$oDoHS->stdYearAss=$stdYearAss;
$oDoHS->Save();
$maxDoHSid = $oDoHS->getMaxDoHSidid();
//-------------------> เก็บค่าใส่ในตาราง ResultRQHStd
for($RowRQ=1; $RowRQ<=$SumRQ; $RowRQ++){
$sectionRQid = "sectionRQid".$RowRQ;
$MRQid = "MRQid".$RowRQ;
$selectMRQ = "selectMRQ".$RowRQ;
$oRRH->AddNew();
$oRRH->reRHSid=$reRHSid;
$oRRH->doHSid=$maxDoHSid;
$oRRH->sectionRQid=${$sectionRQid};
$oRRH->RQid=${$MRQid};
$oRRH->point=${$selectMRQ};
$oRRH->Save();
}
for($RowTQ=1; $RowTQ<=$SumTQ; $RowTQ++){
$sectionTQid = "sectionTQid".$RowTQ;
$TQid = "TQid".$RowTQ;
$commentText = "textTQ".$RowTQ;
$oRTH->AddNew();
$oRTH->reTHSid=$reTHSid;
$oRTH->doHSid=$maxDoHSid;
$oRTH->sectionTQid=${$sectionTQid};
$oRTH->TQid=${$TQid};
$oRTH->comment=${$commentText};
$oRTH->Save();
}
?>
<form name="SendMsgForm" method="post" action = "msgFormHStdComplete.php">
<input type="hidden" name="assid" value="<? echo $assid ?>">
<script type="text/javascript" language="JavaScript">
document.SendMsgForm.submit();
</script>
</form>
<?
}
//end if method
?>
|