<?php include('include/auth.php');?>
<!doctype html>
<html class="fixed dark">
	<?php 
	$pagerole="user";
	
	include('include/head.php');
		?>
	<body>
	<?php
///check whether data with the name usename has been submitted
					 if (isset($_POST['set'])) {
	//variables to hold our submitted data with post

$api_ext_rate_acriss = $_POST['api_ext_rate_acriss'];
$api_ext_rate_seasid = $_POST['api_ext_rate_seasid'];
					 

		 
	$api_ext_rate_acriss = $db2->real_escape_string($api_ext_rate_acriss);
   
		
	//our sql statement that we will execute
    
$sql = "INSERT INTO `api_ext_rates` (`api_ext_rate_id`, `api_ext_rate_day`, `api_ext_rate_acriss`, `api_ext_rate_price`, `api_ext_rate_seasid`) VALUES (NULL, '1', '{$api_ext_rate_acriss}', '0.00', '{$api_ext_rate_seasid}');";
$sql .= "INSERT INTO `api_ext_rates` (`api_ext_rate_id`, `api_ext_rate_day`, `api_ext_rate_acriss`, `api_ext_rate_price`, `api_ext_rate_seasid`) VALUES (NULL, '2', '{$api_ext_rate_acriss}', '0.00', '{$api_ext_rate_seasid}');";
$sql .= "INSERT INTO `api_ext_rates` (`api_ext_rate_id`, `api_ext_rate_day`, `api_ext_rate_acriss`, `api_ext_rate_price`, `api_ext_rate_seasid`) VALUES (NULL, '3', '{$api_ext_rate_acriss}', '0.00', '{$api_ext_rate_seasid}');";
$sql .= "INSERT INTO `api_ext_rates` (`api_ext_rate_id`, `api_ext_rate_day`, `api_ext_rate_acriss`, `api_ext_rate_price`, `api_ext_rate_seasid`) VALUES (NULL, '4', '{$api_ext_rate_acriss}', '0.00', '{$api_ext_rate_seasid}');";
$sql .= "INSERT INTO `api_ext_rates` (`api_ext_rate_id`, `api_ext_rate_day`, `api_ext_rate_acriss`, `api_ext_rate_price`, `api_ext_rate_seasid`) VALUES (NULL, '5', '{$api_ext_rate_acriss}', '0.00', '{$api_ext_rate_seasid}');";
$sql .= "INSERT INTO `api_ext_rates` (`api_ext_rate_id`, `api_ext_rate_day`, `api_ext_rate_acriss`, `api_ext_rate_price`, `api_ext_rate_seasid`) VALUES (NULL, '6', '{$api_ext_rate_acriss}', '0.00', '{$api_ext_rate_seasid}');";
$sql .= "INSERT INTO `api_ext_rates` (`api_ext_rate_id`, `api_ext_rate_day`, `api_ext_rate_acriss`, `api_ext_rate_price`, `api_ext_rate_seasid`) VALUES (NULL, '7', '{$api_ext_rate_acriss}', '0.00', '{$api_ext_rate_seasid}');";
$sql .= "INSERT INTO `api_ext_rates` (`api_ext_rate_id`, `api_ext_rate_day`, `api_ext_rate_acriss`, `api_ext_rate_price`, `api_ext_rate_seasid`) VALUES (NULL, '8', '{$api_ext_rate_acriss}', '0.00', '{$api_ext_rate_seasid}');";
$sql .= "INSERT INTO `api_ext_rates` (`api_ext_rate_id`, `api_ext_rate_day`, `api_ext_rate_acriss`, `api_ext_rate_price`, `api_ext_rate_seasid`) VALUES (NULL, '9', '{$api_ext_rate_acriss}', '0.00', '{$api_ext_rate_seasid}');";
$sql .= "INSERT INTO `api_ext_rates` (`api_ext_rate_id`, `api_ext_rate_day`, `api_ext_rate_acriss`, `api_ext_rate_price`, `api_ext_rate_seasid`) VALUES (NULL, '10', '{$api_ext_rate_acriss}', '0.00', '{$api_ext_rate_seasid}');";
$sql .= "INSERT INTO `api_ext_rates` (`api_ext_rate_id`, `api_ext_rate_day`, `api_ext_rate_acriss`, `api_ext_rate_price`, `api_ext_rate_seasid`) VALUES (NULL, '11', '{$api_ext_rate_acriss}', '0.00', '{$api_ext_rate_seasid}');";
$sql .= "INSERT INTO `api_ext_rates` (`api_ext_rate_id`, `api_ext_rate_day`, `api_ext_rate_acriss`, `api_ext_rate_price`, `api_ext_rate_seasid`) VALUES (NULL, '12', '{$api_ext_rate_acriss}', '0.00', '{$api_ext_rate_seasid}');";
$sql .= "INSERT INTO `api_ext_rates` (`api_ext_rate_id`, `api_ext_rate_day`, `api_ext_rate_acriss`, `api_ext_rate_price`, `api_ext_rate_seasid`) VALUES (NULL, '13', '{$api_ext_rate_acriss}', '0.00', '{$api_ext_rate_seasid}');";
$sql .= "INSERT INTO `api_ext_rates` (`api_ext_rate_id`, `api_ext_rate_day`, `api_ext_rate_acriss`, `api_ext_rate_price`, `api_ext_rate_seasid`) VALUES (NULL, '14', '{$api_ext_rate_acriss}', '0.00', '{$api_ext_rate_seasid}');";
$sql .= "INSERT INTO `api_ext_rates` (`api_ext_rate_id`, `api_ext_rate_day`, `api_ext_rate_acriss`, `api_ext_rate_price`, `api_ext_rate_seasid`) VALUES (NULL, '15', '{$api_ext_rate_acriss}', '0.00', '{$api_ext_rate_seasid}');";
$sql .= "INSERT INTO `api_ext_rates` (`api_ext_rate_id`, `api_ext_rate_day`, `api_ext_rate_acriss`, `api_ext_rate_price`, `api_ext_rate_seasid`) VALUES (NULL, '16', '{$api_ext_rate_acriss}', '0.00', '{$api_ext_rate_seasid}');";
$sql .= "INSERT INTO `api_ext_rates` (`api_ext_rate_id`, `api_ext_rate_day`, `api_ext_rate_acriss`, `api_ext_rate_price`, `api_ext_rate_seasid`) VALUES (NULL, '17', '{$api_ext_rate_acriss}', '0.00', '{$api_ext_rate_seasid}');";
$sql .= "INSERT INTO `api_ext_rates` (`api_ext_rate_id`, `api_ext_rate_day`, `api_ext_rate_acriss`, `api_ext_rate_price`, `api_ext_rate_seasid`) VALUES (NULL, '18', '{$api_ext_rate_acriss}', '0.00', '{$api_ext_rate_seasid}');";
$sql .= "INSERT INTO `api_ext_rates` (`api_ext_rate_id`, `api_ext_rate_day`, `api_ext_rate_acriss`, `api_ext_rate_price`, `api_ext_rate_seasid`) VALUES (NULL, '19', '{$api_ext_rate_acriss}', '0.00', '{$api_ext_rate_seasid}');";
$sql .= "INSERT INTO `api_ext_rates` (`api_ext_rate_id`, `api_ext_rate_day`, `api_ext_rate_acriss`, `api_ext_rate_price`, `api_ext_rate_seasid`) VALUES (NULL, '20', '{$api_ext_rate_acriss}', '0.00', '{$api_ext_rate_seasid}');";
$sql .= "INSERT INTO `api_ext_rates` (`api_ext_rate_id`, `api_ext_rate_day`, `api_ext_rate_acriss`, `api_ext_rate_price`, `api_ext_rate_seasid`) VALUES (NULL, '21', '{$api_ext_rate_acriss}', '0.00', '{$api_ext_rate_seasid}');";
$sql .= "INSERT INTO `api_ext_rates` (`api_ext_rate_id`, `api_ext_rate_day`, `api_ext_rate_acriss`, `api_ext_rate_price`, `api_ext_rate_seasid`) VALUES (NULL, '22', '{$api_ext_rate_acriss}', '0.00', '{$api_ext_rate_seasid}');";
$sql .= "INSERT INTO `api_ext_rates` (`api_ext_rate_id`, `api_ext_rate_day`, `api_ext_rate_acriss`, `api_ext_rate_price`, `api_ext_rate_seasid`) VALUES (NULL, '23', '{$api_ext_rate_acriss}', '0.00', '{$api_ext_rate_seasid}');";
$sql .= "INSERT INTO `api_ext_rates` (`api_ext_rate_id`, `api_ext_rate_day`, `api_ext_rate_acriss`, `api_ext_rate_price`, `api_ext_rate_seasid`) VALUES (NULL, '24', '{$api_ext_rate_acriss}', '0.00', '{$api_ext_rate_seasid}');";
$sql .= "INSERT INTO `api_ext_rates` (`api_ext_rate_id`, `api_ext_rate_day`, `api_ext_rate_acriss`, `api_ext_rate_price`, `api_ext_rate_seasid`) VALUES (NULL, '25', '{$api_ext_rate_acriss}', '0.00', '{$api_ext_rate_seasid}');";
$sql .= "INSERT INTO `api_ext_rates` (`api_ext_rate_id`, `api_ext_rate_day`, `api_ext_rate_acriss`, `api_ext_rate_price`, `api_ext_rate_seasid`) VALUES (NULL, '26', '{$api_ext_rate_acriss}', '0.00', '{$api_ext_rate_seasid}');";
$sql .= "INSERT INTO `api_ext_rates` (`api_ext_rate_id`, `api_ext_rate_day`, `api_ext_rate_acriss`, `api_ext_rate_price`, `api_ext_rate_seasid`) VALUES (NULL, '27', '{$api_ext_rate_acriss}', '0.00', '{$api_ext_rate_seasid}');";
$sql .= "INSERT INTO `api_ext_rates` (`api_ext_rate_id`, `api_ext_rate_day`, `api_ext_rate_acriss`, `api_ext_rate_price`, `api_ext_rate_seasid`) VALUES (NULL, '28', '{$api_ext_rate_acriss}', '0.00', '{$api_ext_rate_seasid}');";
$sql .= "INSERT INTO `api_ext_rates` (`api_ext_rate_id`, `api_ext_rate_day`, `api_ext_rate_acriss`, `api_ext_rate_price`, `api_ext_rate_seasid`) VALUES (NULL, '29', '{$api_ext_rate_acriss}', '0.00', '{$api_ext_rate_seasid}');";
$sql .= "INSERT INTO `api_ext_rates` (`api_ext_rate_id`, `api_ext_rate_day`, `api_ext_rate_acriss`, `api_ext_rate_price`, `api_ext_rate_seasid`) VALUES (NULL, '30', '{$api_ext_rate_acriss}', '0.00', '{$api_ext_rate_seasid}');";
 
	//Executing the sql query with the connection
    $re = mysqli_multi_query($db2, $sql);
	//Check to see whether request was true or false
	if ($re) {  
        echo "<script>";
                                   echo "window.location.replace('apiextrates.php?acriss=$api_ext_rate_acriss&season=$api_ext_rate_seasid');";
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 Extended Rate</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 Extended Rate</span></li>
							</ol>
					
							<a class="sidebar-right-toggle" data-open="sidebar-right"><i class="fas fa-chevron-left"></i></a>
						</div>
					</header>

					<!-- start: page -->
					
				
					<!-- start: page -->
					<form class="order-details action-buttons-fixed"  method="post" name="form1">
						
					<div class="row">
								<div class="col-xl-12 mb-4 ">
								<div class="card card ">
									<div class="card-header">
										<h2 class="card-title">Elements</h2>
									</div>
									<div class="card-body">
									<div class="row">
									<div class="col-xl-12">
							
								<div class="form-row">
											<div class="form-group col-xl-6 mb-3">
												<label>ACRISS CODE</label>
												<input type="text" class="form-control" name="api_ext_rate_acriss" id="api_ext_rate_acriss"/>
											</div>
											
										</div>
								
								
										<div class="form-row">
											<div class="form-group col-xl-6 mb-3">
												<label>Rate Season</label>
												<select class="form-control"  name="api_ext_rate_seasid" id="api_ext_rate_seasid">
                                                <?php $sqlin2 = $db2->query("SELECT * FROM api_ext_seasons ") or die(mysql_error()); 
					 while($rowin2 = mysqli_fetch_array($sqlin2)) {?>
															<option value="<?php echo $rowin2['api_ext_season_id'];?>"><?php echo $rowin2['api_ext_seasons_name'];?></option>
																	<?php }?>									
													</select>
											</div>
										</div>
												
										
								
										</div>
								
									</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> ADD Extended Rate
								</button>
							</div>
						
							<div class="col-12 col-md-auto px-md-0 mt-3 mt-md-0">
								<a href="apiextrates.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" class="form-control" name="set" id="set" value="doit">
					</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>
	

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