Viewing file: v_rptRis207.php (4.39 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
header('Content-type: application/xls');
header('Content-Disposition: attachment; filename="testing.xls"');
?>
<meta http-equiv="Content-Type" content="text/html; charset=tis-620">
<table width="700" align="center" border="0" cellpadding="0" cellspacing="1">
<tr>
<td width="50"><img src="<?php echo base_url().$this->config->item('rg_upload_picture').$cfgClgLogo;?>" width="111" height="95" align="absmiddle" border="0"></td>
<td width="450"><font size="2"><b><?php echo $cfgClgName;?><br><?php echo $cfgSiteName;?></b></font></td>
<td width="200" align="right" valign="top"><font size="2"><b>RIS207</b></font></td>
</tr>
<tr valign="top">
<td align="center" colspan="3"><hr color="#000000" noshade><br></td>
</tr>
<tr>
<td colspan="3" height="22" align="center"><font size="3"><b>ตารางข้อมูลผลสัมฤทธิ์ทางการเรียนของนักศึกษา ประจำปีการศึกษา
<?php echo $acadYear;?></b></font></td>
</tr>
<tr>
<td colspan="3" height="22"></td>
</tr>
<tr>
<td colspan="3" height="22"><font size="2"><?php echo $cfgSiteName;?></font></td>
</tr>
<?php
// $oPg->SearchByKey($programId);
// $oPg->GetRecord();
if($qu_cur->num_rows()) {
$row_cur = $qu_cur->row();
$curName = $row_cur->curName;
}else{
$curName = "";
}
?>
<tr>
<td colspan="3" height="22"><font size="2">หลักสูตร<?php echo $curName;?></font></td>
</tr>
<tr>
<td colspan="3"><table border="1" cellspacing="0" cellpadding="0" bordercolor="#000000" style="border-collapse: collapse" align="center">
<tr>
<td rowspan="2" align="center"><font size="2"><b>ลำดับที่</b></font></td>
<td rowspan="2" align="center"><font size="2"><b>รหัสนักศึกษา</b></font></td>
<td rowspan="2" align="center"><font size="2"><b>ชื่อ-สกุล</b></font></td>
<td rowspan="2" align="center"><font size="2"><b>ชั้นปี</b></font></td>
<td rowspan="2" align="center"><font size="2"><b>เลขประจำตัวประชาชน<br>(13 หลัก)</b></font></td>
<td rowspan="2" align="center"><font size="2"><b>โควตาจังหวัด/กรม</b></font></td>
<td rowspan="2" align="center"><font size="2"><b>ภูมิลำเนาจังหวัดตามทะเบียนบ้าน</b></font></td>
<td colspan="4" align="center"><font size="2"><b>คะแนนผลสัมฤทธิ์ทางการเรียน (ทศนิยม 2 ตำแหน่ง)</b></font></td>
</tr>
<tr>
<?php
foreach($rs_ter->result() as $row){
?>
<td height="22" align="center"><font size="2"><b><?php echo $row->tmName;?></b></font></td>
<?php
}
?>
<td align="center"><font size="2"><b>เฉลี่ยสะสม</b></font></td>
</tr>
<?php
$i = 0;
if($rs_std->num_rows()){
foreach($rs_std->result() as $row){
?>
<tr>
<td align="center"><font size="2"><?php echo $i+1;?></font></td>
<td align="center"><font size="2"><?php echo $row->stdCode;?></font></td>
<td><font size="2"><?php echo $row->prefixName.$row->stdName.' '.$row->stdSurname;?></font></td>
<td align="center"><font size="2"><?php echo $row->stdSyId;?></font></td>
<td align="center"><font size="2">=T("<?php echo $row->sdtCitizenId;?>")</font></td>
<td><font size="2"><?php echo $row->soName.' '.$row->provinceName;?></font></td>
<td><font size="2"><?php echo $prv_name;?></font></td>
<?php
foreach($rs_ter->result() as $row2){
$ssCon = array('ssmStdId' => $row->stdId , 'ssmAcY' => $acadYear , 'ssmTmId' => $row2->tmId);
$ssOrder = array('ssmGPAX' => '');
$row_ss = $ss->qrySsm($ssCon,$ssOrder,'')->row();
if($row_ss){
$GPA = $row_ss->ssmGPA;
}else{
$GPA = 0;
}
?>
<td align="right"><font size="2">=T("<?php echo number_format($GPA, 2);?>")</font></td>
<?php
}
?>
<td align="right"><font size="2">
=T("<?php
$num1 = $rgd->GetDividendAYRGPA($row->stdId,$acadYear);
$num2 = $rgd->GetAllFDivisorAYRGPAX($row->stdId,$acadYear);
$res_num = ($num2 != "" || $num2 != 0 || $num1 != "" || $num1 != 0)?$num1/$num2:'0';
echo number_format($res_num, 2);
?>")
</font></td>
</tr>
<?php
$i++;
}
}
?>
</table></td>
</tr>
</table>
|