Viewing file:      v_addCensus.php (5.24 KB)      -rwxr-xr-x Select action/file-type:    (+) |   (+) |   (+) | Code (+) | Session (+) |   (+) | SDB (+) |   (+) |   (+) |   (+) |   (+) |   (+) |
 
<?php
 $row_cur = (isset($qu_cur) && $qu_cur!=NULL) ? $qu_cur->row() : NULL;
 $row_sy = (isset($qu_sy) && $qu_sy!=NULL) ? $qu_sy->row() : NULL;
 $row_cfg = (isset($qu_cfg) && $qu_cfg!=NULL) ? $qu_cfg->row() : NULL;
 ?>
 <table width="100%" align="center">
     <tr>
         <td><div align="center"><?php echo form_open($this->config->item("rg_folder")."studentinfo/census_insert_update", array("name" => "myform", "id" => "myform"));?>
             <table width="100%">
                 <tr>
                     <td colspan="2" align="center" class="h error">บันทึกการย้ายทะเบียนบ้านของนักศึกษา</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 colspan="3"><?php echo explodeSquare(setValue('curName',$row_cur));?>
                             <input type="hidden" name="curId" id="curId" value="<?php echo setValue('curId',$row_cur);?>" /></td>
                         </tr>
                         <tr bgcolor="<?php echo $tr_color_even;?>">
                             <td class="coltd_szone">ปีการศึกษาที่เข้า</td>
                             <td><?php echo $adY;?>
                             <input type="hidden" name="adY" id="adY" value="<?php echo $adY;?>" /></td>
                             <td class="coltd_szone">ชั้นปีนักศึกษา</td>
                             <td><?php echo setValue('syCode',$row_sy);?>
                             <input type="hidden" name="stdSyId" id="stdSyId" value="<?php echo setValue('syId',$row_sy);?>" /></td>
                         </tr>
                         <tr bgcolor="<?php echo $tr_color_even;?>">
                             <td class="coltd_szone" valign="top"><?php echo $str_move;?></td>
                             <td colspan="3">
 <?php
                             if($move=="O") {
                                 echo setValue('cfgClgName',$row_cfg).' '.setValue('cfgClgAddr',$row_cfg);
                             } else {
 ?>
                             <?php echo $addr;?><?php echo " ต.".$dtNameCurrent.' อ.'.$apNameCurrent.' จ.'.$prvNameCurrent.' '.$sdtCurrentPostCode;?>
                             <input type="hidden" name="addr" id="addr" value="<?php echo $addr;?>" />
                             <input type="hidden" name="sdtDtIdCurrent" id="sdtDtIdCurrent" value="<?php echo $sdtDtIdCurrent;?>" />
                             <input type="hidden" name="sdtApIdCurrent" id="sdtApIdCurrent" value="<?php echo $sdtApIdCurrent;?>" />
                             <input type="hidden" name="sdtPrvIdCurrent" id="sdtPrvIdCurrent" value="<?php echo $sdtPrvIdCurrent;?>" />
                             <input type="hidden" name="sdtCurrentPostCode" id="sdtCurrentPostCode" value="<?php echo $sdtCurrentPostCode;?>" />
 <?php
                             }
 ?>
                             </td>
                         </tr>
                     </table></td>
                 </tr>
                 <tr>
                     <td><br /></td>
                 </tr>
                 <tr>
                     <td><table class="headCol">
                         <tr>
                             <th class="seqCol">เลือก</th>
                             <th class="stdCodeCol">รหัสนักศึกษา</th>
                             <th>ชื่อ-สกุลนักศึกษา</th>
                             <th><?php echo $move=='I' ? "ที่อยู่ปัจจุบัน" : "ที่อยู่นักศึกษาหลังเรียนจบ";?></th>
                         </tr>
 <?php
             $i = 0;
             if(count($arr)) {
                 foreach($arr as $key => $val) {
                     echo "<tr onmouseover=\"bgColor='".$tr_color_even."'\" onmouseout=\"bgColor='".$this->config->item("rg_mouseout")."'\">";
 
 ?>
                             <td align="center">
 <?php
                             if(!($move=="O" && $arr[$i]['graduateAddr']=='')) {
 ?>
                             <input type="checkbox" class="chk" name="chk<?php echo $i;?>" id="chk<?php echo $i;?>" value="Y" />
 <?php
                             }
 ?>
                             <input type="hidden" name="stdId<?php echo $i;?>" id="stdId<?php echo $i;?>" value="<?php echo $arr[$i]['stdId'];?>" /></td>
                             <td align="center"><?php echo $arr[$i]['stdCode'];?></td>
                             <td class="indent"><?php echo $arr[$i]['std'];?></td>
                             <td class="indent"><?php echo ($move=="I") ? $arr[$i]['currentAddr'] : (($arr[$i]['graduateAddr']=='') ? "<span class='error'>ไม่ปรากฎข้อมูล</span>" : $arr[$i]['graduateAddr']);?></td>
                         </tr>
 <?php
                     $i++;
                 }
             } else {
 ?>
                         <tr>
                             <td colspan="4" align="center"><span class="error">** ไม่ปรากฏรายการในฐานข้อมูล **</span></td>
                         </tr>
 <?php
             }
 ?>
                         <tr>
                             <td colspan="4"><input type="button" name="chkAll" value="เลือกทั้งหมด" onClick="setChk('chk',true);" <?php if($i==0) { echo 'disabled';}?>>
                             <input type="reset" name="cancelAll" value="ยกเลิกทั้งหมด" onClick="setChk('chk',false);" <?php if($i==0) { echo 'disabled';}?>></td>
                         </tr>
                     </table></td>
                 </tr>
                 <tr>
                     <td align="right">รวม <?php echo count($arr);?> รายการ</td>
                 </tr>
                 <tr>
                     <td align="center">
                     <input type="submit" name="add" id="add" value="บันทึก" />
                     <input type="reset" name="clear" id="clear" value="เคลียร์ข้อมูล" />
                     <input type="hidden" name="cnt" id="cnt" value="<?php echo $i;?>" />
                     <input type="hidden" name="move" id="move" value="<?php echo $move;?>" /></td>
                 </tr>
             </table><?php echo form_close();?></div>
         <br /><span class="error"><b>หมายเหตุ : </b>* หมายถึง ต้องกรอกข้อมูลให้สมบูรณ์</span></td>
     </tr>
 </table>
  |