Viewing file: v_courseInCourseOpenTable.php (4.25 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<html>
<head>
<title>ตารางรายวิชาในหลักสูตร</title>
<script language="JavaScript">
function ReturnValue(crsId,crsCode,crsName,crsUnit,cdId1,cdId2) {
window.opener.document.myform.elements["crsId"].value = crsId;
window.opener.document.myform.elements["crsCode"].value = crsCode;
window.opener.document.myform.elements["crsName"].value = crsName;
window.opener.document.myform.elements["crsUnit"].value = crsUnit;
window.opener.document.myform.elements["cdId1"].value = cdId1;
window.opener.document.myform.elements["cdId2"].value = cdId2;
window.close();
}
</script>
</head>
<body>
<table width="100%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td><br /></td>
</tr>
<?php echo form_open($this->config->item("rg_folder")."popup/crsInCo_popup" , array("name" => "myform", "id" => "myform"));?><tr bgcolor="#FFFFFF">
<td colspan="4">
<font size="2"><b>รหัสวิชา</b>
<input type="text" id="crsCode" name="crsCode" value="<?php echo set_value('crsCode');?>" size="8" />
<b>ชื่อวิชาไทย</b>
<input type="text" id="crsName" name="crsName" value="<?php echo set_value('crsName');?>" />
<b>ชื่อวิชาอังกฤษ</b></font>
<input type="text" id="crsNameE" name="crsNameE" value="<?php echo set_value('crsNameE')?>" />
<input type="submit" id="search" name="search" value="ค้นหา" />
<input type="reset" id="reset" value="เคลียร์ข้อมูล" /><br />
<input type="hidden" id="curId" name="curId" value="<?php echo $curId;?>" />
<input type="hidden" id="tmId" name="tmId" value="<?php echo $tmId;?>" />
<input type="hidden" id="acY" name="acY" value="<?php echo $acY;?>" />
<input type="hidden" id="syId" name="syId" value="<?php echo $syId;?>" />
</td>
</tr><?php echo form_close();?>
<?php
if(isset($flgmsg)) {
?>
<tr>
<td colspan="4" align="center"><font size="2" class="error"><?php echo $flgmsg;?></font></td>
</tr>
<?php
}
?>
<tr>
<td><br /></td>
</tr>
<tr>
<td><table class="headCol">
<tr>
<th>ลำดับที่</th>
<th>รายวิชา</th>
<th>หน่วยกิต</th>
<th>หลักสูตร</th>
</tr>
<?php
$num_rows = count($rs);
if ($num_rows) {
foreach ($rs as $key => $val) {
$row_crs = $rs[$key]['qu_crs']->row();
echo "<tr onmouseover=\"bgColor='".$tr_color_even."'\" onmouseout=\"bgColor='".$this->config->item("rg_mouseout")."'\">";
?>
<td align="center" ><span class="hand" onClick="ReturnValue('<?php echo $row_crs->crsId;?>','<?php echo $row_crs->crsCode;?>','<?php echo $row_crs->crsName;?>','<?php echo $row_crs->crsUnit;?>','<?php echo $rs[$key]['cdId1'];?>','<?php echo $rs[$key]['cdId2'];?>')"><?php echo $key + 1;?></span></td>
<td><span class="hand" onClick="ReturnValue('<?php echo $row_crs->crsId;?>','<?php echo $row_crs->crsCode;?>','<?php echo $row_crs->crsName;?>','<?php echo $row_crs->crsUnit;?>','<?php echo $rs[$key]['cdId1'];?>','<?php echo $rs[$key]['cdId2'];?>')"><?php echo $row_crs->crsCode.' '.$row_crs->crsName;?></span></td>
<td align="center"><span class="hand" onClick="ReturnValue('<?php echo $row_crs->crsId;?>','<?php echo $row_crs->crsCode;?>','<?php echo $row_crs->crsName;?>','<?php echo $row_crs->crsUnit;?>','<?php echo $rs[$key]['cdId1'];?>','<?php echo $rs[$key]['cdId2'];?>')"><?php echo $row_crs->crsUnit;?></span></td>
<td><span class="hand" onClick="ReturnValue('<?php echo $row_crs->crsId;?>','<?php echo $row_crs->crsCode;?>','<?php echo $row_crs->crsName;?>','<?php echo $row_crs->crsUnit;?>','<?php echo $rs[$key]['cdId1'];?>','<?php echo $rs[$key]['cdId2'];?>')">
<?php
foreach ($rs[$key]['rs_pcr']->result() as $row_pcr) {
echo $row_pcr->curName.'<br />';
}
?>
</span></td>
</tr>
<?php
}
} else {
?>
<tr>
<td colspan="4" align="center" bgcolor="#FFFFFF"><font size="2" class="error">** ไม่ปรากฏรายการดังกล่าวในฐานข้อมูล **</font></td>
</tr>
<?php
}
?>
</table>
<table width="100%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td align="right"><font size="2">รวม <?php echo $num_rows;?> รายการ</font></td>
</tr>
</table>
</body>
</html>
|