Viewing file: 2553-11-16-1.1.03-processEditCourseTableTmp.php (2.52 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?
include_once "../global1.php";
include_once "../../class/clsConnection.php";
include_once "../../class/clsDB.php";
include_once "../class/clsHoldCourseTmp.php";
$oCA = new clsConnection($GLOBALS['HOST'], $GLOBALS['DB_EASS'], $GLOBALS['USER_EASS'], $GLOBALS['PASSWORD_EASS']);
$oHCT = new HoldCourseTmp($oCA);
if($method=="add"){
if(!isset($defineid))
$defineid=0;
if($selectFlag==7){
$oHCT->DeleteByClassId($classId);
for($i=0; $i<$cnt; $i++){
if($ttId[$i]) {
$oHCT->AddNew();
$oHCT->holdid=$holdid;
$oHCT->classId=$classId;
$oHCT->ttId=$ttId[$i];
$oHCT->officerId=$officerId[$i];
$oHCT->Save();
}
}
?><script language="javascript1.2">
window.opener.location.href="./editCourseInProgramTableTmp.php?assid=<?=$assid;?>&acadYear=<?=$acadYear;?>&semester=<?=$semester;?>&startDate=<?=$startDate;?>&endDate=<?=$endDate;?>&closeDate=<?=$closeDate;?>&selectFlag=<?=$selectFlag;?>&isPreAssess=<?=$isPreAssess;?>&edit=<?=$edit;?>&defineid=<?=$defineid;?>&noAss=<?=$noAss;?>";
window.close();
</script>
<?
}elseif($selectFlag==8){
$oHCT->DeleteByClassId($classId);
for($i=0; $i<$cnt; $i++){
if($officerId[$i]) {
$oHCT->AddNew();
$oHCT->holdid=$holdid;
$oHCT->classId=$classId;
$oHCT->officerId=$officerId[$i];
$oHCT->Save();
}
}
?><script language="javascript1.2">
window.opener.location.href="./editCourseInProgramTableTmpF8.php?assid=<?=$assid;?>&acadYear=<?=$acadYear;?>&semester=<?=$semester;?>&startDate=<?=$startDate;?>&endDate=<?=$endDate;?>&closeDate=<?=$closeDate;?>&selectFlag=<?=$selectFlag;?>&isPreAssess=<?=$isPreAssess;?>&edit=<?=$edit;?>&defineid=<?=$defineid;?>&noAss=<?=$noAss;?>";
window.close();
</script>
<?
}else{ // flag 9 ด้วย
$oHCT->DeleteAll();
for($i=0; $i<$cnt; $i++){
if($classId[$i]) {
// echo $classId[$i]."----<br>";
$oHCT->AddNew();
$oHCT->holdid=$holdid;
$oHCT->classId=$classId[$i];
$oHCT->Save();
}
}
//die();
?>
<script language="javascript1.2">
window.opener.location.href="editDefineSomeCourse.php?defineid=<?php echo $defineid;?>&assid=<?php echo $assid;?>&acadYear=<?php echo $acadYear;?>&semester=<?php echo $semester;?>&startDate=<?php echo $startDate;?>&endDate=<?php echo $endDate;?>&closeDate=<?php echo $closeDate;?>&selectFlag=<?php echo $selectFlag;?>&isPreAssess=<?=$isPreAssess;?>&defineid=<?=$defineid;?>&noAss=<?=$noAss;?>&back=1";
window.close();
</script>
<?
}
} //end if method
?>
|