<?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>Add site</title>
    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous" />
    <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>


    <link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
    <style>
        @import url('https://fonts.googleapis.com/css?family=Poppins:400,500,600,700,800,900');

        body {
            font-family: 'Poppins', sans-serif;
            font-size: 15px;

        }

        /* Chrome, Safari, Edge, Opera */
        input::-webkit-outer-spin-button,
        input::-webkit-inner-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }

        /* Firefox */
        input[type=number] {
            -moz-appearance: textfield;
        }

        /*
        input:disabled{
                background-color: #fff;
        }
*/
        select:disabled {
            opacity: 1;
        }


        #updatebtn {
            display: none;
        }

        h2 {
            line-height: 1.66;
            margin: 0;
            padding: 0;
            font-weight: bold;
            color: #222;
            font-family: Poppins;
            font-size: 36px;
        }

        .site-content {
            padding: 75px 0;
        }


        .row.form-container {
            width: 900px;
            background: #fff;
            margin: 0 auto;
            box-shadow: 0px 15px 16.83px 0.17px rgba(0, 0, 0, 0.05);
            -moz-box-shadow: 0px 15px 16.83px 0.17px rgba(0, 0, 0, 0.05);
            /* -webkit-box-shadow: 0px 15px 16.83px 0.17px rgba(0, 0, 0, 0.05); */
            -o-box-shadow: 0px 15px 16.83px 0.17px rgba(0, 0, 0, 0.05);
            -ms-box-shadow: 0px 15px 16.83px 0.17px rgba(0, 0, 0, 0.05);
            border-radius: 20px;
            -moz-border-radius: 20px;
            -webkit-border-radius: 20px;
            -o-border-radius: 20px;
            -ms-border-radius: 20px;
        }

        .main {
            background: #f8f8f8;
            padding: 150px 0;
        }

        .form-group {
            position: relative;
            margin-bottom: 25px;
            overflow: hidden;
        }

        input,
        select {
            height: 50px;
            width: 100%;
            display: block;
            border: none;
            border-bottom: 1px solid #9999994f;
            padding: 6px 50px;
            font-family: Poppins;
            box-sizing: border-box;
            outline: 0;
            font-size: 14.3333px;
        }
        select{
             padding: 6px 45px;
        }

        input:focus,
        select:focus {
            border-bottom: 1px solid #222;

        }

        input:focus::-webkit-input-placeholder {
            color: #222;
            opacity: 1;
            /* Firefox */
        }

        label {
            position: absolute;
            left: 26px;
            top: 50%;
            transform: translateY(-50%);
            -moz-transform: translateY(-50%);
            -webkit-transform: translateY(-50%);
            -o-transform: translateY(-50%);
            -ms-transform: translateY(-50%);
            color: #222;
            font-size: 14px;
        }

        .material-icons-name {
            font-size: 18px;
        }

        label img {
            height: 12px;

        }

        .update-site-btn {

            margin-top: 50px;
        }

        .update-site-btn,
        .edit-site-btn {
            width: 20%;
            display: inline-block;
            background: #009edb;
            color: #fff;
            border-bottom: none;
            width: auto;
            padding: 15px 39px;
            border-radius: 5px;
            -moz-border-radius: 5px;
            -webkit-border-radius: 5px;
            -o-border-radius: 5px;
            -ms-border-radius: 5px;
            cursor: pointer;
            border: 0;
            box-shadow: 3px 2px 9px 2px #35333329;
        }

        .edit-site-btn {
            color: #fff;
            background-color: #222222;
            border-color: #222222;
            margin-top: 25px;
            box-shadow: 1px 1px 1px #020202;
        }

        .update-site-btn.btn.btn-primary:hover,
        .update-site-btn.btn.btn-primary:active,
        .update-site-btn.btn.btn-primary:active:focus,
        .edit-site-btn.btn.btn-primary:hover,
        .edit-site-btn.btn.btn-primary:active,
        .edit-site-btn.btn.btn-primary:active:focus {
            color: #fff;
            background-color: #222222;
            border-color: #222222;
            box-shadow: 1px 1px 5px #020202;

        }

        .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;
        }

        .navbar-light .navbar-nav .nav-link.active {
            color: #009edb;
        }

        .navbar-light .navbar-nav .nav-link:focus,
        .navbar-light .navbar-nav .nav-link:hover {
            color: rgb(0 158 219);
        }


        #searchText {
            text-align: center;
            border-radius: 19px;
            padding: 7px 20px;
            border-color: #009edb;
            font-size: 14px;
        }

        .btn-outline-primary {
            background: #04a0dc;
            border-radius: 50px;
            color: #fff;
            padding: 6px 20px;
        }

        /*        */


        .field {
            display: flex;
            flex-flow: column-reverse;
            margin-bottom: 1em;
        }

        label,
        input {
            transition: all 0.2s;
            touch-action: manipulation;
        }



        input:focus {
            outline: 0;
            border-bottom: 1px solid #666;
        }


        .txt {
            top: 2px;
            font-size: 10px;
            left: 16.7%;
            color: #009edb;
        }
        #circle,#district{
                padding: 6px 35px;
        }
        input+label {
            cursor: text;
            overflow: hidden;
            text-overflow: ellipsis;
            transform-origin: left bottom;
            transform: translate(0, 1.125rem) scale(1.5);
        }

        ::-webkit-input-placeholder {
            opacity: 0;
            transition: inherit;
        }

        input:focus::-webkit-input-placeholder {
            opacity: 1;
        }

        input:not(:placeholder-shown)+label,
        input:focus+label {
            transform: translate(0, 0) scale(1);
            cursor: pointer;
        }

        /*        */
        
        
        /*media query*/
        @media only screen and (max-width:991px) {
            .main {
                padding: 20px 0;
            }

            .row.form-container {
                width: auto;
            }

        }

        @media only screen and (max-width:767px) {
            #updateSiteForm h2 {
                text-align: center;

            }

         /*   #note {
                PADDING-LEFT: 55px;
            }*/
            .txt{
                left: 16.5% !important;
            }
            #updatebtn,#editbtn{
                margin-left: 51px;
            }
        }
        

    </style>
</head>

<body>
    <!-- Navbar start -->
    <nav class="navbar navbar-expand-lg bg-dark navbar-light">
        <a class="navbar-brand" href="./index.php">
            <img src="../images/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 pr-5">
                <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" href="../">Search FTA <span class="sr-only">(current)</span></a>
                </li>
                <li class="nav-item pr-2">
                    <a class="nav-link" href="addSite.php">Add New FTA</a>
                </li>
            </ul>

        </div>
    </nav>

    <!-- Navbar end -->
    <div class="main">
        <div class="container">


            <div class="row form-container justify-content-md-center">
                <div class="col-md-10 col-sm-12 site-content">
                    <form id="updateSiteForm">
                        <h2 class="mb-4">Edit FTA Details</h2>


                        <div class="row">
                            <div class="form-group col-md-6 col-10 mx-auto">
                                <label class="required" for="empId"><i class="fa fa-id-card" aria-hidden="true"></i></label>
                                <input type="text" id="empId" name="empId" placeholder=" " required  disabled/>
                                <label for="empId" class="txt">Emp-Id</label>
                            </div>

                            <div class="form-group col-md-6 col-10 mx-auto">
                                <label class="required" for="empName"><img src="antenna.png" style="height: 17px;" /></label>
                                <input type="text" id="empName" name="empName" placeholder=" " required  disabled/>
                                <label for="empName" class="txt">Emp Name</label>
                            </div>
                        </div>

                        <div class="row">
                            <div class="form-group col-md-6 col-10 mx-auto">
                                <label for="siteId" ><i class="fa fa-street-view"></i></label>
                                <input type="text" id="siteId" name="siteId" placeholder=" "  required  disabled/>
                                <label for="siteId" class="txt">Site Id</label>
                            </div>

                            <div class="form-group col-md-6 col-10 mx-auto" style="margin-bottom: 10px;">
                                <label class="required" for="siteVisitDate"><i class="fa fa-calendar"></i></label>
                                <input type="date" id="siteVisitDate" name="siteVisitDate" placeholder=" " required  disabled/>
                                <label for="siteVisitDate" class="txt">Site Visit Date</label>
                            </div>
                            <!--                            <p id="note"><span>NOTE:-</span> If Latitude Or Longitude values not available enter 0(zero)</p>-->
                        </div>


                        <div class="row">
                            <div class="form-group col-md-6 col-10 mx-auto">
                                <label for="siteLat" ><i class="fa fa-map-pin"></i></label>
                                <input type="text" id="siteLat" name="siteLat" placeholder=" "  required  disabled/>
                                <label for="siteLat" class="txt">Site Latitude</label>
                            </div>

                            <div class="form-group col-md-6 col-10 mx-auto">
                                <label for="sitelong" ><i class="fa fa-map-pin"></i></label>
                                <input type="text" id="sitelong" name="sitelong" placeholder=" "  required  disabled/>
                                <label for="sitelong" class="txt">Site Longitude</label>
                            </div>
                        </div>
                        <div class="row">
                            <div class="form-group col-md-6 col-10 mx-auto" style="margin-bottom: 10px;">
                                <label class="required" for="siteVisitOrder"><i class="fa fa-list-ol"></i></label>
                                <input type="text" id="siteVisitOrder" name="siteVisitOrder" placeholder=" " required  disabled/>
                                <label for="siteVisitOrder" class="txt">Site Visit Order</label>
                            </div>
                            <div class="form-group col-md-6 col-10 mx-auto">
                                <label for="distance" ><i class="fa fa-arrows"></i></label>
                                <input type="text" id="distance" class="form-cntrl" step="0.0001" name="distance" placeholder=" "  required  disabled/>
                                <label for="distance" class="txt">Distance</label>
                            </div>
                        </div>
                        <div class="row">
                            <div class="form-group col-md-6 col-10 mx-auto">
                                <label for="userLat" ><i class="fa fa-map-pin"></i></label>
                                <input type="text" id="userLat" class="form-cntrl" name="userLat" placeholder=" "  required  disabled/>
                                <label for="userLat" class="txt">User Latitude</label>
                            </div>

                            <div class="form-group col-md-6 col-10 mx-auto">
                                <label for="userLong" ><i class="fa fa-map-pin"></i></label>
                                <input type="text" id="userLong" class="form-cntrl" name="userLong" placeholder=" "  required  disabled/>
                                <label for="userLong" class="txt">User Longitude</label>
                            </div>
                        </div>
                        <div class="row">
                            <div class="form-group col-md-6 col-10">
                                <label for="userLntAddress" ><i class="fa fa-address-book"></i></label>
                                <input type="text" id="userLntAddress" class="form-cntrl" name="userLntAddress" placeholder=" "  required  disabled/>
                                <label for="userLntAddress" class="txt">User Location Address</label>
                            </div>

                           
                        </div>


                        <a class=" edit-site-btn btn btn-primary text-white" id="editbtn">Edit</a>
                        <!--                        <input id="updatebtn" type="submit" value="Update" class=" update-site-btn btn btn-primary" />-->

                        <button id="updatebtn" type="submit" class="update-site-btn btn btn-primary">Update<i id="updateSiteSpinner" class='fa fa-spinner d-none fa-spin ' aria-hidden='true'></i></button>
                    </form>
                    <div id="msgPanel" class="panel mt-3"></div>
                </div>
            </div>
        </div>
    </div>
 <script src="../../js/constants.js"></script>
    <script src="../js/common.js"></script>
    <script src="../js/site.js "></script>
    <script src="../js/updateSite.js"></script>
</body>

</html>
