
    <head>
	<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
	</head>

    <div id="mws-wrapper">
		<div id="mws-sidebar-stitch"></div>
		<div id="mws-sidebar-bg"></div>


<?php 
$cats_no=0;
foreach($mods->result() as $row):
 if($row->have_cats=='yes')
{
$cats_no++;
$items[]=$row->name;
$titles[]=$row->title;
}
endforeach;

?>


<div id="mws-sidebar">
        	<div id="mws-searchbox" class="mws-inset">
            	<form action="http://www.malijuwebshop.com/themes/mws-admin/table.html">
                	<input type="text" class="mws-search-input" />
                    <input type="submit" class="mws-search-submit" />
                </form>
            </div>
            <div id="mws-navigation">
            	<ul>
                	<li><a href="<?php echo base_url();?>" class="mws-i-24 i-home">الرئيسيه </a></li>
                	<!-- <li><a href="charts.html" class="mws-i-24 i-chart">Charts</a></li>
                	<li><a href="calendar.html" class="mws-i-24 i-day-calendar">Calendar</a></li>
                	<li><a href="files.html" class="mws-i-24 i-file-cabinet">File Manager</a></li>
                	<li class="active"><a href="table.html" class="mws-i-24 i-table-1">Table</a></li>
         -->

 <?php if($cats_no>0){?>       	 
                       <li>
                    	<a href="#" class="mws-i-24 i-list">الاقسام</a>
                        <ul class="closed">
                         <?php  $i=0; foreach($items as $r):?>
                        	<li><a href="<?php echo base_url();?>index.php/categories/index/<?php echo $titles[$i];?>"><?php echo $r;?></a></li>
                         <?php $i++; endforeach;?>
                         </ul>
                    </li>
<?php }?>

                      <?php foreach($mods->result() as $row):?>
                	<li>
                    	<a href="#" class="mws-i-24 i-list"><?php echo $row->name;?></a>
                        <ul class="closed">
                        	<li><a href="<?php echo base_url();?>index.php/posts/index/<?php echo $row->title;?>/all">عرض الكل</a></li>
                    <li><a href="<?php echo base_url();?>index.php/posts/add_post/<?php echo $row->title;?>/<?php echo $status;?>">اضافه جديد</a></li>
                        </ul>
                    </li>
                    <?php endforeach;?>

         <!--      	 <li><a href="<?php echo base_url();?>index.php/members/" class="mws-i-24 i-cog">الاعضاء</a></li>
 
                	<li><a href="<?php echo base_url();?>index.php/orders/" class="mws-i-24 i-cog">الطلبات</a></li>
                	--><li><a href="<?php echo base_url();?>index.php/musers/" class="mws-i-24 i-text-styling">المستخدمين</a></li>
                	<!-- <li><a href="grids.html" class="mws-i-24 i-blocks-images">Grids &amp; Panels</a></li>
                	<li><a href="gallery.html" class="mws-i-24 i-polaroids">Gallery</a></li>
                	<li><a href="error.html" class="mws-i-24 i-alert-2">Error Page</a></li>
                	<li>
                    	<a href="icons.html" class="mws-i-24 i-pacman">
                        	Icons <span class="mws-nav-tooltip">2000+</span>
                        </a>
                    </li>-->
                </ul>
            </div>
        </div>
