Viewing file:      v_disciplineTable.php (1.83 KB)      -rwxr-xr-x Select action/file-type:    (+) |   (+) |   (+) | Code (+) | Session (+) |   (+) | SDB (+) |   (+) |   (+) |   (+) |   (+) |   (+) |
 
<script language="JavaScript">
     function ReturnValue(dcpId,dcpName,cutPoint)
     {
         window.opener.document.myform.elements['sbeDcpId'].value = dcpId;
         window.opener.document.myform.elements['dcpName'].value = dcpName;
         window.opener.document.myform.elements['sbeCutPoint'].value = cutPoint;
         window.close();
     }
 </script>
 <table width="100%">
     <tr>
         <td><table class="headCol">
             <tr> 
                 <th>ระดับความประพฤติ</th>
                 <th>ประเภทความประพฤติ</th>
                 <th>คะแนนที่ตัด</th>
             </tr>
         <?php
         $i = 0;
         if(isset($rs_dcp) && $rs_dcp->num_rows()) {
             foreach($rs_dcp->result() as $row) {
                 echo "<tr onmouseover=\"bgColor='".$tr_color_even."'\" onmouseout=\"bgColor='".$this->config->item("rg_mouseout")."'\">";
         ?>
                 <td align="center"><?php echo $row->dcpId;?></td>
                 <td class="indent"><?php echo $row->dcpName;?></td>
                 <td class="hand">
         <?php
                 for($j=$row->dcpMinPoint; $j<=$row->dcpMaxPoint; $j++) {
         ?>
                     <span onClick="ReturnValue('<?php echo $row->dcpId;?>', '<?php echo $row->dcpName;?>', '<?php echo $j;?>')"><?php echo $j." | ";?></span>
         <?php
                 }
         ?>
                     </td>
             </tr>
         <?php
                 $i++;
             }
         } else {
         ?>
             <tr>
                 <td colspan="4" align="center"><span class="error">** ไม่ปรากฏรายการดังกล่าวในฐานข้อมูล **</span></td>
             </tr>
         <?php
         }
         ?>
             <tr bgcolor="<?php echo $this->config->item('rg_table_end');?>">
                 <td colspan="4" align="right">รวม <?php echo $i;?> รายการ</td>
             </tr>
         </table>
     </tr>
     <tr>
         <td><font size="2" class="error"><b>หมายเหตุ : </b>ใช้เมาส์เลือกคะแนนตรงคะแนนที่ตัด</span></td>
     </tr>
 </table>
  |