Viewing file: 2551-11-11-1.0.01-teacherInCourse.php (8.43 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";
$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);
doCheckAll();
?>
<script language="javascript1.2">
function doSubmitAll(){
document.pc.action = "./processCourseTableTmp.php?method=add&assid=<?=$assid;?>&acadYear=<?=$acadYear;?>&semester=<?=$semester;?>&startDate=<?=$startDate;?>&endDate=<?=$endDate;?>&closeDate=<?=$closeDate;?>&selectFlag=<?=$selectFlag;?>&officerId=<?=$officerId;?>&cnt=<?=$i;?>&classId=<?=$classId;?>&isPreAssess=<?=$isPreAssess;?>";
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" bgcolor="silver">
<tr bgcolor="#FFFFFF"><td>
<table width="97%" border="0" align="center" cellpadding="1" cellspacing="1" >
<tr bgcolor="#FFFFFF"><td colspan="4"> </td></tr>
<tr bgcolor="#FFFFFF">
<td colspan="2" ><font face="Microsoft Sans Serif" size="2"><b>ปีการศึกษา</b></font></td>
<td colspan="2" ><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 >
<tr bgcolor="#D8F2F3"><td colspan="2"><font face="Microsoft Sans Serif" size="2"><b>ชื่อย่อหลักสูตร</b></font></td>
<td colspan="2"><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="#FFFFFF">
<td colspan="2"><font face="Microsoft Sans Serif" size="2"><b>รายวิชา</b></font></td>
<td colspan="2"><font face="Microsoft Sans Serif" size="2">
<?php echo $oCourse->courseCode.' '.$oCourse->courseName;?>
</font></td>
</tr >
<tr bgcolor="#D8F2F3">
<td colspan="2"><font face="Microsoft Sans Serif" size="2"><b>กลุ่ม</b></font></td>
<td colspan="2"><font face="Microsoft Sans Serif" size="2"><?=$oClassA->section?></font></td>
</tr >
<tr bgcolor="#FFFFFF" ><td colspan="4"> </td></tr>
<tr bgcolor="#FFFFFF" ><td colspan="4"><font face="Microsoft Sans Serif" size="2"><b>เลือกรายชื่ออาจารย์ที่จะประเมิน</b></font></td></tr>
<tr bgcolor="#0066CC"> <b>
<td width="10%" 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="30%" align="center" bgcolor="#0066CC"><font face="Microsoft Sans Serif" size="2"><span class="style1"> รหัสอาจารย์</span></font></td>
<td width="50%" align="center" bgcolor="#0066CC"><font face="Microsoft Sans Serif" size="2"><span class="style1">ชื่ออาจารย์ผู้สอน</span></font></td>
</b></tr>
<?php
$i=1;
$teacher=0;
//$oTTA->searchByClIdAcadSem($classId,$acadYear,$semester);
$oTTA->RSDistinctOfId($classId);
while($oTTA->GetRecord()){
$teacher=$teacher+1;
$oOA->SearchByKey($oTTA->ttOfId);
$oOA->GetRecord();
if($i%2 != 0){
?>
<tr bgcolor="#FFFFFF"> <? }else{ ?><tr bgcolor="#D8F2F3">
<?php } //end $i%2 != 0
$oHCT->SearchByClassIdOfficerId($classId,$oTTA->ttOfId);
if($oHCT->GetRecord()){
?>
<td align="center" ><input type="checkbox" name="officerId[<?php echo $i;?>]" value="<?php echo $oTTA->ttOfId;?>" checked></td>
<?php
}else{ //$oHCT == 0
?>
<td align="center" ><input type="checkbox" name="officerId[<?php echo $i;?>]" value="<?php echo $oTTA->ttOfId;?>" ></td>
<? } //end $oHCT?>
<td align="center" ><font face="Microsoft Sans Serif" size="2"><?=$i;?></font></td>
<td align="center" ><font face="Microsoft Sans Serif" size="2"><?=$oOA->officerCode?></font></td>
<td align="left" ><font face="Microsoft Sans Serif" size="2"> <img src="../picture/user.gif" border="0">
<?='อ.'.$oOA->officerName.' '.$oOA->officerSurname?></font></td>
</tr>
<? $i++ ; }?>
<? if($teacher==0){?>
<tr>
<td colspan="4" align="center" bgcolor="#FFFFFF"><font size="2" color="#FF0000" face="Microsoft Sans Serif">**
ไม่ปรากฏอาจารย์ผู้สอนในรายวิชานี้ **
</font></td></tr>
<? }?>
</table>
<br>
<table width="97%" border="0" align="center" cellpadding="1" cellspacing="0" bgcolor="silver">
<tr bgcolor="#FFFFFF">
<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;?>"></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="center" colspan="2" bgcolor="#FFFFFF"> </td>
</tr>
</table>
</td></tr>
</table>
</form>
</body>
</html>
|