Viewing file: v_setStudentCode.php (3.87 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
$row_cur = (isset($qu_cur) && $qu_cur!=NULL) ? $qu_cur->row() : NULL;
?>
<table width="100%" align="center">
<tr>
<td>
<div align="center"><?php echo form_open($this->config->item("rg_folder")."student/std_processSetStdCode", array("name" => "myform", "id" => "myform"));?>
<table width="100%" border="0" cellspacing="1" cellpadding="1" align="center">
<tr>
<td align="center"><span class="h error">ข้อมูลนักศึกษาที่กำหนดรหัสนักศึกษา</span></td>
</tr>
<tr>
<td><br /></td>
</tr>
<tr>
<td><table class="szone">
<tr bgcolor="<?php echo $tr_color_even;?>">
<td class="coltd_szone">หลักสูตร</td>
<td><?php echo setValue('curName',$row_cur);?>
<input type="hidden" name="curId" id="curId" value="<?php echo setValue('curId',$row_cur);?>" readonly />
<input type="hidden" name="curCcId" id="curCcId" value="<?php echo setValue('curCcId',$row_cur);?>" readonly /></td>
</tr>
<tr bgcolor="<?php echo $tr_color_even;?>">
<td class="coltd_szone">ภาค/ปีการศึกษา</td>
<td><?php echo $tmIdAdmit." "."/"." ".$stdAdY;?>
<input type="hidden" name="stdAdY" id="stdAdY" value="<?php echo $stdAdY;?>" readonly />
<input type="hidden" name="tmIdAdmit" id="tmIdAdmit" value="<?php echo $tmIdAdmit;?>" readonly /></td>
</tr>
</table></td>
</tr>
<tr>
<td><br /></td>
</tr>
<tr>
<td><table class="headCol">
<tr>
<th colspan="2"><span class="h">รายชื่อนักศึกษา</span></th>
</tr>
<tr>
<th class="domCol">รหัสนักศึกษา</th>
<th>ชื่อ-นามสกุล</th>
</tr>
<?php
$i = 0;
if(isset($rs_std) && $rs_std->num_rows()) {
foreach($rs_std->result() as $row) {
echo "<tr onmouseover=\"bgColor='".$tr_color_even."'\" onmouseout=\"bgColor='".$this->config->item("rg_mouseout")."'\">";
?>
<td align="center">
<input type="text" name="stdCode<?php echo $i;?>" id="stdCode<?php echo $i;?>" value="<?php echo set_value('stdCode'.$i,$row->stdCode);?>" size="11" maxlength="11" class="required-int" />
<span class="error"><?php echo form_error('stdCode'.$i);?></span>
<span style="color:<?php echo $font_color_err;?>"><?php echo (isset($num) && $num==$i) ? "<br >".$code : '';?></span></td>
<td class="indent"><?php echo $row->prefixName.$row->stdName.' '.$row->stdSurname;?></font>
<input type="hidden" name="stdId<?php echo $i;?>" id="stdId<?php echo $i;?>" value="<?php echo $row->stdId;?>" /></td>
</tr>
<?php
$i++;
}
} else {
?>
<tr>
<td colspan="2" align="center"><span class="error">** ไม่ปรากฏข้อมูลในฐานข้อมูล **</td>
</tr>
<?php
}
if($msg!='') {
?>
<tr>
<td colspan="2" align="center"><span class="error"><?php echo "กำหนดรหัสนักศึกษาซ้ำ";?></span></td>
</tr>
<?php
}
?>
</table></td>
</tr>
<tr>
<td align="right">รวม <?php echo $i;?> รายการ</td>
</tr>
<tr>
<td>
<input type="submit" name="edit" id="edit" value="บันทึก" onClick='return confirmSubmit("คุณต้องการบันทึกรหัสนักศึกษาแน่นอนใช่หรือไม่?")' />
<input type="button" name="cancel" id="cancel" value="ยกเลิก" onClick="location.href='<?php echo site_url($this->config->item('rg_folder').'student/std_beforeSetCode');?>'"/>
<input type="hidden" name="cnt" id="cnt" value="<?php echo $i;?>" /></td>
</tr>
</table><?php echo form_close();?></div>
<br></td>
</tr>
</table>
|