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

     
    $pagerole="user";
	include('include/head.php');
    if (isset($_GET['webid'])  && $_GET['webid']!='0') {
        $fid=$_GET['webid'];
        $sql = $db->query("SELECT * FROM jos8r_vikrentcar_orders WHERE jos8r_vikrentcar_orders.id='$fid' ") or die(mysql_error());
        $row = mysqli_fetch_array( $sql );
       $nominative=$row['nominative'];
       $phone=$row['phone'];
       $custmail=$row['custmail'];
       $custdata=$row['custdata'];
       $custdata_parts=explode("\n",$custdata); 
    }
    else {
    $custid='0';
    $custdata="Country: 
    Date of Birth: 
    Address: 
    Zip Code: 
    City: 
    Driving License Number: 
    Passport Number: 
    Flight Number: ";
    }
    $disfunct="disabled";
   
		?>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/rome/3.0.2/rome.css"
    integrity="sha512-TAAJeGIyqkrJ4o4ZkIPesmqNKH9zowoRBGHkHUf1s4vWeII8Dv3NayKIq8Hws02HWT3OpocxeSaOQEQo9SH7ZQ=="
    crossorigin="anonymous" />

<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.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 Web Reservation Web ID: #<?php echo $fid?>
                    </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 Web 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/newwebreservation.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="orderStatus2" required disabled>
                                                <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>
                                        <input type="hidden" name="status" id="status" value="<?php echo $row['status'];?>">

                                    </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="days2"
                                                value="<?php echo $row['days'];?>" required disabled/>
                                                <input type="hidden" name="days" id="days" value="<?php echo $row['days'];?>">
                                        </div>
                                      
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col mb-3">
                                            <label>Source</label>
                                            <input type="text" class="form-control form-control-modern" name="source2"
                                                value="motorclub.gr"  required disabled/>
                                                <input type="hidden" name="source" id="source" value="16">
                                                <input type="hidden" name="employee" id="employee" value="00">
                                        </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">
                                    
                                        <?php foreach ($custdata_parts as $custdet) {
                                                    if (strlen($custdet) < 1) {
                                                        continue;
                                                    }
                                                    $custdet_parts = explode(':', $custdet);
                                                    $custd_lbl = '';
                                                    $custd_val = '';
                                                    if (count($custdet_parts) < 2) {
                                                        $custd_val = $custdet;
                                                    } else {
                                                        $custd_lbl = $custdet_parts[0];
                                                        unset($custdet_parts[0]);
                                                        $custd_val = trim(implode(':', $custdet_parts));
                                                    }
                                                    if ($custd_lbl=="Όνομα" || $custd_lbl=="Vorname" || $custd_lbl=="Nom" || $custd_lbl=="Nome" || $custd_lbl=="Имя"){$custd_lbl="Name";}
                                                    if ($custd_lbl=="Επώνυμο" || $custd_lbl=="Nachname" || $custd_lbl=="Prénom" || $custd_lbl=="Cognome" || $custd_lbl=="Фамилия"){$custd_lbl="Last Name";}
                                                    if ($custd_lbl=="Τηλέφωνο" || $custd_lbl=="Telefon" || $custd_lbl=="Téléphone" || $custd_lbl=="Telefono" || $custd_lbl=="Телефон"){$custd_lbl="Phone";}
                         if ($custd_lbl=="Διεύθυνση" || $custd_lbl=="Adresse" || $custd_lbl=="Addresse" || $custd_lbl=="Indirizzo" || $custd_lbl=="Адрес"){$custd_lbl="Address";}
                         if ($custd_lbl=="Τ.Κ" || $custd_lbl=="Postleitzahl" || $custd_lbl=="Code Postal" || $custd_lbl=="CAP" || $custd_lbl=="Почтовый индекс"){$custd_lbl="Zip Code";}
                         if ($custd_lbl=="Πόλη" || $custd_lbl=="Stadt" || $custd_lbl=="Ville" || $custd_lbl=="Citta" || $custd_lbl=="Город"){$custd_lbl="City";}
                         if ($custd_lbl=="Πολιτεία" || $custd_lbl=="Land" || $custd_lbl=="Etat" || $custd_lbl=="Nazione" || $custd_lbl=="Страна"){$custd_lbl="Country";}
                         if ($custd_lbl=="Ημερομηνία γεννήσεως" || $custd_lbl=="Geburtsdatum" || $custd_lbl=="Date de naissance" || $custd_lbl=="Data di Nascita" || $custd_lbl=="Дата рождения"){$custd_lbl="Date of Birth";}
                         if ($custd_lbl=="Αριθμός πτήσης" || $custd_lbl=="Flugnummer" || $custd_lbl=="Numbero de votre vol" || $custd_lbl=="Volo Numero" || $custd_lbl=="Номер рейса"){$custd_lbl="Flight Number";}
                         if ($custd_lbl=="Σημειώσεις" || $custd_lbl=="Notizen" || $custd_lbl=="Notes" || $custd_lbl=="Note" || $custd_lbl=="Примечания"){$custd_lbl="Notes";}
                                                    ?>
                                                  
                                                   
                                        <div class="form-group col-6 mb-3 pt-0" style="border-top:none;">
                                            <label><?php echo $custd_lbl;?></label>
                                            <input type="text" class="form-control form-control-modern" name="<?php echo $custd_lbl;?>2"
                                                value="<?php echo $custd_val;?>" required disabled/>
                                                <input type="hidden" name="<?php echo str_replace(' ', '_', $custd_lbl);?>" id="<?php echo $custd_lbl;?>" value="<?php echo $custd_val;?>">     
                                        </div>
                                  
                                      
                                                
                                               
                                                <?php 
                                                            }
                                                            ?>
                                                              </div>
                                  <input type="hidden" name="custmail" id="custmail" value="<?php echo $custmail;?>">
                                  <input type="hidden" name="custdata" id="custdata" value="<?php echo $custdata;?>">
                                  <input type="hidden" name="phone" id="phone" value="<?php echo $phone;?>">
                                  <input type="hidden" name="nominative" id="nominative" value="<?php echo $nominative;?>">
                                </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="<?php echo date('d/m/Y H:i', $row['ritiro']);?>" required disabled>
                                                <input type="hidden" name="ritiro" id="ritiro" value="<?php echo $row['ritiro'];?>">
                                        </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="idplace2"
                                                data-plugin-selectTwo required disabled>
                                                <?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 if ($row['idplace']==$rowcat['id']){ echo "selected";} else {};?>>
                                                <?php echo $rowcat['name'];?></option>



                                                <?php } ?>

                                            </select>
                                            <input type="hidden" name="idplace" id="idplace" value="<?php echo $row['idplace'];?>">
                                        </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="idcar2"
                                                data-plugin-selectTwo required disabled>
                                                <?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 if ($row['idcar']==$rowcat['id']){ echo "selected";} else {};?>>
                                                <?php echo $rowcat['name'];?></option>

                                                <?php } ?>

                                            </select>
                                            <input type="hidden" name="idcar" id="idcar" value="<?php echo $row['idcar'];?>">
                                        </div>
                                    </div>
                                    <?php 
                                     if($row['idtar']==NULL){
                                        $priceid=1;
                                        $idcar=$row['idcar'];
                                        $excess="Zero";?>
                                        <input type="hidden" name="idtar" id="idtar" value="836">
                                        <?php
                                     }
                                     else{
                                    $sqtar = $db->query("SELECT * FROM jos8r_vikrentcar_orders LEFT JOIN jos8r_vikrentcar_dispcost ON jos8r_vikrentcar_dispcost.id=jos8r_vikrentcar_orders.idtar  WHERE jos8r_vikrentcar_orders.id='$fid'  ") or die(mysql_error());
                                     $rowtar = mysqli_fetch_array( $sqtar );
                                     $priceid=$rowtar['idprice'];
                                     $idcar=$rowtar['idcar'];
                                     $excess=$rowtar['attrdata'];
                                     ?>
                                      <input type="hidden" name="idtar" id="idtar" value="<?php echo $rowtar['idtar'];?>">
                                     <?php
                                     }
                                     $sqtar2 = $db->query("SELECT * FROM jos8r_vikrentcar_prices  WHERE jos8r_vikrentcar_prices.id='$priceid'  ") or die(mysql_error());
                                     $rowtar2 = mysqli_fetch_array( $sqtar2 );
                                     $sqlcar = $db2->query("SELECT * FROM jostj_vikrentcar_cars WHERE jostj_vikrentcar_cars.id='$idcar'  ") or die(mysql_error());
                                     $rowcar = mysqli_fetch_array( $sqlcar );
                                     $idcat=$rowcar['idcat'];
                                     $sqlcar2 = $db2->query("SELECT * FROM jostj_vikrentcar_categories WHERE jostj_vikrentcar_categories.id='$idcat'  ") or die(mysql_error());
                                     $rowcar2 = mysqli_fetch_array( $sqlcar2 );
                                     $group=$rowcar2['name'];
                                    ?>
                                    <div class="form-row">
                                        <div class="form-group col mb-3">
                                            <label>Reserved Group</label>
                                            <input type="text" class="form-control form-control-modern" name="group"
                                                value="<?php echo $group;?>" <?php echo $disfunct;?> />
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col mb-3">
                                            <label>Tarrif</label>
                                            <input type="text" class="form-control form-control-modern" name="tarrif"
                                                value="<?php echo $rowtar2['name'];?>" <?php echo $disfunct;?> />
                                        </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="excess"
                                                value="<?php echo $excess?>" <?php echo $disfunct;?> />
                                        </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 ($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]);
                            
                                $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;
                                              
                            ?>
                                    <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 $rowopt2['name'];  ?>" disabled/>
                                        </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;  ?>" disabled/>
                                        </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;  ?>" disabled/>
                                        </div>
                                        <div class="form-group col-1 mb-3 pt-0 text-left" style="border-top:none;"> €
                                        </div>
                                    </div>

                                    <?php
                            
                            }
                        
                            ?>
 <input type="hidden" name="optionals" id="optionals" value="<?php echo $optionals;?>">
                                </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="<?php echo date('d/m/Y H:i', $row['consegna']);?>" required disabled>
                                                <input type="hidden" name="consegna" id="consegna" value="<?php echo $row['consegna'];?>">


                                        </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="idreturnplace2"
                                                data-plugin-selectTwo required disabled>
                                                <?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 if ($row['idreturnplace']==$rowcat['id']){ echo "selected";} else {};?>>
                                                <?php echo $rowcat['name'];?></option>


                                                <?php } ?>
                                            </select>
                                            <input type="hidden" name="idreturnplace" id="idreturnplace" value="<?php echo $row['idreturnplace'];?>">
                                        </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_total2" value="<?php echo $row['order_total'];  ?>" placeholder="0.00" required disabled/>
                                                <input type="hidden" name="order_total" id="order_total" value="<?php echo $row['order_total'];?>">
                                        </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="totpaid2"
                                                value="<?php echo $row['totpaid'];  ?>" required disabled/>
                                                <input type="hidden" name="totpaid" id="totpaid" value="<?php if (empty($row['totpaid'])){echo "0.00";} else{ echo $row['totpaid'];}?>">
                                        </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_cost2"
                                                value="<?php echo $row['cust_cost'];  ?>" placeholder="0.00" required disabled/>
                                            
                                                <input type="hidden" name="cust_cost" id="cust_cost" value="<?php if (empty($row['cust_cost'])){echo "0.00";} else{ echo $row['cust_cost'];}?>">
                                        </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="extracosts2" value="<?php echo $row['extracosts'];  ?>"  placeholder="0.00" required disabled/>
                                                <input type="hidden" name="extracosts" id="extracosts" value="<?php if (empty($row['extracosts'])){echo "0.00";} else{ echo $row['extracosts'];}?>">
                                        </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="idpayment2" required
                                                data-plugin-selectTwo disabled>
                                                <option value="" disabled selected hidden>
                                                    Select Payment Method
                                                </option>
                                                <?php $sqlcat = "SELECT * FROM jos8r_vikrentcar_gpayments";
                                                        $result = mysqli_query($db,$sqlcat);
                                                        while($rowcat = mysqli_fetch_array($result)) {?>

                                            <option value="<?php echo $rowcat['id'];?>=<?php echo $rowcat['name'];?>"  <?php if ($row['idpayment']==$rowcat['id']."=".$rowcat['name']){ echo "selected";} else {};?>>
                                         <?php echo $rowcat['name'];?></option>


                                                <?php } ?>
                                            </select>
                                            <input type="hidden" name="idpayment" id="idpayment" value="<?php echo $row['idpayment'];?>">
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col-xl-12 mb-3">
                                            <label>Payment log</label>
                                            <textarea rows="10" class="form-control" name="paymentlog"
                                                id="paymentlog" disabled><?php echo $row['paymentlog'];  ?></textarea>

                                        </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="adminnotes2"
                                                id="adminnotes" disabled><?php echo $row['adminnotes'];  ?></textarea>
                                                <input type="hidden" name="adminnotes" id="adminnotes" value="<?php echo $row['adminnotes'];?>">
                                        </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" disabled> </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 $row['ts']; ?>">
                        <input type="hidden" name="webid" id="webid" value="<?php echo $row['id']; ?>">
                </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>
   
<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');?>