
<style>
.navbar {
    border-bottom: 1px solid white;
    margin-bottom:-1px;
}

.navbar-header {
    border-right: 1px solid white;
    height: 105px;
}

.item {
    /*height: 650px;*/
    /*margin-top: 100px;*/
}

.item img {
    width: 100%;
}
</style>
<?php
    include("db.php");
    $data = $db->getRow("select * from site_setting"); 
    $sliders = $db->getRows("select * from slider");
    $extramenu = $db->getRows("select * from extra_menu");
    // print_r($extramenu);
?>
<title><?php echo $data['school_name']; ?></title>
        <?php  // $menu = $db->getRows("select * from extra_menu");  ?>
            <?php  /* foreach($menu as $mn){
                $pid= $mn['linkname'];
                $string = str_replace(' ', '', $pid);
            ?>
            <li><a class="dropdown-item" href="<?php echo $string; ?>.php?menu_id=<?php echo $mn['id']; ?>"><?php echo $mn['linkname']; ?></a></li>
        <?php    }  */ ?> 
<?php $colour = $db->getRow("select * from site_setting");?>

<nav class="navbar navbar-style" style="background:<?php echo $colour['color_code'] ;?>">
  <div class="container-fluid">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <!--<a class="navbar-brand" href="#">WebSiteName</a>-->
            <a class="navbar-brand" href="/">
                <img alt="School Logo" src="./uploads/<?php echo $data['logo'];?>" style="width:90px;height:70px;display:inline-block;">
                <label id="schoolname">
                    <?php echo $data['school_name']; ?><br>
                    <span id="schooladdress"><?php echo $data['address']; ?></span>
                </label>
            </a>
    </div> 

    <div class="collapse navbar-collapse" id="myNavbar">
        <marquee class="floatnews" direction="left" onmouseover="this.stop()" onmouseout="this.start()">
                <?php echo $data['marquee']; ?>
        </marquee>
        <ul class="nav navbar-nav navbar-right">
            <li><a href="online_registration.php"><span class="glyphicon glyphicon-user"></span> Apply Online</a></li>
            <li><a href="<?php echo $data['link']; ?>"><span class="glyphicon glyphicon-log-in"></span> Login</a></li>
        </ul>
        <ul class="nav navbar-nav navbar-left">
            <li class="active"><a href="/">Home</a></li>
            <li class="active"><a href="about.php">About Us</a></li>
            <li class="active"><a href="facilities.php">Facilities</a></li>
            <li class="active"><a href="tc.php">TC</a></li>
            <li class="active"><a href="gallery.php">Gallery</a></li>
            <li class="active"><a href="downloads.php">Downloads</a></li>
            <li class="active"><a href="alumni.php">Alumni</a></li>
            <!--<li class="active"><a href="#">Academics</a></li>-->
              <li class="active dropdown" style="color:white;">
                <a href="javascript:void();" class="dropdown-toggle" type="button" data-toggle="dropdown">Academics
                <span class="caret"></span></a>
                <ul class="dropdown-menu">
                <?php foreach($extramenu as $menu) { ?>
                  <li><a href="extra.php?q=<?php echo $menu['linkname']; ?>"><?php echo $menu['heading']; ?></a></li>
                    <?php } ?>
                </ul>
              </li>
            <li class="active"><a href="contact.php">Contact Us</a></li>
        </ul>
        
    </div>
  </div>
</nav>

    <div id="myCarousel" class="carousel slide" data-ride="carousel">

        <div class="carousel-inner">
            <?php foreach($sliders as $slide){$i++;
                if($i == 1) { ?>
            <div class="item active">
                <img src="./uploads/slider/<?php echo $slide['image']; ?>" alt="Los Angeles" style="width:100%;">
            </div>
            <?php } else { ?>
            <div class="item">
                <img src="./uploads/slider/<?php echo $slide['image']; ?>" alt="Chicago" style="width:100%;">
            </div>
            <?php } 
                } ?>    
        </div>
    
        <!-- Left and right controls -->
        <a class="left carousel-control" href="#myCarousel" data-slide="prev">
          <span class="glyphicon glyphicon-chevron-left"></span>
          <span class="sr-only">Previous</span>
        </a>
        <a class="right carousel-control" href="#myCarousel" data-slide="next">
          <span class="glyphicon glyphicon-chevron-right"></span>
          <span class="sr-only">Next</span>
        </a>
    </div>




