<?php
include('../includes/functions.php');
session_start();
make_connection();
if(is_loggedin());
else
  redirect_to('index.php');
$user=get_user();
if(!$user)
 redirect_to('index.php');
?>
<!DOCTYPE html>
<html lang="en">
<head>
  <?php include('../includes/head.php');?>
  <title>Utopia - Home</title>
  <link rel="stylesheet" type="text/css" href="font-awesome/css/font-awesome.min.css">
  <link rel="stylesheet" type="text/css" href="materialize/css/materialize.css">
  <link rel="stylesheet" type="text/css" href="css/home.css">
  <style type="text/css">
    .btn-short{
      background-color: #4caf50;
      vertical-align: middle;
      margin-bottom: 1rem;
    }
    .btn-short *{
      vertical-align: middle;
    }
  </style>
</head>
<body>
  <div class="body row">
    <?php
   global $navactive;
   $navactive="home";
   include('../includes/nav.php');
   ?>

  <div class="main">
    <div class="container">
      <header>
        <h3 class="center">Welcome!</h3>
      </header>
      <p class="centerr">We all have encountered situations where we need a book and we think that the book must be there with someone. Or we no longer need a book and we want to sell/donate it to others. Now with <b>Utopia Book Store</b>, Book Sharing just got easier!</p> 
      <a class="waves-effect waves-light btn btn-short" href="addbook.php"><i class="fa fa-plus" aria-hidden="true"></i> Add a new book</a>
      <br>
        <a class="waves-effect waves-light btn btn-short" href="searchbook.php"><i class="fa fa-search" aria-hidden="true"></i> Search for a book</a>
      
    </div>
  </div>
</div>
<script src="js/jquery.js"></script>
<script src="materialize/js/materialize.js"></script>
<script>
$(".button-collapse").sideNav();
$('.button-collapse').sideNav({
      menuWidth: 300, // Default is 240
      edge: 'left', // Choose the horizontal origin
      closeOnClick: false // Closes side-nav on <a> clicks, useful for Angular/Meteor
    }
    );
</script>
</body>
</html>