<?php include('include/auth.php');?>
<!doctype html>
<html class="fixed dark">
<?php 

     
    $pagerole="user";
	include('include/head.php');
    if (isset($_GET['custid'])  && $_GET['custid']!='0') {
        $custid=$_GET['custid'];
        $sql = $db2->query("SELECT * FROM jostj_vikrentcar_orders WHERE jostj_vikrentcar_orders.id='$custid' ") or die(mysql_error());
        $row = mysqli_fetch_array( $sql );
        $nominative=$row['nominative'];
       $phone=$row['phone'];
       $custmail=$row['custmail'];
       $custdata=$row['custdata'];
       $cd_dob=$row['cd_dob'];
$cd_flight=$row['cd_flight'];
$cd_hotel=$row['cd_hotel'];
$cd_hotelroom=$row['cd_hotelroom'];
$cd_dlnumber=$row['cd_dlnumber'];
$cd_passnum=$row['cd_passnum'];
$cd_address=$row['cd_address'];
    }
    else {
    $custid='0';
    
    }
    $disfunct="disabled";
   
		?>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/rome/3.0.2/rome.css"
    integrity="sha512-TAAJeGIyqkrJ4o4ZkIPesmqNKH9zowoRBGHkHUf1s4vWeII8Dv3NayKIq8Hws02HWT3OpocxeSaOQEQo9SH7ZQ=="
    crossorigin="anonymous" />
<script>
  
    function data_copy() {


        var m1 = moment(document.form1.ritiro2.value, 'DD-MM-YYYY HH:mm');
        var m2 = moment(document.form1.consegna2.value, 'DD-MM-YYYY HH:mm');
        var m3 = m2.diff(m1, 'minutes');
        m3.toFixed(0) / 1440;
        document.form1.days2.value = m3 / 1440;
       

    }
</script>
<style>
    .ecommerce-timeline:before {

        box-shadow: none !important;
    }

    .ecommerce-timeline:after {

        box-shadow: none !important;
    }

    .editbutton {
        position: absolute;
        right: 15px;
        top: 10px;
    }

    .editnotes {
        position: absolute;
        right: 15px;
        bottom: 10px;
    }

    .rd-container-attachment {
        z-index: 10002;
        zoom: 80%
    }

    .modal {
        max-width: 90%;
    }
</style>

<body>

    <section class="body">

        <!-- start: header -->
        <header class="header">
            <div class="logo-container">
                <a href="index.php" class="logo">
                    <img src="img/logo-light.png" width="75" height="35" alt="Web Voyage" />
                </a>
                <div class="d-md-none toggle-sidebar-left" data-toggle-class="sidebar-left-opened" data-target="html"
                    data-fire-event="sidebar-left-opened">
                    <i class="fas fa-bars" aria-label="Toggle sidebar"></i>
                </div>
            </div>

            <!-- start: search & user box -->
            <div class="header-right">
                <?php include('include/search.php');?>


                <span class="separator"></span>
                <?php include('include/notifications.php');?>


                <span class="separator"></span>
                <?php include('include/userbox.php');?>

            </div>
            <!-- end: search & user box -->
        </header>
        <!-- end: header -->

        <div class="inner-wrapper">
            <!-- start: sidebar -->
            <?php include('include/nav.php');?>
            <!-- end: sidebar -->

            <section role="main" class="content-body">
                <header class="page-header">
                    <h2># New Reservation
                    </h2>

                    <div class="right-wrapper text-right">
                        <ol class="breadcrumbs">
                            <li>
                                <a href="index.php">
                                    <i class="fas fa-home"></i>
                                </a>
                            </li>
                            <li><span>WV Admin</span></li>
                            <li><span># New Reservation </span></li>
                        </ol>

                        <a class="sidebar-right-toggle" data-open="sidebar-right"><i
                                class="fas fa-chevron-left"></i></a>
                    </div>
                </header>

                <!-- start: page -->
                <form class="order-details action-buttons-fixed" action="actions/newreservation.php" method="post"
                    name="form1">

                    <div class="row">

                        <div class="col-xl-4 mb-3 ">

                            <div class="card ">
                                <div class="card-header">
                                    <h2 class="card-title">General</h2>
                                </div>
                                <div class="card-body">
                                    <div class="form-row">
                                        <div class="form-group col-12 mb-3">
                                            <label>Status</label>
                                            <select class="form-control form-control-modern" name="orderStatus" required >
                                                <option value="" disabled selected hidden>
                                                    Select Status
                                                </option>
                                                <option value="on-hold"
                                                    <?php if($row['status']=="standby"){echo "selected";}?>>StandBy
                                                </option>

                                                <option value="completed"
                                                    <?php if($row['status']=="confirmed"){echo "selected";}?>>Confrimed
                                                </option>
                                                <!--<option value="cancelled"
                                                    <?php if($row['status']=="cancelled"){echo "selected";}?>>Cancelled
                                                </option>
                                                <option value="refunded"
                                                    <?php if($row['status']=="contract"){echo "selected";}?>>Contract
                                                </option>-->

                                            </select>
                                        </div>


                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col-4 mb-3">
                                            <label>Rental Days</label>
                                            <input type="text" class="form-control form-control-modern" name="days"
                                                value="" step=".01" required/>
                                                
                                        </div>
                                        <div class="form-group col-4 mb-3 pt-0" style="border-top:none;">
                                        <label>Calculated Days</label>
                                            <input type="text" class="form-control form-control-modern" name="days2" disabled
                                                value=""  />
                                                
                                           
                                        </div>
                                        <div class="form-group col-4 mb-3 pt-5" style="border-top:none;">
                                        <span class="highlight text-center" onclick="data_copy()">Calculate Days/hours</span>
                                                
                                           
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col mb-3">
                                            <label>Source</label>
                                            <select class="form-control form-control-modern" name="source"
                                                data-plugin-selectTwo required>
                                                <option value="" disabled selected hidden>
                                                    Select Source
                                                </option>
                                                <?php $sqlcat2 = "SELECT * FROM jostj_vikrentcar_sources";
                                                        $result2 = mysqli_query($db2,$sqlcat2);
                                                        while($rowcat2 = mysqli_fetch_array($result2)) {?>


                                                <option value="<?php echo $rowcat2['id'];?>">
                                                    <?php echo $rowcat2['name'];?></option>

                                                <?php } ?>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col mb-3">
                                            <label>Employee</label>
                                            <select class="form-control form-control-modern" name="employee"
                                                data-plugin-selectTwo required>
                                                <option value="" disabled selected hidden>
                                                    Select Emloyee
                                                </option>
                                                <?php $sqlcat1 = "SELECT * FROM jostj_vikrentcar_employees WHERE jostj_vikrentcar_employees.active=1";
                                                        $result1 = mysqli_query($db2,$sqlcat1);
                                                        while($rowcat1 = mysqli_fetch_array($result1)) {?>


                                                <option value="<?php echo $rowcat1['id'];?>">
                                                    <?php echo $rowcat1['Name'];?></option>

                                                <?php } ?>
                                            </select>
                                        </div>
                                    </div>

                                </div>
                            </div>
                            <div class="card card">
                                <div class="card-header">
                                    <h2 class="card-title">Customer</h2>
                                </div>
                                <div class="card-body">
                                    <div class="form-row">
                                        <div class="form-group col mb-3">
                                            <label>Drivers Name</label>
                                            <input type="text" class="form-control form-control-modern"
                                                name="nominative" value="<?php echo $nominative;?>" required />
                                           
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col-6 mb-3 pt-0" style="border-top:none;">
                                            <label>Date of Birth</label>
                                            <input type="text" class="form-control form-control-modern" name="cd_dob"
                                                value="<?php echo $cd_dob;  ?>" />
                                        </div>
                                        <div class="form-group col-6 mb-3 pt-0" style="border-top:none;">
                                            <label>Phone</label>
                                            <input type="text" class="form-control form-control-modern" name="phone"
                                                value="<?php echo $phone;?>"  />
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col mb-3">
                                            <label>Email</label>
                                            <input type="text" class="form-control form-control-modern" name="custmail"
                                                value="<?php echo $custmail;?>"  />
                                        </div>
                                    </div>

                                    <div class="form-row">
                                        <div class="form-group col-4 mb-3 pt-0" style="border-top:none;">
                                            <label>Flight</label>
                                            <input type="text" class="form-control form-control-modern" name="flight"
                                                value="<?php echo $cd_flight;  ?>" />
                                        </div>
                                        <div class="form-group col-4 mb-3 pt-0" style="border-top:none;">
                                            <label>Hotel</label>
                                            <input type="text" class="form-control form-control-modern" name="hotel"
                                                value="<?php echo $cd_hotel;  ?>" />
                                        </div>
                                        <div class="form-group col-4 mb-3 pt-0" style="border-top:none;">
                                            <label>Room</label>
                                            <input type="text" class="form-control form-control-modern" name="room"
                                                value="<?php echo $cd_hotelroom;  ?>" />
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col-6 mb-3 pt-0" style="border-top:none;">
                                            <label>Drivers Licence</label>
                                            <input type="text" class="form-control form-control-modern"
                                                name="cd_dlnumber" value="<?php echo $cd_dlnumber;  ?>" />
                                        </div>
                                        <div class="form-group col-6 mb-3 pt-0" style="border-top:none;">
                                            <label>Passport/ID Number</label>
                                            <input type="text" class="form-control form-control-modern"
                                                name="cd_passnum" value="<?php echo $cd_passnum;  ?>" />
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col mb-3">
                                            <label>Address</label>
                                            <textarea rows="1" class="form-control" name="cd_address"
                                                id="cd_address"><?php echo $cd_address;?> </textarea>
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col mb-3">
                                            <label>Customer Data</label>
                                            <textarea rows="7" class="form-control" name="custdata" id="custdata"
                                                >Notes: </textarea>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="col-xl-4">
                            <div class="card card">
                                <div class="card-header">
                                    <h2 class="card-title">Pick Up </h2>
                                </div>
                                <div class="card-body">
                                    <div class="form-row">
                                        <div class="form-group col mb-1">
                                            <label>Pick Up Date / Time</label>
                                            <input class="form-control" type="text" name="ritiro2" id="ritiro2"
                                                value="" required>
                                        </div>

                                    </div>

                                    <div class="form-row">
                                        <div class="form-group col mb-3">
                                            <label>Pick Up Location</label>
                                            <select class="form-control form-control-modern" name="idplacer"
                                                data-plugin-selectTwo required>
                                                <?php $sqlcat = "SELECT * FROM jostj_vikrentcar_places";
                                                    $result = mysqli_query($db2,$sqlcat);
                                                    while($rowcat = mysqli_fetch_array($result)) {?>

                                                <option value="<?php echo $rowcat['id'];?>">
                                                    <?php echo $rowcat['name'];?></option>


                                                <?php } ?>

                                            </select>
                                        </div>
                                    </div>


                                </div>
                            </div>
                            <div class="card card">
                                <div class="card-header">
                                    <h2 class="card-title">Vehicle Info </h2>
                                </div>
                                <div class="card-body">

                                    <div class="form-row">
                                        <div class="form-group col mb-3">
                                            <label>Selected Vehicle</label>
                                            <select class="form-control form-control-modern" name="idcar"
                                                data-plugin-selectTwo required>
                                                <?php $sqlcat = "SELECT * FROM jostj_vikrentcar_cars";
                                                    $result = mysqli_query($db2,$sqlcat);
                                                    while($rowcat = mysqli_fetch_array($result)) {?>

                                                <option value="<?php echo $rowcat['id'];?>">
                                                    <?php echo $rowcat['name'];?></option>


                                                <?php } ?>

                                            </select>
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col mb-3">
                                            <label>Excess</label>
                                            <input type="text" class="form-control form-control-modern" name="idtar"
                                                value="" />
                                        </div>
                                    </div>


                                </div>
                            </div>
                            <div class="card card">
                                <div class="card-header">
                                    <h2 class="card-title">Optional Extras </h2>
                                </div>
                                <div class="card-body">
                                    <?php
                                    if (is_null($row['optionals'])) {
                                        $optionals="1:0;2:0;3:0;4:0;5:0;6:0;7:0";
                                    }
                                    else {
                                        $optionals=$row['optionals'];
                                    }
                                    $st2=explode(';', $optionals);
                            foreach ($st2 as $index=>$value){
                                if ($value == NULL) {
                                    break;
                                }
                                $optionalname=trim(explode(':', $value)[0]);
                                $optionalquant=trim(explode(':', $value)[1]);
                                $sqlopt = $db2->query("SELECT * FROM jostj_vikrentcar_optionals  WHERE jostj_vikrentcar_optionals.id='$optionalname'  ") or die(mysql_error());
                                                    $rowopt = mysqli_fetch_array( $sqlopt );
                            if ($row['source']==16){
                                $sqlopt2 = $db->query("SELECT * FROM jos8r_vikrentcar_optionals  WHERE jos8r_vikrentcar_optionals.id='$optionalname'  ") or die(mysql_error());
                                $rowopt2 = mysqli_fetch_array( $sqlopt2 );
                                $optionalvalue=$rowopt2['cost']*$optionalquant;
                            }
                            else{
                                $optionalvalue=$rowopt['cost']*$optionalquant;
                            }                    
                            ?>
                                    <div class="form-row">
                                        <div class="form-group col-4 mb-3">

                                            <input type="text" class="form-control form-control-modern"
                                                name="op<?php echo $index+1;?>n"
                                                value="<?php echo $rowopt['name'];  ?>" />
                                        </div>
                                        <div class="form-group col-1 mb-3 pt-0 text-center" style="border-top:none;"> X
                                        </div>
                                        <div class="form-group col-2  mb-3 pt-0" style="border-top:none;">

                                            <input type="text" class="form-control form-control-modern"
                                                name="op<?php echo $index+1;?>q"
                                                value="<?php echo $optionalquant;  ?>" />
                                        </div>
                                        <div class="form-group col-1 mb-3 pt-0 text-center" style="border-top:none;"> =
                                        </div>
                                        <div class="form-group col-3  mb-3 pt-0" style="border-top:none;">

                                            <input type="text" class="form-control form-control-modern"
                                                name="op<?php echo $index+1;?>v"
                                                value="<?php echo $optionalvalue;  ?>" />
                                        </div>
                                        <div class="form-group col-1 mb-3 pt-0 text-left" style="border-top:none;"> €
                                        </div>
                                    </div>

                                    <?php
                            
                            }
                        
                            ?>

                                </div>
                            </div>
                        </div>
                        <div class="col-xl-4">


                            <div class="card card">
                                <div class="card-header">
                                    <h2 class="card-title">Drop Off </h2>
                                </div>
                                <div class="card-body">
                                    <div class="form-row">
                                        <div class="form-group col mb-1">
                                            <label>Drop Off Date / Time</label>
                                            <input class="form-control" type="text" name="consegna2" id="consegna2"
                                                value="" required>


                                        </div>

                                    </div>

                                    <div class="form-row">
                                        <div class="form-group col mb-3">
                                            <label>Drop Off Location</label>
                                            <select class="form-control form-control-modern" name="idreturnplacer"
                                                data-plugin-selectTwo required>
                                                <?php $sqlcat = "SELECT * FROM jostj_vikrentcar_places";
                                                        $result = mysqli_query($db2,$sqlcat);
                                                        while($rowcat = mysqli_fetch_array($result)) {?>

                                                <option value="<?php echo $rowcat['id'];?>">
                                                    <?php echo $rowcat['name'];?></option>


                                                <?php } ?>
                                            </select>

                                        </div>
                                    </div>


                                </div>
                            </div>
                            
                            <div class="card card">
                                <div class="card-header">
                                    <h2 class="card-title">Finance Info </h2>
                                </div>
                                <div class="card-body">
                                    <div class="form-row">
                                        <div class="form-group col mb-3">
                                            <label>Reservation Price</label>
                                            <input type="text" class="form-control form-control-modern"
                                                name="order_total" value="" placeholder="0.00" required/>
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col mb-3">
                                            <label>Total Paid</label>
                                            <input type="text" class="form-control form-control-modern" name="totpaid"
                                                value="" required placeholder="0.00"/>
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col mb-3">
                                            <label>Pay Locally</label>
                                            <input type="text" class="form-control form-control-modern" name="cust_cost"
                                                value="" placeholder="0.00" required/>
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col mb-3">
                                            <label>Extra Costs</label>
                                            <input type="text" class="form-control form-control-modern"
                                                name="extracosts" value=""  placeholder="0.00" required/>
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col mb-3">
                                            <label>Payment Method</label>
                                            <select class="form-control form-control-modern" title="Please select at least one Payment Method" name="idpayment" required
                                                data-plugin-selectTwo>
                                                <option value="" disabled selected hidden>
                                                    Select Payment Method
                                                </option>
                                                <?php $sqlcat = "SELECT * FROM jostj_vikrentcar_gpayments";
                                                        $result = mysqli_query($db2,$sqlcat);
                                                        while($rowcat = mysqli_fetch_array($result)) {?>

                                                <option
                                                    value="<?php echo $rowcat['id'];?>=<?php echo $rowcat['name'];?>">
                                                    <?php echo $rowcat['name'];?></option>


                                                <?php } ?>
                                            </select>
                                        </div>
                                    </div>

                                </div>
                            </div>

                        </div>
                        <div class="col-xl-12 mb-3 mt-4">
                            <div class="card card">
                                <div class="card-header">
                                    <h2 class="card-title">Notes
                                        <!--<span class="editbutton"><a
                                                class="modal-basic btn btn-success " href="#modaladdnote"><i
                                                    class="fas fa-plus"></i></a></span>-->
                                    </h2>
                                </div>
                                <div class="card-body">
                                    <div class="form-row">
                                        <div class="form-group col-xl-6 mb-3">
                                            <label>Admin Notes </label>
                                            <textarea rows="10" class="form-control" name="adminnotes"
                                                id="adminnotes"></textarea>

                                        </div>
                                        <div class="form-group col-xl-6 mb-3 pt-0" style="border-top:none;">
                                            <label>Email Text</label>
                                            <textarea rows="10" class="form-control" name="email_text"
                                                id="email_text"> </textarea>
                                        </div>
                                    </div>
                                </div>

                            </div>

                        </div>

                        <div class="row action-buttons">

                        <div class="col-12 col-md-auto">
                            <button type="submit"
                                class="submit-button btn btn-primary btn-px-4 py-3 d-flex align-items-center font-weight-semibold line-height-1"
                                data-loading-text="Loading...">
                                <i class="bx bx-save text-4 mr-2"></i> Save Reservation
                            </button>
                        </div>

                            <div class="col-12 col-md-auto ">
                                <a href="reservations-local.php"
                                    class="cancel-button btn btn-light btn-px-4 py-3 d-flex align-items-center font-weight-semibold line-height-1">Return</a>
                            </div>
                        </div>
                        <input type="hidden" name="ts" id="ts" value="<?php echo time(); ?>">
                </form>
                <!-- end: page -->
                <?php include('include/modals.php');?>
            </section>
        </div>

        <?php include('include/aside.php');?>

    </section>


    <!-- Vendor -->
    <script src="vendor/jquery/jquery.js"></script>
    <script src="vendor/jquery-browser-mobile/jquery.browser.mobile.js"></script>
    <script src="vendor/popper/umd/popper.min.js"></script>
    <script src="vendor/bootstrap/js/bootstrap.js"></script>
    <script src="vendor/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
    <script src="vendor/common/common.js"></script>
    <script src="vendor/nanoscroller/nanoscroller.js"></script>
    <script src="vendor/magnific-popup/jquery.magnific-popup.js"></script>
    <script src="vendor/jquery-placeholder/jquery.placeholder.js"></script>

    <!-- Specific Page Vendor -->
    <script src="vendor/select2/js/select2.js"></script>
    <script src="vendor/pnotify/pnotify.custom.js"></script>
    <script src="vendor/ios7-switch/ios7-switch.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.1/moment.min.js"
        integrity="sha512-qTXRIMyZIFb8iQcfjXWCO8+M5Tbc38Qi5WzdPOYZHIlZpzBHG3L3by84BBBOiRGiEb7KKtAOAs5qYdUiZiQNNQ=="
        crossorigin="anonymous"></script>
        <script src="vendor/jquery-validation/jquery.validate.js"></script>
    <!--(remove-empty-lines-end)-->

    <!-- Theme Base, Components and Settings -->
    <script src="js/theme.js"></script>

    <!-- Theme Custom -->
    <script src="js/custom.js"></script>

    <!-- Theme Initialization Files -->
    <script src="js/theme.init.js"></script>

    <!-- Examples -->
    <script src="js/examples/examples.advanced.form.js"></script>
    <script src="js/examples/examples.validation.js"></script>
</body>

</html>
<!--(remove-empty-lines-end)-->

<!-- Theme Base, Components and Settings -->
<script src="js/theme.js"></script>

<!-- Theme Custom -->
<script src="js/custom.js"></script>

<!-- Theme Initialization Files -->
<script src="js/theme.init.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-modal/0.9.1/jquery.modal.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-modal/0.9.1/jquery.modal.min.css" />
<!-- Examples -->
<script src="js/examples/examples.header.menu.js"></script>
<script src="js/examples/examples.ecommerce.orders.detail.js"></script>
<script src="js/examples/examples.modals.js"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.1/moment.min.js"
    integrity="sha512-qTXRIMyZIFb8iQcfjXWCO8+M5Tbc38Qi5WzdPOYZHIlZpzBHG3L3by84BBBOiRGiEb7KKtAOAs5qYdUiZiQNNQ=="
    crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/rome/3.0.2/rome.standalone.min.js"
    integrity="sha512-cJ4aSZY0xBXrcH65MOwCloQAiTNCBm2F8/KlcBTlczgn4txZkT7h3YSXULN06pkUnsySMEg5BU4QCHAr97U7ng=="
    crossorigin="anonymous"></script>
    <?php if($custid==0){?>
    <script>
        $(window).on('load', function() {
        $('#modalselectCustomer').modal('show');
    });
        </script>
    <?php }?>
<script>
         
    const options = {
        "appendTo": document.body,
        "autoClose": true,
        "autoHideOnBlur": true,
        "autoHideOnClick": true,
        "date": true,
        "dateValidator": Function.prototype,
        "dayFormat": "DD",
        "initialValue": null,
        "inputFormat": "DD-MM-YYYY HH:mm",
        "invalidate": true,
        "max": null,
        "min": null,
        "monthFormat": "MMMM YYYY",
        "monthsInCalendar": 1,
        "required": false,
        "strictParse": false,
        "styles": {
            "back": "rd-back",
            "container": "rd-container",
            "date": "rd-date",
            "dayBody": "rd-days-body",
            "dayBodyElem": "rd-day-body",
            "dayConcealed": "rd-day-concealed",
            "dayDisabled": "rd-day-disabled",
            "dayHead": "rd-days-head",
            "dayHeadElem": "rd-day-head",
            "dayRow": "rd-days-row",
            "dayTable": "rd-days",
            "month": "rd-month",
            "next": "rd-next",
            "positioned": "rd-container-attachment",
            "selectedDay": "rd-day-selected",
            "selectedTime": "rd-time-selected",
            "time": "rd-time",
            "timeList": "rd-time-list",
            "timeOption": "rd-time-option"
        },
        "time": true,
        "timeFormat": "HH:mm",
        "timeInterval": 900,
        "timeValidator": Function.prototype,
        "weekdayFormat": "min",
        "weekStart": moment().weekday(0).day()
    }
    rome(ritiro2, options);
    rome(consegna2, options);
</script>
</body>

</html>
<?php  include('include/footer.php');?>