Viewing file: v_showTeachHoursT.php (2.68 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
$row_prs = (isset($qu_prs) && $qu_prs!=NULL) ? $qu_prs->row() : NULL;
?>
<script>
var url = "<?echo site_url($this->config->item("rg_folder")."timetable2/showTeachHoursT");?>";
function goTo(){
sendPost('hidform',{'prsId':$('#prsId').val(),'acY':$('#tmcAcY').val(),'tmId':$('#tmId').val()},url);
}
</script>
<table width="100%" align="center" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="22" align="center"><b>จำนวนชั่วโมงที่สอนของ</b>
<?php echo getval('name', $row_prs);?>
<b>ภาคการศึกษา</b>
<?php
$tmc_attr = 'id="tmcAcY" onChange="goTo();"';
$tm_attr = 'id="tmId" onChange="goTo();"';
?>
<?=form_dropdown('tmcAcY', $tmc, $year,$tmc_attr); ?> / <?=form_dropdown('tmId', $tm, $tmId,$tm_attr); ?>
<br><br><input type="hidden" value="<?=$prsId;?>" name="prsId" id="prsId"></td>
</tr>
<tr>
<td><table class="headCol">
<tr>
<th rowspan="2">รายวิชา</th>
<th rowspan="2" class="groupCol">กลุ่ม</th>
<th rowspan="2">ชั้นปี</th>
<th colspan="<?php echo $rs_st->num_rows();?>">จำนวนชั่วโมง</td>
<th rowspan="2">รวม</td>
</tr>
<tr>
<?php
foreach($rs_st->result() as$row_st){
?>
<th><?php echo $row_st->stName;?></th>
<?php
}
?>
</tr>
<?php
$i = 0;
if(isset($arr_tt)){
foreach ($arr_tt as $key => $value) {
echo "<tr onmouseover=\"bgColor='".$tr_color_even."'\" onmouseout=\"bgColor='".$this->config->item("rg_mouseout")."'\">";
?>
<td class="indent"><span title="<?echo $arr_tt[$i]['cur']?>"><?php echo $arr_tt[$i]['crsCode'].' '.$arr_tt[$i]['crsName'];?></span></td>
<td align="center"><?echo $arr_tt[$i]['coSection']?></td>
<td align="center"><?echo $arr_tt[$i]['coSyId']?></td>
<?php
foreach($rs_st->result() as$row_st){
?>
<td align="center"><?php echo number_format($arr_tt[$i][$row_st->stId]);?></td>
<?php
}
?>
<td align="center"><?php echo number_format($arr_tt[$i]['sum']);?></td>
</tr>
<?php
$i++;
}
}
if($i == 0) {
?>
<tr>
<td colspan="<?php echo $rs_st->num_rows()+4;?>" height="22" align="center"><span class="error">** ไม่ปรากฏรายการในฐานข้อมูล **</span></td>
</tr>
<?php
}
?>
<tr>
<th colspan="3">รวม</th>
<?php
foreach($rs_st->result() as$row_st){
?>
<th><?php echo (isset($arr_sum))? number_format($arr_sum[$row_st->stId]) : "0";?></th>
<?php
}
?>
<th><?php echo (isset($sum_all))? number_format($sum_all) : "0";?></th>
</tr>
</table></td>
</tr>
</table>
|