<?php 

include('connect.php');
?>

<?php
if (isset($_POST['savecertified'])) {
    
    $id = $_POST['id'];
	$sql = mysqli_query($con,'SELECT * FROM self_certified');
	mysqli_query($con,"DELETE FROM `self_certified` WHERE id = '$id'");
	$first_name = $_POST['first_name'];
	$last_name = $_POST['last_name'];
	$email = $_POST['email'];
	$week_date = $_POST['week_date'];
	$agency = $_POST['agency'];
	$agency2 = $_POST['agency2'];
	$total_amount = $_POST['total_amount'];
	$night_expenses = $_POST['night_expenses'];
	$night_rate = $_POST['night_rate'];
	$night_paid = $_POST['night_paid'];
	$deductible_expenses = $_POST['deductible_expenses'];
	$taxable_amount = $_POST['taxable_amount'];
	$deduction_payable = $_POST['deduction_payable'];
	$date_paid = $_POST['date_paid'];
	$driver_id = $_POST['driver_id'];



	$sql = "INSERT INTO self_certified (first_name,last_name,email,week_date,agency,agency2,total_amount,night_expenses,night_rate,night_paid,deductible_expenses,taxable_amount,deduction_payable,date_paid,status,driver_id) VALUES('$first_name','$last_name','$email','$week_date','$agency','$agency2','$total_amount','$night_expenses','$night_rate','$night_paid','$deductible_expenses','$taxable_amount','$deduction_payable','$date_paid',0,'$driver_id')";
	mysqli_query($con,$sql);

	header('Location:saved.php');
}

 ?>




 <?php
if (isset($_POST['savetravel'])) {
    

	$driver_id = $_POST['driver_id'];
	$agency_id = $_POST['agency_id'];
	$month = $_POST['month'];

	$id = $_POST['id'];
	mysqli_query($con,"DELETE FROM `travel_form` WHERE id = '$id'");	
	$sql = mysqli_query($con,"SELECT * FROM travel_form WHERE driver_id = '$driver_id' AND agency_id = '$agency_id' AND month = '$month'");
    if(mysqli_num_rows($sql) > 0)
    {
      header('Location: complete_form.php?driver_id='.$_POST['driver_id'].'&error="Timesheet Already submitted for this agency and week"');
    }
    else
    {

	
	$linen = implode(",",$_POST['linen']);
	$price_linen = implode(",",$_POST['price_linen']);
	$smaller = implode(",",$_POST['smaller']);
	$price_smaller = implode(",",$_POST['price_smaller']);
	$travel = implode(",",$_POST['travel']);
	$price_travel = implode(",",$_POST['price_travel']);
	$sleeper = implode(",",$_POST['sleeper']);
	$price_sleeper = implode(",",$_POST['price_sleeper']);
	$expense = implode(",",$_POST['expense']);
	$price_expense = implode(",",$_POST['price_expense']);
	$date_expense_type = implode(",",$_POST['date_expense_type']);
	$price_expense_type = implode(",",$_POST['price_expense_type']);
	$miles_expense = $_POST['miles_expense'];
	$expense_type = implode(",",$_POST['expense_type']);
	$rent_date = $_POST['rent_date'];
	$rent_amount = $_POST['rent_amount'];
	$council_date = $_POST['council_date'];
	$council_amount = $_POST['council_amount'];
	$bill_date = $_POST['bill_date'];
	$bill_amount = $_POST['bill_amount'];
	$garage_date = $_POST['garage_amount'];
	$percentage_house = $_POST['percentage_house'];
	$miscellaneous = $_POST['miscellaneous'];
	$comment = $_POST['comment'];

    if($_FILES["invoice"]["name"] != '')
    {
		$target_dir = "uploads/";
		$target_file = $target_dir.time().basename($_FILES["invoice"]["name"]);
		$uploadOk = 1;
		$imageFileType = strtolower(pathinfo($target_file,PATHINFO_EXTENSION));
		// Check if $uploadOk is set to 0 by an error
		if ($uploadOk == 0) {
		echo "Sorry, your file was not uploaded.";
		// if everything is ok, try to upload file
		} else {
		if (move_uploaded_file($_FILES["invoice"]["tmp_name"], $target_file)) {
		echo "The file ". basename( $_FILES["invoice"]["name"]). " has been uploaded.";
		} else {
		echo "Sorry, there was an error uploading your file.";
		}
		}

		$invoice = $target_file;
	}
	else
	{
		$invoice = $_POST['previousmode'];
	}

	$sql = "INSERT INTO `travel_form`(`driver_id`, `agency_id`, `linen`, `linen_price`, `smaller`, `price_smaller`, `travel`, `price_travel`, `sleeper`, `price_sleeper`, `expense`, `price_expense`, `miles_expense`, `expense_type`, `price_expense_type`, `date_expense_type`, `rent_date`, `rent_amount`, `council_date`, `council_amount`, `bill_date`, `bill_amount`, `garage_date`, `garage_amount`, `percentage_house`, `file_receipt`, `miscellanceous`, `comment`, `status`, `month`) VALUES ('$driver_id','$agency_id','$linen','$price_linen','$smaller','$price_smaller','$travel','$price_travel','$sleeper','$price_sleeper','$expense','$price_expense','$miles_expense','$expense_type','$price_expense_type','$date_expense_type','$rent_date','$rent_amount','$council_date','$council_amount','$bill_date','$bill_amount','$garage_amount','$garage_date','$percentage_house','$invoice','$miscellaneous','$comment',0,'$month')";
	mysqli_query($con,$sql);

	header('Location:saved.php');
 }
}

 ?>



  <?php
if (isset($_POST['savemileage'])) {

	$driver_id = $_POST['driver_id'];
	$user_id = $_POST['user_id'];
	$vehicle_date = $_POST['vehicle_date'];
	$vehicle_date1 = implode(",",$vehicle_date);
	$price = $_POST['price'];
	$price1 = implode(",",$price);


	$sql = "INSERT INTO vehicle_mileage (vehicle_date,price,user_id,driver_id,status) VALUES('$vehicle_date1','$price1','$user_id','$driver_id',1)";
	mysqli_query($con,$sql);

	header('Location: vehicle_mileage.php');
}

 ?>




   <?php
if (isset($_POST['savehome'])) {

	$rent_date = $_POST['rent_date'];
	$rent_amount = $_POST['rent_amount'];
	$council_date = $_POST['council_date'];
	$council_amount = $_POST['council_amount'];
	$bill_date = $_POST['bill_date'];
	$bill_amount = $_POST['bill_amount'];
	$garage_date = $_POST['garage_date'];
	$garage_amount = $_POST['garage_amount'];
	$percentage_house = $_POST['percentage_house'];
	$file_receipt = $_POST['file_receipt'];
	$miscellaneous = $_POST['miscellaneous'];
	$comment = $_POST['comment'];
	$admin_expense = $_POST['admin_expense'];



	$sql = "INSERT INTO home_expense (rent_date,rent_amount,council_date,council_amount,bill_date,bill_amount,garage_date,garage_amount,percentage_house,file_receipt,miscellaneous,comment,admin_expense,status) VALUES('$rent_date','$rent_amount','$council_date','$council_amount','$bill_date','$bill_amount','$garage_date','$garage_amount','$percentage_house','$file_receipt','$miscellaneous','$comment','$admin_expense',1)";
	mysqli_query($con,$sql);

	header('Location: home_expenses.php');
}

 ?>





   <?php
if (isset($_POST['savebusiness'])) {

	$expenses_type = $_POST['expenses_type'];
	$expense_type1 = implode(",",$expense_type);
	$expense_date = $_POST['expense_date'];
	$expense_date1 = implode(",",$expense_date);
	$price = $_POST['price'];
	$price1 = implode(",",$price);


	$sql = "INSERT INTO business_expense (expenses_type,expense_date,price,status) VALUES('$expense_type1','$expense_date1','$price1',1)";
	mysqli_query($con,$sql);

	header('Location: business_expenses.php');
}

 ?>






   <?php
if (isset($_POST['savetimesheet'])) {
    
    $id = $_POST['id'];
	$sql = mysqli_query($con,'SELECT * FROM timesheet');
	mysqli_query($con,"DELETE FROM `timesheet` WHERE id = '$id'");
	$counter = 0;
    if($counter > 0)
    {
      header('Location: timesheet.php?driver_id='.$_POST['driver_id'].'&error="Timesheet Already submitted for this agency and week"');
    }
    else
    {
    	$rate1_duty_sunday = $_POST['rate1_duty_sunday'];
	$rate1_duty_monday = $_POST['rate1_duty_monday'];
	$rate1_duty_tuesday = $_POST['rate1_duty_tuesday'];
	$rate1_duty_wednesday = $_POST['rate1_duty_wednesday'];
	$rate1_duty_thursday = $_POST['rate1_duty_thursday'];
	$rate1_duty_friday = $_POST['rate1_duty_friday'];
	$rate1_duty_saturday = $_POST['rate1_duty_saturday'];
	$rate1_less_sunday = $_POST['rate1_less_sunday'];
	$rate1_less_monday = $_POST['rate1_less_monday'];
	$rate1_less_tuesday = $_POST['rate1_less_tuesday'];
	$rate1_less_wednesday = $_POST['rate1_less_wednesday'];
	$rate1_less_thursday = $_POST['rate1_less_thursday'];
	$rate1_less_friday = $_POST['rate1_less_friday'];
	$rate1_less_saturday = $_POST['rate1_less_saturday'];
	$rate1_payable_sunday = $_POST['rate1_payable_sunday'];
	$rate1_payable_monday = $_POST['rate1_payable_monday'];
	$rate1_payable_tuesday = $_POST['rate1_payable_tuesday'];
	$rate1_payable_wednesday = $_POST['rate1_payable_wednesday'];
	$rate1_payable_thursday = $_POST['rate1_payable_thursday'];
	$rate1_payable_friday = $_POST['rate1_payable_friday'];
	$rate1_payable_saturday = $_POST['rate1_payable_saturday'];
	$rate1_sunday = $_POST['rate1_sunday'];
	$rate1_monday = $_POST['rate1_monday'];
	$rate1_tuesday = $_POST['rate1_tuesday'];
	$rate1_wednesday = $_POST['rate1_wednesday'];
	$rate1_thursday = $_POST['rate1_thursday'];
	$rate1_friday = $_POST['rate1_friday'];
	$rate1_saturday = $_POST['rate1_saturday'];
	$rate1_night_sunday = $_POST['rate1_night_sunday'];
	$rate1_night_monday = $_POST['rate1_night_monday'];
	$rate1_night_tuesday = $_POST['rate1_night_tuesday'];
	$rate1_night_wednesday = $_POST['rate1_night_wednesday'];
	$rate1_night_thursday = $_POST['rate1_night_thursday'];
	$rate1_night_friday = $_POST['rate1_night_friday'];
	$rate1_night_saturday = $_POST['rate1_night_saturday'];
	$rate1_parking_sunday = $_POST['rate1_parking_sunday'];
	$rate1_parking_monday = $_POST['rate1_parking_monday'];
	$rate1_parking_tuesday = $_POST['rate1_parking_tuesday'];
	$rate1_parking_wednesday = $_POST['rate1_night_thursday'];
	$rate1_night_thursday = $_POST['rate1_parking_wednesday'];
	$rate1_parking_thursday = $_POST['rate1_parking_thursday'];
	$rate1_parking_friday = $_POST['rate1_parking_friday'];
	$rate1_parking_saturday = $_POST['rate1_parking_saturday'];
	$rate1_dni_sunday = $_POST['rate1_dni_sunday'];
	$rate1_dni_monday = $_POST['rate1_dni_monday'];
	$rate1_dni_tuesday = $_POST['rate1_dni_tuesday'];
	$rate1_dni_wednesday = $_POST['rate1_dni_wednesday'];
	$rate1_dni_thursday = $_POST['rate1_dni_thursday'];
	$rate1_dni_friday = $_POST['rate1_dni_friday'];
	$rate1_dni_saturday = $_POST['rate1_dni_saturday'];
	$rate2_duty_sunday = $_POST['rate2_duty_sunday'];
	$rate2_duty_monday = $_POST['rate2_duty_monday'];
	$rate2_duty_tuesday = $_POST['rate2_duty_tuesday'];
	$rate2_duty_wednesday = $_POST['rate2_duty_wednesday'];
	$rate2_duty_thursday = $_POST['rate2_duty_thursday'];
	$rate2_duty_friday = $_POST['rate2_duty_friday'];
	$rate2_duty_saturday = $_POST['rate2_duty_saturday'];
	$rate2_less_sunday = $_POST['rate2_less_sunday'];
	$rate2_less_monday = $_POST['rate2_less_monday'];
	$rate2_less_tuesday = $_POST['rate2_less_tuesday'];
	$rate2_less_wednesday = $_POST['rate2_less_wednesday'];
	$rate2_less_thursday = $_POST['rate2_less_thursday'];
	$rate2_less_friday = $_POST['rate2_less_friday'];
	$rate2_less_saturday = $_POST['rate2_less_saturday'];
	$rate2_payable_sunday = $_POST['rate2_payable_sunday'];
	$rate2_payable_monday = $_POST['rate2_payable_monday'];
	$rate2_payable_tuesday = $_POST['rate2_payable_tuesday'];
	$rate2_payable_wednesday = $_POST['rate2_payable_wednesday'];
	$rate2_payable_thursday = $_POST['rate2_payable_thursday'];
	$rate2_payable_friday = $_POST['rate2_payable_friday'];
	$rate2_payable_saturday = $_POST['rate2_payable_saturday'];
	$rate2_sunday = $_POST['rate2_sunday'];
	$rate2_monday = $_POST['rate2_monday'];
	$rate2_tuesday = $_POST['rate2_tuesday'];
	$rate2_wednesday = $_POST['rate2_wednesday'];
	$rate2_thursday = $_POST['rate2_thursday'];
	$rate2_friday = $_POST['rate2_friday'];
	$rate2_saturday = $_POST['rate2_saturday'];
	$rate2_night_sunday = $_POST['rate2_night_sunday'];
	$rate2_night_monday = $_POST['rate2_night_monday'];
	$rate2_night_tuesday = $_POST['rate2_night_tuesday'];
	$rate2_night_wednesday = $_POST['rate2_night_wednesday'];
	$rate2_night_thursday = $_POST['rate2_night_thursday'];
	$rate2_night_friday = $_POST['rate2_night_friday'];
	$rate2_night_saturday = $_POST['rate2_night_saturday'];
	$rate2_parking_sunday = $_POST['rate2_parking_sunday'];
	$rate2_parking_monday = $_POST['rate2_parking_monday'];
	$rate2_parking_tuesday = $_POST['rate2_parking_tuesday'];
	$rate2_parking_wednesday = $_POST['rate2_parking_wednesday'];
	$rate2_parking_thursday = $_POST['rate2_parking_thursday'];
	$rate2_parking_friday = $_POST['rate2_parking_friday'];
	$rate2_parking_saturday = $_POST['rate2_parking_saturday'];
	$rate2_dni_sunday = $_POST['rate2_dni_sunday'];
	$rate2_dni_monday = $_POST['rate2_dni_monday'];
	$rate2_dni_tuesday = $_POST['rate2_dni_tuesday'];
	$rate2_dni_wednesday = $_POST['rate2_dni_wednesday'];
	$rate2_dni_thursday = $_POST['rate2_dni_thursday'];
	$rate2_dni_friday = $_POST['rate2_dni_friday'];
	$rate2_dni_saturday = $_POST['rate2_dni_saturday'];
	$rate3_duty_sunday = $_POST['rate3_duty_sunday'];
	$rate3_duty_monday = $_POST['rate3_duty_monday'];
	$rate3_duty_tuesday = $_POST['rate3_duty_tuesday'];
	$rate3_duty_wednesday = $_POST['rate3_duty_wednesday'];
	$rate3_duty_thursday = $_POST['rate3_duty_thursday'];
	$rate3_duty_friday = $_POST['rate3_duty_friday'];
	$rate3_duty_saturday = $_POST['rate3_duty_saturday'];
	$rate3_less_sunday = $_POST['rate3_less_sunday'];
	$rate3_less_monday = $_POST['rate3_less_monday'];
	$rate3_less_tuesday = $_POST['rate3_less_tuesday'];
	$rate3_less_wednesday = $_POST['rate3_less_wednesday'];
	$rate3_less_thursday = $_POST['rate3_less_thursday'];
	$rate3_less_friday = $_POST['rate3_less_friday'];
	$rate3_less_saturday = $_POST['rate3_less_saturday'];
	$rate3_payable_sunday = $_POST['rate3_payable_sunday'];
	$rate3_payable_monday = $_POST['rate3_payable_monday'];
	$rate3_payable_tuesday = $_POST['rate3_payable_tuesday'];
	$rate3_payable_wednesday = $_POST['rate3_payable_wednesday'];
	$rate3_payable_thursday = $_POST['rate3_payable_thursday'];
	$rate3_payable_friday = $_POST['rate3_payable_friday'];
	$rate3_payable_saturday = $_POST['rate3_payable_saturday'];
	$rate3_sunday = $_POST['rate3_sunday'];
	$rate3_monday = $_POST['rate3_monday'];
	$rate3_tuesday = $_POST['rate3_tuesday'];
	$rate3_wednesday = $_POST['rate3_wednesday'];
	$rate3_thursday = $_POST['rate3_thursday'];
	$rate3_friday = $_POST['rate3_friday'];
	$rate3_saturday = $_POST['rate3_saturday'];
	$rate3_night_sunday = $_POST['rate3_night_sunday'];
	$rate3_night_monday = $_POST['rate3_night_monday'];
	$rate3_night_tuesday = $_POST['rate3_night_tuesday'];
	$rate3_night_wednesday = $_POST['rate3_night_wednesday'];
	$rate3_night_thursday = $_POST['rate3_night_thursday'];
	$rate3_night_friday = $_POST['rate3_night_friday'];
	$rate3_night_saturday = $_POST['rate3_night_saturday'];
	$rate3_parking_sunday = $_POST['rate3_parking_sunday'];
	$rate3_parking_monday = $_POST['rate3_parking_monday'];
	$rate3_parking_tuesday = $_POST['rate3_parking_tuesday'];
	$rate3_parking_wednesday = $_POST['rate3_parking_wednesday'];
	$rate3_parking_thursday = $_POST['rate3_parking_thursday'];
	$rate3_parking_friday = $_POST['rate3_parking_friday'];
	$rate3_parking_saturday = $_POST['rate3_parking_saturday'];
	$rate3_dni_sunday = $_POST['rate3_dni_sunday'];
	$rate3_dni_monday = $_POST['rate3_dni_monday'];
	$rate3_dni_tuesday = $_POST['rate3_dni_tuesday'];
	$rate3_dni_wednesday = $_POST['rate3_dni_wednesday'];
	$rate3_dni_thursday = $_POST['rate3_dni_thursday'];
	$rate3_dni_friday = $_POST['rate3_dni_friday'];
	$rate3_dni_saturday = $_POST['rate3_dni_saturday'];
	$additional_info = $_POST['additional_info'].'-'.$_POST['driver_id'].'-'.$_POST['agency_id'].'-'.$_POST['date'];
    if($_FILES["invoice"]["name"] != '')
    {
		$target_dir = "uploads/";
		$target_file = $target_dir.time().basename($_FILES["invoice"]["name"]);
		$uploadOk = 1;
		$imageFileType = strtolower(pathinfo($target_file,PATHINFO_EXTENSION));
		// Check if $uploadOk is set to 0 by an error
		if ($uploadOk == 0) {
		echo "Sorry, your file was not uploaded.";
		// if everything is ok, try to upload file
		} else {
		if (move_uploaded_file($_FILES["invoice"]["tmp_name"], $target_file)) {
		echo "The file ". basename( $_FILES["invoice"]["name"]). " has been uploaded.";
		} else {
		echo "Sorry, there was an error uploading your file.";
		}
		}

		$invoice = $target_file;
	}
	else
	{
		$invoice = $_POST['previousmode'];
	}


   

	$sql = "INSERT INTO timesheet (rate1_duty_sunday, rate1_duty_monday, rate1_duty_tuesday, rate1_duty_wednesday, rate1_duty_thursday, rate1_duty_friday, rate1_duty_saturday, rate1_less_sunday, rate1_less_monday, rate1_less_tuesday, rate1_less_wednesday, rate1_less_thursday, rate1_less_friday, rate1_less_saturday, rate1_payable_sunday, rate1_payable_monday, rate1_payable_tuesday, rate1_payable_wednesday, rate1_payable_thursday, rate1_payable_friday, rate1_payable_saturday, rate1_sunday, rate1_monday, rate1_tuesday, rate1_wednesday, rate1_thursday, rate1_friday, rate1_saturday, rate1_night_sunday, rate1_night_monday, rate1_night_tuesday, rate1_night_wednesday, rate1_night_thursday, rate1_night_friday, rate1_night_saturday, rate1_parking_sunday, rate1_parking_monday, rate1_parking_tuesday, rate1_parking_wednesday, rate1_parking_thursday, rate1_parking_friday, rate1_parking_saturday, rate1_dni_sunday, rate1_dni_monday, rate1_dni_tuesday, rate1_dni_wednesday, rate1_dni_thursday, rate1_dni_friday, rate1_dni_saturday, rate2_duty_sunday, rate2_duty_monday, rate2_duty_tuesday, rate2_duty_wednesday, rate2_duty_thursday, rate2_duty_friday, rate2_duty_saturday, rate2_less_sunday, rate2_less_monday, rate2_less_tuesday, rate2_less_wednesday, rate2_less_thursday, rate2_less_friday, rate2_less_saturday, rate2_payable_sunday, rate2_payable_monday, rate2_payable_tuesday, rate2_payable_wednesday, rate2_payable_thursday, rate2_payable_friday, rate2_payable_saturday, rate2_sunday, rate2_monday, rate2_tuesday, rate2_wednesday, rate2_thursday, rate2_friday, rate2_saturday, rate2_night_sunday, rate2_night_monday, rate2_night_tuesday, rate2_night_wednesday, rate2_night_thursday, rate2_night_friday, rate2_night_saturday, rate2_parking_sunday, rate2_parking_monday, rate2_parking_tuesday, rate2_parking_wednesday, rate2_parking_thursday, rate2_parking_friday, rate2_parking_saturday, rate2_dni_sunday, rate2_dni_monday, rate2_dni_tuesday, rate2_dni_wednesday, rate2_dni_thursday, rate2_dni_friday, rate2_dni_saturday, rate3_duty_sunday, rate3_duty_monday, rate3_duty_tuesday, rate3_duty_wednesday, rate3_duty_thursday, rate3_duty_friday, rate3_duty_saturday, rate3_less_sunday, rate3_less_monday, rate3_less_tuesday, rate3_less_wednesday, rate3_less_thursday, rate3_less_friday, rate3_less_saturday, rate3_payable_sunday, rate3_payable_monday, rate3_payable_tuesday, rate3_payable_wednesday, rate3_payable_thursday, rate3_payable_friday, rate3_payable_saturday, rate3_sunday, rate3_monday, rate3_tuesday, rate3_wednesday, rate3_thursday, rate3_friday, rate3_saturday, rate3_night_sunday, rate3_night_monday, rate3_night_tuesday, rate3_night_wednesday, rate3_night_thursday, rate3_night_friday, rate3_night_saturday, rate3_parking_sunday, rate3_parking_monday, rate3_parking_tuesday, rate3_parking_wednesday, rate3_parking_thursday, rate3_parking_friday, rate3_parking_saturday, rate3_dni_sunday, rate3_dni_monday, rate3_dni_tuesday, rate3_dni_wednesday, rate3_dni_thursday, rate3_dni_friday, rate3_dni_saturday, additional_info, invoice) VALUES ('$rate1_duty_sunday',
'$rate1_duty_monday',
'$rate1_duty_tuesday',
'$rate1_duty_wednesday',
'$rate1_duty_thursday',
'$rate1_duty_friday',
'$rate1_duty_saturday',
'$rate1_less_sunday',
'$rate1_less_monday',
'$rate1_less_tuesday',
'$rate1_less_wednesday',
'$rate1_less_thursday',
'$rate1_less_friday',
'$rate1_less_saturday',
'$rate1_payable_sunday',
'$rate1_payable_monday',
'$rate1_payable_tuesday',
'$rate1_payable_wednesday',
'$rate1_payable_thursday',
'$rate1_payable_friday',
'$rate1_payable_saturday',
'$rate1_sunday',
'$rate1_monday',
'$rate1_tuesday',
'$rate1_wednesday',
'$rate1_thursday',
'$rate1_friday',
'$rate1_saturday',
'$rate1_night_sunday',
'$rate1_night_monday',
'$rate1_night_tuesday',
'$rate1_night_wednesday',
'$rate1_night_thursday',
'$rate1_night_friday',
'$rate1_night_saturday',
'$rate1_parking_sunday',
'$rate1_parking_monday',
'$rate1_parking_tuesday',
'$rate1_parking_wednesday',
'$rate1_parking_thursday',
'$rate1_parking_friday',
'$rate1_parking_saturday',
'$rate1_dni_sunday',
'$rate1_dni_monday',
'$rate1_dni_tuesday',
'$rate1_dni_wednesday',
'$rate1_dni_thursday',
'$rate1_dni_friday',
'$rate1_dni_saturday',
'$rate2_duty_sunday',
'$rate2_duty_monday',
'$rate2_duty_tuesday',
'$rate2_duty_wednesday',
'$rate2_duty_thursday',
'$rate2_duty_friday',
'$rate2_duty_saturday',
'$rate2_less_sunday',
'$rate2_less_monday',
'$rate2_less_tuesday',
'$rate2_less_wednesday',
'$rate2_less_thursday',
'$rate2_less_friday',
'$rate2_less_saturday',
'$rate2_payable_sunday',
'$rate2_payable_monday',
'$rate2_payable_tuesday',
'$rate2_payable_wednesday',
'$rate2_payable_thursday',
'$rate2_payable_friday',
'$rate2_payable_saturday',
'$rate2_sunday',
'$rate2_monday',
'$rate2_tuesday',
'$rate2_wednesday',
'$rate2_thursday',
'$rate2_friday',
'$rate2_saturday',
'$rate2_night_sunday',
'$rate2_night_monday',
'$rate2_night_tuesday',
'$rate2_night_wednesday',
'$rate2_night_thursday',
'$rate2_night_friday',
'$rate2_night_saturday',
'$rate2_parking_sunday',
'$rate2_parking_monday',
'$rate2_parking_tuesday',
'$rate2_parking_wednesday',
'$rate2_parking_thursday',
'$rate2_parking_friday',
'$rate2_parking_saturday',
'$rate2_dni_sunday',
'$rate2_dni_monday',
'$rate2_dni_tuesday',
'$rate2_dni_wednesday',
'$rate2_dni_thursday',
'$rate2_dni_friday',
'$rate2_dni_saturday',
'$rate3_duty_sunday',
'$rate3_duty_monday',
'$rate3_duty_tuesday',
'$rate3_duty_wednesday',
'$rate3_duty_thursday',
'$rate3_duty_friday',
'$rate3_duty_saturday',
'$rate3_less_sunday',
'$rate3_less_monday',
'$rate3_less_tuesday',
'$rate3_less_wednesday',
'$rate3_less_thursday',
'$rate3_less_friday',
'$rate3_less_saturday',
'$rate3_payable_sunday',
'$rate3_payable_monday',
'$rate3_payable_tuesday',
'$rate3_payable_wednesday',
'$rate3_payable_thursday',
'$rate3_payable_friday',
'$rate3_payable_saturday',
'$rate3_sunday',
'$rate3_monday',
'$rate3_tuesday',
'$rate3_wednesday',
'$rate3_thursday',
'$rate3_friday',
'$rate3_saturday',
'$rate3_night_sunday',
'$rate3_night_monday',
'$rate3_night_tuesday',
'$rate3_night_wednesday',
'$rate3_night_thursday',
'$rate3_night_friday',
'$rate3_night_saturday',
'$rate3_parking_sunday',
'$rate3_parking_monday',
'$rate3_parking_tuesday',
'$rate3_parking_wednesday',
'$rate3_parking_thursday',
'$rate3_parking_friday',
'$rate3_parking_saturday',
'$rate3_dni_sunday',
'$rate3_dni_monday',
'$rate3_dni_tuesday',
'$rate3_dni_wednesday',
'$rate3_dni_thursday',
'$rate3_dni_friday',
'$rate3_dni_saturday',
'$additional_info',
'$nvoice'
)";
	
	mysqli_query($con,$sql);

	header('Location:saved.php');
    }
	
}

 ?>