<?php
	session_start();

    require('connect.php');
    require('functions.php');

    $log=loggedin();
    if($log!==true)
    {
        
        header('Refresh:0 url=index.php');
        

    }
    else if($_SESSION['type']==="2")
    {
       header('Refresh:0 url=driver.php');
    }
    else if($_SESSION['type']==="3")
    {
       header('Refresh:0 url=admin.php');
    }
?>




<!DOCKTYPE html>
<html>
	<head>
		<title>Abhi Cab</title>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
		<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">

		<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
		<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
		<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>


		<style>

			#swift
			{

				display:none;
			}
			#swift-dzire
			{

				display:none;
			}
			#innova
			{

				display:none;
			}
			#indica
			{

				display:none;
			}
			input[type=text], input[type=password], input[type=date]
			{
				width: auto;
				padding: 12px 20px;
				margin: 8px 0;
				display: inline-block;
				border: 1px solid #ccc;

				box-sizing: border-box;
			}

			.container1 
			{
				color: #990099;
				width:150%;
			}
			.container2 
			{
				width: 100%;
				color: #990000;
			}

			.checked 
			{
				color: orange;
			}

			button 
			{
				background-color: #4CAF50;
				color: white;
				padding: 14px 20px;
				margin: 8px 0;
				border: none;
				cursor: pointer;
				width: 100%;
			}
			img
			{
				max-width: 100%;
			}
			.cancelbtn 
			{
				width:100%
				padding: 10px 18px;
				background-color: green;
			}

			.Search 
			{
				width:100%
				padding: 10px 18px;
				background-color: red;
			}
			.footer 
			{
				color: white;
				background-color: black;
				margin-left: 0px;
				text-align: center;
				position:fixed;
				bottom: 0;
				height: 50px;
				width: 100%;
			}


			.autocomplete {
				position: relative;
				display: inline-block;
			}


			.autocomplete-items {
				position: absolute;
				border: 1px solid #d4d4d4;
				border-bottom: none;
				border-top: none;
				z-index: 99;
				/*position the autocomplete items to be the same width as the container:*/
				top: 100%;
				left: 0;
				right: 0;
			}

			.autocomplete-items div {
				padding: 10px;
				cursor: pointer;
				background-color: #fff; 
				border-bottom: 1px solid #d4d4d4; 
			}

			/*when hovering an item:*/
			.autocomplete-items div:hover {
				background-color: #e9e9e9; 
			}

			/*when navigating through the items using the arrow keys:*/
			.autocomplete-active {
				background-color: DodgerBlue !important; 
				color: #ffffff; 
			}
			@media screen and (max-width: 300px) 
			{

				.cancelbtn 
				{
					width: 70%;
				}
				.Search 
				{
					width: 70%;
				}
			}

		</style>
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>

/*the container must be positioned relative:*/
.autocomplete {
  position: relative;
  display: inline-block;
  max-width: 50%;
}



.autocomplete-items {
  position: absolute;
  border: 1px solid #d4d4d4;
  border-bottom: none;
  border-top: none;
  z-index: 99;
  /*position the autocomplete items to be the same width as the container:*/
  top: 100%;
  left: 0;
  right: 0;
}

.autocomplete-items div {
  padding: 10px;
  cursor: pointer;
  background-color: #fff; 
  border-bottom: 1px solid #d4d4d4; 
}

/*when hovering an item:*/
.autocomplete-items div:hover {
  background-color: #e9e9e9; 
}

/*when navigating through the items using the arrow keys:*/
.autocomplete-active {
  background-color: DodgerBlue !important; 
  color: #ffffff; 
}
</style>


		<script type="text/javascript">
			function myFunction() 
			{
				var x = document.getElementById("swift");
				if (x.style.display === "none") 
				{
					x.style.display = "block";
				} 
				else 
				{
					x.style.display = "none";
				}
			}


		</script>









	</head>

<body style="overflow-x:hidden;background-size:100% 100%;background-repeat: no-repeat;bottom: 0;background-attachment: fixed;" background="images/background.jpg">

	<div>
		<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation" style="padding: 0px margin:0px">
			<div class="main" >
				<div class="col-sm-6" >
					<h1 align="left" style="margin-left:10px;" ><font color="white" size="15">   ABHI CAB</font>
						<img src="images/logo.png" alt="google.com" width="100" height="50" align="left" style="margin-left:10px;">
					</h1>
				</div>
				<div class="col-sm-6" style="margin-top:40px;">
					<ul class="nav navbar-nav navbar-right" style="margin-right:10px;">

						<li ><a href="index.php"> Home   <span class="glyphicon glyphicon-home"></span></a></li>
						<li class="active"><a href="main.php">Book Now  <span class="glyphicon glyphicon-shopping-cart"></span></a></li>
						<li><a href="about_us.php">About Us</a></li>
						<li><a href="contact.php">Contact Us <span class="glyphicon glyphicon-earphone"></span></a></li>
						<li><a href="logout.php">Log Out <span class="glyphicon glyphicon-log-out"></span></a></li>
					</ul>
				</div>
			</div>
		</nav>
	</div>

	<div class="col-sm-12">
		<div class="col-sm-2"></div>

		<div class="col-sm-8">
			<div class="row">
				<!--<form action="#" method="post" style="margin-top:100px">
				     <div class="col-sm-3">
				          <div class="col-sm-1" style="width:400%" >
				               <form autocomplete="off" action="#">
				                    <div class="autocomplete" style="width:300px;">
				                         <input id="from" type="text" name="myCountry" placeholder="Country">
				                    </div>
				                    
				               </form>
				          </div>
				     </div>
				</form>-->

				<form action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>" method="post" autocomplete="off" style="margin-top:100px">
					<!--<div class="col-sm-3">
						<div class="col-sm-1" style="width:400%" >
							<form autocomplete="off" action="#">
								<div class="autocomplete">
									<label  ><b><font color="white" size="3">From</font></b></label>
									<br></br>
									<input type="text" placeholder="eg:Pune" name="from" id="from" required >
								</div>
							</form>
						</div>
					</div>-->


					<div class="col-sm-3">
				          	<div class="col-sm-1" style="width:400%" >
				          		<label  ><b><font color="white" size="3">From</font></b></label>
							<br></br>
				               	
				                    		<div class="autocomplete" style="width:300px;">
				                         		<input id="from" type="text" name="from" placeholder="eg:Pune">
				                    		</div>
				                    
				               	
				          	</div>
				     	</div>

					<div class="col-sm-3">
						<div class="col-sm-1" style="width:400%; margin-top:5px">
							<lable><b><font color="white" size="3">To</font></b></lable>
							<br></br>
							<div class="autocomplete" style="width:300px;">
								<input type="text" placeholder="eg:Nashik" name="to" id="to" required>
							</div>
						</div>
					</div>

					<div class="col-sm-3">
						<div class="col-sm-1" style="width:400%" >
							<label ><b><font color="white" size="3">Date</font></b></label>
							<br></br>
							<input type="date" name="date" id="date" name="date" required> 
						</div>
					</div>

					<div class="col-sm-3">
						<div class="col-sm-1" style="width:auto; margin-top:15px" >
							<button type="submit"  class="Search" onclick="city()" id="search" name="search">Search Cab</button>
						</div>
					</div>
				</form>
			</div>
		</div>
		<div id="hello">
			<div class="col-sm-2"></div>
		</div>
		<div class="container" id="cars" style="margin-bottom:70px">


			

<script>
function autocomplete(inp, arr) {
  /*the autocomplete function takes two arguments,
  the text field element and an array of possible autocompleted values:*/
  var currentFocus;
  /*execute a function when someone writes in the text field:*/
  inp.addEventListener("input", function(e) {
      var a, b, i, val = this.value;
      /*close any already open lists of autocompleted values*/
      closeAllLists();
      if (!val) { return false;}
      currentFocus = -1;
      /*create a DIV element that will contain the items (values):*/
      a = document.createElement("DIV");
      a.setAttribute("id", this.id + "autocomplete-list");
      a.setAttribute("class", "autocomplete-items");
      /*append the DIV element as a child of the autocomplete container:*/
      this.parentNode.appendChild(a);
      /*for each item in the array...*/
      for (i = 0; i < arr.length; i++) {
        /*check if the item starts with the same letters as the text field value:*/
        if (arr[i].substr(0, val.length).toUpperCase() == val.toUpperCase()) {
          /*create a DIV element for each matching element:*/
          b = document.createElement("DIV");
          /*make the matching letters bold:*/
          b.innerHTML = "<strong>" + arr[i].substr(0, val.length) + "</strong>";
          b.innerHTML += arr[i].substr(val.length);
          /*insert a input field that will hold the current array item's value:*/
          b.innerHTML += "<input type='hidden' value='" + arr[i] + "'>";
          /*execute a function when someone clicks on the item value (DIV element):*/
          b.addEventListener("click", function(e) {
              /*insert the value for the autocomplete text field:*/
              inp.value = this.getElementsByTagName("input")[0].value;
              /*close the list of autocompleted values,
              (or any other open lists of autocompleted values:*/
              closeAllLists();
          });
          a.appendChild(b);
        }
      }
  });
  /*execute a function presses a key on the keyboard:*/
  inp.addEventListener("keydown", function(e) {
      var x = document.getElementById(this.id + "autocomplete-list");
      if (x) x = x.getElementsByTagName("div");
      if (e.keyCode == 40) {
        /*If the arrow DOWN key is pressed,
        increase the currentFocus variable:*/
        currentFocus++;
        /*and and make the current item more visible:*/
        addActive(x);
      } else if (e.keyCode == 38) { //up
        /*If the arrow UP key is pressed,
        decrease the currentFocus variable:*/
        currentFocus--;
        /*and and make the current item more visible:*/
        addActive(x);
      } else if (e.keyCode == 13) {
        /*If the ENTER key is pressed, prevent the form from being submitted,*/
        e.preventDefault();
        if (currentFocus > -1) {
          /*and simulate a click on the "active" item:*/
          if (x) x[currentFocus].click();
        }
      }
  });
  function addActive(x) {
    /*a function to classify an item as "active":*/
    if (!x) return false;
    /*start by removing the "active" class on all items:*/
    removeActive(x);
    if (currentFocus >= x.length) currentFocus = 0;
    if (currentFocus < 0) currentFocus = (x.length - 1);
    /*add class "autocomplete-active":*/
    x[currentFocus].classList.add("autocomplete-active");
  }
  function removeActive(x) {
    /*a function to remove the "active" class from all autocomplete items:*/
    for (var i = 0; i < x.length; i++) {
      x[i].classList.remove("autocomplete-active");
    }
  }
  function closeAllLists(elmnt) {
    /*close all autocomplete lists in the document,
    except the one passed as an argument:*/
    var x = document.getElementsByClassName("autocomplete-items");
    for (var i = 0; i < x.length; i++) {
      if (elmnt != x[i] && elmnt != inp) {
        x[i].parentNode.removeChild(x[i]);
      }
    }
  }
  /*execute a function when someone clicks in the document:*/
  document.addEventListener("click", function (e) {
      closeAllLists(e.target);
  });
}

/*An array containing all the country names in the world:*/
var countries = ["Adilabad","Agra","Ahmedabad","Ahmednagar","Aizawl","Ajitgarh(Mohali)","Ajmer","Akola","Alappuzha","Aligarh","Alirajpur","Allahabad","Almora","Alwar","Ambala","Ambedkar Nagar","Amravati","Amreli","Amritsar","Anand","Anantapur","Anantnag","Angul","Anjaw","Anuppur","Araria","Ariyalur","Arwal","Ashok Nagar","Auraiya","Aurangabad","Aurangabad","Azamgarh","Badgam","Bagalkot","Bageshwar","Bagpat","Bahraich","Baksa","Balaghat","Balangir","Balasore","Ballia","Balrampur","Banaskantha","Banda","Bandipora","Bangalore Rural","Bangalore  Urban","Banka","Bankura","Banswara","Barabanki","Baramulla","Baran","Bardhaman","Bareilly","Bargarh (Baragarh)","Barmer","Barnala","Barpeta","Barwani","Bastar","Basti","Bathinda","Beed","Begusarai","Belgaum","Bellary","Betul","Bhadrak","Bhagalpur","Bhandara","Bharatpur","Bharuch","Bhavnagar","Bhilwara","Bhind","Bhiwani","Bhojpur","Bhopal","Bidar","Bijapur","Bijapur","Bijnor","Bikaner","Bilaspur","’Bilaspur","Birbhum","Bishnupur","Bokaro","Bongaigaon","Boudh (Bauda)","Budaun","Bulandshahr","Buldhana","Bundi","Burhanpur","Buxar","Cachar","Central Delhi","Chamarajnagar","Chamba","Chamoli","Champawat","Champhai","Chandauli","Chandel","Chandigarh","Chandrapur","Changlang","Chatra","Chennai","Chhatarpur","Chhatrapati Shahuji Maharaj Nagar","Chhindwara","Chikkaballapur","Chikkamagaluru","Chirang","Chitradurga","Chitrakoot","Chittoor","Chittorgarh","Churachandpur","Churu","Coimbatore","Cooch Behar","Cuddalore","Cuttack","Dadra and Nagar Haveli","Dahod","Dakshin Dinajpur","Dakshina Kannada","Daman","Damoh","Dantewada","Darbhanga","Darjeeling","Darrang","Datia","Dausa","Davanagere","Debagarh (Deogarh)","Dehradun","Deoghar","Deoria","Dewas","Dhalai","Dhamtari","Dhanbad","Dhar","Dharmapuri","Dharwad","Dhemaji","Dhenkanal","Dholpur","Dhubri","Dhule","Dibang Valley","Dibrugarh","Dima Hasao","Dimapur","Dindigul","Dindori","Diu","Doda","Dumka","Dungapur","Durg","East Champaran","East Delhi","East Garo Hills","East Khasi Hills","East Siang","East Sikkim","East Singhbhum","Eluru","Ernakulam","Erode","Etah","Etawah","Faizabad","Faridabad","Faridkot","Farrukhabad","Fatehabad","Fatehgarh Sahib","Fatehpur","Fazilka","Firozabad","Firozpur","Gadag","Gadchiroli","Gajapati","Ganderbal","Gandhinagar","Ganganagar","Ganjam","Garhwa","Gautam Buddh Nagar","Gaya","Ghaziabad","Ghazipur","Giridih","Goalpara","Godda","Golaghat","Gonda","Gondia","Gopalganj","Gorakhpur","Gulbarga","Gumla","Guna","Guntur","Gurdaspur","Gurgaon","Gwalior","Hailakandi","Hamirpur","Hanumangarh","Harda","Hardoi","Haridwar","Hassan","Haveri district","Hazaribag","Hingoli","Hissar","Hooghly","Hoshangabad","Hoshiarpur","Howrah","Hyderabad","Idukki","Imphal East","Imphal West","Indore","Jabalpur","Jagatsinghpur","Jaintia Hills","Jaipur","Jaisalmer","Jajpur","Jalandhar","Jalaun","Jalgaon","Jalna","Jalore","Jalpaiguri","Jammu","Jamnagar","Jamtara","Jamui","Janjgir-Champa","Jashpur","Jaunpur district","Jehanabad","Jhabua","Jhajjar","Jhalawar","Jhansi","Jharsuguda","Jhunjhunu","Jind","Jodhpur","Jorhat","Junagadh","Jyotiba Phule Nagar","Kabirdham (formerly Kawardha)","Kadapa","Kaimur","Kaithal","Kakinada","Kalahandi","Kamrup","Kamrup Metropolitan","Kanchipuram","Kandhamal","Kangra","Kanker","Kannauj","Kannur","Kanpur","Kanshi Ram Nagar","Kanyakumari","Kapurthala","Karaikal","Karauli","Karbi Anglong","Kargil","Karimganj","Karimnagar","Karnal","Karur","Kasaragod","Kathua","Katihar","Katni","Kaushambi","Kendrapara","Kendujhar (Keonjhar)","Khagaria","Khammam","Khandwa (East Nimar)","Khargone (West Nimar)","Kheda","Khordha","Khowai","Khunti","Kinnaur","Kishanganj","Kishtwar","Kodagu","Koderma","Kohima","Kokrajhar","Kolar","Kolasib","Kolhapur","Kolkata","Kollam","Koppal","Koraput","Korba","Koriya","Kota","Kottayam","Kozhikode","Krishna","Kulgam","Kullu","Kupwara","Kurnool","Kurukshetra","Kurung Kumey","Kushinagar","Kutch","Lahaul and Spiti","Lakhimpur","Lakhimpur","Kheri","Lakhisarai","Lalitpur","Latehar","Latur","Lawngtlai","Leh","Lohardaga","Lohit","Lower Dibang Valley","Lower Subansiri","Lucknow","Ludhiana","Lunglei","Madhepura","Madhubani","Madurai","Mahamaya Nagar","Maharajganj","Mahasamund","Mahbubnagar","Mahe","Mahendragarh","Mahoba","Mainpuri","Malappuram","Maldah","Malkangiri","Mamit","Mandi","Mandla","Mandsaur","Mandya","Mansa","Marigaon","Mathura","Mau","Mayurbhanj","Medak","Meerut","Mehsana","Mewat","Mirzapur","Moga","Mokokchung","Mon","Moradabad","Morena","Mumbai City","Mumbai suburban","Munger","Murshidabad","Muzaffarnagar","Muzaffarpur","Mysore","Nabarangpur","Nadia","Nagaon","Nagapattinam","Nagaur","Nagpur","Nainital","Nalanda","Nalbari","Nalgonda","Namakkal","Nanded","Nandurbar","Narayanpur","Narmada","Narsinghpur","Nashik","Navsari","Nawada","Nawanshahr","Nayagarh","Neemuch","Nellore","New Delhi","Nilgiris","Nizamabad","North 24","Parganas","North Delhi","North East Delhi","North Goa","North Sikkim","North Tripura","North West Delhi","Nuapada","Ongole","Osmanabad","Pakur","Palakkad","Palamu","Pali","Palwal","Panchkula","Panchmahal","Panchsheel Nagar district (Hapur)","Panipat","Panna","Papum Pare","Parbhani","Paschim Medinipur","Patan","Pathanamthitta","Pathankot","Patiala","Patna","Pauri Garhwal","Perambalur","Phek","Pilibhit","Pithoragarh","Pondicherry","Poonch","Porbandar","Pratapgarh","Pudukkottai","Pulwama","Pune","Purba Medinipur","Puri","Purnia","Purulia","Raebareli","Raichur","Raigad","Raigarh","Raipur","Raisen","Rajauri","Rajgarh","Rajkot","Rajnandgaon","Rajsamand","Ramabai Nagar (Kanpur Dehat)","Ramanagara","Ramanathapuram","Ramban","Ramgarh","Rampur","Ranchi","Ratlam","Ratnagiri","Rayagada","Reasi","Rewa","Rewari","Ri Bhoi","Rohtak","Rohtas","Rudraprayag","Rupnagar","Sabarkantha","Sagar","Saharanpur","Saharsa","Sahibganj","Saiha","Salem","Samastipur","Samba","Sambalpur","Sangli","Sangrur","Sant Kabir Nagar","Sant Ravidas Nagar","Saran","Satara","Satna","Sawai Madhopur","Sehore","Senapati","Seoni","Seraikela Kharsawan","Serchhip","Shahdol","Shahjahanpur","Shajapur","Shamli","Sheikhpura","Sheohar","Sheopur","Shimla","Shimoga","Shivpuri","Shopian","Shravasti","Sibsagar","Siddharthnagar","Sidhi","Sikar","Simdega","Sindhudurg","Singrauli","Sirmaur","Sirohi","Sirsa","Sitamarhi","Sitapur","Sivaganga","Siwan","Solan","Solapur","Sonbhadra","Sonipat","Sonitpur","South 24 Parganas","South Delhi","South Garo Hills","South Goa","South Sikkim","South Tripura","South West Delhi","Sri Muktsar"," Sahib","Srikakulam","Srinagar","Subarnapur (Sonepur)","Sultanpur","Sundergarh","Supaul","Surat","Surendranagar","Surguja","Tamenglong","Tarn","Taran","Tawang","Tehri Garhwal","Thane","Thanjavur","The Dangs","Theni","Thiruvananthapuram","Thoothukudi","Thoubal","Thrissur","Tikamgarh","Tinsukia","Tirap","Tiruchirappalli","Tirunelveli","Tirupur","Tiruvallur","Tiruvannamalai","Tiruvarur","Tonk","Tuensang","Tumkur","Udaipur","Udalguri","Udham Singh Nagar","Udhampur","Udupi","Ujjain","Ukhrul","Umaria","Una","Unnao","Upper Siang","Upper Subansiri","Uttar Dinajpur","Uttara Kannada","Uttarkashi","Vadodara","Vaishali","Valsad","Varanasi","Vellore","Vidisha","Viluppuram","Virudhunagar","Visakhapatnam","Vizianagaram","Vyara","Warangal","Wardha","Washim","Wayanad","West Champaran","West Delhi","West Garo Hills","West Kameng","West Khasi Hills","West Siang","West Sikkim","West Singhbhum","West Tripura","Wokha","Yadgir","Yamuna Nagar","Yanam","Yavatmal","Zunheboto"];




/*initiate the autocomplete function on the "myInput" element, and pass along the countries array as possible autocomplete values:*/
autocomplete(document.getElementById("from"), countries);
autocomplete(document.getElementById("to"), countries);
</script>




<?php
	require('connect.php');
	
	
	if(isset($_POST['search']))
	{
		//echo '<script>alert("hello customer krushna");</script>';
		//echo '<script>alert("AFTER BUTTEN PRESS");</script>';
		if($_POST['from']=="" || $_POST['to']=="" || $_POST['date']=="")
		{
			echo '<script>alert("All fields must be filled out");</script>';
		}
		else
		{
			$from=$_POST['from'];
			$from=test_input($from);
			$to=$_POST['to'];
			$to=test_input($to);
			$date=$_POST['date'];
			$date=test_input($date);
				
				$_SESSION["ddate"] = $date;
				//echo '<script type=\'text/javascript\'>'; 
				//echo 'alert("hello'.$from.'");'; 
				//echo '</script>'; 
				
				//echo '<script type=\'text/javascript\'>'; 
				//echo 'alert("hello'.$to.'");'; 
				//echo '</script>';
				
				/*$abhi="SELECT * FROM distance WHERE dfrom='".$from."' AND dto='".$to."'";
				$abhi=mysqli_query($con,$abhi);
				if($abhi){ echo '<script>alert("distance calculation");</script>';}
				$row = mysqli_fetch_array($abhi);
				$distance=$row['distance'];
				$_SESSION["dist"] = $distance;*/
				$url = "https://www.distance24.org/route.json?stops=".$from."|".$to." ";


				$contents = file_get_contents($url);
				$clima=json_decode($contents);

				$distance=$clima->distance;
				$_SESSION["dist"] = $distance;


				$Q = "SELECT * FROM logs WHERE lfrom = '".$from."' and lto = '".$to."' and ldate = '".$date."'";
				$Q = mysqli_query($con,$Q);




				
				/*$r="SELECT *  FROM driver WHERE dcity='".$from."' "; 
				//$id="SELECT did FROM driver WHERE demail='".$username."' and dpassword='".$password."'"; 
				$abc=mysqli_query($con,$r);
				$r=mysqli_query($con,$r);
				*/
				if(mysqli_num_rows($Q) > 0)
				{	
					//echo '<script>alert("hello customer making ur cab ready");</script>';
					while($row = mysqli_fetch_array($Q))
					{
						//$dcarname=$row['DCARNAME'];
						$did=$row['DID'];
						$dcarname="swift";
						$lid=$row['LID'];
						
						//$d="SELECT DATEOFTRAVEL FROM CUSTDRIV WHERE DID ='".$did."'";
						//$d=mysqli_query($con,$d);
						//$ro = mysqli_fetch_array($d);
						//$d=$ro['DATEOFTRAVEL'];
						//echo '<script type=\'text/javascript\'>'; 
						//echo 'alert("hello date of travel is '.$d.'");'; 
						//echo 'alert("hello date that is entered is '.$date.'");'; 
						//echo '</script>';
						//$dname=$row['DNAME'];
						//echo '<script type=\'text/javascript\'>'; 
						//echo 'alert("hello care name is '.$dcarname.'");'; 
						//echo '</script>';
						
						/*$k="SELECT * FROM car where cname = '".$dcarname."'";
						$k=mysqli_query($con,$k);
						$ki = mysqli_fetch_array($k);
						$image=$ki['IMAGE'];
						$person=$ki['PERSON'];
						$bag=$ki['BAGS'];
						$rate=$ki['RATE'];*/

						$k="SELECT * FROM driver where DID = '".$did."'";
						$k=mysqli_query($con,$k);
						$ki = mysqli_fetch_array($k);
						$image=$ki['CARIMAGE'];

						$person=$row['passenger'];
						$bag=$row['bags'];
						$rate=$row['rate'];
						//echo '<img  src="'.$k.'" alt="google.com" width="300" height="150"  >';
						
						
						
						echo "
						<div class='col-sm-1'>
							<div clas='container'></div>
						</div>";
						?>
						
						<form action="krushna1.php" method="post">
						<?php
						echo "
						<div   class='col-sm-4' style='margin-top:100px; border: 1px solid black; background-color:#ffffff;'>
							<h3 class='col-sm-6'>".$dcarname."</h3>
							<h3 class='col-s,-6' align='right'> ".$person."PPL,".$bag."Bags</h3>

							<div class='col-sm-12'>
								
								<img src='data:image/png;base64,".base64_encode($image)."'/>

							</div>

							<div class='col-sm-6'>
								<span class='fa fa-star checked'></span>
								<span class='fa fa-star checked'></span>
								<span class='fa fa-star checked'></span>
								<span class='fa fa-star checked'></span>
								<span class='fa fa-star'></span>

								<h4 text='bold'>".$rate."RS per KM</h4>
							</div>

							<div class='col-sm-6'>";
							//$_SESSION["favcolor"] = $did;onclick='on_clic_go_button(".$did.")'
														//<a href='krushna.php'><button type='button'  class='cancelbtn' name='".$did."' onclick='on_clic_go_button('".$did."')'>GO</button></a>

							echo "
								<input type='text' name='rate' value='".$rate."' style='display:none'>
								<button type='submit'  class='cancelbtn' name=".$lid." >GO</button>
							</div>
							</form>
						</div>
						<div class='col-sm-1'>
							<div clas='container'></div>
						</div>";
						
		
		
						
						
						if($dcarname == "swift")
						{
							
						}
						if($dcarname == "swift-dezire")
						{
							
						}
						if($dcarname == "innova")
						{
							
						
						}
					}
				}
				else
				{
					//echo "<script type='text/javascript'>alert('something is not correct..!!!');</script>";
					
				}
			
			
		}
	}
	
			
			
?>












	
</div>



</div>


<!-- Footer -->
  <footer class="footer">
    <h5>Copyright &copy; 2019 AbhiCab.com</h5>
  </footer>



</div>
  
  
  
 


</body>

</html>

