Viewing file:      v_showStudent.php (5.21 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_tm = (isset($qu_tm) && $qu_tm!=NULL) ? $qu_tm->row() : NULL;
 $row_gen = (isset($qu_gen) && $qu_gen!=NULL) ? $qu_gen->row() : NULL;
 ?>
 <table width="100%" align="center">
     <tr>
         <td>
             <div align="center"><table width="100%">
                 <tr>
                     <td align="center"><span class="h error">รายชื่อนักศึกษาใหม่ตามหลักสูตร</span></td>
                 </tr>
                 <tr>
                     <td><br /></td>
                 </tr>
                 <tr>
                     <td><?php echo form_open($this->config->item("rg_folder")."student/std_search");?>
                     <table class="szone">
                         <tr bgcolor="<?php echo $tr_color_even;?>">
                             <td class="coltd_szone">หลักสูตร</td>
                             <td>
 <?php
                             echo form_dropdown('curId', $rs_cur, setValue('curId', $rs_cur));
 ?>
                             <span class="error">*<?php echo form_error('curId');?></span></td>
                         </tr>
                         <tr bgcolor="<?php echo $tr_color_even;?>">
                             <td class="coltd_szone">ภาค/ปีการศึกษาที่เข้า
                             <td>
 <?php
                             echo form_dropdown('tmId', $rs_tm, set_value('tmId',$tmId));
 ?>
                             /
 <?php
                             echo form_dropdown('adY', $rs_tmc, set_value('adY',$acY));
 ?>
                             </td>
                         </tr>
                         <tr bgcolor="<?php echo $tr_color_even;?>">
                             <td colspan="2" align="center">
                             <input type="submit" name="search" id="search" value="ค้นหา" /></td>
                         </tr>
                     </table><?php echo form_close();?></td>
                 </tr>
                 <tr>
                     <td><b>หลักสูตร</b><?php echo ($row_cur!=NULL) ? ' : '.setValue('curName',$row_cur).' ปีการศึกษา '.setValue('tmCode',$row_tm).'/'.$adY : ' : -';?></td>
                 </tr>
 <?php
                 echo form_open($this->config->item("rg_folder")."student/std_add", array('name' => 'm_form1', 'id' => 'm_form1'));
 ?>
                 <tr>
                     <td><table class="headCol">
                             <tr>
                                 <th class="seqCol">ลำดับที่</th>
                                 <th class="stdCodeCol">รหัสนักศึกษา</th>
                                 <th>ชื่อ-สกุล</th>
                                 <th>เจ้าของทุน</th>
                                 <th class="editCol">แก้ไข</th>
                                 <th class="deleteCol">ลบ</th>
                             </tr>
 <?php
                     $i = 0;
                     if(isset($rs_std) && $rs_std->num_rows()) {
                         foreach($rs_std->result() as $row) {
                             echo "<tr onmouseover=\"bgColor='".$tr_color_even."'\" onmouseout=\"bgColor='".$this->config->item("rg_mouseout")."'\">";
 ?>
                                  <td align="center"><?php echo $i+1;?></td>
                                 <td align="center"><?php echo ($row->stdGenStatus=='Y') ? $row->stdCode : "";?></td>
                                 <td class="indent"><?php echo $row->prefixName.$row->stdName." ".$row->stdSurname;?></td>
                                 <td class="indent"><?php echo $row->soName;
                                 if($row->stdSoId!=1) 
                                     echo ' จ.'.$row->provinceName;?></td>
                                 <td align="center">
                                 <img src="<?php echo base_url().$this->config->item('rg_edit');?>" align="absmiddle" border="0" class="hand" onClick="sendPost('hidform', {'stdId':<?php echo $row->stdId;?>, 'adY':<?php echo $row->stdAdY;?>, 'tmId':<?php echo $row->stdTmIdAdmit;?>, 'curId':<?php echo $row->stdCurId;?>, 'genId':<?php echo $row->stdGenId;?>},'<?php echo site_url($this->config->item('rg_folder').'student/std_add');?>')" />
                                 </td>
                                 <td align="center">
 <?php
                                 if($row->stdGenStatus=='Y') {
                                     echo '-';
                                 } else {
 ?>
                                 <span onClick="confirmDel2({stdId:<?php echo $row->stdId;?>}, 'm_form1','<?php echo site_url($this->config->item('rg_folder').'student/std_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 height="22" colspan="6" align="center"><span class="error">** ไม่ปรากฏข้อมูลในฐานข้อมูล **</span></td>
                             </tr>
 <?php
                     }
                     if(isset($flgmsg)) {
 ?>
                             <tr>
                                 <td height="22" colspan="6" align="center"><span class="error"><?php echo $flgmsg;?></span></td>
                             </tr>
 <?php
                     }
 ?>
                         </table>
                     </td>
                 </tr>
                 <tr>
                     <td align="right">รวม <?php echo $i;?> รายการ</td>
                 </tr>
                 <tr>
                     <td align="left">
                     <input type="submit" name="add" id="add" value="เพิ่มรายการ" <?php echo (isset($flgmsg) || $row_cur==NULL) ? 'disabled' : '';?> />
                     <input type="submit" name="addSpe" id="addSpe" value="เพิ่มแบบกำหนดรหัสนักศึกษาเอง" <?php echo (isset($flgmsg) || $i==0 || $genStatus=='N') ? 'disabled' : '';?> />
                     <input type="hidden" name="curId" id="curId" value="<?php echo setValue('curId',$row_cur);?>" />
                     <input type="hidden" name="tmId" id="tmId" value="<?php echo setValue('tmId',$row_tm);?>" />
                     <input type="hidden" name="adY" id="adY" value="<?php echo isset($adY) ? $adY : '';?>" />
                     <input type="hidden" name="genId" id="genId" value="<?php echo setValue('genId',$row_gen);?>" /></td>
                 </tr><?php echo form_close();?>
             </table></div>
         </td>
     </tr>
 </table>
  |