Viewing file:      v_addCollege.php (7.82 KB)      -rwxr-xr-x Select action/file-type:    (+) |   (+) |   (+) | Code (+) | Session (+) |   (+) | SDB (+) |   (+) |   (+) |   (+) |   (+) |   (+) |
 
<?php $row_clg = (isset($qu_clg) && $qu_clg!=NULL) ? $qu_clg->row() : NULL; ?> <table width="100%" align="center">     <tr>         <td>             <div align="center"><table width="100%">                 <tr>                     <td colspan="2" align="center" class="h error">ข้อมูลวิทยาลัย</td>                 </tr>                 <tr>                     <td align="right"> <?php                     echo anchor_popup($this->config->item("rg_folder")."bdpbri/clg_print", "<img src=\"".base_url().$this->config->item("rg_print")."\" width=\"15\" height=\"14\" align=\"absmiddle\" border=\"0\" />"); ?>                     </td>                 </tr>                 <tr>                     <td><?php echo form_open_multipart($this->config->item("rg_folder")."bdpbri/clg_insert_update");?>                     <table class="szone">                         <tr bgcolor="<?php echo $tr_color_even;?>">                             <td class="coltd_szone2"><font size="2">รหัสของวิทยาลัย</font></td>                             <td> <?php                             if($row_clg==NULL) { ?>                             <input type="text" name="clgCode" id="clgCode" value="<?php echo set_value('clgCode',setValue('clgCode',$row_clg));?>" size="3" maxlength="4" class="required" />                             <span class="error">* <?php echo form_error("clgCode");?></span> <?php                             } else {                             echo $row_clg->clgCode;                             } ?>                             </td>                         </tr>                         <!-- <tr bgcolor="<?php echo $tr_color_even;?>">                             <td class="coltd_szone2"><font size="2">สัญลักษณ์ของวิทยาลัย</font></td>                             <td>                             <input type="file" name="uploadclgLogo" id="uploadclgLogo" />                             <font size="2" color="<?php echo $font_color_err;?>"> (ขนาดรูปภาพควรมีขนาด 111x95 pixels)</font><br /><?php echo form_error("chkUpload");?></td>                         </tr> -->                         <tr bgcolor="<?php echo $tr_color_even;?>">                             <td class="coltd_szone2"><font size="2">ชื่อวิทยาลัย (ไทย)</font></td>                             <td><input type="text" name="clgName" id="clgName" value="<?php echo set_value('clgName',setValue('clgName',$row_clg));?>" size="50" class="required-thai" />                             <span class="error">* <?php echo form_error("clgName");?></span></td>                         </tr>                         <tr bgcolor="<?php echo $tr_color_even;?>">                             <td class="coltd_szone2"><font size="2">ชื่อวิทยาลัย (อังกฤษ)</font></td>                             <td><input type="text" name="clgNameE" id="clgNameE" value="<?php echo set_value('clgNameE',setValue('clgNameE',$row_clg));?>" size="50" class="required-eng" />                             <span class="error">* <?php echo form_error("clgNameE");?></span></td>                         </tr>                         <tr bgcolor="<?php echo $tr_color_even;?>">                             <td class="coltd_szone2"><font size="2">ชื่อย่อวิทยาลัย (ไทย)</font></td>                             <td><input type="text" name="clgAbbr" id="clgAbbr" value="<?php echo set_value('clgAbbr',setValue('clgAbbr',$row_clg));?>" size="50" class="required-thai" />                             <span class="error">* <?php echo form_error("clgAbbr");?></span></td>                         </tr>                         <tr bgcolor="<?php echo $tr_color_even;?>">                             <td class="coltd_szone2"><font size="2">ชื่อย่อวิทยาลัย (อังกฤษ)</font></td>                             <td><input type="text" name="clgAbbrE" id="clgAbbrE" value="<?php echo set_value('clgAbbrE',setValue('clgAbbrE',$row_clg));?>" size="50" class="required-eng" />                             <span class="error">* <?php echo form_error("clgAbbrE");?></span></td>                         </tr>                         <tr bgcolor="<?php echo $tr_color_even;?>">                             <td class="coltd_szone2"><font size="2">ที่อยู่วิทยาลัย</font></td>                             <td><input type="text" name="clgAddr" id="clgAddr" value="<?php echo set_value('clgAddr',setValue('clgAddr',$row_clg));?>" size="50" class="required" />                             <span class="error">* <?php echo form_error("clgAddr");?></span></td>                         </tr>                         <tr bgcolor="<?php echo $tr_color_even;?>">                             <td class="coltd_szone2"><font size="2">หมายเลขโทรศัพท์วิทยาลัย</font></td>                             <td><input type="text" name="clgPhoneNo" id="clgPhoneNo" value="<?php echo set_value('clgPhoneNo',setValue('clgPhoneNo',$row_clg));?>" size="50" class="required" />                             <span class="error">* <?php echo form_error("clgPhoneNo");?></span></td>                         </tr>                         <tr bgcolor="<?php echo $tr_color_even;?>">                             <td colspan="2" align="center">                             <input type="submit" name="add" id="add" value="บันทึก" />                             <input type="reset" name="clear" value="เคลียร์ข้อมูล" /> <?php                             if($row_clg!=NULL) { ?>                             <input type="hidden" name="clgCode" id="clgCode" value="<?php echo setValue('clgCode',$row_clg);?>" />                             <input type="hidden" name="edit" id="edit" value="edit" /> <?php                             } ?>                             </td>                         </tr>                     </table><?php echo form_close();?></td>                 </tr>                 <?php echo form_open($this->config->item("rg_folder")."bdpbri/clg_search");?><tr>                     <td align="right">                     <font size="2"><b>ชื่อวิทยาลัย (ไทย)</b>                     <input type="text" name="clgNameSearch" id="clgNameSearch" value="<?php echo set_value('clgNameSearch');?>" size="20" />                     <b> เรียงโดย</b></font> <?php                     echo form_dropdown('orderByKey', $opt, setValue('orderByKey', $opt)); ?>                     <input type="submit" name="search" value="ค้นหา" />                     </td>                 </tr><?php echo form_close();?>                 <tr>                     <td><table class="headCol">                         <tr>                             <th class="stdCodeCol"><font size="2" color="<?php echo $font_color_table;?>"><b>รหัสวิทยาลัย</b></font></th>                             <th><font size="2" color="<?php echo $font_color_table;?>"><b>ชื่อวิทยาลัย</b></font></th>                             <th class="editCol"><font size="2" color="<?php echo $font_color_table;?>">แก้ไข</font></th>                             <th class="deleteCol"><font size="2" color="<?php echo $font_color_table;?>">ลบ</font></th>                         </tr> <?php             $i = 0;             if($rs_clg && $rs_clg->num_rows()) {                 foreach($rs_clg->result() as $row) {                     echo "<tr onmouseover=\"bgColor='".$tr_color_even."'\" onmouseout=\"bgColor='".$this->config->item("rg_mouseout")."'\">"; ?>                             <td class="indent" align="center"><font size="2"><?php echo $row->clgCode;?></font></td>                             <td class="indent"><span class="hand" onClick="sendPost('f_detail',                             {'clgCode':'<?php echo $row->clgCode;?>'},                              '<?php echo site_url($this->config->item('rg_folder').'bdpbri/clg_detail');?>',{'width':400,'height':400})" /><?php echo $row->clgName;?></span></td>                             <td align="center">                             <span class ="hand" onClick="sendPost(                             'myform',{'clgCode':<?php echo $row->clgCode;?>,'edit':'<?php echo "edit";?>'},'clg_input')"><img src="<?php echo base_url().$this->config->item("rg_edit");?>" align="absmiddle" border="0" /></span>                             </td>                             <td align="center">                             <span onClick="confirmDel2({clgCode:<?php echo $row->clgCode;?>}, 'm_form1','<?php echo site_url($this->config->item('rg_folder').'bdpbri/clg_delete');?>')" /><img src="<?php echo base_url()."images/".$this->config->item("rg_folder")."picture/delete.gif";?>" align="absmiddle" border="0" width="16" height="19" class="hand"/></span></td>                         </tr> <?php                     $i++;                 }             } else { ?>                         <tr>                             <td colspan="4" height="22" align="center"><span class="error">** ไม่ปรากฏรายการในฐานข้อมูล **</span></td>                         </tr> <?php             } ?>                     </table><?php echo form_close();?></td>                 </tr>                 <tr>                     <td align="right"><font size="2">รวม <?php echo $i;?> รายการ</font></td>                 </tr>             </table></div>         </td>     </tr>     <tr>         <td><table width="100%">             <tr>                 <td width="8%"><span class="error"><strong>หมายเหตุ : </strong></span></td>                 <td><span class="error">ใช้เมาส์คลิกที่ชื่อวิทยาลัยเพื่อดูรายละเอียดของวิทยาลัย</span></td>             </tr>         </table></td>     </tr> </table>
  |