<!DOCTYPE html>

<?php 

session_start();
if (!isset($_SESSION['username'])) {
  header("location:login/main_login.php");
}

	
	?>
<html lang="en">
<head>
  <title>Edit customer detail</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="css/bootstrap.min.css">

		   <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">

		 <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
  <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
  <script src="js/bootstrap.min.js"></script>
    <script>
         $( function() {
    $( "#search" ).autocomplete({
      minLength: 3,
      source: "resources/search_name.php?vc=",
      focus: function( event, ui ) {
        $( "#search" ).val( ui.item.name);
		//alert(ui.item.name);
        return false;
      },
      select: function( event, ui ) {
        $( "#c_id" ).val( ui.item.code );
        $( "#search" ).val( ui.item.name );
        $( "#cfname" ).val( ui.item.desc );
		$( "#cnic" ).val( ui.item.cnic );
        $( "#address" ).val( ui.item.address );
        $( "#phone1" ).val( ui.item.phone1 );
        $( "#date" ).val( ui.item.conn );
		var $select = $("#option");
		$select.val(ui.item.pkg );
		var $select = $("#status");
		$select.val(ui.item.status );	
			
			
			
			
			
			//showHin(ui.item.code);

       // $( "#project-icon" ).attr( "src", "images/" + ui.item.desc );
         //var ccod= ui.item.code; 
        return false;
      }
    })
    .autocomplete( "instance" )._renderItem = function( ul, item ) {
	return $( "<li>" )
        .append( "<div><b>" + item.name + "</b><br>" + item.address +"</b><br>" + item.phone1 + "</div>" )
        .appendTo( ul );
    };
  
		
  } );
  </script>
</head>
<body>
<?php require_once("setting.php");
	
    require_once(config);?>
<div class="container"><div class="row justify-content-md-center">
<?php include_once(menu_penal);
?>
</div>
<div class="row justify-content-center">
    <div class="col-5">
  <h2>Dublicate Bill print</h2></div></div>
  <form class="form-horizontal" action="c_stat.php" method="post">
    <div class="form-group">
		   <div class="form-row">

      <label for="disabledInput" class="col-sm-4 control-label">Customer ID</label>
      <div class="col-md-6">
        <input class="form-control" name="c_id" id="c_id" type="text" placeholder="" readonly>
      </div>
      <label class="col-sm-4 control-label">Search Customer Name</label>
      <div class="col-sm-6">
        <input class="form-control" name="search" id="search"  type="search" placeholder="Customer Name">
      </div>
	  <label class="col-sm-4 control-label">Father Name</label>
      <div class="col-sm-6">
        <input class="form-control" name="cfname" id="cfname" type="text" placeholder="Father Name">
      </div>
	  </div>
	  	  	  <div class="form-row">
<label class="col-sm-4 control-label">Address</label>
      <div class="col-sm-6">
        <input class="form-control" name="address" id="address" type="text" placeholder="Customer Address">
      </div>


     
  <label class="col-sm-4 control-label">Click</label>
	  <div class="col-sm-3">

   <input class="btn btn-primary" type="submit" name="submit" value="Preview" />
      </div>
 </div>
	  
	  </div>		

 </div>
  </form>
</div>
</body>
</html>
