Viewing file: processLTInClass.php (1.81 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php session_start(); include_once "../class/clsrg_CopyTimeTable.php";
$ctId = (! isset($_POST['ctId'])? "" : $_POST['ctId']); $ctLtId = (! isset($_POST['ctLtId'])? "" : $_POST['ctLtId']); $acadYear = (! isset($_POST['acadYear'])? "" : $_POST['acadYear']); $semester = (! isset($_POST['semester'])? "" : $_POST['semester']); $ctClId = (! isset($_POST['ctClId'])? "" : $_POST['ctClId']);
$conn = new Connection();
$oCt1 = new rg_CopyTimeTable(); $oCt2 = new rg_CopyTimeTable();
set_time_limit(0);
if($method=="edit"){ if($ctClId) $oCt1->RSrg_CopyTimeTableByClIdAndLtId($ctClId, $ctLtId); else $oCt1->RSrg_CopyTimeTableByAcYAndSeAndLtId($acadYear, $semester, $ctLtId); while($oCt1->GetRecord()) { $oCt2->SearchByKey($oCt1->ctId); $oCt2->GetRecord(); $oCt2->Edit(); if(is_null($oCt2->ctRmId)) $oCt2->ctRmId='NULL'; if(is_null($oCt2->ctEpMepId)) $oCt2->ctEpMepId='NULL'; if(is_null($oCt2->ctEpSepId)) $oCt2->ctEpSepId='NULL'; if(is_null($oCt2->ctTtId)) $oCt2->ctTtId='NULL'; $oCt2->ctLtId='NULL'; $oCt2->ctUpdateUserId=$updateUserId; $oCt2->ctUpdateDateTime=date('Y-m-d H:i:s'); $oCt2->Save(); } for($i=0; $i<count($ctId); $i++) { $oCt1->SearchByKey($ctId[$i]); if($oCt1->GetRecord()) { $oCt1->Edit(); if(is_null($oCt1->ctRmId)) $oCt1->ctRmId='NULL'; if(is_null($oCt1->ctEpMepId)) $oCt1->ctEpMepId='NULL'; if(is_null($oCt1->ctEpSepId)) $oCt1->ctEpSepId='NULL'; if(is_null($oCt1->ctTtId)) $oCt1->ctTtId='NULL'; $oCt1->ctLtId=$ctLtId; $oCt1->ctUpdateUserId=$updateUserId; $oCt1->ctUpdateDateTime=date('Y-m-d H:i:s'); $oCt1->Save(); } } }
set_time_limit(30);
$oCt1->Destroy(); $oCt2->Destroy(); $conn->Disconnect();
echo "<meta http-equiv='refresh' content='0; URL=addLTInClass.php?acadYear=$acadYear&semester=$semester&ctLtId=$ctLtId&ctClId=$ctClId'>";
?>
|