Viewing file: v_coAndRspTable.php (2.96 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<html>
<head>
<title>ตารางรายวิชาที่เปิดสอน</title>
<script language="JavaScript">
function ReturnValue(coId,crsCode,crsName,crsUnit,cdId1,cdId2,crsId)
{
window.opener.document.myform.elements["crsCode"].value = crsCode;
window.opener.document.myform.elements["crsName"].value = crsName;
window.opener.document.myform.elements["coId"].value = coId;
window.opener.document.myform.elements["cdId"].value = cdId1;
window.opener.document.myform.elements["cdId2"].value = cdId2;
window.opener.document.myform.elements["crsUnit"].value = crsUnit;
window.opener.document.myform.elements["crsId"].value = crsId;
window.close();
}
</script>
</head>
<body bgcolor="#FFFFFF">
<table class="headCol">
<tr>
<th class="seqCol"><font face="Microsoft Sans Serif" size="2">ลำดับที่</font></th>
<th><font face="Microsoft Sans Serif" size="2">รายวิชา</font></th>
<th class="domAmtCol"><font face="Microsoft Sans Serif" size="2">หน่วยกิต</font></th>
</tr>
<?php
$i = 0;
if(isset($arr) && $arr!=NULL) {
foreach($arr as $key => $val) {
echo "<tr onmouseover=\"bgColor='".$tr_color_even."'\" onmouseout=\"bgColor='".$this->config->item("rg_mouseout")."'\">";
?>
<td align="center" class="hand"><font size="2" onClick='ReturnValue("<?php echo $arr[$key]['coId'];?>","<?php echo $arr[$key]['crs']->crsCode;?>","<?php echo $arr[$key]['crs']->crsName;?>","<?php echo $arr[$key]['crs']->crsUnit;?>","<?php echo $arr[$key]['coCdId1'];?>","<?php echo $arr[$key]['coCdId2'];?>","<?php echo $arr[$key]['coCrsId'];?>")'><?php echo $i+1;?></font></td>
<td class="indent hand"><font size="2" onClick='ReturnValue("<?php echo $arr[$key]['coId'];?>","<?php echo $arr[$key]['crs']->crsCode;?>","<?php echo $arr[$key]['crs']->crsName;?>","<?php echo $arr[$key]['crs']->crsUnit;?>","<?php echo $arr[$key]['coCdId1'];?>","<?php echo $arr[$key]['coCdId2'];?>","<?php echo $arr[$key]['coCrsId'];?>")'><?php echo $arr[$key]['crs']->crsCode.' '.$arr[$key]['crs']->crsName;?></font></td>
<td align="center" class="hand"><font size="2" onClick='ReturnValue("<?php echo $arr[$key]['coId'];?>","<?php echo $arr[$key]['crs']->crsCode;?>","<?php echo $arr[$key]['crs']->crsName;?>","<?php echo $arr[$key]['crs']->crsUnit;?>","<?php echo $arr[$key]['coCdId1'];?>","<?php echo $arr[$key]['coCdId2'];?>","<?php echo $arr[$key]['coCrsId'];?>")'><?php echo $arr[$key]['crs']->crsUnit;?></font></td>
</tr>
<?php
$i++;
}
} else {
?>
<tr>
<td colspan="3" align="center" bgcolor="#FFFFFF"><font size="2" color="#FF0000" face="Microsoft Sans Serif">** ไม่ปรากฏรายการดังกล่าวในฐานข้อมูล **</font></td>
</tr>
<?php
}
?>
</table>
<table width="100%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td align="right"><font face="Microsoft Sans Serif" size="2">รวม <?php echo $i;?> รายการ</font></td>
</tr>
</table>
</body>
</html>
|