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

<div class="container rightside">
                 <!--Search box-->
                    <div class="search">
                        <input type="text" name="search" placeholder="بحث" />
                        <input type="submit" value="" />
                  	</div>
                		<div class="submenu">
             <ul id="right_menu">
             
                    <?php  
	                	$q_cats= $this->fun->get_cats('services');
	                	if($q_cats!=FALSE){
	                	foreach($q_cats->result() as $r):
	                	$cat=$r->id;
                    ?>

                    <li><a href="#"><?php echo $r->name_ar?></a>
                      <ul>
                         <?php  
					                	$social_q= $this->fun->getall_bycat('posts','services',$cat);
					                	if($social_q!=FALSE){
					                	foreach($social_q->result() as $row):
					                	$name=str_replace('/','',$row->name_ar);
					                	$name=str_replace('?','',$name);
					                	$name=str_replace('!','',$name);
					                	$name=str_replace(' ','_',$name);									   
                                   ?>
                                       <li> <a href="<?php echo base_url();?>index.php/home/clinics/<?php echo $name?>/<?php echo $row->id?>"><?php echo $row->name_ar?></a> </li>
                                    <?php endforeach;}?>
                      </ul>
                    </li>
                    <?php endforeach;}?>

                     </ul>
                         </div>
                            	
                
                </div>