Viewing file: processAssFormPj.php (1.88 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/clsEsa_DoProject.php";
include_once "../class/clsEsa_ResultRQPj.php";
include_once "../class/clsEsa_ResultTQPj.php";
$oC = new clsConnection($GLOBALS['HOST'], $GLOBALS['DB_EASS'], $GLOBALS['USER_EASS'], $GLOBALS['PASSWORD_EASS']);
$oRRH = new ResultRQPj($oC);
$oRTH = new ResultTQPj($oC);
$oDoPj = new DoProject($oC);
if($method=="add"){
//-------------------> เก็บค่าใส่ในตาราง DoAssessment
$y = date('Y');
$md = date('m-d');
$dateNow = ($y+543)."-".$md;
$oDoPj->AddNew();
$oDoPj->doidHSid = $doPjid;
$oDoPj->defineid = $defineid;
$oDoPj->stdId = $studentId;
$oDoPj->pjId = $pjid;
$oDoPj->stdYear = $stdYearAss;
$oDoPj->dateAss = $dateNow;
$oDoPj->Save();
$maxDoPj = $oDoPj->GetMaxCode();
//-------------------> เก็บค่าใส่ในตาราง ResultRQHStd
for($RowRQ=1; $RowRQ<=$SumRQ; $RowRQ++){
$sectionRQid = "sectionRQid".$RowRQ;
$MRQid = "MRQid".$RowRQ;
$selectMRQ = "selectMRQ".$RowRQ;
$oRRH->AddNew();
$oRRH->rsRQPjid=$rsRQPjid;
$oRRH->doPjid=$maxDoPj;
$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->rsTQPjid=$rsTQPjid;
$oRTH->doPjid=$maxDoPj;
$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
?>
|