<?php include('include/auth.php');?>
<!doctype html>
<html class="fixed dark">
<?php 
	$pagerole="user";
	 $pid=$_GET['pid'];
     
	include('include/head.php');
    $sql1 = $db2->query("SELECT * FROM api_partner WHERE api_partner.api_partner_id='$pid' ") or die(mysql_error());
    $row = mysqli_fetch_array( $sql1 );
		?>

<body>
<?php

///check whether data with the name usename has been submitted
if (isset($_POST['api_stopsales_from'])) {
    //variables to hold our submitted data with post
$totalacriss=$_POST['totalacriss'];
    $api_stopsales_from = $_POST['api_stopsales_from'];
   $api_stopsales_to = $_POST['api_stopsales_to'];   
  $fpid = $_POST['fpid'];
$apigenstopsale_values=$api_stopsales_acriss_code1.$api_stopsales_acriss_code2;
  $api_stopsales_acriss_code1 = $_POST['api_stopsales_acriss_code1'];
  $api_stopsales_acriss_code1 =$db2->real_escape_string($api_stopsales_acriss_code1);	
  $api_stopsales_acriss_code2 = $_POST['api_stopsales_acriss_code2'];
  $api_stopsales_acriss_code2 =$db2->real_escape_string($api_stopsales_acriss_code2);
  $api_stopsales_acriss_code3 = $_POST['api_stopsales_acriss_code3'];
  $api_stopsales_acriss_code3 =$db2->real_escape_string($api_stopsales_acriss_code3);
  $api_stopsales_acriss_code4 = $_POST['api_stopsales_acriss_code4'];
  $api_stopsales_acriss_code4 =$db2->real_escape_string($api_stopsales_acriss_code4);
  $api_stopsales_acriss_code5 = $_POST['api_stopsales_acriss_code5'];
  $api_stopsales_acriss_code5 =$db2->real_escape_string($api_stopsales_acriss_code5);
  $api_stopsales_acriss_code6 = $_POST['api_stopsales_acriss_code6'];
  $api_stopsales_acriss_code6 =$db2->real_escape_string($api_stopsales_acriss_code6);
  $api_stopsales_acriss_code7 = $_POST['api_stopsales_acriss_code7'];
  $api_stopsales_acriss_code7 =$db2->real_escape_string($api_stopsales_acriss_code7);
  $api_stopsales_acriss_code8 = $_POST['api_stopsales_acriss_code8'];
  $api_stopsales_acriss_code8 =$db2->real_escape_string($api_stopsales_acriss_code8);
  $api_stopsales_acriss_code9 = $_POST['api_stopsales_acriss_code9'];
  $api_stopsales_acriss_code9 =$db2->real_escape_string($api_stopsales_acriss_code9);
  $api_stopsales_acriss_code10 = $_POST['api_stopsales_acriss_code10'];
  $api_stopsales_acriss_code10 =$db2->real_escape_string($api_stopsales_acriss_code10);
  $api_stopsales_acriss_code11 = $_POST['api_stopsales_acriss_code11'];
  $api_stopsales_acriss_code11 =$db2->real_escape_string($api_stopsales_acriss_code11);	
  $api_stopsales_acriss_code12 = $_POST['api_stopsales_acriss_code12'];
  $api_stopsales_acriss_code12 =$db2->real_escape_string($api_stopsales_acriss_code12);
  $api_stopsales_acriss_code13 = $_POST['api_stopsales_acriss_code13'];
  $api_stopsales_acriss_code13 =$db2->real_escape_string($api_stopsales_acriss_code13);
  $api_stopsales_acriss_code14 = $_POST['api_stopsales_acriss_code14'];
  $api_stopsales_acriss_code14 =$db2->real_escape_string($api_stopsales_acriss_code14);
  $api_stopsales_acriss_code15 = $_POST['api_stopsales_acriss_code15'];
  $api_stopsales_acriss_code15 =$db2->real_escape_string($api_stopsales_acriss_code15);
  $api_stopsales_acriss_code16 = $_POST['api_stopsales_acriss_code16'];
  $api_stopsales_acriss_code16 =$db2->real_escape_string($api_stopsales_acriss_code16);
  $api_stopsales_acriss_code17 = $_POST['api_stopsales_acriss_code17'];
  $api_stopsales_acriss_code17 =$db2->real_escape_string($api_stopsales_acriss_code17);
  $api_stopsales_acriss_code18 = $_POST['api_stopsales_acriss_code18'];
  $api_stopsales_acriss_code18 =$db2->real_escape_string($api_stopsales_acriss_code18);
  $api_stopsales_acriss_code19 = $_POST['api_stopsales_acriss_code19'];
  $api_stopsales_acriss_code19 =$db2->real_escape_string($api_stopsales_acriss_code19);
  $api_stopsales_acriss_code20 = $_POST['api_stopsales_acriss_code20'];
  $api_stopsales_acriss_code20 =$db2->real_escape_string($api_stopsales_acriss_code20);
  $api_stopsales_acriss_code21 = $_POST['api_stopsales_acriss_code21'];
  $api_stopsales_acriss_code21 =$db2->real_escape_string($api_stopsales_acriss_code21);
  $api_stopsales_acriss_code22 = $_POST['api_stopsales_acriss_code22'];
  $api_stopsales_acriss_code22 =$db2->real_escape_string($api_stopsales_acriss_code22);
  $api_stopsales_acriss_code23 = $_POST['api_stopsales_acriss_code23'];
  $api_stopsales_acriss_code23 =$db2->real_escape_string($api_stopsales_acriss_code23);
  $api_stopsales_acriss_code24 = $_POST['api_stopsales_acriss_code24'];
  $api_stopsales_acriss_code24 =$db2->real_escape_string($api_stopsales_acriss_code24);
  $api_stopsales_acriss_code25 = $_POST['api_stopsales_acriss_code25'];
  $api_stopsales_acriss_code25 =$db2->real_escape_string($api_stopsales_acriss_code25);
$api_stopsales_from= \DateTime::createFromFormat('d-m-Y H:i', $api_stopsales_from)->getTimestamp(); 
$api_stopsales_to= \DateTime::createFromFormat('d-m-Y H:i', $api_stopsales_to)->getTimestamp(); 

$apigenstopsale_values=$pid.$api_stopsales_acriss_code1.$api_stopsales_acriss_code2;
$apigenstopsale_values =$db2->real_escape_string($apigenstopsale_values);
//our sql statement that we will execute

$sql = "INSERT INTO `apigenstopsale` (`apigenstopsale_id`, `apigenstopsale_values`) VALUES (NULL,  '$apigenstopsale_values');";

if(isset($_POST['api_stopsales_acriss_code1'])){
$sql .= " INSERT INTO `api_stopsales` (`api_stopsales_id`, `api_stopsales_from`,`api_stopsales_to`, `api_stopsales_acriss_code`, `api_stopsales_partner_id`) VALUES (NULL,  '$api_stopsales_from','$api_stopsales_to', '$api_stopsales_acriss_code1','$fpid');";
}
if(isset($_POST['api_stopsales_acriss_code2'])){
    $sql .= " INSERT INTO `api_stopsales` (`api_stopsales_id`, `api_stopsales_from`,`api_stopsales_to`, `api_stopsales_acriss_code`, `api_stopsales_partner_id`) VALUES (NULL,  '$api_stopsales_from','$api_stopsales_to', '$api_stopsales_acriss_code2','$fpid');";
    }
    if(isset($_POST['api_stopsales_acriss_code3'])){
        $sql .= " INSERT INTO `api_stopsales` (`api_stopsales_id`, `api_stopsales_from`,`api_stopsales_to`, `api_stopsales_acriss_code`, `api_stopsales_partner_id`) VALUES (NULL,  '$api_stopsales_from','$api_stopsales_to', '$api_stopsales_acriss_code3','$fpid');";
        }
        if(isset($_POST['api_stopsales_acriss_code4'])){
            $sql .= " INSERT INTO `api_stopsales` (`api_stopsales_id`, `api_stopsales_from`,`api_stopsales_to`, `api_stopsales_acriss_code`, `api_stopsales_partner_id`) VALUES (NULL,  '$api_stopsales_from','$api_stopsales_to', '$api_stopsales_acriss_code4','$fpid');";
            }  
            if(isset($_POST['api_stopsales_acriss_code5'])){
                $sql .= " INSERT INTO `api_stopsales` (`api_stopsales_id`, `api_stopsales_from`,`api_stopsales_to`, `api_stopsales_acriss_code`, `api_stopsales_partner_id`) VALUES (NULL,  '$api_stopsales_from','$api_stopsales_to', '$api_stopsales_acriss_code5','$fpid');";
                } 
                
                    if(isset($_POST['api_stopsales_acriss_code6'])){
                        $sql .= " INSERT INTO `api_stopsales` (`api_stopsales_id`, `api_stopsales_from`,`api_stopsales_to`, `api_stopsales_acriss_code`, `api_stopsales_partner_id`) VALUES (NULL,  '$api_stopsales_from','$api_stopsales_to', '$api_stopsales_acriss_code6','$fpid');";
                        } 
                        if(isset($_POST['api_stopsales_acriss_code7'])){
                            $sql .= " INSERT INTO `api_stopsales` (`api_stopsales_id`, `api_stopsales_from`,`api_stopsales_to`, `api_stopsales_acriss_code`, `api_stopsales_partner_id`) VALUES (NULL,  '$api_stopsales_from','$api_stopsales_to', '$api_stopsales_acriss_code7','$fpid');";
                            }  
                            if(isset($_POST['api_stopsales_acriss_code8'])){
                                $sql .= " INSERT INTO `api_stopsales` (`api_stopsales_id`, `api_stopsales_from`,`api_stopsales_to`, `api_stopsales_acriss_code`, `api_stopsales_partner_id`) VALUES (NULL,  '$api_stopsales_from','$api_stopsales_to', '$api_stopsales_acriss_code8','$fpid');";
                                }
                                if(isset($_POST['api_stopsales_acriss_code9'])){
                                    $sql .= " INSERT INTO `api_stopsales` (`api_stopsales_id`, `api_stopsales_from`,`api_stopsales_to`, `api_stopsales_acriss_code`, `api_stopsales_partner_id`) VALUES (NULL,  '$api_stopsales_from','$api_stopsales_to', '$api_stopsales_acriss_code9','$fpid');";
                                    }
                                    if(isset($_POST['api_stopsales_acriss_code10'])){
                                        $sql .= " INSERT INTO `api_stopsales` (`api_stopsales_id`, `api_stopsales_from`,`api_stopsales_to`, `api_stopsales_acriss_code`, `api_stopsales_partner_id`) VALUES (NULL,  '$api_stopsales_from','$api_stopsales_to', '$api_stopsales_acriss_code10','$fpid');";
                                        } 
                                        if(isset($_POST['api_stopsales_acriss_code11'])){
                                            $sql .= " INSERT INTO `api_stopsales` (`api_stopsales_id`, `api_stopsales_from`,`api_stopsales_to`, `api_stopsales_acriss_code`, `api_stopsales_partner_id`) VALUES (NULL,  '$api_stopsales_from','$api_stopsales_to', '$api_stopsales_acriss_code11','$fpid');";
                                            }
                                            if(isset($_POST['api_stopsales_acriss_code12'])){
                                                $sql .= " INSERT INTO `api_stopsales` (`api_stopsales_id`, `api_stopsales_from`,`api_stopsales_to`, `api_stopsales_acriss_code`, `api_stopsales_partner_id`) VALUES (NULL,  '$api_stopsales_from','$api_stopsales_to', '$api_stopsales_acriss_code12','$fpid');";
                                                }
                                                if(isset($_POST['api_stopsales_acriss_code13'])){
                                                    $sql .= " INSERT INTO `api_stopsales` (`api_stopsales_id`, `api_stopsales_from`,`api_stopsales_to`, `api_stopsales_acriss_code`, `api_stopsales_partner_id`) VALUES (NULL,  '$api_stopsales_from','$api_stopsales_to', '$api_stopsales_acriss_code13','$fpid');";
                                                    }
                                                    if(isset($_POST['api_stopsales_acriss_code14'])){
                                                        $sql .= " INSERT INTO `api_stopsales` (`api_stopsales_id`, `api_stopsales_from`,`api_stopsales_to`, `api_stopsales_acriss_code`, `api_stopsales_partner_id`) VALUES (NULL,  '$api_stopsales_from','$api_stopsales_to', '$api_stopsales_acriss_code14','$fpid');";
                                                        }  
                                                        if(isset($_POST['api_stopsales_acriss_code15'])){
                                                            $sql .= " INSERT INTO `api_stopsales` (`api_stopsales_id`, `api_stopsales_from`,`api_stopsales_to`, `api_stopsales_acriss_code`, `api_stopsales_partner_id`) VALUES (NULL,  '$api_stopsales_from','$api_stopsales_to', '$api_stopsales_acriss_code15','$fpid');";
                                                            } 
                                                            
                                                                if(isset($_POST['api_stopsales_acriss_code16'])){
                                                                    $sql .= " INSERT INTO `api_stopsales` (`api_stopsales_id`, `api_stopsales_from`,`api_stopsales_to`, `api_stopsales_acriss_code`, `api_stopsales_partner_id`) VALUES (NULL,  '$api_stopsales_from','$api_stopsales_to', '$api_stopsales_acriss_code16','$fpid');";
                                                                    } 
                                                                    if(isset($_POST['api_stopsales_acriss_code17'])){
                                                                        $sql .= " INSERT INTO `api_stopsales` (`api_stopsales_id`, `api_stopsales_from`,`api_stopsales_to`, `api_stopsales_acriss_code`, `api_stopsales_partner_id`) VALUES (NULL,  '$api_stopsales_from','$api_stopsales_to', '$api_stopsales_acriss_code17','$fpid');";
                                                                        }  
                                                                        if(isset($_POST['api_stopsales_acriss_code18'])){
                                                                            $sql .= " INSERT INTO `api_stopsales` (`api_stopsales_id`, `api_stopsales_from`,`api_stopsales_to`, `api_stopsales_acriss_code`, `api_stopsales_partner_id`) VALUES (NULL,  '$api_stopsales_from','$api_stopsales_to', '$api_stopsales_acriss_code18','$fpid');";
                                                                            }
                                                                            if(isset($_POST['api_stopsales_acriss_code19'])){
                                                                                $sql .= " INSERT INTO `api_stopsales` (`api_stopsales_id`, `api_stopsales_from`,`api_stopsales_to`, `api_stopsales_acriss_code`, `api_stopsales_partner_id`) VALUES (NULL,  '$api_stopsales_from','$api_stopsales_to', '$api_stopsales_acriss_code19','$fpid');";
                                                                                }
                                                                                if(isset($_POST['api_stopsales_acriss_code20'])){
                                                                                    $sql .= " INSERT INTO `api_stopsales` (`api_stopsales_id`, `api_stopsales_from`,`api_stopsales_to`, `api_stopsales_acriss_code`, `api_stopsales_partner_id`) VALUES (NULL,  '$api_stopsales_from','$api_stopsales_to', '$api_stopsales_acriss_code20','$fpid');";
                                                                                    }    
                                                                                    if(isset($_POST['api_stopsales_acriss_code21'])){
                                                                                        $sql .= " INSERT INTO `api_stopsales` (`api_stopsales_id`, `api_stopsales_from`,`api_stopsales_to`, `api_stopsales_acriss_code`, `api_stopsales_partner_id`) VALUES (NULL,  '$api_stopsales_from','$api_stopsales_to', '$api_stopsales_acriss_code21','$fpid');";
                                                                                        }     
                                                                                        if(isset($_POST['api_stopsales_acriss_code22'])){
                                                                                            $sql .= " INSERT INTO `api_stopsales` (`api_stopsales_id`, `api_stopsales_from`,`api_stopsales_to`, `api_stopsales_acriss_code`, `api_stopsales_partner_id`) VALUES (NULL,  '$api_stopsales_from','$api_stopsales_to', '$api_stopsales_acriss_code22','$fpid');";
                                                                                            }     
                                                                                            if(isset($_POST['api_stopsales_acriss_code23'])){
                                                                                                $sql .= " INSERT INTO `api_stopsales` (`api_stopsales_id`, `api_stopsales_from`,`api_stopsales_to`, `api_stopsales_acriss_code`, `api_stopsales_partner_id`) VALUES (NULL,  '$api_stopsales_from','$api_stopsales_to', '$api_stopsales_acriss_code23','$fpid');";
                                                                                                }     
                                                                                                if(isset($_POST['api_stopsales_acriss_code24'])){
                                                                                                    $sql .= " INSERT INTO `api_stopsales` (`api_stopsales_id`, `api_stopsales_from`,`api_stopsales_to`, `api_stopsales_acriss_code`, `api_stopsales_partner_id`) VALUES (NULL,  '$api_stopsales_from','$api_stopsales_to', '$api_stopsales_acriss_code24','$fpid');";
                                                                                                    }     
                                                                                                    if(isset($_POST['api_stopsales_acriss_code25'])){
                                                                                                        $sql .= " INSERT INTO `api_stopsales` (`api_stopsales_id`, `api_stopsales_from`,`api_stopsales_to`, `api_stopsales_acriss_code`, `api_stopsales_partner_id`) VALUES (NULL,  '$api_stopsales_from','$api_stopsales_to', '$api_stopsales_acriss_code25','$fpid');";
                                                                                                        }          
$re = mysqli_multi_query($db2, $sql);
//Check to see whether request was true or false
if ($re) {  
    echo "<script>";
                               echo "window.location.replace('apistopsales.php');";
echo "</script>";
exit;}
else{
    echo "ERROR: Could not able to execute $sql. " . mysqli_error($db2);
}
}?>
    <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 General API Stop Sale </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 General API Stop Sale</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="newapistopsalegen.php?pid=<?php echo $pid;?>"
                    method="post" name="form1">

                    <div class="row">
                    <div class="col-xl-4 mb-4 ">
                            <div class="card card ">
                                <div class="card-header">
                                    <h2 class="card-title">Partner</h2>
                                </div>
                                <div class="card-body">


                                    <div class="form-row">
                                        <div class="form-group col-xl-6 mb-3">
                                            <label>Partner</label>
                                            <select data-plugin-selectTwo class="form-control populate"
                                                        id="api_stopsales_partner_id" name="api_stopsales_partner_id" disabled>
                                                        <?php 
                                                        $sql23 = "SELECT * FROM  api_partner ";
                                                        $result23 = mysqli_query($db2,$sql23);

                                                        while($row23 = mysqli_fetch_array($result23)) {?>
                                                        <option value="<?php echo $row23['api_partner_id'];?>"
                                                        <?php if($row['api_partner_id']==$row23['api_partner_id']){ echo"selected";}?> >
                                                            <?php echo $row23['api_partner_name'];?> </option>
                                                           <?php } ?>                                                    
                                                            
                                                    </select>
                                        </div>
                                    </div>
                                   



                                   
                                </div>
                            </div>

                        </div>
                        <div class="col-xl-4 mb-4 ">
                            <div class="card card ">
                                <div class="card-header">
                                    <h2 class="card-title">Selected Vehicles (Max 25)</h2>
                                </div>
                                <div class="card-body">


                                    <div class="form-group row">
                                        <label class="col-lg-3 control-label text-lg-right pt-2">Acriss Code</label>

                                       <div class="col-lg-6">
                                     
                                       <?php 
                                                        $sql33 = "SELECT * FROM  api_fleet WHERE api_fleet_partner='{$pid}' ";
                                                        $result33 = mysqli_query($db2,$sql33);
                                                        $x=1;
                                                        while($row33 = mysqli_fetch_array($result33)) {
                                                           ?>
                                        <div class="checkbox-<?php echo $row33['api_fleet_acriss'];?>">
														<label>
															<input type="checkbox" onChange=handleCheckbox() value="<?php echo $row33['api_fleet_acriss'];?>" name="api_stopsales_acriss_code<?php echo $x ++;?>">
															<?php echo $row33['api_fleet_acriss'];?>
														</label>
													</div>
                                                    <?php } ?>  
                                          
                                                        </div>
                                    </div>
                                   



                                   
                                </div>
                            </div>

                        </div>
                     
                        <div class="col-xl-4 mb-4 ">
                            <div class="card card ">
                                <div class="card-header">
                                    <h2 class="card-title">Dates</h2>
                                </div>
                                <div class="card-body">
                                <div class="form-row">
                                        <div class="form-group col-xl-12 mb-3">
                                            <label>Starting From:</label>
                                            <input type="text"  class="form-control" name="api_stopsales_from" id="api_stopsales_from" 
                                                />
                                        </div>
                                        <div class="form-group col-xl-12 mb-3">
                                            <label>Ending To:</label>
                                            <input type="text" class="form-control form-control" name="api_stopsales_to" id="api_stopsales_to"
                                                />
                                        </div>
                                    </div>
                                  
                                   
                                 


                                   

                                   
                                </div>
                            </div>

                        </div>
                    </div>
                    <input type="hidden" id="count" name="totalacriss" value="">
                    <input type="hidden" id="pid" name="fpid" value="<?php echo $pid;?>">
                    <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
                            </button>
                        </div>

                        <div class="col-12 col-md-auto px-md-0 mt-3 mt-md-0">
                            <a href="apipartner.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>

                </form>
                <!-- end: page -->
            </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>

    <!--(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.header.menu.js"></script>
    <script src="js/examples/examples.ecommerce.orders.detail.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(api_stopsales_from,options);	
	rome(api_stopsales_to,options);
    function handleCheckbox(){
        var inputElems = document.getElementsByTagName("input"),
        count = 0;
        for (var i=0; i<inputElems.length; i++) {
        if (inputElems[i].type === "checkbox" && inputElems[i].checked === true){
            count++;
            document.getElementById("count").value = count;
        }
    }}
	
 

		</script>

</body>

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