| Viewing file:  v_rptRis206.php (4.02 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><?=$cfgClgName;?><br><?=$cfgSiteName;?></b></font></td>
 <td width="200" align="right" valign="top"><font size="2"><b>RIS206</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" align="center"><font size="3"><b>ระหว่าง
 <?php echo 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
 $saNumRow = $rs_sta->num_rows();
 ?>
 <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 colspan="<?php echo $saNumRow;?>" align="center"><font size="2"><b>โครงการ/กิจกรรมปีการศึกษา <?php echo $acadYear;?>
 (จำนวน <?php echo $saNumRow;?> โครงการ/กิจกรรม)</b></font></td>
 </tr>
 <tr>
 <?php
 for($sa=1; $sa<=$saNumRow; $sa++) {
 ?>
 <td align="center"><font size="2"><b><?php echo $sa;?></b></font></td>
 <?php
 }
 ?>
 </tr>
 <?php
 $i = 0;
 if($rs_std->num_rows()) {
 foreach($rs_std->result() as $row){
 $stdCon = array('stdId' => $row->stdId);
 $rs_stdJPrf = $std->qryStdJoinPf($stdCon);
 $rsStdPrf = $rs_stdJPrf->row();
 ?>
 <tr>
 <td height="22" align="center"><font size="2"><?php echo $i+1;?></font></td>
 <td align="center"><font size="2"><?php echo $rsStdPrf->stdCode;?></font></td>
 <td><font size="2"><?php echo $rsStdPrf->prefixName.$rsStdPrf->stdName;?></font></td>
 <td><font size="2"><?php echo $rsStdPrf->stdSurname;?></font></td>
 <?php
 foreach($rs_sta->result() as $row2){
 $staCon = array('sacStdId' => $row->stdId , 'sacName' => $row2->sacName , 'sacAcY' => $acadYear , 'sacFrDate' => $row2->sacFrDate , 'sacToDate' => $row2->sacToDate);
 $rs_sta2 = $sta->qrySac($staCon,'','');
 ?>
 <td align="right"><font size="2"><?php echo $rs_sta2->row() ? 1 : 0;?></font></td>
 <?php
 }
 ?>
 </tr>
 <?php
 $i++;
 }
 ?>
 <tr>
 <td colspan="4" align="center"><font size="2">รวม</font></td>
 <?php
 foreach($rs_sta->result() as $row2){
 ?>
 <td align="right"><font size="2">
 <?php
 $staCon = array('sacAcY' => $acadYear , 'sacName' => $row2->sacName , 'sacFrDate' => $row2->sacFrDate , 'sacToDate' => $row2->sacToDate);
 $rs_sta2 = $sta->qrystdActivityGetCountStdIdByAcYAndActNameAndDate($staCon,'','');
 echo $rs_sta2->row()->num;
 ?></font></td>
 <?php
 }
 ?>
 </tr>
 <?php } ?>
 </table></td>
 </tr>
 <tr valign="bottom">
 <td align="center" colspan="3" height="88"><hr color="#000000" noshade></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>
 |