Viewing file:      v_addMajorEdu.php (4.49 KB)      -rwxr-xr-x Select action/file-type:    (+) |   (+) |   (+) | Code (+) | Session (+) |   (+) | SDB (+) |   (+) |   (+) |   (+) |   (+) |   (+) |
 
<?php
 $row_maj = (isset($qu_maj) && $qu_maj!=NULL) ? $qu_maj->row() : NULL;
 ?>
 <table width="100%">
     <tr>
         <td align="center"><span class="h error">ข้อมูลสาขาวิชาการศึกษา</span></td>
     </tr>
     <tr>
         <td><br /></td>
     </tr>
 <?php
     if(isset($flgSave)) {
 ?>
     <tr>
         <td align="center"><?php echo $flgSave;?></td>
     </tr>
 <?php
     }
 ?>
     <tr>
         <td><table class="szone"><?php echo form_open($this->config->item("ea_folder")."basedata/majoredu_insert_update", array("name" => "myform", "id" => "myform"));?>
             <tr bgcolor="<?php echo $this->config->item("tr_c_even");?>">
                 <td class="coltd_szone2">ชื่อสาขาวิชาการศึกษา</td>
                 <td><input type="text" name="majoreduName" id="majoreduName" value="<?php echo ($flg==0) ? set_value('majoreduName',setValue('majoreduName',$row_maj)) : "";?>" size="70" maxlength="100" />
                 <span class="error"> *<?php echo form_error('majoreduName');?></span></td>
             </tr>
             <tr bgcolor="<?php echo $this->config->item("tr_c_even");?>">
                 <td colspan="2" align="center">
                 <input type="submit" name="add" id="add" value="บันทึก" />
                 <input type="reset" name="clear" id="clear" value="เคลียร์ข้อมูล" />
                 <input type="hidden" name="majoreduId" id="majoreduId" value="<?php echo ($flg==0)  ? setValue('majoreduId',$row_maj) : "";?>" />
                 <input type="hidden" name="str" id="str" value="<?php echo (isset($str) && $str!="") ? $str : "";?>" /></td>
             </tr>
         </table><?php echo form_close();?></td>
     </tr>
     <tr>
         <td><br /></td>
     </tr>
     <tr>
         <td align="right">ส่งออก <img class="hand" title="ส่งออกเป็น excel" src="<?php echo base_url().$this->config->item('rg_excel_exp');?>" align="absmiddle" border="0" onClick="sendPost('hidform',{},
         '<?php echo site_url($this->config->item('ea_folder').'basedata/majoredu_ex');?>')" />
         </td>
     </tr>
     <tr>
         <td><table class="headCol">
             <tr bgcolor="<?php echo $this->config->item('table_c_even');?>">
                 <td class="indent" colspan="4"><b>ดูข้อมูลที่ขึ้นต้นด้วย</b> >>
 <?php
     if(isset($maj) && $maj->num_rows()) {
         foreach($maj->result() as $rowMaj) {
 ?>
             <span class="hand" onClick="sendPost(
             'showfrm', 
             {'str':'<?php echo $rowMaj->majoreduName;?>'},
              '<?php echo site_url($this->config->item('ea_folder').'basedata/majoredu_input');?>')"><?php echo "  ".$rowMaj->majoreduName;?></span>
 <?php
         }
     }
 ?>
                 </td>
             </tr>
             <tr bgcolor="<?php echo $this->config->item('table_c_even');?>">
                 <th class="seqCol">ลำดับที่</th>
                 <th>ชื่อสาขาวิชาการศึกษา</th>
                 <th class="editCol">แก้ไข</th>
                 <th class="deleteCol">ลบ</th>
             </tr>
 <?php
     $i = 0;
     if(isset($rs_maj) && $rs_maj->num_rows()) {
         foreach($rs_maj->result() as $row_maj) {
             echo "<tr onmouseover=\"bgColor='".$this->config->item('tr_c_even')."'\" onmouseout=\"bgColor='".$this->config->item("rg_mouseout")."'\">";
 ?>
                 <td align="center"><?php echo $i+1;?></td>
                 <td class="indent"><?php echo $row_maj->majoreduName;?></td>
                 <td align="center">
                 <img class="hand" src="<?php echo base_url().$this->config->item("rg_edit");?>" align="absmiddle" border="0" onClick="sendPost('hidform',{'majoreduId':<?php echo $row_maj->majoreduId;?>,'str':'<?php echo $str;?>'}, '<?php echo site_url($this->config->item('ea_folder').'basedata/majoredu_input');?>')" /></td>
                 <td align="center">
                 <img class="hand" src="<?php echo base_url().$this->config->item("rg_delete");?>" align="absmiddle" border="0" onClick="confirmDel2({majoreduId:<?php echo $row_maj->majoreduId;?>, str:'<?php echo $str;?>'}, 'm_form1','<?php echo site_url($this->config->item('ea_folder').'basedata/majoredu_delete');?>')" /></td>
             </tr>
 <?php
             $i++;
         }
     } else {
 ?>
             <tr>
                 <td colspan="4" align="center"><span class="error">** ไม่ปรากฏรายการในฐานข้อมูล **</span></td>
             </tr>
 <?php
     }
 ?>
         </table></td>
     </tr>
     <tr>
         <td align="right">รวม <?php echo $i;?> รายการ</td>
     </tr>
     <tr>
         <td><table class="mark">
             <tr>
                 <td class="coltd_mark"><span class="error"><b>หมายเหตุ :</b></span></td>
                 <td><span class="error">* หมายถึง ต้องกรอกข้อมูลให้สมบูรณ์</span></td>
             </tr>
         </table></td>
     </tr>
 </table>
  |