Viewing file:      v_showCpub.php (2.05 KB)      -rwxr-xr-x Select action/file-type:    (+) |   (+) |   (+) | Code (+) | Session (+) |   (+) | SDB (+) |   (+) |   (+) |   (+) |   (+) |   (+) |
 
<script type="text/javascript" src="<?php echo base_url();?>js/jQuery-1.5.js"></script>
 <script language="JavaScript">
     function checkall() {
         $('*:checkbox').attr('checked',true);
     }
 </script>
 <?php
     $attributes = array('id' => 'popform','name' =>'popform');
     echo form_open($this->config->item("rg_folder")."curpbri/cpub_insert_update", $attributes);
 ?>
 <table width="100%" align="center">
 <?php
     if(isset($cpub)){
         if($cpub->num_rows() > 0){
 ?>
     <tr ><td>
         <table class="headCol">
             <tr>
                 <th>เลือก</th>
                 <th>หลักสูตร</th>
             </tr>
 <?php
         $i = 0;
         foreach($cpub->result() AS $row){
             echo "<tr onmouseover=\"bgColor='".$tr_color_even."'\" onmouseout=\"bgColor='".$this->config->item("rg_mouseout")."'\">";
 ?>
                 <td align='center'><? echo form_checkbox("curId[]", $row->cpubCurId, false); ?></td>
                 <td class="indent"><? echo explodeSquare($row->curName);?></td>
             </tr>
 <?php
             $i++;
         }
 ?>
 
         </table>
     </td></tr>
     <tr >
         <td>
 <?php
     $js = 'onClick="checkall()"';
     echo form_button('mybutton', 'เลือกทั้งหมด', $js); 
     $data = array(
         'name' => 'button',
         'id' => 'button',
         'value' => 'true',
         'type' => 'reset',
         'content' => 'ยกเลิกทั้งหมด'
     );
     echo form_button($data);
 ?>
         </td>
     </tr>
     <tr >
         <td align='center'>
 <?php
     $js = 'onClick="return confirm(\'ต้องการเผยแพร่หลักสูตรนี้ใช่หรือไม่\')"';
     echo form_submit('save', 'บันทึก', $js);
 ?>
         </td>
     </tr>
 <?php
         
         }else{
 ?>
     <tr><td> </td></tr>
     <tr><td align='center'><span class="error">ไม่พบหลักสูตรที่ยังไม่เผยแพร่</span></td></tr>
 <?
         }
     }
 ?>
 </table>
 </form>
  |