Viewing file:      v_rptRis115.php (4.01 KB)      -rwxr-xr-x Select action/file-type:    (+) |   (+) |   (+) | Code (+) | Session (+) |   (+) | SDB (+) |   (+) |   (+) |   (+) |   (+) |   (+) |
 
<?php header('Content-type: application/xls'); header('Content-Disposition: attachment; filename="testing.xls"');
  $row_gen = ( isset($qu_gen) ) ? $qu_gen->row() : null; $qu_cur = ( isset($qu_cur) ) ? $qu_cur->row() : null;
  ?>
  <table width="95%" align="center">     <tr>         <td width="50"><img src="<?=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>RIS115</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>ข้อมูลนักศึกษาที่แจ้งย้ายเข้า/ออกทะเบียนบ้าน</b></font></td>     </tr>     <tr>         <td colspan="3" height="22" align="center"><font size="2"><b>หลักสูตร</b> <?php echo setValue('curName',$qu_cur);?>         <b>รุ่นที่</b> <?php echo setValue('genNo',$row_gen);?></font></td>     </tr>     <tr>         <td colspan="3" height="22"></td>     </tr>     <tr>         <td colspan="3"><table width="100%" border="1" cellspacing="0" cellpadding="2" bordercolor="#000000" style="border-collapse: collapse" align="center">             <tr>                 <th align="center">ที่</th>                 <th align="center">รหัสนักศึกษา</th>                 <th align="center">ชื่อ-สกุล</th>                 <th align="center">ชั้นปี</th>                 <th align="center">วัน เดือน ปี เกิด</th>                 <th align="center">อายุ</th>                 <th align="center">เลขที่บัตรประชาชน</th>                 <th align="center">ที่อยู่ภูมิลำเนา</th>                 <th align="center">ที่อยู่ปัจจุบัน</th>                 <th align="center">ชื่อ - สกุลบิดา</th>                 <th align="center">ชื่อ - สกุลมารดา</th>             </tr> <?php             $i = 0;             if($rs_std->num_rows()) {                 foreach($rs_std->result() as $row) { ?>             <tr>                 <td align="center"><?php echo $i+1;?></td>                 <td align="center"><?=$row->stdCode;?></td>                 <td><?=$row->prefixName.$row->stdName.' '.$row->stdSurname;?></td>                 <td align="center"><?=$row->stdSyId;?></td>                 <td align="center">=T("<?php echo ($row->sdtBirthDate=="" || $row->sdtBirthDate=="0000-00-00") ? "" : abbreDate2($row->sdtBirthDate);?>")</td>                 <td align="center"><?php echo time_diff($row->sdtBirthDate, getNowDateTh());?></td>                 <td align="center">=T("<?php echo $row->sdtCitizenId;?>")</td>                 <td> <?php                 if($row->sdtHomeAddr == '') {                     echo '';                 } else {                     $con_dt = array('districtId'=>$row->sdtDtIdHome);                     $qu_dt = $dt->getAllDtJoinApPrv($con_dt);                     if($qu_dt->num_rows()) {                          $row_dt = $qu_dt->row();                         echo $row->sdtHomeAddr.' ต.'.$row_dt->districtName.' อ.'.$row_dt->amphurName.' จ.'.$row_dt->provinceName.' '.$row->sdtHomePostCode;                      }else "";                 } ?>                 </td>                 <td> <?php                 if($row->sdtCurrentAddr == '') echo '';                 else{                     $con_dt = array('districtId'=>$row->sdtDtIdCurrent);                     $qu_dt = $dt->getAllDtJoinApPrv($con_dt);                     if($qu_dt->num_rows()) {                          $row_dt = $qu_dt->row();                         echo $row->sdtHomeAddr.' ต.'.$row_dt->districtName.' อ.'.$row_dt->amphurName.' จ.'.$row_dt->provinceName.' '.$row->sdtHomePostCode;                      }else "";                 } ?>                 </td>                 <td><?=$row->sdtFatherName;?></td>                 <td><?=$row->sdtMotherName;?></td>             </tr> <?php                 $i++;             }         }else { ?>             <tr><td colspan='11' align="center"><span> ไม่พบข้อมูล </span></td></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>
  |