Viewing file: v_majoreduTable.php (2.51 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<script language="JavaScript">
function ReturnValue(Id,Name)
{
window.opener.document.myform.elements["majoreduId"].value = Id;
window.opener.document.myform.elements["majoreduName"].value = Name;
window.close();
}
</script>
<table width="100%"><?php echo form_open($this->config->item("ea_folder")."popup/medu_popup_search");?><br/>
<tr>
<td align="center">
<font size="2"><b>ชื่อสาขา:</b></font>
<input type="text" name="meduName" id="meduName" size="14" value="<?php echo set_value('meduName');?>" />
<input type="submit" name="search" value="ค้นหา" />
</td>
</tr>
</table>
<table width="100%">
<tr>
<td height="22" colspan="4"></td>
</tr>
<?php
if(isset($rs_medu) && $rs_medu->num_rows() > $this->config->item("ea_max_row")) {
?>
<tr>
<td height="30" colspan="3"><div class="boxBlock leftBox"><font size="2"><b>
แสดง <?php echo $this->config->item("ea_max_row");?> รายการจาก <?php echo isset($rs_lv) ? $rs_lv->num_rows() : '';?> รายการ</b></font>
</div></td>
</tr>
<?php
}
?>
<tr bgcolor="<?php echo $this->config->item("rg_table_color");?>">
<td width="10%" align="center"><font size="2" color="<?php echo $font_color_table;?>"><b>ลำดับที่</b></font></td>
<td align="center"><font size="2" color="<?php echo $font_color_table;?>"><b>ชื่อสาขา</b></font></td>
</tr>
<?php
$i = 0;
if($rs_medu->num_rows()) {
foreach($rs_medu->result() as $row) {
if($i >= $this->config->item("ea_max_row"))
break;
echo "<tr onmouseover=\"bgColor='".$tr_color_even."'\" onmouseout=\"bgColor='".$this->config->item("rg_mouseout")."'\">";
?>
<td align="center" onClick="ReturnValue(<?php echo $row->meduId;?>,'<?php echo $row->meduName;?>')" onMouseOver="this.style.cursor='pointer'"><font size="2"><?php echo $i+1;?></font></td>
<td onClick="ReturnValue(<?php echo $row->meduId;?>,'<?php echo $row->meduName;?>')" onMouseOver="this.style.cursor='pointer'"><font size="2">  <?php echo $row->meduName;?></font></td>
</tr>
<?php
$i++;
}
} else {
?>
<tr>
<td colspan="4" align="center"><font size="2" color="<?php echo $font_color_err;?>">** ไม่ปรากฏรายการดังกล่าวในฐานข้อมูล **</font></td>
</tr>
<?php
}
?>
<tr bgcolor="silver">
<td colspan="4" align="right"><font size="2">รวม <?php echo $rs_medu->num_rows();?> รายการ</font></td>
</tr>
<?php echo form_close();?>
</table>
|