Viewing file: v_rptRis205.php (4.26 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>RIS205</b></font></td>
</tr>
<tr>
<td colspan="3" height="22" align="center"><font size="3"><b>สรุปจำนวนนักศึกษาเข้าร่วมโครงการ/กิจกรรม
ปีการศึกษา
<?php echo $acadYear.' ('.abbreDate($dateFrom).' - '.abbreDate($dateTo).')';?></b></font></td>
</tr>
<tr>
<td colspan="3" height="22"></td>
</tr>
<tr>
<td colspan="3"><table width="100%" border="1" cellspacing="0" cellpadding="0" bordercolor="#000000" style="border-collapse: collapse" align="center">
<?php
$syNumRow = $nr_sty->num_rows();
$pgNumRow = $nr_cur->num_rows();
$totalStNum = $num_std;
?>
<tr>
<td rowspan="3" align="center"><font size="2"><b>ที่</b></font></td>
<td rowspan="3" align="center"><font size="2"><b>ชื่อโครงการ/กิจกรรม</b></font></td>
<td rowspan="3" align="center"><font size="2"><b>ว.ด.ป.<br>ที่ดำเนินการ</b></font></td>
<td colspan="2" align="center"><font size="2"><b>ประเภทโครงการ/กิจกรรม</b></font></td>
<td colspan="<?php echo $syNumRow*$pgNumRow;?>" align="center"><font size="2"><b>จำนวนเข้าร่วมโครงการ (<?php echo $num_std;?> คน)</b></font></td>
<td rowspan="3" align="center"><font size="2"><b>รวมจำนวน<br>ทั้งหมด<br>(คน)</b></font></td>
<td rowspan="3" align="center"><font size="2"><b>ร้อยละ</b></font></td>
</tr>
<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>
<?php
foreach($nr_sty->result() as $row){
?>
<td colspan="<?php echo $pgNumRow;?>" align="center"><font size="2"><b><?php echo $row->syName;?></b></font></td>
<?php
}
?>
</tr>
<tr>
<?php
for($sy=1; $sy<=$syNumRow; $sy++) {
foreach($nr_cur->result() as $row){
?>
<td align="center"><font size="2"><b><?php echo $row->curAbbr;?></b></font></td>
<?php
}
}
?>
</tr>
<?php
$i = 0;
foreach($rs_sta->result() as $row){
$staCon = array('sacAcY' => $acadYear,'sacName' => $row->sacName,'sacFrDate' => $row->sacFrDate, 'sacToDate' => $row->sacToDate);
$stNum = $sta->qrystdActivityGetCountStdIdByAcYAndActNameAndDate($staCon,'','')->row()->num;
?>
<tr>
<td height="22" align="center"><font size="2"><?php echo $i+1;?></font></td>
<td><font size="2"><?php echo $row->sacName;?></font></td>
<td><font size="2">=T("<?php echo $row->sacFrDate==$row->sacToDate ? abbreDate2($row->sacFrDate) : abbreDate2($row->sacFrDate).' - '.abbreDate2($row->sacToDate);?>")</font></td>
<td></td>
<td></td>
<?php
for($sy=1; $sy<=$syNumRow; $sy++) {
foreach($nr_cur->result() as $row2){
?>
<td align="right"><font size="2">
<?php
$staCon = array('sacAcY' => $acadYear,'sacName' => $row->sacName,'sacSyId' => $sy , 'sacFrDate' => $row->sacFrDate, 'sacToDate' => $row->sacToDate ,'stdCurId' => $row2->curId);
$numStd2 = $sta->qrystdActivityGetCountStdIdByAcYAndActNameAndDate($staCon,'','')->row()->num;
echo $numStd2;
?>
</font></td>
<?php
}
}
?>
<td align="right"><font size="2"><?php echo $stNum;?></font></td>
<td align="right"><font size="2"><?php echo number_format(($stNum*100) / $totalStNum, 2);?></font></td>
</tr>
<?php
$i++;
}
?>
</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>
|