<?php
    session_start();
if(isset($_SESSION['userId'])){

}else{
header("location: ../login.php");
 
        }

?>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Home page</title>
    <!-- Bootstrap CSS -->
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" rel="stylesheet">
    <link href='css/style.css?version=0.2' rel="stylesheet"/>
     <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>

    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js"></script>
    <style>
        @import url('https://fonts.googleapis.com/css?family=Poppins:400,500,600,700,800,900');

        :root{
            --theme-color:#5664d2;
        }
        body {
            font-family: 'Poppins', sans-serif;
            background: rgb(244, 245, 247);
            font-size: 0.8rem;
        }
        .btn-theme-type1{
            color:#fff!important;
            background-color:var(--theme-color)!important;
            border-radius:28px!important;
            font-size:10px!important;
            box-shadow:none!important;
        }
        .btn-theme-type1:hover{
            color:var(--theme-color)!important;
            background-color:#fff!important;
            border-color:var(--theme-color)!important;
        }       .btn-theme-type2{
            color:var(--theme-color);
            background-color:#fff;
            border-radius:28px;
            font-size:10px;
            border-color:var(--theme-color);
            box-shadow:none!important;
        }
        .btn-theme-type2:hover{
             color:#fff;
            background-color:var(--theme-color)!important;
        }
        .bg-theme-color{
                background-color: var(--theme-color);
                border-color:var(--theme-color);
        }
        #list .card {
            box-shadow: 1px 1px 13px 2px #00000012;
            border: none;
        }

        .navbar.navbar-expand-lg {
            background-color: #ffffff !important;
            box-shadow: 1px 1px 3px 1px #00000012;
            position: sticky;
            top: 0;
            z-index: 10;
        }


        .navbar a img {
            height: 60px;
            padding-left: 35px;
        }

        .navbar-light .navbar-nav .nav-link {
            color: #000;
        }

        .text-primary {
            color: var(--theme-color) !important;
        }

        /*
        #container .car-holder:nth-child(-n+3) {
            padding-top: 7px !important;
        }
*/

        .navbar-light .navbar-nav .nav-link:focus,
        .navbar-light .navbar-nav .nav-link:hover {
            color: var(--theme-color);
        }

        .navbar-light .navbar-nav .nav-link.active {
            color: var(--theme-color);
        }

        #searchText {
            text-align: center;
            border-radius: 19px;
            padding: 7px 20px;
            border-color: var(--theme-color);
            font-size: 12px;
        }

        /*.btn-outline-primary {*/
        /*    background: var(--theme-color);*/
        /*    border-radius: 50px;*/
        /*    color: #fff;*/
        /*    padding: 6px 20px;*/
        /*    border-color: var(--theme-color);*/
        /*}*/

        /*.btn-outline-primary:active,*/
        /*.btn-outline-primary:focus,*/
        /*.btn-outline-primary:hover {*/
        /*    background-color: #222222 !important;*/
        /*    border-color: #222222 !important;*/
        /*    box-shadow: 1px 1px 5px #020202 !important;*/
        /*}*/

        /*.card-footer a.btn-outline-info {*/
        /*    color: #9da2a5;*/
        /*    background-color: transparent;*/
        /*    border-color: none;*/
        /*    border: none;*/
        /*    font-size: 0.9rem;*/
        /*}*/

        /*.card-footer a.btn-outline-info:hover {*/
        /*    color: #fff !important;*/
        /*    border-color: #222222 !important;*/
        /*    background-color: #222222 !important;*/
        /*    box-shadow: 1px 1px 5px #020202 !important;*/
        /*}*/
        /*.copyText_LatLng_Btn:hover,.copyText_LatLng_Btn:active,.copyText_LatLng_Btn:focus{*/
        /*        outline: 0;*/
        /*    color: var(--theme-color);*/
        /*}*/

        /* right bounce */
        /*@-webkit-keyframes bounceRight {*/

        /*    0%,*/
        /*    20%,*/
        /*    50%,*/
        /*    80%,*/
        /*    100% {*/
        /*        -webkit-transform: translateX(0);*/
        /*        transform: translateX(0);*/
        /*    }*/

        /*    40% {*/
        /*        -webkit-transform: translateX(-15px);*/
        /*        transform: translateX(-15px);*/
        /*    }*/

        /*    60% {*/
        /*        -webkit-transform: translateX(-7.5px);*/
        /*        transform: translateX(-7.5px);*/
        /*    }*/
        /*}*/

        /*@-moz-keyframes bounceRight {*/

        /*    0%,*/
        /*    20%,*/
        /*    50%,*/
        /*    80%,*/
        /*    100% {*/
        /*        transform: translateX(0);*/
        /*    }*/

        /*    40% {*/
        /*        transform: translateX(-15px);*/
        /*    }*/

        /*    60% {*/
        /*        transform: translateX(-7.5px);*/
        /*    }*/
        /*}*/

        /*@keyframes bounceRight {*/

        /*    0%,*/
        /*    20%,*/
        /*    50%,*/
        /*    80%,*/
        /*    100% {*/
        /*        -ms-transform: translateX(0);*/
        /*        transform: translateX(0);*/
        /*    }*/

        /*    40% {*/
        /*        -ms-transform: translateX(-15px);*/
        /*        transform: translateX(-15px);*/
        /*    }*/

        /*    60% {*/
        /*        -ms-transform: translateX(-7.5px);*/
        /*        transform: translateX(-7.5px);*/
        /*    }*/
        /*}*/

        /* /right bounce */


        /* assign bounce */
        /*.card-footer a.btn-outline-info:hover .fa-arrow-right {*/
        /*    -webkit-animation: bounceRight 2s infinite;*/
        /*    animation: bounceRight 2s infinite;*/
        /*    float: right;*/
        /*    padding-top: 4px;*/
        /*    padding-left: 10px;*/
        /*    opacity: 1;*/

        /*}*/

        /*.card-footer .fa-arrow-right {*/
        /*    padding-left: 10px;*/
        /*    opacity: 0;*/
        /*}*/
        .siteDetailCardTable .copyText_LatLng_Btn i{
                color:#d4d9ff;
        }
        .siteDetailCardTable tr td:nth-child(2) {
            padding-left: 15px;
        }

        #searchForm {
            margin-left: 3rem;
        }
        .siteDetailCardTable tr td:nth-child(2){
            word-break: break-all;
            width: 64%;
            }
        /*---------------media query-------------*/
        @media (min-width: 1200px) {

            .container,
            .container-lg,
            .container-md,
            .container-sm,
            .container-xl {
                    max-width: 1465px;
            }
        }
        @media (max-width:992px ){

        #searchForm {
            margin-left: 0;
        }
        }
/*         @media only screen and(max-width:575px ){*/
        @media only screen and (max-width: 575px) {

            #searchForm button{
                margin: auto;
            }
           
        }

    </style>
</head>

<body>
    <!-- Navbar start -->
    <nav class="navbar navbar-expand-lg bg-dark navbar-light">
        <a class="navbar-brand" href="./index.php">
            <img src="public/pacslogo.jpg" alt="Navbar" />
        </a>
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarSupportedContent">
            <ul class="navbar-nav ml-auto">
                   <?php
                if($_SESSION['deviceType']=='PC'){
                echo '<li class="nav-item pr-2">'
                        .'<a class="nav-link" href="../">Home<span class="sr-only">(current)</span></a>'
                     .'</li>';
                }
                ?>
                <li class="nav-item pr-2">
                    <a class="nav-link active" href="index.php">All Sites <span class="sr-only">(current)</span></a>
                </li>
                <li class="nav-item pr-2">
                    <a class="nav-link" href="html/addSite.php">Add Site</a>
                </li>
            </ul>
            <form id="searchForm" class="form-inline">
                <input class="form-control mr-sm-2" id="searchText" type="search" placeholder="Search by site ID" aria-label="Search" required />
                <button class="btn btn-theme-type1 my-2 my-sm-0 text-white px-4" type="submit" style="font-size:12px!important">
                    Search<i id="searchSiteIdSpinner" class="d-none fa fa-spinner fa-spin"></i>
                </button>
            </form>
        </div>
    </nav>

    <!-- Navbar end -->
    <div class="container" id="container">
        <h5 class="recent text-primary ml-2 mt-4">Recently Added Sites</h5>
        <div id="list" class="row">
        <!--placeholder loader-->
            
                <!--placeholder end-->
        </div>
    </div>
    <script src="../js/constants.js?version= 2.2"></script>
<!--    <script src="js/main.js"></script>-->
    <script src="js/common.js?version=1.8"></script>
    <script src="js/placeholder_loader.js?version= 1.9"></script>
    <script src="js/index.js?version= 1.9"></script>
    <script src="js/checkSessionState.js?version= 1.8"></script>

</body>

</html>
