Viewing file:      v_tc_showSdt.php (5.61 KB)      -rwxr-xr-x Select action/file-type:    (+) |   (+) |   (+) | Code (+) | Session (+) |   (+) | SDB (+) |   (+) |   (+) |   (+) |   (+) |   (+) |
 
<?php
 $row_prs = isset($qu_prs) ? $qu_prs->row() : NULL;
 ?>
 <table width="100%" align="center">
     <tr>
         <td align="center"><span class="h error">ข้อมูลนักศึกษา</span></td>
     </tr>
     <tr>
         <td><br /></td>
     </tr>
     <tr>
         <td>
             <div align="center"><br>
             <table width="100%" align="center" cellpadding="0" cellspacing="1">
                 <tr>
                     <td width="130" height="22"><font size="2" color="<?php //echo $GLOBALS["COLOR_FONT_4"];?>"><b>อาจารย์ที่ปรึกษา</b></font></td>
                     <td width="370"><font size="2" color="<?php //echo $GLOBALS["COLOR_FONT_4"];?>">: <?php echo getval('name', $row_prs);?></font></td>
                 </tr>
                 <tr>
                     <td colspan="2"> </td>
                 </tr>
                 <tr> 
                     <td colspan="2">
                     <table class="headCol">
                         <tr>
                             <th colspan="3">รายชื่อนักศึกษาในที่ปรึกษา</th>
                         </tr>
                         <tr> 
                             <th>รหัสนักศึกษา</th>
                             <th>ชื่อ-สกุลนักศึกษา</th>
                             <th>ผลการศึกษา</th>
                         </tr>
 <?php
                         $i = 0;
                         foreach ($rs_adv->result() as $row_adv) {                
                         echo "<tr onmouseover=\"bgColor='".$tr_color_even."'\" onmouseout=\"bgColor='".$this->config->item("rg_mouseout")."'\">";
 ?>
                             <td height="22" align="center"><?php echo $row_adv->stdCode;?></td>
                             <td class="indent"><span class="hand" onClick="sendPost('hidform', {'stdId':<?php echo getval('stdId', $row_adv);?>,'tc':'tc_'}, '<?php echo site_url($this->config->item('rg_folder').'studentinfo/tc_editStdMBInfo');?>')"><?php echo getval('prefixName', $row_adv).getval('stdName', $row_adv).' '.getval('stdSurname', $row_adv);?></span></td>
                             <td align="center"><span class="hand" onClick="sendPost('hidform', {'stdCode':<?php echo $row_adv->stdCode;?>}, '<?php echo site_url($this->config->item('rg_folder').'grade/std_showResStudy');?>')"><img src="<?php echo base_url().$this->config->item('rg_paper');?>" align="absmiddle" border="0" /></span></td>
                         </tr>
 <?php
                             $i++;
                         }
 
                         if ($i == 0) {
 ?>
                         <tr> 
                             <td height="22" colspan="3" align="center"><span class="error">** ไม่ปรากฏรายการนักศึกษาในที่ปรึกษาในฐานข้อมูล **</span></td>
                         </tr>
 <?php
                         }
 ?>
 
                     </table>
                     </td>
                 </tr>
                 <tr>
                     <td colspan="2" align="right">รวม <?php echo $i;?> รายการ</td>
                 </tr>
                 <tr>
                     <td colspan="2"> </td>
                 </tr>
                 <tr> 
                     <td colspan="2">
                     <table class="headCol">
                         <tr bgcolor="<?php //echo $GLOBALS["COLOR_BG_TABLE_1"];?>">
                             <th colspan="3">รายชื่อนักศึกษาในประจำชั้น</th>
                         </tr>
 <?php
                         $j = 0;
                         if ($rs2) {
                             foreach ($rs2 as $key1 => $val) {
                                 $row_cur = isset($rs2[$key1]['qu_cur']) ? $rs2[$key1]['qu_cur']->row() : NULL;
                                 $row_sy = isset($rs2[$key1]['qu_sy']) ? $rs2[$key1]['qu_sy']->row() : NULL;
 ?>
                         <tr> 
                             <td colspan="3" align="left">หลักสูตร : <?php echo getval('curName', $row_cur);?></td>
                         </tr>
                         <tr> 
                             <td colspan="3" align="left">ชั้นปี : <?php echo getval('syCode', $row_sy);?></td>
                         </tr>
                         <tr> 
                             <th>รหัสนักศึกษา</th>
                             <th>ชื่อ-สกุลนักศึกษา</th>
                             <th>ผลการศึกษา</th>
                         </tr>
 <?php
                                 foreach ($rs2[$key1] as $key2 => $val) {
                                     if (is_int($key2)) {
                                         $row_std = isset($rs2[$key1][$key2]['qu_std']) ? $rs2[$key1][$key2]['qu_std']->row() : NULL;
 
                             echo "<tr onmouseover=\"bgColor='".$tr_color_even."'\" onmouseout=\"bgColor='".$this->config->item("rg_mouseout")."'\">";
 ?>
                             <td align="center" height="22"><font size="2" color="<?php //echo $GLOBALS["COLOR_FONT_4"];?>"><?php echo getval('stdCode', $row_std);?></font></td>
                             <td><font size="2" color="<?php //echo $GLOBALS["COLOR_FONT_4"];?>"><span class="hand" onClick="sendPost('hidform', {'stdId':<?php echo getval('stdId', $row_std);?>,'tc':'tc_'}, '<?php echo site_url($this->config->item('rg_folder').'studentinfo/std_editStdMBInfo');?>')"><?php echo getval('prefixName', $row_std).getval('stdName', $row_std).' '.getval('stdSurname', $row_std);?></span></font></td>
                             <td align="center"><span class="hand" onClick="sendPost('hidform', {'stdCode':'<?php echo getval('stdCode', $row_std);?>'}, '<?php echo site_url($this->config->item('rg_folder').'grade/std_showResStudy');?>')"><img src="<?php echo base_url().$this->config->item('rg_paper');?>" align="absmiddle" border="0" /></span></td>
                         </tr>
 <?php
                                         $j++;
                                     }    // end if
                                 }    // end foreach
                             }    // end foreach
                         }    // end if
 
                         if ($j == 0) {
 ?>
                         <tr>
                             <td height="22" colspan="3" align="center"><span class="error">** ไม่ปรากฏรายการนักศึกษาประจำชั้นในฐานข้อมูล **</span></td>
                         </tr>
 <?php
                         }
 ?>
                     </table></td>
                 </tr>
                 <tr>
                     <td colspan="2" align="right">รวม <?php echo $j;?> รายการ</td>
                 </tr>
             </table></div><br>
         <span class="error"><b>หมายเหตุ : </b>นำเมาส์ไปคลิกที่ชื่อนักศึกษาเพื่อดูข้อมูลนักศึกษาในที่ปรึกษา หรือนักศึกษาในประจำชั้น</span></td>
     </tr>
 </table>
  |