Viewing file: 2554-11-04-2.0.01-searchResCourse.php (12.72 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php // Search Responsibility Class
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/clsClassInStructorAssess.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 "../eregis/class/cls_ClassInStructor.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);
//----
//$oCIS = new ClassInStructor($oCR);
$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);
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>
<?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();
$courseCode2=$courseCode;
?>
<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"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><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>
<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->semesterName;?></option>
<?php
}
?>
</select>
</b></font></td>
</tr>
</table></td>
</tr>
<tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_6"];?>">
<td height="22" colspan="2" align="center"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_3'];?>"><b>รายวิชาที่ส่งเกรดในปีการศึกษา
: <? echo $acadYearSearch ?> /
<? $oSse->SearchByKey($semesterSearch);
$oSse->GetRecord();
echo $oSse->semesterName;?>
</b></font></td>
</tr>
<tr>
<td height="21" colspan="2" ><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"> <b>รหัสประจำตัว
: </b><?php echo $oOFA->officerCode;?></font><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><b> อาจารย์ผู้รับผิดชอบส่งเกรด
: </b><?php echo $oOFA->prefixName.$oOFA->officerName.' '.$oOFA->officerSurname;?></font><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"> </font></td>
</tr>
</table>
<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;
if(($acadYearSearch == "") && ($semesterSearch == "")){
//ค้นหารายวิชาที่สอนในเปีการศึกษา เทอมที่เลือก defult
$oClass->SearchClassIdCourseIdByAcadSemOfficerGroupClassId($acadYear,$semester,$oOFA->officerId);
} else {
//ค้นหารายวิชาที่สอนในเปีการศึกษา เทอมที่เลือก
$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 = "<?php echo $PHP_SELF;?>?officerId=2634&courseCode=<?php echo $oCourse->courseCode;?> "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 = "<?php echo $PHP_SELF;?>?courseCode=<?php echo $oCourse->courseName;?>" ><?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
}
?>
<tr bgcolor="<?php echo $GLOBALS['COLOR_BG_TABLE_2'];?>">
<td height="22" colspan="6" align="right"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_1"];?>"> </font></td>
</tr>
<? if ($courseCode2!="NULL"){?>
<tr>
<td colspan="6" align="center"><?php require_once "searchCourseTeach.php";?></td>
</tr>
<? }?>
</table></td>
</tr>
</table>
<br>
</form>
</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>
<?php
showFooter();
?>
|