       

<script language="javascript" type="text/javascript">



    function filter(element) {



       var value = $(element).val();



  $("#accordion li").each(function() {



    if ($(this).text().search(new RegExp(value, "i")) > -1) {



      $(this).show();



    } else {



      $(this).hide();



    }



  });



    }



</script>



<style type="text/css">

  

.searchIcon{



      top: 29px !important;



    padding-left: 8px !important;



    color: #FF7F00 !important;



}



</style>



     <div class="left_col scroll-view">

        

             <?php if($brid[0]['logo']!=NULL){ ?>

          

        

            <div class="" style="border: 0;margin-top: 5px;background-color: white;text-align: center;">

              <img src="<?php echo DOMAIN.AgentDirectory;?>img/<?php echo $brid[0]['logo'];?>" id="preview1" class="img-thumbnail" style="width:70px;height:70px;"   />

            </div>



            <?php } else { ?>

        

            <div class="navbar nav_title" style="border: 0;margin-top: 5px;">

              <a href="index.html" class="site_title"><span style="color: black;font-size: 35px;font-weight: bold;">Edu</span><span style="color:#00ADEF;font-size: 35px;font-weight: bold;">Portal</span></a>

            </div>



          <?php } ?>

          <p style="color:white;text-align: center;font-size: 12px;margin:0px;padding: 3px;"><?php echo $brid[0]['Branch_Name'];?></p>

            <div class="clearfix"></div>



           

         <!-- sidebar menu -->

            <div id="sidebar-menu" class="main_menu_side hidden-print main_menu">

              <div class="menu_section">



<div class="searchSideBar">



     <!-- <span class="glyphicon glyphicon-search searchIcon" ></span> --><input type="search" placeholder="     Search Module " id="myInput" onkeyup="filter(this)" class="form-control searchTextbar">





</div>

<div style="margin: 9px 0px -17px 15px; color: white;">Current Session: <?php 

$m->where("session_id", $_SESSION['current_session']);

$session=$m->get("edu_session_config");

echo $session[0]['session_year'];?></div>

                <ul class="nav side-menu" id="accordion">

             <li><a href="demo_videos.php"><i style="color: #FFA302" class="fa fa-play"></i> Guidline Videos </a></li>

            

  <?php

    $branch=$_SESSION['branch'];

    $user=$_SESSION['user_id'];     

    

    $qr="SELECT * FROM eduportal_modules_detail as modu, eduportal_school_modules as schl WHERE modu.modules_id=schl.module_id and schl.branch_id='$branch' ORDER BY order_no ASC ";

        //echo $qr;

             $sidebar = $m->query($qr);

                  foreach($sidebar as $side)

                      { 



                  /*  $m->where("branch_id", $_SESSION['branch']);

                    $m->where("user_id", $_SESSION['user_id']);

                    $m->where("module_id", $side['modules_id']);

                     $values = $m->get("users_privilege_detail");

*/

                    $qr="SELECT * FROM users_privilege_detail WHERE branch_id='$branch' and user_id='".$_SESSION['user_id']."' AND module_id='".$side['modules_id']."'";

                    //echo $qr;

                    $values = $m->query($qr);



                      if(count($values)>0){

                        //echo "Yes";

                        ?>



                    <li style="margin-top: -15px;"><a data-parent="#accordion"><i style="color: #FFA302;" class="<?php echo $side['module_icon'] ?>"></i> <?php echo $side['modules_name'];?> <span class="fa fa-chevron-down"></span></a>



                    <?php } ?>



<ul class="nav child_menu">

                <?php

    $user=$_SESSION['user_id'];            

    $module=$side['modules_id'];

    $qr="SELECT * FROM users_privilege_detail as priv, eduportal_modules_pages_detail as pag WHERE priv.module_id='$module' and priv.user_id='$user' and priv.page_id=pag.page_id and priv.branch_id='$branch' ORDER BY pag.page_id ASC ";

           

             $pages = $m->query($qr);

           

                      foreach($pages as $page)

                      { ?>



                      <li><a href="<?php echo $page['page_name'] ?>"><?php echo $page['page_title'] ?></a></li>

                  

                    <?php } ?>

                     </li>



  </ul> 



                     <?php } ?>









      <li style="margin-top: -15px;"><a href='logout.php'><i style="color: #FFA302" class="fa fa-power-off"></i>Logout</a></li>



                 

              </div>



            </div>

            <!-- /sidebar menu -->



          </div>

        </div>

   