Viewing file:      v_addCondition.php (8.37 KB)      -rwxr-xr-x Select action/file-type:    (+) |   (+) |   (+) | Code (+) | Session (+) |   (+) | SDB (+) |   (+) |   (+) |   (+) |   (+) |   (+) |
 
<script language="JavaScript1.2"> //function changeGtp(seed) { //    var gtpId = document.getElementById('gtpId').value; //    var url = "<?=site_url().$this->config->item('rg_folder')?>"+"bdpbri/cd_inputRow/"+gtpId+"/"+seed; // //    xmlhttp = newXmlHttp(); //    xmlhttp.open("GET", url, false); //    xmlhttp.send(null);  //    if(xmlhttp.readyState==4 && xmlhttp.status==200){ //        var ret_text = xmlhttp.responseText; //        alert(ret_text); //        document.getElementById('showGtp').innerHTML= ret_text; //    } //} </script> <?php $row_cd = (isset($qu_cd) && $qu_cd!=NULL) ? $qu_cd->row() : NULL; ?> <table width="100%" align="center">     <tr>         <td>             <table width="100%">                 <tr>                     <td align="center"><font class="h error">ข้อมูลหมวดวิชากลุ่มวิชาหน่วยบูรณาการ</font></td>                 </tr>                 <tr>                     <td align="right"> <?php                     echo anchor_popup($this->config->item("rg_folder")."bdpbri/cd_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($this->config->item("rg_folder")."bdpbri/cd_insert_update");?>                     <table class="szone">                         <tr bgcolor="<?php echo $tr_color_even;?>">                             <td class="coltd_szone"><font size="2">รหัส</font></td>                             <td><input type="text" name="cdCode" id="cdCode" value="<?php echo $cdCode ? $cdCode : set_value('cdCode',setValue("cdCode",$row_cd));?>" size="4" maxlength="3" />                             <font size="2" color="<?php echo $font_color_err;?>">*</font>                             <br /><?php echo form_error("cdCode");?></td>                         </tr>                         <tr bgcolor="<?php echo $tr_color_even;?>">                             <td class="coltd_szone"><font size="2">ชื่อ (ไทย)</font></td>                             <td><input type="text" name="cdName" id="cdName" value="<?php echo $cdName ? $cdName : set_value('cdName',setValue("cdName",$row_cd));?>" size="40" />                             <font size="2" color="<?php echo $font_color_err;?>">*</font>                             <br /><?php echo form_error("cdName");?></td>                         </tr>                         <tr bgcolor="<?php echo $tr_color_even;?>">                             <td class="coltd_szone"><font size="2">ชื่อ (อังกฤษ)</font></td>                             <td><input type="text" name="cdNameE" id="cdNameE" value="<?php echo $cdNameE ? $cdNameE : set_value('cdNameE',setValue("cdNameE",$row_cd));?>" size="40" />                             <font size="2" color="<?php echo $font_color_err;?>">*</font>                             <br /><?php echo form_error("cdNameE");?></td>                         </tr>                         <tr bgcolor="<?php echo $tr_color_even;?>">                             <td class="coltd_szone"><font size="2">ชื่อย่อ (ไทย)</font></td>                             <td><input type="text" name="cdAbbr" id="cdAbbr" value="<?php echo $cdAbbr ? $cdAbbr : set_value('cdAbbr',setValue("cdAbbr",$row_cd));?>" size="10" /></td>                         </tr>                         <tr bgcolor="<?php echo $tr_color_even;?>">                             <td class="coltd_szone"><font size="2">ชื่อย่อ (อังกฤษ)</font></td>                             <td><input type="text" name="cdAbbrE" id="cdAbbrE" value="<?php echo $cdAbbrE ? $cdAbbrE : set_value('cdAbbrE',setValue("cdAbbrE",$row_cd));?>" size="10" /></td>                         </tr>                         <tr bgcolor="<?php echo $tr_color_even;?>">                             <td class="coltd_szone"><font size="2">ประเภทเงื่อนไข</font></td>                             <td><font size="2">                             <input type="radio" name="cdType" id="cdType1" value="H" <?php echo (setValue('cdType',$row_cd)!="C" || $cdType1=='true') ? "checked" : "";?> /> หมวด                             <input type="radio" name="cdType" id="cdType2" value="C" <?php echo (setValue('cdType',$row_cd)=='C' || $cdType2=='true') ? "checked" : "";?> /> กลุ่ม/หน่วย                             </font></td>                         </tr>                         <tr bgcolor="<?php echo $tr_color_even;?>">                             <td class="coltd_szone"><font size="2">รูปแบบเกรด</font></td>                             <td><font size="2"> <?php                             if(setValue('cdId',$row_cd)) {                                 $js1 = "id=\"cdGtpId\" onChange=\"sendPost('hidform',{'cdGtpId':this.value,'cdId':".setValue('cdId',$row_cd)."},'".site_url($this->config->item('rg_folder').'bdpbri/cd_input')."')\"";                             } else {                                 $js1 = "id=\"cdGtpId\" onChange=\"sendPost('hidform',{'cdGtpId':this.value,'cdCode':cdCode.value,'cdName':cdName.value,'cdNameE':cdNameE.value,'cdAbbr':cdAbbr.value,'cdAbbrE':cdAbbrE.value,'cdType1':cdType1.checked,'cdType2':cdType2.checked},'".site_url($this->config->item('rg_folder').'bdpbri/cd_input')."')\"";                             }                             echo form_dropdown('cdGtpId',$rs_gtp,($cdGtpId!="" ? $cdGtpId : setValue('cdGtpId',$row_cd)),$js1); ?>                             <span class="error"> *</span><?php echo form_error('cdGtpId');?></td>                         </tr>                         <tr bgcolor="<?php echo $tr_color_even;?>">                             <td class="coltd_szone"><font size="2">เกรดขั้นต่ำ</font></td>                             <td> <?php                             echo form_dropdown('cdMinGrade',$rs_grd,setValue('cdMinGrade',$row_cd)); ?>                             </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="เคลียร์ข้อมูล" />                             <input type="hidden" name="cdId" id="cdId" value="<?php echo setValue("cdId",$row_cd);?>" /></td>                         </tr>                     </table><?php echo form_close();?></td>                 </tr>                 <?php echo form_open($this->config->item("rg_folder")."bdpbri/cd_search");?>                 <tr>                     <td align="right">                     <font size="2"><b>ชื่อหมวดวิชากลุ่มวิชา หน่วยบูรณาการ</b></font>                     <input type="text" name="cdNameSearch" value="<?php echo set_value("cdNameSearch",'');?>" />                     <input type="submit" name="search" value="ค้นหา" />                     <br /><?php echo form_error("cdNameSearch");?></td>                 </tr><?php echo form_close();?>                 <tr>                     <td><table class="headCol">                         <tr>                             <th class="seqCol"><font size="2" color="<?php echo $font_color_table;?>">รหัส</font></th>                             <th><font size="2" color="<?php echo $font_color_table;?>">ชื่อหมวดวิชา กลุ่มวิชา หน่วยบูรณาการ</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(isset($rs_cd) && $rs_cd->num_rows()) {                     foreach($rs_cd->result() as $row) {                         echo "<tr onmouseover=\"bgColor='".$tr_color_even."'\" onmouseout=\"bgColor='".$this->config->item("rg_mouseout")."'\">"; ?>                             <td align="center"><font size="2"><?php echo $i+1;?></font></td>                             <td class="indent"><font size="2"><span class="hand" onClick="sendPost(                             'f_detail',                             {'cdId':<?php echo $row->cdId;?>},                             '<?php echo site_url($this->config->item("rg_folder").'bdpbri/cd_detail');?>',                             {'width':450,'height':400})" /><?php echo $row->cdName;?></span></font></td>                             <td align="center"> <?php                             if($row->cdId==1)                                 echo "-";                             else { ?>                             <img class="hand" src="<?php echo base_url().$this->config->item("rg_edit");?>" align="absmiddle" border="0"                              onClick="sendPost('hidform',                             {'cdId':<?php echo $row->cdId;?>},                              '<?php echo site_url($this->config->item('rg_folder').'bdpbri/cd_input');?>')" /> <?php                             } ?>                             </td>                             <td align="center"> <?php                             if($row->cdId==1)                                 echo "-";                             else { ?>                             <span onClick="confirmDel2({cdId:<?php echo $row->cdId;?>}, 'm_form1','<?php echo site_url($this->config->item('rg_folder').'bdpbri/cd_delete');?>')" /><img src="<?php echo base_url().$this->config->item("rg_delete");?>" align="absmiddle" border="0" width="16" height="19" class="hand"/></span> <?php                             } ?>                             </td>                         </tr> <?php                         $i++;                     }                 } else { ?>                     <tr>                         <td colspan="4" height="22" align="center"><font size="2" color="<?php echo $font_color_err;?>">** ไม่ปรากฏรายการในฐานข้อมูล **</font></td>                     </tr> <?php                 } ?>                     </table></td>                 </tr>                 <tr>                     <td align="right"><font size="2">รวม <?php echo $i;?> รายการ</font></td>                 </tr>             </table>         <br /><font size="2" color="<?php echo $font_color_err;?>"><b>หมายเหตุ : </b>* หมายถึง ต้องกรอกข้อมูลให้สมบูรณ์</font></td>     </tr> </table>
  |