 <?php
 global $navactive;
 if(!isset($navactive))
  $navactive="";

$picture_rw="https://lh3.googleusercontent.com/-XdUIqdMkCWA/AAAAAAAAAAI/AAAAAAAAAAA/4252rscbv5M/photo.jpg";
if(isset($user['fbid']) and !empty($user['fbid']))
  $picture_rw="https://graph.facebook.com/".$user['fbid']."/picture?type=large";
?>
<div class="nav col l6">
  <ul id="slide-out" style="overflow-x: hidden !important;" class="side-nav fixed collapsible collapsible-accordion">
    <li>
      <div class="userView">

       <a href="home.php"><img src="<?php echo $picture_rw;?>" class="nav-img-pp"> </a>
       <div class="navname"><?php echo $user['name'];?></div>
       <div class="navregno"><?php echo $user['phone'];?></div>
     </div>
   </li>
   <div class="navlinks">
    <li <?php if($navactive=="postnews") echo " class='active'";?>><a class="" href="add-news.php"><i class="fa fa-plus" aria-hidden="true"></i>&nbsp;&nbsp;Post a News</a></li>
    <li <?php if($navactive=="viewnews") echo " class='active'";?>><a href="view-news.php"><i class="fa fa-book" aria-hidden="true"></i>&nbsp;View News</a></li>
    <hr style="border-color: #959595;" />

    <li <?php if($navactive=="viewbooks1") echo " class='active'";?>><a href="searchbook.php"><i class="fas fa-book"></i>&nbsp;Switch to Book Sharing</a></li>
    <li <?php if($navactive=="viewrecommendations1") echo " class='active'";?>><a href="view-recommendations.php"><i class="fas fa-comments"></i>&nbsp;Switch to Recommendations</a></li>
    <li <?php if($navactive=="viewgreive1") echo " class='active'";?>><a href="view-grievances.php"><i class="fas fa-bullhorn"></i>&nbsp;Switch to Grievances</a></li>

    <hr style="border-color: #959595;" />

    <li><a class="" href="logout.php"  onclick="return confirm('Are you sure you want to logout?')"><i class="fa fa-sign-out" aria-hidden="true"></i>&nbsp;&nbsp;Logout</a></li>
  </div>
</ul>
</div>
<div class="hide-on-large-only">
 <nav>
  <div class="nav-wrapper">
    <a href="#" class="brand-logo right"> Utopia</a>
    <ul id="nav-mobile" class="">
      <a href="#" data-activates="slide-out" class="button-collapse"><i class="material-icons">menu</i></a>
    </ul>
  </div>
</nav>

</div>
