Viewing file: repCloseDateOfficer.php (8.18 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
header('Content-type: application/xls');
header('Content-Disposition: attachment; filename="testing.xls"');
include_once "../../class/clsDB.php";
include_once "../../class/clsConnection.php";
include_once "../global.php";
include_once "../class/clsOfficerAssess.php";
include_once "../class/clsClassAssess.php";
include_once "../class/clsDefineAssessment.php";
include_once "../class/clsStudentAssess.php";
include_once "../class/clsCourseAssess.php";
include_once "../class/clsAssessForm.php";
$oCA = new clsConnection($GLOBALS['HOST'], $GLOBALS['DB_EASS'], $GLOBALS['USER_EASS'], $GLOBALS['PASSWORD_EASS']);
$oOf = new OfficerAssess($oCA);
$oClass = new ClassAssess($oCA);
$oDA = new DefineAssessment($oCA);
$oStd1 = new StudentAssess($oCA);
$oStd2 = new StudentAssess($oCA);
$oCourse = new CourseAssess($oCA);
$oAF = new AssessForm($oCA);
$oOf->SearchByKey($officerId);
$oOf->GetRecord();
?>
<meta http-equiv="Content-Type" content="text/html; charset=tis-620">
<table width="740" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" height="22"><font size="2"><b>รหัสอาจารย์</b></font></td>
<td colspan="2"><font size="2"><b>:</b> <?php echo $oOf->officerCode;?></font></td>
<td colspan="2"><font size="2"><b>ชื่อ-นามสกุล</b></font></td>
<td colspan="2"><font size="2"><b>:</b> <?php echo $oOf->prefixName.$oOf->officerName.' '.$oOf->officerSurname;?></font></td>
</tr>
<tr>
<td colspan="2" height="22"><font size="2"><b>ปีการศึกษา</b></font></td>
<td colspan="2"><font size="2"><b>:</b> <?php echo $acadYear ?></font></td>
<td colspan="2"><font size="2"><b>ภาคการศึกษา</b></font></td>
<td colspan="2"><font size="2"><b>:</b> <?php echo $semester;?></font></td>
</tr>
<tr>
<td height="22" colspan="8"></td>
</tr>
<?php
set_time_limit(0);
$oClass->RSClassAssessByAcYAndSeAndOfIdGroupCoId($acadYear, $semester, $officerId);
while($oClass->GetRecord()) {
$daFlag = 0;
// case 0
$oDA->SearchByAcadSemFlag($acadYear, $semester, 0);
while($oDA->GetRecord()) {
$pgFlag = 0;
$oStd1->RSStudentAssessGroupPgName();
while($oStd1->GetRecord()) {
$stFlag = 0;
$oStd2->GetNotAssessFlag0ByPgNameAndAcYAndSeAndCoIdAndDeIdAndOfId($oStd1->programName, $acadYear, $semester, $oClass->courseId, $oDA->defineid, $officerId);
while($oStd2->GetRecord()) {
$daFlag++;
$pgFlag++;
$stFlag++;
if($daFlag == 1) {
$oCourse->SearchByKey($oClass->courseId);
$oCourse->GetRecord();
?>
<tr>
<td height="22" colspan="8"><font size="2"><?php echo $oCourse->courseCode.' '.$oCourse->courseName;?></font></td>
</tr>
<?php
}
if($pgFlag == 1) {
$oAF->SearchByKey($oDA->assid);
$oAF->GetRecord();
?>
<tr>
<td height="22"></td>
<td colspan="7"><font size="2"><?php echo $oAF->nameAss;?></font></td>
</tr>
<?php
}
if($stFlag == 1) {
?>
<tr>
<td colspan="2" height="22"></td>
<td colspan="6"><font size="2">หลัักสูตร<?php echo $oStd1->programName;?></font></td>
</tr>
<?php
}
?>
<tr>
<td colspan="3" height="22"></td>
<td><font size="2"><?php echo $stFlag;?></font></td>
<td colspan="2"><font size="2"><?php echo $oStd2->studentCode;?></font></td>
<td colspan="2"><font size="2"><?php echo $oStd2->prefixName.$oStd2->studentName.' '.$oStd2->studentSurname;?></font></td>
</tr>
<?php
} // end while $oStd2
} // end while $oStd1
} // end while $oDA
// case 1
$oDA->RSDefineAssessmentByAcYAndSeAndFlagAndCoIdAndOfId($acadYear, $semester, 1, $oClass->courseId, $officerId);
while($oDA->GetRecord()) {
$pgFlag = 0;
$oStd1->RSStudentAssessGroupPgName();
while($oStd1->GetRecord()) {
$stFlag = 0;
$oStd2->GetNotAssessFlag1ByPgNameAndAcYAndSeAndCoIdAndDeIdAndOfId($oStd1->programName, $acadYear, $semester, $oClass->courseId, $oDA->defineid, $officerId);
while($oStd2->GetRecord()) {
$daFlag++;
$pgFlag++;
$stFlag++;
if($daFlag == 1) {
$oCourse->SearchByKey($oClass->courseId);
$oCourse->GetRecord();
?>
<tr>
<td height="22" colspan="8"><font size="2"><?php echo $oCourse->courseCode.' '.$oCourse->courseName;?></font></td>
</tr>
<?php
}
if($pgFlag == 1) {
$oAF->SearchByKey($oDA->assid);
$oAF->GetRecord();
?>
<tr>
<td height="22"></td>
<td colspan="7"><font size="2"><?php echo $oAF->nameAss;?></font></td>
</tr>
<?php
}
if($stFlag == 1) {
?>
<tr>
<td colspan="2" height="22"></td>
<td colspan="6"><font size="2">หลัักสูตร<?php echo $oStd1->programName;?></font></td>
</tr>
<?php
}
?>
<tr>
<td colspan="3" height="22"></td>
<td><font size="2"><?php echo $stFlag;?></font></td>
<td colspan="2"><font size="2"><?php echo $oStd2->studentCode;?></font></td>
<td colspan="2"><font size="2"><?php echo $oStd2->prefixName.$oStd2->studentName.' '.$oStd2->studentSurname;?></font></td>
</tr>
<?php
} // end while $oStd2
} // end while $oStd1
} // end while $oDA
// case 5
$oDA->SearchByAcadSemFlag($acadYear, $semester, 5);
while($oDA->GetRecord()) {
$pgFlag = 0;
$oStd1->RSStudentAssessGroupPgName();
while($oStd1->GetRecord()) {
$stFlag = 0;
$oStd2->GetNotAssessFlag5ByPgNameAndAcYAndSeAndCoIdAndDeId($oStd1->programName, $acadYear, $semester, $oClass->courseId, $oDA->defineid);
while($oStd2->GetRecord()) {
$daFlag++;
$pgFlag++;
$stFlag++;
if($daFlag == 1) {
$oCourse->SearchByKey($oClass->courseId);
$oCourse->GetRecord();
?>
<tr>
<td height="22" colspan="8"><font size="2"><?php echo $oCourse->courseCode.' '.$oCourse->courseName;?></font></td>
</tr>
<?php
}
if($pgFlag == 1) {
$oAF->SearchByKey($oDA->assid);
$oAF->GetRecord();
?>
<tr>
<td height="22"></td>
<td colspan="7"><font size="2"><?php echo $oAF->nameAss;?></font></td>
</tr>
<?php
}
if($stFlag == 1) {
?>
<tr>
<td colspan="2" height="22"></td>
<td colspan="6"><font size="2">หลัักสูตร<?php echo $oStd1->programName;?></font></td>
</tr>
<?php
}
?>
<tr>
<td colspan="3" height="22"></td>
<td><font size="2"><?php echo $stFlag;?></font></td>
<td colspan="2"><font size="2"><?php echo $oStd2->studentCode;?></font></td>
<td colspan="2"><font size="2"><?php echo $oStd2->prefixName.$oStd2->studentName.' '.$oStd2->studentSurname;?></font></td>
</tr>
<?php
} // end while $oStd2
} // end while $oStd1
} // end while $oDA
// case 6
$oDA->RSDefineAssessmentByAcYAndSeAndFlagAndCoIdAndOfId($acadYear, $semester, 6, $oClass->courseId, $officerId);
while($oDA->GetRecord()) {
$pgFlag = 0;
$oStd1->RSStudentAssessGroupPgName();
while($oStd1->GetRecord()) {
$stFlag = 0;
$oStd2->GetNotAssessFlag6ByPgNameAndAcYAndSeAndCoIdAndDeId($oStd1->programName, $acadYear, $semester, $oClass->courseId, $oDA->defineid);
while($oStd2->GetRecord()) {
$daFlag++;
$pgFlag++;
$stFlag++;
if($daFlag == 1) {
$oCourse->SearchByKey($oClass->courseId);
$oCourse->GetRecord();
?>
<tr>
<td height="22" colspan="8"><font size="2"><?php echo $oCourse->courseCode.' '.$oCourse->courseName;?></font></td>
</tr>
<?php
}
if($pgFlag == 1) {
$oAF->SearchByKey($oDA->assid);
$oAF->GetRecord();
?>
<tr>
<td height="22"></td>
<td colspan="7"><font size="2"><?php echo $oAF->nameAss;?></font></td>
</tr>
<?php
}
if($stFlag == 1) {
?>
<tr>
<td colspan="2" height="22"></td>
<td colspan="6"><font size="2">หลัักสูตร<?php echo $oStd1->programName;?></font></td>
</tr>
<?php
}
?>
<tr>
<td colspan="3" height="22"></td>
<td><font size="2"><?php echo $stFlag;?></font></td>
<td colspan="2"><font size="2"><?php echo $oStd2->studentCode;?></font></td>
<td colspan="2"><font size="2"><?php echo $oStd2->prefixName.$oStd2->studentName.' '.$oStd2->studentSurname;?></font></td>
</tr>
<?php
} // end while $oStd2
} // end while $oStd1
} // end while $oDA
} // end while $oClass
set_time_limit(30);
?>
</table>
|