<?php $urlpage= basename($_SERVER['PHP_SELF']);
$active='';

?>
<div class="appBottomMenu">
  <div class="item <?php if($urlpage=='index.php'){echo'active';}?>"> <a href="index.php">
    <p> <i class="icon ion-md-home"></i> <span>Home</span> </p>
    </a> </div>
  <div class="item <?php if($urlpage=='search.php'){echo'active';}?>"> <a href="search.php">
    <p> <i class="icon ion-ios-search"></i> <span>Search</span> </p>
    </a> </div>
   <?php if(isset($_SESSION['userid'])){?>
    <div class="item <?php if($urlpage=='win.php'){echo'active';}?>"> <a href="win.php">
    <p> <i class="icon ion-md-trophy"></i> <span>Win</span> </p>
    </a> </div>
    
    <div class="item <?php if($urlpage=='login.php' || $urlpage=='signup.php' || $urlpage=='forgot-password.php' || $urlpage=='mine.php' || $urlpage=='recharge.php' || $urlpage=='transactions.php'){echo'active';}?>"> <a href="mine.php" class="icon toggleSidebar">
    <p> <i class="icon ion-md-person"></i> <span>My </span> </p>
    </a> </div>
    <?php }else{?>
  <div class="item <?php if($urlpage=='login.php' || $urlpage=='signup.php' || $urlpage=='forgot-password.php'){echo'active';}?>"> <a href="login.php" class="icon toggleSidebar">
    <p> <i class="icon ion-md-person"></i> <span>My </span> </p>
    </a> </div>
    <?php }?>
</div>