Viewing file:      v_oldprefixTable.php (2.92 KB)      -rwxr-xr-x Select action/file-type:    (+) |   (+) |   (+) | Code (+) | Session (+) |   (+) | SDB (+) |   (+) |   (+) |   (+) |   (+) |   (+) |
 
<script language="JavaScript">
 function ReturnValue(id,nameT,nameE)
 {
     window.opener.document.myform.elements["oldPfId"].value = id;
     window.opener.document.myform.elements["oldPfName"].value = nameT;
     window.close();
 }
 </script>
 <table width="100%">
     <tr> 
         <td colspan="3" align="center"><?php echo form_open($this->config->item("ea_folder")."popup/oldpf_popup_search");?>
         <font size="2"><b>คำนำหน้าชื่อภาษาไทย</b></font>
         <input type="text" name="prefixNameFull" id="prefixNameFull" size="30" />
         <input type="submit" name="search" value="ค้นหา" />
         <br /><?php echo form_error('prefixNameFull');?>
         <?php echo form_close();?></td>
     </tr>
     <tr>
         <td height="22" colspan="3"></td>
     </tr>
  <?php
 if(isset($rs_pf) && $rs_pf->num_rows() > $this->config->item("ea_max_row")) {
 ?>
     <tr>
         <td height="30" colspan="3"><div class="boxBlock leftBox"><font size="2"><b>
         แสดง <?php echo $this->config->item("ea_max_row");?> รายการจาก <?php echo isset($rs_pf) ?    $rs_pf->num_rows() : '';?> รายการ</b></font>
         </div></td>
     </tr>
 <?php
         }
 ?>
     <tr bgcolor="<?php echo $this->config->item("rg_table_color");?>"> 
         <td width="12%" align="center"><font size="2" color="<?php echo $font_color_table;?>"><b>ลำดับที่</b></font></td>
         <td width="44%" align="center"><font size="2" color="<?php echo $font_color_table;?>"><b>คำนำหน้าชื่อไทย</b></font></td>
         <td width="44%" align="center"><font size="2" color="<?php echo $font_color_table;?>"><b>คำนำหน้าชื่ออังกฤษ</b></font></td>
     </tr>
 
 <?php
 $i = 0;
 if($rs_pf->num_rows()) {
     foreach($rs_pf->result() as $row) {
         if($i >= $this->config->item("ea_max_row"))
             break;
         echo "<tr onmouseover=\"bgColor='".$tr_color_even."'\" onmouseout=\"bgColor='".$this->config->item("rg_mouseout")."'\">";
 ?>
         <td align="center" onClick="ReturnValue(<?php echo $row->prefixId;?>,'<?php echo $row->prefixName;?>')" onMouseOver="this.style.cursor='pointer'"><font size="2"><?php echo $i+1;?></font></td>
         <td onClick="ReturnValue(<?php echo $row->prefixId;?>,'<?php echo $row->prefixName;?>')" onMouseOver="this.style.cursor='pointer'"><font size="2"><?php echo $row->prefixNameFull;?></font></td>
         <td onClick="ReturnValue(<?php echo $row->prefixId;?>,'<?php echo $row->prefixName;?>')" onMouseOver="this.style.cursor='pointer'"><font size="2"><?php echo $row->prefixNameEngFull;?></font></td>
     </tr>
 <?php
             $i++;
         }
     }
     else {
 ?>
     <tr>
         <td colspan="3" align="center"><font size="2" color="<?php echo $font_color_err;?>">** ไม่ปรากฏรายการดังกล่าวในฐานข้อมูล **</font></td>
     </tr>
 <?php
     }
 ?>
     <tr bgcolor="silver">
         <td colspan="3" align="right"><font size="2">รวม <?php echo $rs_pf->num_rows();?> รายการ</font></td>
     </tr>
 </table>
  |