Viewing file: v_rptRis109Excel.php (5.76 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
header('Content-type: application/xls');
header('Content-Disposition: attachment; filename="Ris109.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>RIS109</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>
<?
if($qu_co->num_rows()) {
$row = $qu_co->row();
$timeTable = $row->dyName;
$prd->prdId = $row->ttPrdFrTime;
$prd->get_by_key(TRUE);
if(isset($prd->prdFrTime)){
list($hh, $mm, $ii) = preg_split('[:]', $prd->prdFrTime);
$timeTable .= ' '.$hh.'.'.$mm;
}
$prd->prdId = $row->ttPrdToTime;
$prd->get_by_key(TRUE);
if(isset($prd->prdFrTime)){
list($hh, $mm, $ii) = preg_split('[:]', $prd->prdToTime);
$timeTable .= '-'.$hh.'.'.$mm.' น.';
}
if(!(isset($prd->prdFrTime) && isset($prd->prdFrTime))) {
$timeTable = ".-. น.";
}
$midDate = $finalDate = '-';
$esCon = array('esCoId' => $row->coId, 'esExamType' => 'M');
$qu_es = $es->qryEs($esCon);
if($qu_es->num_rows()){
$row_es = $qu_es->first_row();
$midDate = fullDate2($row_es->esDate);
}
$esCon = array('esCoId' => $row->coId, 'esExamType' => 'F');
$qu_es = $es->qryEs($esCon);
if($qu_es->num_rows()){
$row_es = $qu_es->first_row();
$finalDate = fullDate2($row_es->esDate);
}
?>
<tr>
<td colspan="3" height="22" align="center"><font size="2"><b>รหัสวิชา</b> <?php echo $row->crsCode;?>
<b>รายวิชา</b> <?php echo $row->crsName;?>
<b>หน่วยกิต</b> <?php echo $row->crsUnit;?></font></td>
</tr>
<tr>
<td colspan="3" height="22" align="center"><font size="2"><b>ภาคการศึกษาที่</b> <?php echo $tmId;?>
<b>ปีการศึกษา</b> <?php echo $acY;?></font></td>
</tr>
<tr>
<td colspan="3" height="22" align="center"><font size="2"><b>วันเวลาที่เรียน</b> <?php echo $timeTable;?>
<b>วันที่สอบกลางภาค</b> <?php echo $midDate;?>
<b>วันที่สอบปลายภาค</b> <?php echo $finalDate;?></font></td>
</tr>
<?
}
?>
<tr>
<td colspan="3" height="22"></td>
</tr>
<tr>
<td colspan="3"><table border="1" cellspacing="0" cellpadding="2" bordercolor="#000000" style="border-collapse: collapse" align="center">
<tr>
<td height="22" 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="16" 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>1</b></font></td>
<td align="center"><font size="2"><b>2</b></font></td>
<td align="center"><font size="2"><b>3</b></font></td>
<td align="center"><font size="2"><b>4</b></font></td>
<td align="center"><font size="2"><b>5</b></font></td>
<td align="center"><font size="2"><b>6</b></font></td>
<td align="center"><font size="2"><b>7</b></font></td>
<td align="center"><font size="2"><b>8</b></font></td>
<td align="center"><font size="2"><b>9</b></font></td>
<td align="center"><font size="2"><b>10</b></font></td>
<td align="center"><font size="2"><b>11</b></font></td>
<td align="center"><font size="2"><b>12</b></font></td>
<td align="center"><font size="2"><b>13</b></font></td>
<td align="center"><font size="2"><b>14</b></font></td>
<td align="center"><font size="2"><b>15</b></font></td>
<td align="center"><font size="2"><b>16</b></font></td>
</tr>
<?
$i = 0;
if($rs_rd->num_rows()){
foreach($rs_rd->result() as $row_rd){
$i++;
?>
<tr>
<td height="22" align="center"><font size="2"><?php echo $i;?></font></td>
<td align="center"><font size="2"><?php echo $row_rd->stdCode;?></font></td>
<td><font size="2"><?php echo $row_rd->prefixName.$row_rd->stdName.' '.$row_rd->stdSurname;?></font></td>
<td><font size="2"><?php echo $row_rd->sstName;?></font></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<?
}
}else{
?>
<tr>
<td colspan="21" height="22" align="center"><font size="3"><b>** ไม่ปรากฏรายการในฐานข้อมูล **</b></font></td>
</tr>
<?
}
?>
</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>
|