Viewing file: showCopyTimeTable.php (34.93 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
include_once "../global0.php";
include_once "../link/function.php";
include_once "../class/clsClass.php";
include_once "../class/clsrg_WeekDate.php";
include_once "../class/clsProgram.php";
include_once "../class/clsSysStudentYearDes.php";
include_once "../class/clsRoom.php";
include_once "../class/clsrg_ExternalPlace.php";
include_once "../class/clsrg_MainExternalPlace.php";
include_once "../class/clsrg_SubExternalPlace.php";
include_once "../class/clsOfficer.php";
include_once "../class/clsrg_OFSetTT.php";
include_once "../class/clsrg_CopyTimeTable.php";
include_once "../class/clsPeriod.php";
include_once "../class/clsDay.php";
include_once "../class/clsCourse.php";
include_once "../class/clsrg_SysStudyType.php";
include_once "../class/clsrg_NoStudyDate.php";
openWindow();
$conn = new Connection();
$oCl = new Class1();
$oWd = new rg_WeekDate();
$oPg = new Program();
$oSy = new SysStudentYearDes();
$oRm = new Room();
$oEp = new rg_ExternalPlace();
$oMep = new rg_MainExternalPlace();
$oSep = new rg_SubExternalPlace();
$oOf = new Officer();
$oOst = new rg_OFSetTT();
$oCt1 = new rg_CopyTimeTable();
$oCt2 = new rg_CopyTimeTable();
$oPr = new Period();
$oDy = new Day();
$oCo = new Course();
$oSt = new rg_SysStudyType();
$oNsd = new rg_NoStudyDate();
?>
<meta http-equiv="Content-Type" content="text/html; charset=tis-620">
<link href="../source/style.css" rel="stylesheet" type="text/css">
<script language="javascript">
function changeAcY(a) {
parent.topFrame.location = "addCopyTimeTable.php?programId=<?=$programId?>&studentYear=<?=$studentYear?>&acadYear=" + a + "&semester=<?=$semester?>&coId=<?=$coId?>&ctClId=<?=$ctClId?>&ctRmId=<?=$ctRmId?>&mepName=<?=$mepName?>&sepName=<?=$sepName?>&ctEpMepId=<?=$ctEpMepId?>&ctEpSepId=<?=$ctEpSepId?>&ctWdAcYWeekNo=<?=$ctWdAcYWeekNo?>&numWeek=<?=$numWeek?>&ctDyId[1]=<?=$ctDyId[1]?>&ctDyId[2]=<?=$ctDyId[2]?>&ctDyId[3]=<?=$ctDyId[3]?>&ctDyId[4]=<?=$ctDyId[4]?>&ctDyId[5]=<?=$ctDyId[5]?>&ctDyId[6]=<?=$ctDyId[6]?>&ctDyId[7]=<?=$ctDyId[7]?>&ctFrPr=<?=$ctFrPr?>&ctToPr=<?=$ctToPr?>&ctOfId=<?=$ctOfId?>&ctSstId=<?=$ctSstId?>&view=<?=$view?>&officerCode=<?=$officerCode?>";
parent.bottomFrame.location = "showCopyTimeTable.php?programId=<?=$programId?>&studentYear=<?=$studentYear?>&acadYear=" + a + "&semester=<?=$semester?>&coId=<?=$coId?>&ctClId=<?=$ctClId?>&ctRmId=<?=$ctRmId?>&mepName=<?=$mepName?>&sepName=<?=$sepName?>&ctEpMepId=<?=$ctEpMepId?>&ctEpSepId=<?=$ctEpSepId?>&ctWdAcYWeekNo=<?=$ctWdAcYWeekNo?>&numWeek=<?=$numWeek?>&ctDyId[1]=<?=$ctDyId[1]?>&ctDyId[2]=<?=$ctDyId[2]?>&ctDyId[3]=<?=$ctDyId[3]?>&ctDyId[4]=<?=$ctDyId[4]?>&ctDyId[5]=<?=$ctDyId[5]?>&ctDyId[6]=<?=$ctDyId[6]?>&ctDyId[7]=<?=$ctDyId[7]?>&ctFrPr=<?=$ctFrPr?>&ctToPr=<?=$ctToPr?>&ctOfId=<?=$ctOfId?>&ctSstId=<?=$ctSstId?>&view=<?=$view?>&officerCode=<?=$officerCode?>";
}
function changeView(v) {
parent.topFrame.location = "addCopyTimeTable.php?programId=<?=$programId?>&studentYear=<?=$studentYear?>&acadYear=<?=$acadYear?>&semester=<?=$semester?>&coId=<?=$coId?>&ctClId=<?=$ctClId?>&ctRmId=<?=$ctRmId?>&mepName=<?=$mepName?>&sepName=<?=$sepName?>&ctEpMepId=<?=$ctEpMepId?>&ctEpSepId=<?=$ctEpSepId?>&ctWdAcYWeekNo=<?=$ctWdAcYWeekNo?>&numWeek=<?=$numWeek?>&ctDyId[1]=<?=$ctDyId[1]?>&ctDyId[2]=<?=$ctDyId[2]?>&ctDyId[3]=<?=$ctDyId[3]?>&ctDyId[4]=<?=$ctDyId[4]?>&ctDyId[5]=<?=$ctDyId[5]?>&ctDyId[6]=<?=$ctDyId[6]?>&ctDyId[7]=<?=$ctDyId[7]?>&ctFrPr=<?=$ctFrPr?>&ctToPr=<?=$ctToPr?>&ctOfId=<?=$ctOfId?>&ctSstId=<?=$ctSstId?>&view=" + v + "&officerCode=<?=$officerCode?>";
parent.bottomFrame.location = "showCopyTimeTable.php?programId=<?=$programId?>&studentYear=<?=$studentYear?>&acadYear=<?=$acadYear?>&semester=<?=$semester?>&coId=<?=$coId?>&ctClId=<?=$ctClId?>&ctRmId=<?=$ctRmId?>&mepName=<?=$mepName?>&sepName=<?=$sepName?>&ctEpMepId=<?=$ctEpMepId?>&ctEpSepId=<?=$ctEpSepId?>&ctWdAcYWeekNo=<?=$ctWdAcYWeekNo?>&numWeek=<?=$numWeek?>&ctDyId[1]=<?=$ctDyId[1]?>&ctDyId[2]=<?=$ctDyId[2]?>&ctDyId[3]=<?=$ctDyId[3]?>&ctDyId[4]=<?=$ctDyId[4]?>&ctDyId[5]=<?=$ctDyId[5]?>&ctDyId[6]=<?=$ctDyId[6]?>&ctDyId[7]=<?=$ctDyId[7]?>&ctFrPr=<?=$ctFrPr?>&ctToPr=<?=$ctToPr?>&ctOfId=<?=$ctOfId?>&ctSstId=<?=$ctSstId?>&view=" + v + "&officerCode=<?=$officerCode?>";
}
function changeWeek(w) {
parent.topFrame.location = "addCopyTimeTable.php?programId=<?=$programId?>&studentYear=<?=$studentYear?>&acadYear=<?=$acadYear?>&semester=<?=$semester?>&coId=<?=$coId?>&ctClId=<?=$ctClId?>&ctRmId=<?=$ctRmId?>&mepName=<?=$mepName?>&sepName=<?=$sepName?>&ctEpMepId=<?=$ctEpMepId?>&ctEpSepId=<?=$ctEpSepId?>&ctWdAcYWeekNo=" + w + "&numWeek=<?=$numWeek?>&ctDyId[1]=<?=$ctDyId[1]?>&ctDyId[2]=<?=$ctDyId[2]?>&ctDyId[3]=<?=$ctDyId[3]?>&ctDyId[4]=<?=$ctDyId[4]?>&ctDyId[5]=<?=$ctDyId[5]?>&ctDyId[6]=<?=$ctDyId[6]?>&ctDyId[7]=<?=$ctDyId[7]?>&ctFrPr=<?=$ctFrPr?>&ctToPr=<?=$ctToPr?>&ctOfId=<?=$ctOfId?>&ctSstId=<?=$ctSstId?>&view=<?=$view?>&officerCode=<?=$officerCode?>";
parent.bottomFrame.location = "showCopyTimeTable.php?programId=<?=$programId?>&studentYear=<?=$studentYear?>&acadYear=<?=$acadYear?>&semester=<?=$semester?>&coId=<?=$coId?>&ctClId=<?=$ctClId?>&ctRmId=<?=$ctRmId?>&mepName=<?=$mepName?>&sepName=<?=$sepName?>&ctEpMepId=<?=$ctEpMepId?>&ctEpSepId=<?=$ctEpSepId?>&ctWdAcYWeekNo=" + w + "&numWeek=<?=$numWeek?>&ctDyId[1]=<?=$ctDyId[1]?>&ctDyId[2]=<?=$ctDyId[2]?>&ctDyId[3]=<?=$ctDyId[3]?>&ctDyId[4]=<?=$ctDyId[4]?>&ctDyId[5]=<?=$ctDyId[5]?>&ctDyId[6]=<?=$ctDyId[6]?>&ctDyId[7]=<?=$ctDyId[7]?>&ctFrPr=<?=$ctFrPr?>&ctToPr=<?=$ctToPr?>&ctOfId=<?=$ctOfId?>&ctSstId=<?=$ctSstId?>&view=<?=$view?>&officerCode=<?=$officerCode?>";
}
function changeCurr(c) {
parent.topFrame.location = "addCopyTimeTable.php?programId=" + c + "&studentYear=<?=$studentYear?>&acadYear=<?=$acadYear?>&semester=<?=$semester?>&coId=<?=$coId?>&ctClId=<?=$ctClId?>&ctRmId=<?=$ctRmId?>&mepName=<?=$mepName?>&sepName=<?=$sepName?>&ctEpMepId=<?=$ctEpMepId?>&ctEpSepId=<?=$ctEpSepId?>&ctWdAcYWeekNo=<?=$ctWdAcYWeekNo?>&numWeek=<?=$numWeek?>&ctDyId[1]=<?=$ctDyId[1]?>&ctDyId[2]=<?=$ctDyId[2]?>&ctDyId[3]=<?=$ctDyId[3]?>&ctDyId[4]=<?=$ctDyId[4]?>&ctDyId[5]=<?=$ctDyId[5]?>&ctDyId[6]=<?=$ctDyId[6]?>&ctDyId[7]=<?=$ctDyId[7]?>&ctFrPr=<?=$ctFrPr?>&ctToPr=<?=$ctToPr?>&ctOfId=<?=$ctOfId?>&ctSstId=<?=$ctSstId?>&view=<?=$view?>&officerCode=<?=$officerCode?>" ;
parent.bottomFrame.location = "showCopyTimeTable.php?programId=" + c + "&studentYear=<?=$studentYear?>&acadYear=<?=$acadYear?>&semester=<?=$semester?>&coId=<?=$coId?>&ctClId=<?=$ctClId?>&ctRmId=<?=$ctRmId?>&mepName=<?=$mepName?>&sepName=<?=$sepName?>&ctEpMepId=<?=$ctEpMepId?>&ctEpSepId=<?=$ctEpSepId?>&ctWdAcYWeekNo=<?=$ctWdAcYWeekNo?>&numWeek=<?=$numWeek?>&ctDyId[1]=<?=$ctDyId[1]?>&ctDyId[2]=<?=$ctDyId[2]?>&ctDyId[3]=<?=$ctDyId[3]?>&ctDyId[4]=<?=$ctDyId[4]?>&ctDyId[5]=<?=$ctDyId[5]?>&ctDyId[6]=<?=$ctDyId[6]?>&ctDyId[7]=<?=$ctDyId[7]?>&ctFrPr=<?=$ctFrPr?>&ctToPr=<?=$ctToPr?>&ctOfId=<?=$ctOfId?>&ctSstId=<?=$ctSstId?>&view=<?=$view?>&officerCode=<?=$officerCode?>" ;
}
function changeLevel(l) {
parent.topFrame.location = "addCopyTimeTable.php?programId=<?=$programId?>&studentYear=" + l + "&acadYear=<?=$acadYear?>&semester=<?=$semester?>&coId=<?=$coId?>&ctClId=<?=$ctClId?>&ctRmId=<?=$ctRmId?>&mepName=<?=$mepName?>&sepName=<?=$sepName?>&ctEpMepId=<?=$ctEpMepId?>&ctEpSepId=<?=$ctEpSepId?>&ctWdAcYWeekNo=<?=$ctWdAcYWeekNo?>&numWeek=<?=$numWeek?>&ctDyId[1]=<?=$ctDyId[1]?>&ctDyId[2]=<?=$ctDyId[2]?>&ctDyId[3]=<?=$ctDyId[3]?>&ctDyId[4]=<?=$ctDyId[4]?>&ctDyId[5]=<?=$ctDyId[5]?>&ctDyId[6]=<?=$ctDyId[6]?>&ctDyId[7]=<?=$ctDyId[7]?>&ctFrPr=<?=$ctFrPr?>&ctToPr=<?=$ctToPr?>&ctOfId=<?=$ctOfId?>&ctSstId=<?=$ctSstId?>&view=<?=$view?>&officerCode=<?=$officerCode?>" ;
parent.bottomFrame.location = "showCopyTimeTable.php?programId=<?=$programId?>&studentYear=" + l + "&acadYear=<?=$acadYear?>&semester=<?=$semester?>&coId=<?=$coId?>&ctClId=<?=$ctClId?>&ctRmId=<?=$ctRmId?>&mepName=<?=$mepName?>&sepName=<?=$sepName?>&ctEpMepId=<?=$ctEpMepId?>&ctEpSepId=<?=$ctEpSepId?>&ctWdAcYWeekNo=<?=$ctWdAcYWeekNo?>&numWeek=<?=$numWeek?>&ctDyId[1]=<?=$ctDyId[1]?>&ctDyId[2]=<?=$ctDyId[2]?>&ctDyId[3]=<?=$ctDyId[3]?>&ctDyId[4]=<?=$ctDyId[4]?>&ctDyId[5]=<?=$ctDyId[5]?>&ctDyId[6]=<?=$ctDyId[6]?>&ctDyId[7]=<?=$ctDyId[7]?>&ctFrPr=<?=$ctFrPr?>&ctToPr=<?=$ctToPr?>&ctOfId=<?=$ctOfId?>&ctSstId=<?=$ctSstId?>&view=<?=$view?>&officerCode=<?=$officerCode?>" ;
}
function changeRoom(r) {
parent.topFrame.location = "addCopyTimeTable.php?programId=<?=$programId?>&studentYear=<?=$studentYear?>&acadYear=<?=$acadYear?>&semester=<?=$semester?>&coId=<?=$coId?>&ctClId=<?=$ctClId?>&ctRmId=" + r + "&mepName=<?=$mepName?>&sepName=<?=$sepName?>&ctEpMepId=<?=$ctEpMepId?>&ctEpSepId=<?=$ctEpSepId?>&ctWdAcYWeekNo=<?=$ctWdAcYWeekNo?>&numWeek=<?=$numWeek?>&ctDyId[1]=<?=$ctDyId[1]?>&ctDyId[2]=<?=$ctDyId[2]?>&ctDyId[3]=<?=$ctDyId[3]?>&ctDyId[4]=<?=$ctDyId[4]?>&ctDyId[5]=<?=$ctDyId[5]?>&ctDyId[6]=<?=$ctDyId[6]?>&ctDyId[7]=<?=$ctDyId[7]?>&ctFrPr=<?=$ctFrPr?>&ctToPr=<?=$ctToPr?>&ctOfId=<?=$ctOfId?>&ctSstId=<?=$ctSstId?>&view=<?=$view?>&officerCode=<?=$officerCode?>" ;
parent.bottomFrame.location = "showCopyTimeTable.php?programId=<?=$programId?>&studentYear=<?=$studentYear?>&acadYear=<?=$acadYear?>&semester=<?=$semester?>&coId=<?=$coId?>&ctClId=<?=$ctClId?>&ctRmId=" + r + "&mepName=<?=$mepName?>&sepName=<?=$sepName?>&ctEpMepId=<?=$ctEpMepId?>&ctEpSepId=<?=$ctEpSepId?>&ctWdAcYWeekNo=<?=$ctWdAcYWeekNo?>&numWeek=<?=$numWeek?>&ctDyId[1]=<?=$ctDyId[1]?>&ctDyId[2]=<?=$ctDyId[2]?>&ctDyId[3]=<?=$ctDyId[3]?>&ctDyId[4]=<?=$ctDyId[4]?>&ctDyId[5]=<?=$ctDyId[5]?>&ctDyId[6]=<?=$ctDyId[6]?>&ctDyId[7]=<?=$ctDyId[7]?>&ctFrPr=<?=$ctFrPr?>&ctToPr=<?=$ctToPr?>&ctOfId=<?=$ctOfId?>&ctSstId=<?=$ctSstId?>&view=<?=$view?>&officerCode=<?=$officerCode?>" ;
}
function changePlace(p) {
parent.topFrame.location = "addCopyTimeTable.php?programId=<?=$programId?>&studentYear=<?=$studentYear?>&acadYear=<?=$acadYear?>&semester=<?=$semester?>&coId=<?=$coId?>&ctClId=<?=$ctClId?>&ctRmId=<?=$ctRmId?>&mepName=<?=$mepName?>&sepName=<?=$sepName?>&ctEpMepId=" + p + "&ctEpSepId=<?=$ctEpSepId?>&ctWdAcYWeekNo=<?=$ctWdAcYWeekNo?>&numWeek=<?=$numWeek?>&ctDyId[1]=<?=$ctDyId[1]?>&ctDyId[2]=<?=$ctDyId[2]?>&ctDyId[3]=<?=$ctDyId[3]?>&ctDyId[4]=<?=$ctDyId[4]?>&ctDyId[5]=<?=$ctDyId[5]?>&ctDyId[6]=<?=$ctDyId[6]?>&ctDyId[7]=<?=$ctDyId[7]?>&ctFrPr=<?=$ctFrPr?>&ctToPr=<?=$ctToPr?>&ctOfId=<?=$ctOfId?>&ctSstId=<?=$ctSstId?>&view=<?=$view?>&officerCode=<?=$officerCode?>" ;
parent.bottomFrame.location = "showCopyTimeTable.php?programId=<?=$programId?>&studentYear=<?=$studentYear?>&acadYear=<?=$acadYear?>&semester=<?=$semester?>&coId=<?=$coId?>&ctClId=<?=$ctClId?>&ctRmId=<?=$ctRmId?>&mepName=<?=$mepName?>&sepName=<?=$sepName?>&ctEpMepId=" + p + "&ctEpSepId=<?=$ctEpSepId?>&ctWdAcYWeekNo=<?=$ctWdAcYWeekNo?>&numWeek=<?=$numWeek?>&ctDyId[1]=<?=$ctDyId[1]?>&ctDyId[2]=<?=$ctDyId[2]?>&ctDyId[3]=<?=$ctDyId[3]?>&ctDyId[4]=<?=$ctDyId[4]?>&ctDyId[5]=<?=$ctDyId[5]?>&ctDyId[6]=<?=$ctDyId[6]?>&ctDyId[7]=<?=$ctDyId[7]?>&ctFrPr=<?=$ctFrPr?>&ctToPr=<?=$ctToPr?>&ctOfId=<?=$ctOfId?>&ctSstId=<?=$ctSstId?>&view=<?=$view?>&officerCode=<?=$officerCode?>" ;
}
function changeSubPlace(s) {
parent.topFrame.location = "addCopyTimeTable.php?programId=<?=$programId?>&studentYear=<?=$studentYear?>&acadYear=<?=$acadYear?>&semester=<?=$semester?>&coId=<?=$coId?>&ctClId=<?=$ctClId?>&ctRmId=<?=$ctRmId?>&mepName=<?=$mepName?>&sepName=<?=$sepName?>&ctEpMepId=<?=$ctEpMepId?>&ctEpSepId=" + s + "&ctWdAcYWeekNo=<?=$ctWdAcYWeekNo?>&numWeek=<?=$numWeek?>&ctDyId[1]=<?=$ctDyId[1]?>&ctDyId[2]=<?=$ctDyId[2]?>&ctDyId[3]=<?=$ctDyId[3]?>&ctDyId[4]=<?=$ctDyId[4]?>&ctDyId[5]=<?=$ctDyId[5]?>&ctDyId[6]=<?=$ctDyId[6]?>&ctDyId[7]=<?=$ctDyId[7]?>&ctFrPr=<?=$ctFrPr?>&ctToPr=<?=$ctToPr?>&ctOfId=<?=$ctOfId?>&ctSstId=<?=$ctSstId?>&view=<?=$view?>&officerCode=<?=$officerCode?>" ;
parent.bottomFrame.location = "showCopyTimeTable.php?programId=<?=$programId?>&studentYear=<?=$studentYear?>&acadYear=<?=$acadYear?>&semester=<?=$semester?>&coId=<?=$coId?>&ctClId=<?=$ctClId?>&ctRmId=<?=$ctRmId?>&mepName=<?=$mepName?>&sepName=<?=$sepName?>&ctEpMepId=<?=$ctEpMepId?>&ctEpSepId=" + s + "&ctWdAcYWeekNo=<?=$ctWdAcYWeekNo?>&numWeek=<?=$numWeek?>&ctDyId[1]=<?=$ctDyId[1]?>&ctDyId[2]=<?=$ctDyId[2]?>&ctDyId[3]=<?=$ctDyId[3]?>&ctDyId[4]=<?=$ctDyId[4]?>&ctDyId[5]=<?=$ctDyId[5]?>&ctDyId[6]=<?=$ctDyId[6]?>&ctDyId[7]=<?=$ctDyId[7]?>&ctFrPr=<?=$ctFrPr?>&ctToPr=<?=$ctToPr?>&ctOfId=<?=$ctOfId?>&ctSstId=<?=$ctSstId?>&view=<?=$view?>&officerCode=<?=$officerCode?>" ;
}
function changeTeacher(t) {
parent.topFrame.location = "addCopyTimeTable.php?programId=<?=$programId?>&studentYear=<?=$studentYear?>&acadYear=<?=$acadYear?>&semester=<?=$semester?>&coId=<?=$coId?>&ctClId=<?=$ctClId?>&ctRmId=<?=$ctRmId?>&mepName=<?=$mepName?>&sepName=<?=$sepName?>&ctEpMepId=<?=$ctEpMepId?>&ctEpSepId=<?=$ctEpSepId?>&ctWdAcYWeekNo=<?=$ctWdAcYWeekNo?>&numWeek=<?=$numWeek?>&ctDyId[1]=<?=$ctDyId[1]?>&ctDyId[2]=<?=$ctDyId[2]?>&ctDyId[3]=<?=$ctDyId[3]?>&ctDyId[4]=<?=$ctDyId[4]?>&ctDyId[5]=<?=$ctDyId[5]?>&ctDyId[6]=<?=$ctDyId[6]?>&ctDyId[7]=<?=$ctDyId[7]?>&ctFrPr=<?=$ctFrPr?>&ctToPr=<?=$ctToPr?>&ctOfId=" + t + "&ctSstId=<?=$ctSstId?>&view=<?=$view?>&officerCode=<?=$officerCode?>" ;
parent.bottomFrame.location = "showCopyTimeTable.php?programId=<?=$programId?>&studentYear=<?=$studentYear?>&acadYear=<?=$acadYear?>&semester=<?=$semester?>&coId=<?=$coId?>&ctClId=<?=$ctClId?>&ctRmId=<?=$ctRmId?>&mepName=<?=$mepName?>&sepName=<?=$sepName?>&ctEpMepId=<?=$ctEpMepId?>&ctEpSepId=<?=$ctEpSepId?>&ctWdAcYWeekNo=<?=$ctWdAcYWeekNo?>&numWeek=<?=$numWeek?>&ctDyId[1]=<?=$ctDyId[1]?>&ctDyId[2]=<?=$ctDyId[2]?>&ctDyId[3]=<?=$ctDyId[3]?>&ctDyId[4]=<?=$ctDyId[4]?>&ctDyId[5]=<?=$ctDyId[5]?>&ctDyId[6]=<?=$ctDyId[6]?>&ctDyId[7]=<?=$ctDyId[7]?>&ctFrPr=<?=$ctFrPr?>&ctToPr=<?=$ctToPr?>&ctOfId=" + t + "&ctSstId=<?=$ctSstId?>&view=<?=$view?>&officerCode=<?=$officerCode?>" ;
}
function changeSubject(s) {
parent.topFrame.location = "addCopyTimeTable.php?programId=<?=$programId?>&studentYear=<?=$studentYear?>&acadYear=<?=$acadYear?>&semester=<?=$semester?>&coId=" + s + "&ctClId=&ctRmId=<?=$ctRmId?>&mepName=<?=$mepName?>&sepName=<?=$sepName?>&ctEpMepId=<?=$ctEpMepId?>&ctEpSepId=<?=$ctEpSepId?>&ctWdAcYWeekNo=<?=$ctWdAcYWeekNo?>&numWeek=<?=$numWeek?>&ctDyId[1]=<?=$ctDyId[1]?>&ctDyId[2]=<?=$ctDyId[2]?>&ctDyId[3]=<?=$ctDyId[3]?>&ctDyId[4]=<?=$ctDyId[4]?>&ctDyId[5]=<?=$ctDyId[5]?>&ctDyId[6]=<?=$ctDyId[6]?>&ctDyId[7]=<?=$ctDyId[7]?>&ctFrPr=<?=$ctFrPr?>&ctToPr=<?=$ctToPr?>&ctOfId=<?=$ctOfId?>&ctSstId=<?=$ctSstId?>&view=<?=$view?>&officerCode=<?=$officerCode?>" ;
parent.bottomFrame.location = "showCopyTimeTable.php?programId=<?=$programId?>&studentYear=<?=$studentYear?>&acadYear=<?=$acadYear?>&semester=<?=$semester?>&coId=" + s + "&ctClId=&ctRmId=<?=$ctRmId?>&mepName=<?=$mepName?>&sepName=<?=$sepName?>&ctEpMepId=<?=$ctEpMepId?>&ctEpSepId=<?=$ctEpSepId?>&ctWdAcYWeekNo=<?=$ctWdAcYWeekNo?>&numWeek=<?=$numWeek?>&ctDyId[1]=<?=$ctDyId[1]?>&ctDyId[2]=<?=$ctDyId[2]?>&ctDyId[3]=<?=$ctDyId[3]?>&ctDyId[4]=<?=$ctDyId[4]?>&ctDyId[5]=<?=$ctDyId[5]?>&ctDyId[6]=<?=$ctDyId[6]?>&ctDyId[7]=<?=$ctDyId[7]?>&ctFrPr=<?=$ctFrPr?>&ctToPr=<?=$ctToPr?>&ctOfId=<?=$ctOfId?>&ctSstId=<?=$ctSstId?>&view=<?=$view?>&officerCode=<?=$officerCode?>" ;
}
function changeGroup(g) {
parent.topFrame.location = "addCopyTimeTable.php?programId=<?=$programId?>&studentYear=<?=$studentYear?>&acadYear=<?=$acadYear?>&semester=<?=$semester?>&coId=<?=$coId?>&ctClId=" + g + "&ctRmId=<?=$ctRmId?>&mepName=<?=$mepName?>&sepName=<?=$sepName?>&ctEpMepId=<?=$ctEpMepId?>&ctEpSepId=<?=$ctEpSepId?>&ctWdAcYWeekNo=<?=$ctWdAcYWeekNo?>&numWeek=<?=$numWeek?>&ctDyId[1]=<?=$ctDyId[1]?>&ctDyId[2]=<?=$ctDyId[2]?>&ctDyId[3]=<?=$ctDyId[3]?>&ctDyId[4]=<?=$ctDyId[4]?>&ctDyId[5]=<?=$ctDyId[5]?>&ctDyId[6]=<?=$ctDyId[6]?>&ctDyId[7]=<?=$ctDyId[7]?>&ctFrPr=<?=$ctFrPr?>&ctToPr=<?=$ctToPr?>&ctOfId=<?=$ctOfId?>&ctSstId=<?=$ctSstId?>&view=<?=$view?>&officerCode=<?=$officerCode?>" ;
parent.bottomFrame.location = "showCopyTimeTable.php?programId=<?=$programId?>&studentYear=<?=$studentYear?>&acadYear=<?=$acadYear?>&semester=<?=$semester?>&coId=<?=$coId?>&ctClId=" + g + "&ctRmId=<?=$ctRmId?>&mepName=<?=$mepName?>&sepName=<?=$sepName?>&ctEpMepId=<?=$ctEpMepId?>&ctEpSepId=<?=$ctEpSepId?>&ctWdAcYWeekNo=<?=$ctWdAcYWeekNo?>&numWeek=<?=$numWeek?>&ctDyId[1]=<?=$ctDyId[1]?>&ctDyId[2]=<?=$ctDyId[2]?>&ctDyId[3]=<?=$ctDyId[3]?>&ctDyId[4]=<?=$ctDyId[4]?>&ctDyId[5]=<?=$ctDyId[5]?>&ctDyId[6]=<?=$ctDyId[6]?>&ctDyId[7]=<?=$ctDyId[7]?>&ctFrPr=<?=$ctFrPr?>&ctToPr=<?=$ctToPr?>&ctOfId=<?=$ctOfId?>&ctSstId=<?=$ctSstId?>&view=<?=$view?>&officerCode=<?=$officerCode?>" ;
}
</script>
<form name="pc" method="post">
<table width="100%">
<tr>
<td><font size="3" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><b>ตารางสอน</b></font>
<font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"]; ?>">ปีการศึกษา</font>
<select name="acadYear" onChange="changeAcY(this.form.acadYear.value)">
<?php
$oCl->RSClassGroupAcY();
while($oCl->GetRecord()) {
?>
<option value="<?php echo $oCl->acadYear;?>" <?php echo ($oCl->acadYear==$acadYear) ? 'selected' : '';?>><?php echo $oCl->acadYear;?></option>
<?php
}
?>
</select></td>
<?php
if($view == "") $view = 'c';
if(!$ctWdAcYWeekNo) {
$oWd->RSrg_WeekDateByDate(getNowDate());
$oWd->GetRecord();
$ctWdAcYWeekNo = $oWd->wdAcYWeekNo;
}
?>
<td align="right" style="<?php echo ($view=='s') ? 'display: none' : '';?>"><font size="2"><a href="javascript:changeWeek(<?php echo (($ctWdAcYWeekNo-1) < $oWd->GetMinAcYWeekNoByAcY($acadYear)) ? $oWd->GetMinAcYWeekNoByAcY($acadYear) : $ctWdAcYWeekNo-1;?>)" class="blue">สัปดาห์ก่อน</a>
<b>สัปดาห์ที่</b>
<select name="ctWdAcYWeekNo" onChange="changeWeek(this.form.ctWdAcYWeekNo.value)">
<?php
$oWd->RSrg_WeekDateByAcY($acadYear);
while($oWd->GetRecord()) {
?>
<option value="<?php echo $oWd->wdAcYWeekNo;?>" <?php echo ($oWd->wdAcYWeekNo==$ctWdAcYWeekNo) ? 'selected' : '';?>><?php echo abbreDate(splitDateDb2($oWd->wdFrDate));?></option>
<?php
}
?>
</select>
<a href="javascript:changeWeek(<?php echo (($ctWdAcYWeekNo+1) > $oWd->GetMaxAcYWeekNoByAcY($acadYear)) ? $oWd->GetMaxAcYWeekNoByAcY($acadYear) : $ctWdAcYWeekNo+1;?>)" class="blue">สัปดาห์ถัดไป</a></font></td>
</tr>
<tr>
<td colspan="2"><font size="2"><b>ดูตาม >></b>
<img src="../picture/curriculum.jpg" width="20" height="20">
<a href="javascript:changeView('c')" class="<?php echo ($view=='c') ? 'red' : 'blue';?>">หลักสูตร</a> |
<img src="../picture/room.jpg" width="20" height="20">
<a href="javascript:changeView('r')" class="<?php echo ($view=='r') ? 'red' : 'blue';?>">ห้อง</a> |
<img src="../picture/hospital.jpg" width="20" height="20">
<a href="javascript:changeView('p')" class="<?php echo ($view=='p') ? 'red' : 'blue';?>">สถานที่ฝึกงาน</a> |
<img src="../picture/teacher.jpg" width="20" height="20">
<a href="javascript:changeView('t')" class="<?php echo ($view=='t') ? 'red' : 'blue';?>">อาจารย์ผู้สอน</a> |
<img src="../picture/subject.jpg" width="20" height="20">
<a href="javascript:changeView('s')" class="<?php echo ($view=='s') ? 'red' : 'blue';?>">รายวิชา</a></font></td>
</tr>
<tr>
<td colspan="2"><hr size=1></td>
</tr>
<?php
if($view == "c") {
if($programId == "") $programId = 'NULL';
$pgIdStr = ($programId=='NULL') ? " is NULL" : "='$programId'";
if($studentYear == "") $studentYear = 1;
?>
<tr>
<td colspan="2"><font size="2">หลักสูตร
<select name="programId" onChange="changeCurr(this.form.programId.value)">
<option value="NULL">เรียนรวมหลายหลักสูตร</option>
<?php
$oPg->RSProgramByStatusIsYOrderName();
while($oPg->GetRecord()) {
?>
<option value="<?php echo $oPg->programId;?>" <?php echo ($oPg->programId==$programId) ? 'selected' : '';?>><?php echo $oPg->programName;?></option>
<?php
}
?>
</select>
ชั้นปี</font>
<select name="studentYear" onChange="changeLevel(this.form.studentYear.value)">
<?php
$oSy->RSSysStudentYearDes();
while($oSy->GetRecord()) {
?>
<option value="<?php echo $oSy->studentYear;?>" <?php echo ($oSy->studentYear==$studentYear) ? 'selected' : '';?>><?php echo $oSy->studentYear;?></option>
<?php
}
?>
</select></td>
</tr>
<?php
}
if($view == "r") {
if($ctRmId == "") {
$oRm->RSRoom();
$ctRmId = ($oRm->GetRecord()) ? $oRm->roomId : '';
}
?>
<tr>
<td colspan="2"><font size="2">ห้อง</font>
<select name="ctRmId" onChange="changeRoom(this.form.ctRmId.value)">
<?php
$oRm->RSRoom();
while($oRm->GetRecord()) {
?>
<option value="<?php echo $oRm->roomId;?>" <?php echo ($oRm->roomId==$ctRmId) ? 'selected' : '';?>><?php echo $oRm->roomNo;?></option>
<?php
}
?>
</select></td>
</tr>
<?php
}
if($view == "p") {
if($ctEpMepId == "") {
$oEp->RSrg_ExternalPlaceGroupMepId();
$ctEpMepId = ($oEp->GetRecord()) ? $oEp->epMepId : '';
}
if($ctEpSepId == "") {
$oEp->RSrg_ExternalPlaceByMepId($ctEpMepId);
$ctEpSepId = ($oEp->GetRecord()) ? $oEp->epSepId : '';
}
?>
<tr>
<td colspan="2"><font size="2">สถานที่ฝึกงานหลัก
<select name="ctEpMepId" onChange="changePlace(this.form.ctEpMepId.value)">
<?php
$oEp->RSrg_ExternalPlaceGroupMepId();
while($oEp->GetRecord()) {
$oMep->SearchByKey($oEp->epMepId);
$oMep->GetRecord();
?>
<option value="<?php echo $oEp->epMepId;?>" <?php echo ($oEp->epMepId==$ctEpMepId) ? 'selected' : '';?>><?php echo $oMep->mepName;?></option>
<?php
}
?>
</select>
สถานที่ฝึกงานย่อย</font>
<select name="ctEpSepId" onChange="changeSubPlace(this.form.ctEpSepId.value)">
<?php
$oEp->RSrg_ExternalPlaceByMepId($ctEpMepId);
while($oEp->GetRecord()) {
$oSep->SearchByKey($oEp->epSepId);
$oSep->GetRecord();
?>
<option value="<?php echo $oEp->epSepId;?>" <?php echo ($oEp->epSepId==$ctEpSepId) ? 'selected' : '';?>><?php echo $oSep->sepName;?></option>
<?php
}
?>
</select></td>
</tr>
<?php
}
if($view == "t") {
if($ctOfId == "") {
$oOf->RSOfficerOrderNmAndSn();
$ctOfId = ($oOf->GetRecord()) ? $oOf->officerId : '';
}
?>
<tr>
<td colspan="2"><font size="2">อาจารย์ผู้สอน</font>
<select name="ctOfId" onChange="changeTeacher(this.form.ctOfId.value)">
<?php
$oOf->RSOfficerOrderNmAndSn();
while($oOf->GetRecord()) {
?>
<option value="<?php echo $oOf->officerId;?>" <?php echo ($oOf->officerId==$ctOfId) ? 'selected' : '';?>><?php echo $oOf->officerName.' '.$oOf->officerSurname;?></option>
<?php
}
?>
</select></td>
</tr>
<?php
}
if($view == "s") {
if($coId == "") {
$oCl->RSClassByAcYGroupCoIdOrderCoCodeCoName($acadYear);
$coId = ($oCl->GetRecord()) ? $oCl->courseId : '';
}
?>
<tr>
<td colspan="2"><font size="2">รายวิชา
<select name="coId" onChange="changeSubject(this.form.coId.value)">
<?php
$oCl->RSClassByAcYGroupCoIdOrderCoCodeCoName($acadYear);
while($oCl->GetRecord()) {
$oCo->SearchByKey($oCl->courseId);
$oCo->GetRecord();
?>
<option value="<?php echo $oCl->courseId;?>" <?php echo ($oCl->courseId==$coId) ? 'selected' : '';?>><?php echo $oCo->courseCode.' '.$oCo->courseName;?></option>
<?php
}
?>
</select>
กลุ่ม</font>
<select name="ctClId" onChange="changeGroup(this.form.ctClId.value)">
<option value="" <?php echo ($ctClId=="") ? 'selected' : '';?>>ทุกกลุ่ม</option>
<?php
$oCl->RSClassByAcYAndCoIdOrderSection($acadYear, $coId);
while($oCl->GetRecord()) {
$oPg->SearchByKey($oCl->programId);
$oPg->GetRecord();
?>
<option value="<?php echo $oCl->classId;?>" <?php echo ($oCl->classId==$ctClId) ? 'selected' : '';?>><?php echo $oCl->section.' ('.(is_null($oCl->programId) ? 'เรียนรวมหลายหลักสูตร' : $oPg->programAbbr).')';?></option>
<?php
}
?>
</select></td>
</tr>
<?php
}
?>
</table>
</form>
<?php
//do delete
if($method=="delete") {
$oCt1->SearchByKey($ctId);
$oCt1->GetRecord();
$oCt1->Delete();
}
///////////////////////////////
// show schedule by room, teacher, curr
///////////////////////////////
?>
<table bgcolor="#999999" cellpadding="0" cellspacing="0">
<tr>
<td><table cellpadding=3 cellspacing=1>
<?php
//period header
?>
<tr align="center" bgcolor="#ABCDEF">
<td></td>
<?php
$oPr->RSPeriod();
while($oPr->GetRecord()) {
?>
<td><font size="1"><b><?php echo $oPr->period.'<br>'.substr($oPr->startTime, 0, 5).'-'.substr($oPr->endTime, 0, 5);?></b></font></td>
<?php
}
?>
</tr>
<?php
//day header ในแต่ละวันของสัปดาห์
$oDy->RSDay();
while($oDy->GetRecord()) {
if($ctWdAcYWeekNo == "") $ctWdAcYWeekNo = 1;
//เช็คว่าแต่ละวันมีวิชาหรือไม่ ถ้าไม่มีให้ข้ามไปวันต่อไป
if($view == "c") $num = $oCt1->GetCountIdByAcYAndPgIdStrAndStYAndAcYWeekNoAndDyId($acadYear, $pgIdStr, $studentYear, $ctWdAcYWeekNo, $oDy->dayId);
if($view == "r") $num = $oCt1->GetCountIdByAcYAndRmIdAndAcYWeekNoAndDyId($acadYear, $ctRmId, $ctWdAcYWeekNo, $oDy->dayId);
if($view == "p") $num = $oCt1->GetCountIdByAcYAndEpMepIdAndEpSepIdAndAcYWeekNoAndDyId($acadYear, $ctEpMepId, $ctEpSepId, $ctWdAcYWeekNo, $oDy->dayId);
if($view == "t") $num = $oCt1->GetCountIdByAcYAndOfIdAndAcYWeekNoAndDyId($acadYear, $ctOfId, $ctWdAcYWeekNo, $oDy->dayId);
if($view == "s") {
if($ctClId == "")
$num = $oCt1->GetCountIdByAcYAndCoIdAndDyId($acadYear, $coId, $oDy->dayId);
else
$num = $oCt1->GetCountIdByAcYAndCoIdAndClIdAndDyId($acadYear, $coId, $ctClId, $oDy->dayId);
}
//-[1]---ถ้ามีวิชาในแต่ละวัน
if ($num > 0) {
//นับจำนวนวิชาที่เวลาซ้อนกันมากที่สุด ตาม view เพื่อจะไป rowspan
if($view == "c") $maxOvl = $oCt1->GetMaxOVLByAcYAndPgIdStrAndStYAndAcYWeekNoAndDyId($acadYear, $pgIdStr, $studentYear, $ctWdAcYWeekNo, $oDy->dayId);
if($view == "r") $maxOvl = $oCt1->GetMaxOVLByAcYAndRmIdAndAcYWeekNoAndDyId($acadYear, $ctRmId, $ctWdAcYWeekNo, $oDy->dayId);
if($view == "p") $maxOvl = $oCt1->GetMaxOVLByAcYAndEpMepIdAndEpSepIdAndAcYWeekNoAndDyId($acadYear, $ctEpMepId, $ctEpSepId, $ctWdAcYWeekNo, $oDy->dayId);
if($view == "t") $maxOvl = $oCt1->GetMaxOVLByAcYAndOfIdAndAcYWeekNoAndDyId($acadYear, $ctOfId, $ctWdAcYWeekNo, $oDy->dayId);
if($view == "s") {
if($ctClId == "")
$maxOvl = $oCt1->GetMaxOVLByAcYAndCoIdAndDyId($acadYear, $coId, $oDy->dayId);
else
$maxOvl = $oCt1->GetMaxOVLByAcYAndCoIdAndClIdAndDyId($acadYear, $coId, $ctClId, $oDy->dayId);
}
//-[2]---สร้างอะเรย์ขนาด maxOvl x $oPr->NumRow() เริ่มที่ [1][1]
$aa = array();
for($i=1; $i<=$maxOvl; $i++) {
for($j=1;$j<=$oPr->NumRow(); $j++)
$aa[$i][$j] = 0;
}
//-[3]---อ่านวิชาทั้งหมดในวันนี้ เรียงตาม id
if($view == "c") $oCt1->RSrg_CopyTimeTableByAcYAndPgIdStrAndStYAndAcYWeekNoAndDyIdOrderId($acadYear, $pgIdStr, $studentYear, $ctWdAcYWeekNo, $oDy->dayId);
if($view == "r") $oCt1->RSrg_CopyTimeTableByAcYAndRmIdAndAcYWeekNoAndDyIdOrderId($acadYear, $ctRmId, $ctWdAcYWeekNo, $oDy->dayId);
if($view == "p") $oCt1->RSrg_CopyTimeTableByAcYAndEpMepIdAndEpSepIdAndAcYWeekNoAndDyIdOrderId($acadYear, $ctEpMepId, $ctEpSepId, $ctWdAcYWeekNo, $oDy->dayId);
if($view == "t") $oCt1->RSrg_CopyTimeTableByAcYAndOfIdAndAcYWeekNoAndDyIdOrderId($acadYear, $ctOfId, $ctWdAcYWeekNo, $oDy->dayId);
if($view == "s") {
if($ctClId == "")
$oCt1->RSrg_CopyTimeTableByAcYAndCoIdAndDyIdOrderId($acadYear, $coId, $oDy->dayId);
else
$oCt1->RSrg_CopyTimeTableByAcYAndCoIdAndClIdAndDyIdOrderId($acadYear, $coId, $ctClId, $oDy->dayId);
}
//-[4]---loop แต่ละวิชาเพื่อไป mark ในอะเรย์ โดยเริ่มจากแถวแรก ตามคาบ
//-[4.1]---อ่านออกมาทีละวิชา
while($oCt1->GetRecord()) {
//-[4.2]---loop เท่ากับจำนวน maxOvl เริ่มจาก [1]
for($i=1; $i<=$maxOvl; $i++) {
//-[4.3]---ถ้า $aa จากตำแหน่ง ctFrPr ถึง ctToPr เป็น 0 แปลว่า ว่าง ให้ใส่ id ของวิชาลงไปแทน 0
$isEmpty = true;
for($z=$oCt1->ctFrPr; $z<=$oCt1->ctToPr; $z++) {
if($aa[$i][$z] <> 0) {
$isEmpty = false;
break; //ไปยัง for $i
}
}
if($isEmpty) {
for($z=$oCt1->ctFrPr; $z<=$oCt1->ctToPr; $z++) {
//-ใส่ id ของวิชาลงไปแทน 0
$aa[$i][$z] = $oCt1->ctId;
}
//-ออกจาก loop ไปเรคอร์ดต่อไป เนื่องจากว่าง
break; //ไปยัง while
} //$isEmpty
} //-[4.2]---for $i
} //-[4.1]---while
if($view <> "s") {
$oWd->SearchByKey($acadYear, $ctWdAcYWeekNo);
$oWd->GetRecord();
$nsdDate = futureDay($oWd->wdFrDate, $oDy->dayId-1);
$oNsd->RSrg_NoStudyDateByDate($nsdDate);
while($oNsd->GetRecord()) {
for($i=1; $i<=$maxOvl; $i++) {
for($z=$oNsd->nsdFrPr; $z<=$oNsd->nsdToPr; $z++)
$aa[$i][$z] = '-'.$oNsd->nsdId;
}
}
}
//-[5]---หมด 1 วัน ก็พิมพ์ 1 ครั้ง
for($rwovl=1; $rwovl<=$maxOvl; $rwovl++) {
?>
<tr align="center">
<?php
//-พิมพ์หัวแถว
if($rwovl==1) {
?>
<td rowspan="<?php echo $maxOvl;?>" bgcolor="#FEDCBA"><font size="2"><b><?php echo $oDy->dayName;?></b></font></td>
<?php
}
//-พิมพ์รายละเอียดในแต่ละแถว
for($prd=1; $prd<=$oPr->NumRow(); $prd++) {
if($aa[$rwovl][$prd] == 0) {
?>
<td bgcolor="#FFFFFF"> </td>
<?php
}
else if($aa[$rwovl][$prd] < 0) {
$oNsd->SearchByKey(substr($aa[$rwovl][$prd], 1));
$oNsd->GetRecord();
$nprd = $oNsd->nsdToPr - $oNsd->nsdFrPr +1;
if($rwovl==1) {
?>
<td colspan="<?php echo $nprd;?>" rowspan="<?php echo count($aa);?>" bgcolor="#AAFFAA"><font size="2" title="<?php echo $oNsd->nsdRemark;?>"><?php echo $oNsd->nsdName;?></font></td>
<?php
}
$prd += $nprd-1;
}
else {
$oCt1->SearchByKey($aa[$rwovl][$prd]);
$oCt1->GetRecord();
$oCl->SearchByKey($oCt1->ctClId);
$oCl->GetRecord();
$oCo->SearchByKey($oCl->courseId);
$oCo->GetRecord();
$oSt->SearchByKey($oCt1->ctSstId);
$oSt->GetRecord();
$oWd->SearchByKey($acadYear, $oCt1->ctWdAcYWeekNo);
$oWd->GetRecord();
$oRm->SearchByKey($oCt1->ctRmId);
$oRm->GetRecord();
$oMep->SearchByKey($oCt1->ctEpMepId);
$oMep->GetRecord();
$oSep->SearchByKey($oCt1->ctEpSepId);
$oSep->GetRecord();
$nprd = $oCt1->ctToPr - $oCt1->ctFrPr +1;
?>
<td colspan="<?php echo $nprd;?>" bgcolor="<?php echo ($rwovl==1) ? "#EEEEEE" : "#FFCCFF";?>"><font size="2">
<a href="editCopyTimeTable.php?ctId=<?php echo $oCt1->ctId;?>&view=<?php echo $view;?>&officerCode=<?php echo $officerCode;?>" title="<?php echo $oCo->courseName;?>" class="blue"><?php echo $oCo->courseCode;?></a><br>
(<?php echo $oCl->section;?>)
(<?php echo $oSt->sstAbbrEng;?>)
<font color="#FF0000"><b>
<?php
$oCt2->RSrg_CopyTimeTableByAcYAndSeAndConfirmIsY($oCl->acadYear, $oCl->semester);
$oOf->SearchByOfficerCode($officerCode);
$oOf->GetRecord();
$ostPgId = (is_null($oCl->programId)) ? 0 : $oCl->programId;
$oOst->SearchByKeyAndWLIsY($oOf->officerId, $oCl->acadYear, $oCl->semester, $ostPgId);
if(!$oCt2->GetRecord() && $oOst->GetRecord()) {
?>
<a href="showCopyTimeTable.php?method=delete&programId=<?php echo $programId;?>&studentYear=<?php echo $studentYear;?>&acadYear=<?php echo $acadYear;?>&semester=<?php echo $semester;?>&ctId=<?php echo $oCt1->ctId;?>&coId=<?php echo $coId;?>&ctClId=<?php echo $oCt1->ctClId;?>&ctRmId=<?php echo $ctRmId;?>&mepName=<?php echo $mepName;?>&sepName=<?php echo $sepName;?>&ctEpMepId=<?php echo $ctEpMepId;?>&ctEpSepId=<?php echo $ctEpSepId;?>&ctWdAcYWeekNo=<?php echo $ctWdAcYWeekNo;?>&numWeek=<?php echo $numWeek;?>&ctDyId[1]=<?php echo $ctDyId[1];?>&ctDyId[2]=<?php echo $ctDyId[2];?>&ctDyId[3]=<?php echo $ctDyId[3];?>&ctDyId[4]=<?php echo $ctDyId[4];?>&ctDyId[5]=<?php echo $ctDyId[5];?>&ctDyId[6]=<?php echo $ctDyId[6];?>&ctDyId[7]=<?php echo $ctDyId[7];?>&ctFrPr=<?php echo $ctFrPr;?>&ctToPr=<?php echo $ctToPr;?>&ctOfId=<?php echo $ctOfId;?>&ctSstId=<?php echo $ctSstId;?>&view=<?php echo $view;?>&officerCode=<?php echo $officerCode;?>" title="ลบ" class="blue">-</a>
<?php
}
else
echo '-';
?>
</b></font>
<?php
$oOf->SearchByKey($oCt1->ctOfId);
$oOf->GetRecord();
if($view == "c") echo (is_null($oCt1->ctRmId)) ? $oMep->mepName.':'.$oSep->sepName.'<br>อ.'.$oOf->officerName.' '.$oOf->officerSurname : 'ห้อง '.$oRm->roomNo.'<br>อ.'.$oOf->officerName.' '.$oOf->officerSurname;
if($view == "r") echo 'อ.'.$oOf->officerName.' '.$oOf->officerSurname;
if($view == "p") echo 'อ.'.$oOf->officerName.' '.$oOf->officerSurname;
if($view == "t") echo (is_null($oCt1->ctRmId)) ? $oMep->mepName.':'.$oSep->sepName : 'ห้อง '.$oRm->roomNo;
if($view == "s") echo (is_null($oCt1->ctRmId)) ? $oMep->mepName.':'.$oSep->sepName.'<br>อ.'.$oOf->officerName.' '.$oOf->officerSurname.'<br>สัปดาห์ที่ '.$oCt1->ctWdAcYWeekNo : 'ห้อง '.$oRm->roomNo.'<br>อ.'.$oOf->officerName.' '.$oOf->officerSurname.'<br>สัปดาห์ที่ '.$oCt1->ctWdAcYWeekNo;
?>
</font></td>
<?php
$prd += $nprd-1;
}
} // for $prd
?>
</tr>
<?php
} //-[5]---
}
else { //ถ้าใน วัน ไม่มีวิชาเลย ให้แสดงเฉพาะคอลัมน์แรก
?>
<tr align="center">
<td bgcolor="#FEDCBA"><font size="2"><b><?php echo $oDy->dayName;?></b></font></td>
<?php
$oWd->SearchByKey($acadYear, $ctWdAcYWeekNo);
$oWd->GetRecord();
$nsdDate = futureDay($oWd->wdFrDate, $oDy->dayId-1);
for($c=1; $c<=$oPr->NumRow(); $c++) {
if($view == "s") {
?>
<td bgcolor="#FFFFFF"> </td>
<?php
}
else {
$oNsd->RSrg_NoStudyDateByDateAndFrPr($nsdDate, $c);
if($oNsd->GetRecord()) {
$nprd = $oNsd->nsdToPr - $oNsd->nsdFrPr +1;
?>
<td colspan="<?php echo $nprd;?>" bgcolor="#AAFFAA"><font size="2" title="<?php echo $oNsd->nsdRemark;?>"><?php echo $oNsd->nsdName;?></font></td>
<?php
$c += $nprd-1;
}
else {
?>
<td bgcolor="#FFFFFF"> </td>
<?php
} // end if
} // end if
} // for $c
?>
</tr>
<?php
} //-[1]---if $num==0
} //foreach day
?>
</table></td>
</tr>
<tr>
<td><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr bgcolor="#FFFFFF">
<td width="10%" height="22"><font size="2"><b>หมายเหตุ :</b></font></td>
<td><font size="2">สีเทา = ห้อง วัน เวลาเรียน ไม่ซ้ำกัน, สีชมพู = ห้อง วัน เวลาเรียน ซ้ำกัน, สึเขียว = วันที่ไม่ให้จัดการเรียนการสอน</font></td>
</tr>
<?php
$oWd->SearchByKey($acadYear, $ctWdAcYWeekNo);
$oWd->GetRecord();
$oNsd->RSrg_NoStudyDateByBetweenDateOrderDateFrPr($oWd->wdFrDate, $oWd->wdToDate);
while($oNsd->GetRecord()) {
$oPr->SearchByKey($oNsd->nsdFrPr);
$oPr->GetRecord();
$prStr = substr($oPr->startTime, 0, 5);
$oPr->SearchByKey($oNsd->nsdToPr);
$oPr->GetRecord();
$prStr .= ' - '.substr($oPr->endTime, 0, 5);
?>
<tr bgcolor="#FFFFFF">
<td height="22"></td>
<td><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_6"];?>"><?php echo abbreDate(splitDateDb2($oNsd->nsdDate)).' เวลา '.$prStr.' น. '.$oNsd->nsdName.' '.$oNsd->nsdRemark;?></font></td>
</tr>
<?php
}
?>
</table></td>
</tr>
</table>
|