Viewing file: 2551-03-10-1.0.01-repCloseDateAssessForm.php (3.12 KB) -rw-r--r-- 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/clsDefineAssessment.php";
include_once "../class/clsAssessForm.php";
include_once "../class/clsStudentAssess.php";
include_once "../class/clsReg_Program.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']);
$oDA = new DefineAssessment($oCA);
$oAF = new AssessForm($oCA);
$oStd1 = new StudentAssess($oCA);
$oStd2 = new StudentAssess($oCA);
$oProg=new Program($oCR);
$oDA->SearchByKey($defineid, $acadYear, $semester, $noAss);
$oDA->GetRecord();
$oAF->SearchByKey($oDA->assid);
$oAF->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 height="22"><font size="2"><b>ชื่อแบบประเมิน</b></font></td>
<td colspan="3"><font size="2"><b>:</b> <?php echo $oAF->nameAss;?></font></td>
</tr>
<tr>
<td height="22"><font size="2"><b>ปีการศึกษา</b></font></td>
<td><font size="2"><b>:</b> <?php echo $acadYear ?></font></td>
<td><font size="2"><b>ภาคการศึกษา</b></font></td>
<td><font size="2"><b>:</b> <?php echo $semester;?></font></td>
</tr>
<tr>
<td height="22" colspan="4"></td>
</tr>
<?php
set_time_limit(0);
$oStd1->RSStudentAssessGroupPgName();
while($oStd1->GetRecord()) {
$pgFlag = 0;
if($oDA->flag == 0)
$oStd2->GetNotAssessFlag0ByPgNameAndAcYAndSeAndDeId($oStd1->programName, $acadYear, $semester, $defineid);
else if($oDA->flag == 1)
$oStd2->GetNotAssessFlag1ByPgNameAndAcYAndSeAndDeId($oStd1->programName, $acadYear, $semester, $defineid);
else if($oDA->flag == 5)
$oStd2->GetNotAssessFlag5ByPgNameAndAcYAndSeAndDeId($oStd1->programName, $acadYear, $semester, $defineid);
else if($oDA->flag == 6)
$oStd2->GetNotAssessFlag6ByPgNameAndAcYAndSeAndDeId($oStd1->programName, $acadYear, $semester, $defineid);
else if($oDA->flag == 2)
$oStd2->GetNotAssessFlag2ByPgNameAndDeId($oStd1->programName, $defineid);
else if($oDA->flag == 3) {
$oProg->SearchProgramIdByPrgramName($oStd1->programName);
$oProg->GetRecord();
$oStd2->GetNotAssessFlag3ByPgNameAndDeIdAndPgId($oStd1->programName, $defineid, $oProg->programId);
}
while($oStd2->GetRecord()) {
$pgFlag++;
if($pgFlag == 1) {
?>
<tr>
<td height="22" colspan="4"><font size="2"><?php echo $oStd1->programName;?></font></td>
</tr>
<?php
}
?>
<tr>
<td height="22"></td>
<td><font size="2"><?php echo $pgFlag;?></font></td>
<td><font size="2"><?php echo $oStd2->studentCode;?></font></td>
<td><font size="2"><?php echo $oStd2->prefixName.$oStd2->studentName.' '.$oStd2->studentSurname;?></font></td>
</tr>
<?php
} // end while $oStd2
} // end while $oStd1
set_time_limit(30);
?>
</table>
|