Viewing file: v_rptRis204.php (6.71 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
header('Content-type: application/xls');
header('Content-Disposition: attachment; filename="testing.xls"');
?>
<table 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><?=$cfgClgName;?><br><?=$cfgSiteName;?></b></font></td>
<td width="200" align="right" valign="top"><font size="2"><b>RIS204</b></font></td>
</tr>
<tr>
<td colspan="3" height="22" align="center"><font size="3"><b>แบบสรุปจำนวนนักศึกษา จำแนกตามทุน/โควตา</b></font></td>
</tr>
<?php
$row = $qu_tcf->row();
?>
<tr>
<td colspan="3" height="22" align="center"><font size="2"><b>ประจำปีการศึกษา</b> <?php echo $row->tmcAcY;?></font></td>
</tr>
<tr>
<td colspan="3" height="22"></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>การศึกษา</b></font></td>
<td rowspan="2" align="center"><font size="2"><b>จำนวน<br>(คน)</b></font></td>
<td colspan="2" height="22" align="center"><font size="2"><b>เพศ</b></font></td>
<td colspan="<?php echo $rs_ett->num_rows();?>" align="center"><font size="2"><b>ประเภททุน</b></font></td>
<td colspan="<?php echo $rs_pam->num_rows();?>" align="center"><font size="2"><b>สถานะก่อนเข้าเรียน</b></font></td>
<td rowspan="2" align="center"><font size="2"><b>หมายเหตุ</b></font></td>
</tr>
<tr>
<td height="22" align="center"><font size="2"><b>ชาย</b></font></td>
<td align="center"><font size="2"><b>หญิง</b></font></td>
<?php
foreach($rs_ett->result() as $row) {
?>
<td align="center"><font size="2"><b><?php echo $row->etName;?></b></font></td>
<?php
}
foreach($rs_pam->result() as $row) {
?>
<td align="center"><font size="2"><b><?php echo $row->paName;?></b></font></td>
<?php
}
?>
</tr>
<?php
$i = 0;
if($rs_std->num_rows()) {
foreach($rs_std->result() as $row) {
?>
<tr>
<td height="22" align="center"><font size="2"><?php echo $i+1;?></font></td>
<td><font size="2"><?php echo $row->curName;?>(<?php echo $row->stdAdY;?>)</font></td>
<td align="center"><font size="2"><?php echo $row->genNo;?></font></td>
<td align="center"><font size="2"><?php echo $row->stdSyId;?></font></td>
<td align="center"><font size="2"><?php echo $row->curNumStudyY;?></font></td>
<td align="right"><font size="2"><?php echo $row->studentId;?></font></td>
<td align="right"><font size="2">
<?php
$stdCon = array('stdCurId' => $row->stdCurId ,'stdPaId' => '1' , 'stdSyId' => $row->stdSyId , 'stdGenId' => $row->stdGenId, 'sdtSex' =>'M');
echo $std->qryStdByCurId($stdCon,'','')->num_rows();
?>
</font></td>
<td align="right"><font size="2">
<?php
$stdCon = array('stdCurId' => $row->stdCurId ,'stdPaId' => '1' , 'stdSyId' => $row->stdSyId , 'stdGenId' => $row->stdGenId, 'sdtSex' =>'F');
echo $std->qryStdByCurId($stdCon,'','')->num_rows();
//echo $this->db->last_query();
?>
</font></td>
<?php
if($rs_ett->num_rows()) {
foreach($rs_ett->result() as $row2) {
?>
<td align="right"><font size="2">
<?php
$stdCon = array('stdCurId' => $row->stdCurId ,'stdPaId' => '1' , 'stdSyId' => $row->stdSyId , 'stdGenId' => $row->stdGenId, 'stdEtId' => $row2->etId);
echo $std->qryStdByCurId($stdCon,'','')->num_rows();
?>
</font></td>
<?php
}
}
if($rs_pam->num_rows()) {
foreach($rs_pam->result() as $row3) {
?>
<td align="right"><font size="2">
<?php
$stdCon = array('stdCurId' => $row->stdCurId ,'stdPaId' => '1' , 'stdSyId' => $row->stdSyId , 'stdGenId' => $row->stdGenId, 'stdEtId' => $row3->paId);
echo $std->qryStdByCurId($stdCon,'','')->num_rows();
//echo $this->db->last_query();
?>
</font></td>
<?php
}
}
?>
<td></td>
</tr>
<?php
$i++;
}
}
?>
<tr>
<td colspan="5" height="22" align="center"><font size="2"><b>รวมทั้งสิ้น</b></font></td>
<td align="right"><font size="2">
<?php
$stdCon = array('stdGenStatus' => 'Y' ,'stdPaId' => '1' , 'stdGraduateDate' => '0000-00-00' , 'stdGraduateY' => '0');
echo $std->qryStdByCurId($stdCon,'','')->num_rows();
?>
</font></td>
<td align="right"><font size="2">
<?php
$stdCon = array('sdtSex' => 'M' , 'stdGenStatus' => 'Y' ,'stdPaId' => '1' , 'stdGraduateDate' => '0000-00-00' , 'stdGraduateY' => '0');
echo $std->qryStdByCurId($stdCon,'','')->num_rows();
?>
</font></td>
<td align="right"><font size="2">
<?php
$stdCon = array('sdtSex' => 'F' , 'stdGenStatus' => 'Y' ,'stdPaId' => '1' , 'stdGraduateDate' => '0000-00-00' , 'stdGraduateY' => '0');
echo $std->qryStdByCurId($stdCon,'','')->num_rows();
?>
</font></td>
<?php
if($rs_ett->num_rows()) {
foreach($rs_ett->result() as $row2) {
$stdCon = array('stdEtId' => $row2->etId ,'stdPaId' => '1' ,'stdGenStatus' => 'Y', 'stdGraduateDate' => '0000-00-00' , 'stdGraduateY' => '0');
?>
<td align="right"><font size="2"><?php echo $std->qryStdByCurId($stdCon,'','')->num_rows(); ?></font></td>
<?php
}
}
if($rs_pam->num_rows()) {
foreach($rs_pam->result() as $row3) {
$stdCon = array('stdPaId' => $row3->paId ,'stdGenStatus' => 'Y', 'stdGraduateDate' => '0000-00-00' , 'stdGraduateY' => '0');
$stdGroup = array('stdAdY' => 'stdAdY');
$num = $std->qryStdJoinPreadmit($stdCon,'',$stdGroup);
?>
<td align="right"><font size="2"><?php echo $num;?></font></td>
<?php
}
}
?>
<td></td>
</tr>
</table></td>
</tr>
<tr valign="top">
<td colspan="2"><font size="2">วันที่พิมพ์ : <?php echo date('d-m-y h:m');?></font></td>
<td align="right"><font size="2">หน้า 1/1</font></td>
</tr>
</table>
|