Viewing file: 2552-11-23-1.0.02-searchTeachCourse.php (24.53 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
include_once "template.php";
showHeader();
include_once "../class/clsReg_Program.php";
include_once "../class/clsReg_SysSemesterDes.php";
include_once "../link/function.php";
include_once "../class/clsStudentAssess.php";
include_once "../class/clsRegistration.php";
include_once "../class/clsClassAssess.php";
include_once "../class/clsClassOpenForAssess.php";
include_once "../class/clsCourseAssess.php";
include_once "../class/clsOfficerAssess.php";
include_once "../class/clsDefineAssessment.php";
include_once "../class/clsHoldCourse.php";
include_once "../class/clsDoAssessment.php";
include_once "../class/clsAssessForm.php";
include_once "../class/clsHoldStudent.php";
include_once "../class/clsea_OFInDP.php";
sendRequest();
$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);
$oStd = new StudentAssess($oCA);
$oReg = new Registration($oCA);
$oOFA = new OfficerAssess($oCA);
$oDA = new DefineAssessment($oCA);
$oHC = new HoldCourse($oCA);
$oClsOpen = new ClassOpenForAssess($oCA);
$oDo = new DoAssessment($oCA);
$oAF = new AssessForm($oCA);
$oHStd = new HoldStudent($oCA);
$oOFA2 = new OfficerAssess($oCA);
if(!$acadYear)
$acadYear = $GLOBALS["ACADYEAR"];
if(!$semester)
$semester = $GLOBALS["SEMESTER"];
?>
<meta http-equiv="Content-Type" content="text/html; charset=tis-620">
<link href="../source/style.css" rel="stylesheet" type="text/css">
<table width="740" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><br><fieldset>
<legend><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"> ผลการประเมิน</font></legend><label>
<?php
//$officerCode=$oU->userPsCode;
$officerCode=$oU->userPsCodeReg;
$oOFA->SearchByOfCode($officerCode);
$oOFA->GetRecord();
if(!isset($acadYearSearch)&&(!isset($semesterSearch))) {
$acadYearSearch = $acadYear;
$semesterSearch = $semester;
}
$oSse = new SysSemesterDes($oCR);
$oSse->SearchByKey($semesterSearch);
$oSse->GetRecord();
?>
<div align="center">
<form name="pc" method="post" action="<?php echo $PHP_SELF;?>">
<table width="674" align="center" border="0" cellpadding="0" cellspacing="1">
<tr>
<td width="672" height="2"></td>
</tr>
<tr>
<td height="19" align="center"> <table width="614" >
<tr>
<td width="246" height="22" valign="bottom"><p> </p>
<p> </p></td>
<td height="22" align="center">
<table width="341" border="0" align="right" background="../picture/coverBG3.gif">
<tr>
<td width="341" height="33" ><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><b> ปีการศึกษา
:</b><b>
<select name="semesterSearchList" onChange="location.href = '<?php echo $PHP_SELF;?>?acadYearSearch='+encodeURI(options[selectedIndex].value)+'&semesterSearch=<?php echo $semesterSearch;?>&officerId=<?php echo $officerId;?>'">
<?php
$oAy->RSAcadYearConfigGroupAcY();
while($oAy->GetRecord()) {
?>
<option value="<?php echo $oAy->acadYear;?>" <? if($acadYearSearch == $oAy->acadYear) echo "selected"; ?>><?php echo $oAy->acadYear;?></option>
<?php
}
?>
</select>
ภาคการศึกษา :</b><b>
<select name="acadYearSeachList" onChange="location.href = '<?php echo $PHP_SELF;?>?semesterSearch='+encodeURI(options[selectedIndex].value)+'&acadYearSearch=<?php echo $acadYearSearch;?>&officerId=<?php echo $officerId;?>'">
<?php
$oSse->RSSysSemesterDes();
while($oSse->GetRecord()) {
?>
<option value="<?php echo $oSse->semester;?>" <? if($semesterSearch == $oSse->semester) echo "selected"?>><?php echo $oSse->semester;?></option>
<?php
}
?>
</select>
</b></font></td>
</tr>
</table>
</td>
</tr>
<tr >
<td colspan="2"><a href="#" style="display:inline" onclick="toggle('4')" >
<img src="../picture/RQ.png" border="0" /> <b>รายวิชาที่สอน</b> </a> </td>
</tr>
<tr ><!-- id="4" style="display:none" --><td colspan="2" >
<table width="610" cellpadding="1" cellspacing="1" bgcolor="silver" >
<tr bgcolor="#FFFFFF"><td colspan="7"><font size="2" ><a href="showFormTeachCourseSumRe.php?officerId=<? echo $oOFA->officerId ?>&acad_=<? echo $acadYearSearch ?>&sem_=<? echo $semesterSearch ?>" onClick="return sendRequest(this);" onMouseOver="window.status=''; return true;"><img src="../picture/select.gif" width="16" height="16" border="0">สรุปผลการประเมินจำแนกตามรายวิชาที่สอน</a></font></td></tr>
<tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TABLE_2"];?>">
<td width="77" height="22" align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_1"];?>"><strong>ชื่อย่อหลักสูตร</strong></font></td>
<td width="71" align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_1"];?>"><strong>รหัสรายวิชา</strong></font></td>
<td width="281" align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_1"];?>" size="2"><strong>ชื่อรายวิชา</strong></font><font color="<?php echo $GLOBALS["COLOR_FONT_1"];?>" size="2"> </font></td>
<td width="44" align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_1"];?>" size="2"><strong>ชั้นปี</strong></font></td>
<td width="78" align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_1"];?>" size="2"> <strong>หน่วยกิต</strong></font></td>
<td width="38" align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_1"];?>" size="2"><strong>กลุ่ม</strong></font></td>
</tr>
<?php
$oClass = new ClassAssess($oCA);
$i=0;
if(($acadYearSearch == "") && ($semesterSearch == "")) {
//??????????????????????? ??w?????? defult
$oClass->SearchClassIdCourseIdByAcadSemOfficerGroupClassId($acadYear,$semester,$oOFA->officerId);
} else {
//??????????????????????? ??w??????
$oClass->SearchClassIdCourseIdByAcadSemOfficerGroupClassId($acadYearSearch,$semesterSearch,$oOFA->officerId);
}
while($oClass->GetRecord()) {
$oCourse = new CourseAssess($oCA);
$oCourse->SearchByKey($oClass->courseId);
$oCourse->GetRecord();
if(($i%2) == 0)
echo '<tr bgcolor="'.$GLOBALS["COLOR_BG_TD_5"].'">';
else
echo '<tr bgcolor="'.$GLOBALS["COLOR_BG_TD_4"].'">';
?>
<td height="22" align="center"><font size="1" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>">
<? if(($oClass->programId == 0) || ($oClass->programId == "")) {
$z = 0;
$oClsOpen->SearchByClassId($oClass->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\">";
}
$z++;
} // end while oClsOpen
for($a=0;$a<=$z;$a++) {
echo $arrCls[$a];
if($a < $z-1) echo ",<br>";
}
}else {
$oProg->SearchByKey($oClass->programId);
if($oProg->GetRecord()) {
if($oProg->programAbbr != "") {
echo $oProg->programAbbr;
}else {
echo "<img src = \"../picture/warn.png\" border = \"0\">";
}
}
//echo $oClassA->programId;
}
?>
</font></td>
<td height="22" align="center"><font size="1" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><a href = "showFormTeachCourse.php?officerId=<? echo $oOFA->officerId?>&officerCode=<? echo $officerCode ?>&classId=<? echo $oClass->classId ?>&courseId=<? echo $oClass->courseId ?>&acadYear=<? echo $acadYearSearch ?>&semester=<? echo $semesterSearch ?>&owner=0" onclick="return sendRequest(this);" onmouseover="window.status=''; return true;"><?php echo $oCourse->courseCode;?></a></font></td>
<td ><font size="1" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><a href = "showFormTeachCourse.php?officerId=<? echo $oOFA->officerId?>&officerCode=<? echo $officerCode ?>&classId=<? echo $oClass->classId ?>&courseId=<? echo $oClass->courseId ?>&acadYear=<? echo $acadYearSearch ?>&semester=<? echo $semesterSearch ?>&owner=0" onclick="return sendRequest(this);" onmouseover="window.status=''; return true;"><?php echo $oCourse->courseName;?></a></font> </td>
<td align="center"><? echo $oClass->studentYear ?></td>
<td align="center"><font size="1" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><?php echo $oCourse->courseUnit;?></font></td>
<td align="center"><font size="1" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><?php echo $oClass->section;?></font></td>
</tr>
<?php
$i++;
$flag=1;
} // end while oClass
if($flag == 0) {
?>
<tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_5"];?>">
<td colspan="6" align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>">**
ไม่พบรายวิชาที่สอน **</font></td>
</tr>
<?php
}
?>
</table>
</td></tr>
<tr >
<td height="22" colspan="6" align="right"> </td>
</tr>
<tr >
<td colspan="2"><a href="#" style="display:inline" onclick="toggle('5')" > <img src="../picture/RQ.png" border="0" /> <b>รายวิชาที่ส่งเกรด</b> </a> </td>
</tr>
<tr ><!-- id="5" style="display:none" --><td colspan="2" >
<table width="610" cellpadding="1" cellspacing="1" bgcolor="silver" >
<tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TABLE_2"];?>">
<td width="77" height="22" align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_1"];?>"><strong>ชื่อย่อหลักสูตร</strong></font></td>
<td width="71" align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_1"];?>"><strong>รหัสรายวิชา</strong></font></td>
<td width="281" align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_1"];?>" size="2"><strong>ชื่อรายวิชา</strong></font><font color="<?php echo $GLOBALS["COLOR_FONT_1"];?>" size="2"> </font></td>
<td width="44" align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_1"];?>" size="2"><strong>ชั้นปี</strong></font></td>
<td width="78" align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_1"];?>" size="2"> <strong>หน่วยกิต</strong></font></td>
<td width="38" align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_1"];?>" size="2"><strong>กลุ่ม</strong></font></td>
</tr>
<?php
$oClass = new ClassAssess($oCA);
$i=0;
$flag2 = 0;
if(($acadYearSearch == "") && ($semesterSearch == "")) {
//??????????????????????? ??w?????? defult
// $oClass->SearchClassIdCourseIdByAcadSemOfficerGroupClassId($acadYear,$semester,$oOFA->officerId);
$oClass->SearchClassIdByAcadSemOfficerGroupClassId($acadYearSearch,$semesterSearch,$oOFA->officerId);
} else {
//??????????????????????? ??w??????
// $oClass->SearchClassIdCourseIdByAcadSemOfficerGroupClassId($acadYearSearch,$semesterSearch,$oOFA->officerId);
$oClass->SearchClassIdByAcadSemOfficerGroupClassId($acadYearSearch,$semesterSearch,$oOFA->officerId);
}
while($oClass->GetRecord()) {
$oCourse = new CourseAssess($oCA);
$oCourse->SearchByKey($oClass->courseId);
$oCourse->GetRecord();
if(($i%2) == 0)
echo '<tr bgcolor="'.$GLOBALS["COLOR_BG_TD_5"].'">';
else
echo '<tr bgcolor="'.$GLOBALS["COLOR_BG_TD_4"].'">';
?>
<td height="22" align="center"><font size="1" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>">
<? if(($oClass->programId == 0) || ($oClass->programId == "")) {
$z = 0;
$oClsOpen->SearchByClassId($oClass->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\">";
}
$z++;
} // end while oClsOpen
for($a=0;$a<=$z;$a++) {
echo $arrCls[$a];
if($a < $z-1) echo ",<br>";
}
}else {
$oProg->SearchByKey($oClass->programId);
if($oProg->GetRecord()) {
if($oProg->programAbbr != "") {
echo $oProg->programAbbr;
}else {
echo "<img src = \"../picture/warn.png\" border = \"0\">";
}
}
//echo $oClassA->programId;
}
?>
</font></td>
<td height="22" align="center"><font size="1" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><a href = "showFormTeachCourse.php?officerId=<? echo $oOFA->officerId?>&officerCode=<? echo $officerCode ?>&classId=<? echo $oClass->classId ?>&courseId=<? echo $oClass->courseId ?>&acadYear=<? echo $acadYearSearch ?>&semester=<? echo $semesterSearch ?>&owner=1" onclick="return sendRequest(this);" onmouseover="window.status=''; return true;"><?php echo $oCourse->courseCode;?></a></font></td>
<td ><font size="1" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><a href = "showFormTeachCourse.php?officerId=<? echo $oOFA->officerId?>&officerCode=<? echo $officerCode ?>&classId=<? echo $oClass->classId ?>&courseId=<? echo $oClass->courseId ?>&acadYear=<? echo $acadYearSearch ?>&semester=<? echo $semesterSearch ?>&owner=1" onclick="return sendRequest(this);" onmouseover="window.status=''; return true;"><?php echo $oCourse->courseName;?></a></font>
</td>
<td align="center"><? echo $oClass->studentYear ?></td>
<td align="center"><font size="1" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><?php echo $oCourse->courseUnit;?></font></td>
<td align="center"><font size="1" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><?php echo $oClass->section;?></font></td>
</tr>
<?php
$i++;
$flag2=1;
} // end while oClass
if($flag2 == 0) {
?>
<tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_5"];?>">
<td colspan="6" align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>">**
ไม่พบรายวิชาที่ส่งเกรด **</font></td>
</tr>
<?php
}
?>
</table>
</td></tr>
<tr >
<td height="22" colspan="6" align="right"> </td>
</tr>
<?php
$oaOFInDP = new ea_OFInDP($oCA);
$oaOFInDP->RSByOfIdSeqDesc($oOFA->officerId);
$oaOFInDP->GetRecord();
if($oaOFInDP->oidIsBoss == Y ) {
?>
<tr >
<td colspan="2"><a href="#" style="display:inline" onclick="toggle('6')" > <img src="../picture/RQ.png" border="0" /> <b>รายชื่ออาจารย์ในสังกัด</b> </a> </td>
</tr>
<tr ><!-- id="6" style="display:none" --><td colspan="2" >
<table width="410" cellpadding="1" cellspacing="1" bgcolor="silver" >
<tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TABLE_2"];?>">
<td width="40" height="22" align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_1"];?>"><strong>ลำดับ</strong></font></td>
<td width="80" align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_1"];?>"><strong>รหัสอาจารย์</strong></font></td>
<td width="260" align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_1"];?>" size="2"><strong>ชื่อ - สกุล</strong></font></td>
</tr>
<?php
$seq = 1;
$oOFA2->RSJoinOfInDp($oaOFInDP->oidDpId,$oaOFInDP->oidOfId);
while($oOFA2->GetRecord()) {
?>
<tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_5"]; ?>">
<td align="center"><font size="1" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><?=$seq?></font></td>
<td align="center"><font size="1" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><?=$oOFA2->officerCode?></font></td>
<td align="left"><font size="1" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"> <img src="../picture/user.gif" border="0" /> <a href = "searchTeachCourse2.php?officerId2=<? echo $oOFA2->officerId?>&officerCode2=<? echo $oOFA2->officerCode ?>&acadYearSearch=<? echo $acadYearSearch ?>&semesterSearch=<? echo $semesterSearch ?>" onclick="return sendRequest(this);" onmouseover="window.status=''; return true;"><?=$oOFA2->officerName?> <?=$oOFA2->officerSurname?> </a></font></td>
</tr>
<?php $seq++; } ?>
</table>
</td></tr>
<tr >
<td height="22" colspan="3" align="right"> </td>
</tr>
<?php } // End if IsBoss ?>
</table>
</td>
</tr>
</table>
<br>
</form>
</div>
<div align="center"></div>
</fieldset><br>
<table width="742" border="0">
<tr>
<td width="72" height="27"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>"><strong>หมายเหตุ
: </strong></font></td>
<td width="660"><font color="<?php echo $GLOBALS["COLOR_FONT_3"];?>" size="2">กรอกปีการศึกษาและเลือกภาคการศึกษาเพื่อค้นหาแบบประเมินนอกเหนือรายวิชาที่ลงทะเบียนเรียน
, </font></td>
</tr>
<tr>
<td width="72" height="27"></td>
<td width="660"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>">คลิกที่รหัสรายวิชา
หรือชื่อรายวิชาที่สอนเพื่อดูผลการประเมิน</font></td>
</tr>
</table>
<table width="742" border="0">
<tr>
<td width="72" height="18"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>"> </font></td>
<td width="660"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>"><u>ชื่อย่อหลักสูตรที่แสดงอยู่ในตาราง
หมายถึง </u></font></td>
</tr>
<? $oProg->SearchByProgramStatusY();
while($oProg->GetRecord()) {
?>
<tr>
<td> </td>
<td><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>">
<? if($oProg->programAbbr != "") {
echo $oProg->programAbbr." = ".$oProg->programName;
}else {
echo "<img src = \"../picture/warn.png\" border = \"0\"> = ".$oProg->programName;
}
?>
<? //echo $oProg->programId." = ".$oProg->programName; ?>
</font></td>
</tr>
<? } ?>
</table></td>
</tr>
</table>
<form name="silent" id="silent" style="margin:0px; padding: 0px;" method="post"></form>
<script language="javascript">
function toggle(target)
{
// var row =1;
// while (document.getElementById(target)) {
obj=document.getElementById(target);
obj.style.display=( (obj.style.display=='none') ? '' : 'none');
// row++;
// }
}
</script>
<?php
showFooter();
?>
|