    
    
    


<script language="JavaScript">
function checkall(checkname,exby) {
  for (i = 0; i < checkname.length; i++)
  checkname[i].checked = exby.checked? true:false
}
</script>
<?php foreach($sett->result() as $rss):
      $gal=$rss->have_gallery;
endforeach;
?>
  
    
    <div class="right_content">            
        
    <h2><?php echo $type?></h2> 
                    
        <form name="form" method="post" action="<?php echo base_url();?>index.php/posts/change_status/<?php echo $type?>/<?php echo $status?>">          
<table id="rounded-corner" summary="2007 Major IT Companies' Profit">
    <thead>
    	<tr>
        	<th scope="col" class="rounded-company">		
        	<input  type="checkbox" value="1" name='check_all' id="show" onclick='checkall(this.form.show,this)' />
        		
</th>
            <th scope="col" class="rounded">Title</th>
            <th scope="col" class="rounded"><?php echo iconv("windows-1256","utf-8","العنوان")?></th>
            <th scope="col" class="rounded">&nbsp;</th>
            <th scope="col" class="rounded">&nbsp;</th>
            <th scope="col" class="rounded">Edit</th>
            <th scope="col" class="rounded-q4">Delete</th>
           <?php if($gal=='yes'){?> <th scope="col" class="rounded-q4">Gal</th> <?php }?>
            <th scope="col" class="rounded-q4">Status</th>
        </tr>
    </thead>
        <tfoot>

    	<tr>
        	<td colspan="6" class="rounded-foot-left"><em></em></td>
        	<td class="rounded-foot-right">&nbsp;</td>

        	<td class="rounded-foot-right">&nbsp;</td>

        	<td class="rounded-foot-right">&nbsp;</td>

        </tr>

    </tfoot>
    <tbody>
    <?php 
    if($records !=FALSE){
    foreach($records as $rs):?>
    	<tr>
        	<td><input type="checkbox"  name="list[]" id="show"   value="<?php echo $rs->id;?>" /></td>
            <td><?php echo $rs->name;?></td>
            <td><?php echo $rs->name_ar;?></td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>

            <td><a href="<?php echo base_url();?>index.php/posts/edit_post/<?php echo $type;?>/<?php echo $status;?>/<?php echo $rs->id;?>"><img src="<?php echo base_url();?>template/images/user_edit.png" alt="" title="" border="0" /></a></td>
            <td><a href="<?php echo base_url();?>index.php/posts/delete_post/<?php echo $type;?>/<?php echo $status;?>/<?php echo $rs->id;?>" class="ask"><img src="<?php echo base_url();?>template/images/trash.png" alt="" title="" border="0" /></a></td>
            <?php if($gal=='yes'){?>
            <td><a href="<?php echo base_url();?>index.php/gallery/index/<?php echo $type;?>/<?php echo $status;?>/<?php echo $rs->id;?>"><img src="<?php echo base_url();?>template/images/gal.png" alt="" title="" border="0" /></a></td>
            <?php }?>
            <td><?php if($rs->active=='yes'){?><img src="<?php echo base_url();?>template/images/active.png" alt="Active" title="Active" border="0" /><?php }else{?><img src="<?php echo base_url();?>template/images/notactive.png" alt="NonActive" title="NonActive" border="0" /><?php }?></td>
        </tr>
        <?php endforeach;
        }
        else
        {
        ?>
        <div class="warning_box">
        Don't Have Any Posts..!!
     </div>

    	<?php }?>
        
    	
        
    </tbody>
</table>
  
     		<table style="width: 85%">
				<tr>
					<td> <input name="del_all" class="but_red" type="submit" value="Delete Selected"></td>
					<td> <input name="act_all" class="menuitem" type="submit" value="Active Selected"></td>
					<td><input name="notact_all" class="menuitem" type="submit" value="NonActive Selected"></td>
					<td>	 <a href="<?php echo base_url();?>index.php/posts/add_post/<?php echo $type;?>/<?php echo $status;?>" class="bt_green"><span class="bt_green_lft"></span><strong>Add new item</strong><span class="bt_green_r"></span></a>
</td>
				</tr>
			</table>
     
   		
   		 
   		  
   		 </form>  
        <div class="pagination">
         <?php echo $this->pagination->create_links();?>
      <!--  <span class="disabled"><< prev</span><span class="current">1</span><a href="">2</a><a href="">3</a><a href="">4</a><a href="">5</a>…<a href="">10</a><a href="">11</a><a href="">12</a>...<a href="">100</a><a href="">101</a><a href="">next >></a>-->
        </div> 
    
         <div class="form">
         </div>  
      
     
     </div><!-- end of right content-->
            
                    
  </div>