Viewing file: 2551-11-11-1.0.01-editTimetableInCourseTmp.php (10.8 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
include_once "../../class/clsDB.php";
include_once "../../class/clsConnection.php";
include_once "../global.php";
include_once "../link/function.php";
include_once "../class/clsReg_SysSemesterDes.php";
include_once "../class/clsReg_Program.php";
include_once "../class/clsClassAssess.php";
include_once "../class/clsClassOpenForAssess.php";
include_once "../class/clsCourseAssess.php";
include_once "../class/clsHoldCourseTmp.php";
include_once "../class/clsTimeTableAssess.php";
include_once "../class/clsOfficerAssess.php";
include_once "../class/clsSysStudyTypeAssess.php";
include_once "../class/clsReg_Day.php";
include_once "../class/clsReg_Period.php";
include_once "../class/clsWeekDateAssess.php";
include_once "../class/clsDoAssessment.php";
$oCR = new clsConnection($GLOBALS['HOST'], $GLOBALS['DB_REG'], $GLOBALS['USER_REG'], $GLOBALS['PASSWORD_REG']);
$oCA = new clsConnection($GLOBALS['HOST'], $GLOBALS['DB_EASS'], $GLOBALS['USER_EASS'], $GLOBALS['PASSWORD_EASS']);
$oProg = new Program($oCR);
$oClassA = new ClassAssess($oCA);
$oClsOpen = new ClassOpenForAssess($oCA);
$oCourse = new CourseAssess($oCA);
$oCourse_in = new CourseAssess($oCA);
$oHCT = new HoldCourseTmp($oCA);
$oTTA = new TimeTableAssess($oCA);
$oOA = new OfficerAssess($oCA);
$oSST=new SysStudyTypeAssess($oCA);
$orDy=new Day($oCR);
$orPr = new Period($oCR);
$oWDA = new WeekDateAssess($oCA);
$oDo = new DoAssessment($oCA);
doCheckAll();
?>
<script language="javascript1.2">
function doSubmitAll(){
document.pc.action = "./processEditCourseTableTmp.php?method=add&assid=<?=$assid;?>&acadYear=<?=$acadYear;?>&semester=<?=$semester;?>&startDate=<?=$startDate;?>&endDate=<?=$endDate;?>&closeDate=<?=$closeDate;?>&selectFlag=<?=$selectFlag;?>&ttId=<?=$ttId;?>&cnt=<?=$i;?>&classId=<?=$classId;?>&officerId=<?=$officerId;?>&isPreAssess=<?=$isPreAssess;?>&defineid=<?=$defineid;?>&noAss=<?=$noAss;?>";
document.pc.submit();
}
</script>
<html>
<head>
<title>ตารางเรียนในรายวิชา</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
<link href="style.css" rel="stylesheet" type="text/css">
<style>
<!--
A:link {text-decoration: none }
A:visited {text-decoration: none}
A:hover {text-decoration: none; font-weight: underline}
.style1 {color: #FFFFFF}
-->
</style>
</head>
<body bgcolor="#FFFFFF" >
<?php
$acadYear_1 = $GLOBALS["ACADYEAR"];
$semester_1 = $GLOBALS["SEMESTER"];
$oClassA->SearchByKey($classId);
$oClassA->GetRecord();
$oCourse->SearchByKey($oClassA->courseId);
$oCourse->GetRecord();
?>
<form name="pc" action="<?php echo $PHP_SELF;?>" method="post">
<table width="97%" border="0" align="center" cellpadding="1" cellspacing="1" >
<tr bgcolor="#FFFFFF">
<td colspan="3" align = "center" background="bg_LightSpirit.gif"><font face="Microsoft Sans Serif" size="2"><b>เลือกสัปดาห์ที่เปิดสอน</b></font>
<br></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="18%" ><font face="Microsoft Sans Serif" size="2"><b>ชื่อย่อหลักสูตร</b></font></td>
<td width="82%" ><font face="Microsoft Sans Serif" size="2">
<?
if(($oClassA->programId == 0) || ($oClassA->programId == "")){
$z = 0;
$oClsOpen->SearchByClassId($oClassA->classId);
while($oClsOpen->GetRecord()){
$oProg->SearchByKey($oClsOpen->programId);
$oProg->GetRecord();
if($oProg->programAbbr != ""){
$arrCls[$z] = $oProg->programAbbr;
}else{
$arrCls[$z] = "<img src = \"../picture/warn.png\" border = \"0\">";
}
//$arrCls[$z] = $oClsOpen->programId;
$z++;
} // end while oClsOpen
for($a=0;$a<=$z;$a++){
echo $arrCls[$a];
if($a < $z-1) echo ",<br>";
}
}else{
$oProg->SearchByKey($oClassA->programId);
if($oProg->GetRecord()){
if($oProg->programAbbr != ""){
echo $oProg->programAbbr;
}else{
echo "<img src = \"../picture/warn.png\" border = \"0\">";
}
}
//echo $oClassA->programId;
}
?>
</font></td>
</tr >
<tr bgcolor="#D8F2F3"><td ><font face="Microsoft Sans Serif" size="2"><b>รายวิชา</b></font></td>
<td ><font face="Microsoft Sans Serif" size="2"><?php echo $oCourse->courseCode.' '.$oCourse->courseName.' กลุ่ม '.$oClassA->section;?> </font></td>
</tr >
<tr bgcolor="#FFFFFF"><td ><font face="Microsoft Sans Serif" size="2"><b>ปีการศึกษา</b></font></td>
<td ><font face="Microsoft Sans Serif" size="2">
<?
$oSse = new SysSemesterDes($oCR);
$oSse->SearchByKey($semester_1);
$oSse->GetRecord();
echo $oSse->semesterName."/".$acadYear_1;
?>
</font></td>
</tr >
</table>
<table width="97%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#999999" >
<font face="Microsoft Sans Serif" size="2">
<tr bgcolor="#0066CC"> <b>
<td width="5%" align="center" bgcolor="#0066CC"><font face="Microsoft Sans Serif" size="2"><span class="style1"> เลือก</span></font></td>
<td width="7%" align="center" bgcolor="#0066CC"><font face="Microsoft Sans Serif" size="2"><span class="style1"> ครั้งที่</span></font></td>
<td width="16%" align="center" bgcolor="#0066CC"><font face="Microsoft Sans Serif" size="2"><span class="style1">สัปดาห์ที่</span></font></td>
<td width="14%" align="center" bgcolor="#0066CC"><font face="Microsoft Sans Serif" size="2"><span class="style1">ห้อง</span></font></td>
<td width="30%" align="center" bgcolor="#0066CC"><font face="Microsoft Sans Serif" size="2"><span class="style1">( กิจกรรมการเรียน ) บท/เรื่อง/หัวข้อสอน</span></font></td>
<td width="10%" align="center" bgcolor="#0066CC"><font face="Microsoft Sans Serif" size="2"><span class="style1">อาจารย์</span></font></td>
<td width="20%" align="center" bgcolor="#0066CC"><font face="Microsoft Sans Serif" size="2"><span class="style1">วัน/เวลา</span></font></td>
</b></tr>
<?php
$i=1;
$oTTA->searchByClIdAcadSem($classId,$acadYear,$semester);
while($oTTA->GetRecord()){
$oOA->SearchByKey($oTTA->ttOfId);
$oOA->GetRecord();
$oSST->SearchByKey($oTTA->ttSstId);
$oSST->GetRecord();
$orDy->SearchByKey($oTTA->ttDyId);
$orDy->GetRecord();
$orPr->SearchByKey($oTTA>ttFrPr);
$orPr->GetRecord();
$orPr->SearchByKey($oTTA->ttToPr);
$orPr->GetRecord();
$ClassTime= $orDy->dayAbbrEng.' '.substr($orPr->startTime,0,5).'-'.substr($orPr->endTime,0,5);
$oWDA->searchByWdAcYWeekNoAcY($oTTA->ttWdAcYWeekNo,$acadYear_1);
$oWDA->GetRecord();
$mm =convertMonthNumberToString2(substr($oWDA->wdToDate,5,2));
$week = substr($oWDA->wdFrDate,8,2).'-'.substr($oWDA->wdToDate,8,2).' '.$mm.' '.substr($acadYear_1,2,2);
?>
<tr bgcolor="#FFFFFF">
<?php
$oHCT->SearchByttId($oTTA->ttId);
if($oHCT->GetRecord()){
$oDo->SearchByDefineIdClassIdOfficeridSectionttId($defineid,$classId,$oTTA->ttOfId,$oClassA->section,$oTTA->ttId);
if($oDo->GetRecord()){
?>
<td align="center" ><img src="../picture/checked.gif" align="absmiddle" border="0"></td>
<input type="hidden" name="ttId[<?php echo $i;?>]" value="<?php echo $oTTA->ttId;?>" >
<input type="hidden" name="officerId[<?php echo $i;?>]" value="<?=$oOA->officerId;?>">
<?php
}else{
?>
<td align="center" ><input type="checkbox" name="ttId[<?php echo $i;?>]" value="<?php echo $oTTA->ttId;?>" checked></td>
<input type="hidden" name="officerId[<?php echo $i;?>]" value="<?=$oOA->officerId;?>">
<?php }
}else{ //$oHCT == 0
?>
<td align="center" ><input type="checkbox" name="ttId[<?php echo $i;?>]" value="<?php echo $oTTA->ttId;?>" ></td>
<input type="hidden" name="officerId[<?php echo $i;?>]" value="<?=$oOA->officerId;?>">
<? } //end $oHCT?>
<td align="center" ><font face="Microsoft Sans Serif" size="2"><?=$i;?></font></td>
<td align="right" ><font face="Microsoft Sans Serif" size="2"><?=$oTTA->ttWdAcYWeekNo.':'.$week;?></font></td>
<td align="center" ><font face="Microsoft Sans Serif" size="2"><? echo $oTTA->ttMainPlace. ' - '.$oTTA->ttSubPlace;?></font></td>
<td align="left" ><font face="Microsoft Sans Serif" size="2"><?='('.$oSST->sstAbbrEng.') '.$oTTA->ttTitle;?></font></td>
<td align="left" ><font face="Microsoft Sans Serif" size="2"><?=$oOA->officerName;?></font></td>
<td align="left" ><font face="Microsoft Sans Serif" size="2"><?=$ClassTime;?></font></td>
</tr>
<? $i++ ; }?>
</table>
<br>
<table width="97%" border="0" align="center" cellpadding="1" cellspacing="0" bgcolor="silver">
<tr>
<td width="76%"><input type="button" name="selectAll" value="เลือกทั้งหมด" onClick="doCheckAll(this.form, true);">
<input type="button" name="cancelAll" value="ยกเลิกทั้งหมด" onClick="doCheckAll(this.form, false);">
<input type="hidden" name="cnt" value="<?php echo $i;?>">
<input type="hidden" name="assid" value="<?php echo $assid;?>">
<input type="hidden" name="acadYear" value="<?php echo $acadYear;?>">
<input type="hidden" name="semester" value="<?php echo $semester;?>">
<input type="hidden" name="startDate" value="<?php echo $startDate;?>">
<input type="hidden" name="endDate" value="<?php echo $endDate;?>">
<input type="hidden" name="closeDate" value="<?php echo $closeDate;?>">
<input type="hidden" name="selectFlag" value="<?php echo $selectFlag;?>">
<input type="hidden" name="isPreAssess" value="<?php echo $isPreAssess;?>">
<input type="hidden" name="defineid" value="<?php echo $defineid;?>">
<input type="hidden" name="noAss" value="<?php echo $noAss;?>"></td>
<td width="24%" align="right"> </td>
</tr>
<tr>
<td colspan="2" align="center" bgcolor="#FFFFFF"><br> <input type="button" name="Submit" value="บันทึกข้อมูลที่เลือก" onclick = 'return doSubmitAll();'>
</td>
</tr>
<tr>
<td align="left" colspan="2" bgcolor="#FFFFFF">
<table width="350" border="0">
<tr>
<td width="80" ><font face="Microsoft Sans Serif" size="2" color="<?php echo $GLOBALS["COLOR_FONT_5"];?>"><b> หมายเหตุ :</b></font></td>
<td width="270"><font face="Microsoft Sans Serif" size="2" color="<?php echo $GLOBALS["COLOR_FONT_5"];?>">
<img src="../picture/checked.gif" align="absmiddle" border="0"> หมายถึง ไม่สามารถทำการแก้ไขได้
</font></td>
</tr>
<tr>
<td width="80" ><font face="Microsoft Sans Serif" size="2"><b> </b></font></td>
<td width="270"><font face="Microsoft Sans Serif" size="2" color="<?php echo $GLOBALS["COLOR_FONT_5"];?>">
เนื่องจากมีนักศึกษาประเมินแล้ว
</font></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" bgcolor="#FFFFFF"> </td>
</tr>
</front></table>
</form>
</body>
</html>
|