Viewing file: v_addAdv.php (3.73 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
$row_prs = isset($qu_prs) ? $qu_prs->row() : NULL;
?>
<table width="100%" align="center">
<tr>
<td>
<div align="center">
<?php echo form_open($this->config->item("rg_folder")."officer/adv_insert", array('id' => 'myform', 'name' => 'myform'));?>
<table width="100%">
<tr>
<td align="center"><span class="h" style="color:<?php echo $font_color_err;?>">เพิ่ม/แก้ไขนักศึกษาในที่ปรึกษา</span></td>
</tr>
<tr>
<td><br /></td>
</tr>
<tr>
<td><table class="szone">
<tr bgcolor="<?php echo $tr_color_even;?>">
<td class="coltd_szone"><span><b>อาจารย์ที่ปรึกษา</b></span></td>
<td><span><?php echo getval('name', $row_prs);?></span>
<input type="hidden" id="prsId" name="prsId" value="<?php echo getval('prsId', $row_prs);?>" /></td>
</tr>
<tr bgcolor="<?php echo $tr_color_even;?>">
<td class="coltd_szone"><span><b>ปีการศึกษา</b></span></td>
<td><span><?php echo $acY;?></span>
<input type="hidden" id="acY" name="acY" value="<?php echo $acY;?>" /></td>
</tr>
<tr bgcolor="<?php echo $tr_color_even;?>">
<td class="coltd_szone"><span><b>หลักสูตร</b></span></td>
<td>
<?php
$js = "id=\"curId\" onChange=\"sendPost('myform', {'prsId':".getval('prsId', $row_prs).",'acY':".$acY.",'curId':this.value,'syId':".$syId."}, 'adv_input')\"";
echo form_dropdown('curId', $rs_cur, $curId, $js);
?>
</td>
</tr>
<tr bgcolor="<?php echo $tr_color_even;?>">
<td class="coltd_szone"><span>ชั้นปี</span></td>
<td>
<?php
$js = "id=\"syId\" onChange=\"sendPost('myform', {'prsId':".getval('prsId', $row_prs).",'acY':".$acY.",'curId':".$curId.",'syId':this.value}, 'adv_input')\"";
echo form_dropdown('syId', $rs_sy, $syId, $js);
?>
</td>
</tr>
</table></td>
</tr>
<tr>
<td><br /></td>
</tr>
<tr>
<td><table class="headCol">
<tr>
<th class="editCol"><span>เลือก</span></th>
<th class="stdCodeCol"><span>รหัสนักศึกษา</span></th>
<th><span>ชื่อ-สกุลนักศึกษา</span></th>
</tr>
<?php
$i = 0;
foreach ($rs_std->result() as $row_std) {
echo "<tr onmouseover=\"bgColor='".$tr_color_even."'\" onmouseout=\"bgColor='".$this->config->item("rg_mouseout")."'\">";
?>
<td align="center" height="22">
<?php
$default = is_null($row_std->advStdId) ? FALSE : TRUE;
echo form_checkbox('order'.$i, $row_std->stdId, $default);
?>
</td>
<td align="center"><span><?php echo $row_std->stdCode;?></span>
<input type="hidden" id="stdId<?php echo $i;?>" name="stdId<?php echo $i;?>" value="<?php echo $row_std->stdId;?>" /></td>
<td class="indent"><span><?php echo $row_std->prefixName.$row_std->stdName.' '.$row_std->stdSurname;?></span></td>
</tr>
<?php
$i++;
}
if ($i == 0) {
?>
<tr>
<td colspan="3" align="center"><span style="color:<?php echo $font_color_err;?>">** ไม่ปรากฏรายชื่อนักศึกษาในที่ปรึกษาในฐานข้อมูล **</span></td>
</tr>
<?php
}
?>
</table></td>
</tr>
<tr align="center">
<td><input type="submit" id="btnSubmit" name="btnSubmit" value="บันทึก" <?php echo ($i) ? '' : 'disabled';?> />
<input type="hidden" id="cnt" name="cnt" value="<?php echo $i;?>" /></td>
</tr>
</table><?php echo form_close();?></div>
<br></td>
</tr>
</table>
|