Viewing file:      v_searchCheckOVLCourse.php (3.32 KB)      -rwxr-xr-x Select action/file-type:    (+) |   (+) |   (+) | Code (+) | Session (+) |   (+) | SDB (+) |   (+) |   (+) |   (+) |   (+) |   (+) |
 
<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")."preregis/checkOVLCourse");
 ?>
                         <table class="szone">                        
                         <tr bgcolor="<?php echo $tr_color_even;?>">
                             <td class="coltd_szone">ปีการศึกษา</td>
                             <td>
                             <input type="text" name="acY" id="acY" value="<?php echo set_value('acY', $acY);?>" size="5" maxlength="4" class="required-int" >
                             <span class="error">* <?php echo form_error('acY');?></span></td>
                         </tr>
                         <tr bgcolor="<?php echo $tr_color_even;?>">
                             <td class="coltd_szone">ภาคการศึกษา</td>
                             <td>
 <?php
                             echo form_dropdown('tmId', $rs_tm, set_value('tmId',$tmId));
 ?>
                             <span class="error">* <?php echo form_error('tmId');?></span></td>
                         </tr>    
                         <tr bgcolor="<?php echo $tr_color_even;?>">
                             <td colspan="2" align="center">
                             <input type="submit" name="btnSearth" id='btnSearth' value="ค้นหา">            
                             </td>
                         </tr>
                     </table><?php echo form_close();?></td>
                 </tr>
                 <tr><td height="22" colspan="4"></td></tr>
 <? //--------------------------------------------------------
                 if(isset($rs_tt) && $rs_tt->num_rows()>0){                    
 ?>
                 <tr>
                     <td colspan="2"><table class="headCol">
                         <tr>
                             <th class="amtCol">วัน</th>
                             <th class='hourCol'>เวลา</th>
                             <th>ห้อง</th>
                             <th>รายวิชาที่เวลาเรียนซ้ำซ้อน</th>
                         </tr>
                 <?    $i=0;
                     foreach($rs_tt->result() as $row) {                                
                         $rs = $tt->rsTTDuplicateTime($acY, $tmId, $row->ttDyId, $row->ttRmId, $row->ttPrdFrTime, $row->ttPrdToTime);
                         //echo $this->db->last_query()."<br>";
                         $strCo = '';
                         if($rs->num_rows()>1){                            
                             foreach($rs->result() as $r) {                                
                                 $strCo .= $r->crsCode.' '.$r->crsName.' กลุ่ม '.$r->coSection.'<br>';
                             }
                             $dayName = $r->dyName;
                             $timeValue = substr($r->prdFrTime, 0, 5).' - '.substr($r->prdToTime, 0, 5);
                             $rmNo = $r->plRmNo;
                         }
                         if($strCo!=''){ $i++;
                             echo "<tr valign='top' onmouseover=\"bgColor='".$tr_color_even."'\" onmouseout=\"bgColor='".$this->config->item("rg_mouseout")."'\">";
                 ?>                        
                             <td align='center'><?=$dayName?></th>
                             <td align='center'><?=$timeValue?></th>
                             <td align='center'><?=$rmNo?></th>
                             <td class='indent'><?=explodeSquare($strCo);?></th>
                         </tr>
                 <?        }
                     } 
                     if($i==0){
                 ?>
                         <tr>
                             <td colspan="2" align="center"><span class='error'>** ไม่ปรากฏรายวิชาที่สอนในฐานข้อมูล **</span></td>
                         </tr>
                 <?    } ?>
                     </table></td>
                 </tr>                
 <?                } 
 //--------------------------------------------------------
 ?>
             </table></div>
         <br><span class="error"><b>หมายเหตุ : </b>* หมายถึง ต้องกรอกข้อมูลให้สมบูรณ์</span></td>
     </tr>
 </table>
  |