<?php include 'connection.php';
session_start();
if (!isset($_SESSION['is_logged_in'])) {
    header("Location:login.php");
    die();
    }
date_default_timezone_set('Asia/Calcutta');
$today = date("d/m/Y");
$today1 = date("d/m");
$currentmonth = date(m);

?>
<?php 

$query = "select * from users where username = '". $_SESSION["LOGIN_NAME"]."' AND password = '".$_SESSION["EMPLOYEE_PASSWORD"]."'";
//echo $query;
		                 $result = mysql_query($query,$conn);
						 while($row=mysql_fetch_array($result))
	                                              	{
													$staff_name = $row['full_name'];
													  $full_name = $row['full_name'];
													  $avatar = $row['avatar'];
													  $department_name = $row['department_name'];
													  $staff_id  = $row['id'];
													  $username = $row['username'];
													  $our_company = $row['our_company'];
													  $designation = $row['designation'];
													  $sales_group = $row['sales_group'];
													  $head = $row['head'];
													  $region = $row['region'];
													  $district = $row['district'];
													  $email = $row['email'];
													  $mobile_no = $row['mobile_no'];
													  $staff_id_self  = $row['id'];
													  //echo $Branch;
													  }	
													   ?>	
													   
													   
<!DOCTYPE html>
<html>
<head><? include('sahavas_dropdown_function.php');?>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>THREESTAR - CRM</title>
  <!-- Tell the browser to be responsive to screen width -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  <!-- Bootstrap 3.3.6 -->
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css">
  <!-- Ionicons -->
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css">
  <!-- daterange picker -->
  <link rel="stylesheet" href="plugins/daterangepicker/daterangepicker.css">
  <!-- bootstrap datepicker -->
  <link rel="stylesheet" href="plugins/datepicker/datepicker3.css">
  <!-- iCheck for checkboxes and radio inputs -->
  <link rel="stylesheet" href="plugins/iCheck/all.css">
  <!-- Bootstrap Color Picker -->
  <link rel="stylesheet" href="plugins/colorpicker/bootstrap-colorpicker.min.css">
  <!-- Bootstrap time Picker -->
  <link rel="stylesheet" href="plugins/timepicker/bootstrap-timepicker.min.css">
  <!-- Select2 -->
  <link rel="stylesheet" href="plugins/select2/select2.min.css">
  <!-- Theme style -->
  <link rel="stylesheet" href="dist/css/AdminLTE.min.css">
  <!-- AdminLTE Skins. Choose a skin from the css/skins
       folder instead of downloading all of them to reduce the load. -->
  <link rel="stylesheet" href="dist/css/skins/_all-skins.min.css">
 <link rel="stylesheet" href="public/css/default.css" type="text/css">
  <script src="jquery.min.js"></script>
<script src="jquery-ui.js"></script>
<script src="jquery-ui.js"></script>
  <style>
  table {
  border: 1px solid #ccc;
  border-collapse: collapse;
  margin: 0;
  padding: 0;
  table-layout: fixed;
}
table caption {
  font-size: 1.2em;
  margin: .5em 0 .75em;
}
table tr {
  
  border: 1px solid #ddd;
  padding: .35em;
}
table th,
table td {
  padding: .625em;
  
}
table th {
  font-size: .9em;
  letter-spacing: .0em;
  text-transform: uppercase;
}
@media screen and (max-width: 600px) {
  table {
    border: 0;
  }
  table caption {
    font-size: 1.8em;
  }
  table thead {
    border: none;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
  }
  table tr {
    border-bottom: 3px solid #ddd;
    display: block;
    margin-bottom: .625em;
  }
  table td {
    border-bottom: 1px solid #ddd;
    display: block;
    font-size: .9em;
    
  }
  table td:before {
    /*
    * aria-label has no advantage, it won't be read inside a table
    content: attr(aria-label);
    */
    content: attr(data-label);
    float: left;
    font-weight: bold;
    text-transform: uppercase;
  }
  table td:last-child {
    border-bottom: 0;
  }
}

</style>												   
<script type="text/javascript" src="jquery.min.js"></script>
<script src="jquery-ui.js"></script>
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript">


function fillsale1(Value)
{
$('#customer_id1').val(Value);
$('#displaysale1').hide();
}

$(document).ready(function(){
$("#customer_id1").keyup(function() {
var name = $('#customer_id1').val();
if(name=="")
{
$("#displaysale1").html("");
}
else
{
$.ajax({
type: "POST",
url: "ajax_customer.php",
data: "customer_id1="+ name ,
success: function(html){
$("#displaysale1").html(html).show();
}
});
}
});
});



function fillsale(Value)
{
$('#customer_id').val(Value);
$('#displaysale').hide();
}

$(document).ready(function(){
$("#customer_id").keyup(function() {
var name = $('#customer_id').val();
if(name=="")
{
$("#displaysale").html("");
}
else
{
$.ajax({
type: "POST",
url: "ajax_customer.php",
data: "customer_id="+ name ,
success: function(html){
$("#displaysale").html(html).show();
}
});
}
});
});</script>
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
<? depat_check($department_name,$designation);?>

<script src="jquery.min.js"></script>
   <script src="jquery-ui.js"></script>
  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
      <h1>
        Dashboard &nbsp; &nbsp; &nbsp; &nbsp;<a href="view_all_contacts.php?customer_id=<?php echo $_REQUEST['customer_id']?>&&id=<? echo $_REQUEST['id']?>" title="Click To Edit" class="btn btn-success"><span class="glyphicon glyphicon glyphicon-edit"></span>&nbsp;Go Back</a>
        
      </h1>
      <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
        <li class="active">Edit Account</li>
      </ol>
    </section>

    <!-- Main content -->
    <section class="content">
	<form name="deptdetail" id="deptdetail" action="contact_person_add2.php" method="post" enctype="multipart/form-data">
			  
      <div class="row">
			<div class="col-md-12">
		
		<div class="row">
           
           
            <div class="box-body">
              <table class="table table-bordered">
			  <form name="deptdetail" id="deptdetail" action="contact_person_add2.php" method="post" enctype="multipart/form-data">
			  <div class="col-xs-12" style="background:#007E50">
			  
								<h5 style="color:#FFFFFF">
								<span class="glyphicon glyphicon-edit"></span>&nbsp;&nbsp;Customer Search</h5>
							</div>
			
  <tbody>

                <tr>
                  <td> <label style="font-weight:normal; font-size:15px;"  >Customer Name<input style="background-color:#E9E9E9; width:250px; border:none; color:#FF0000;" type="text" name="customer_id1"id="customer_id1" value="<?php echo $val;?>" placeholder="" class="form-control" ></label>
				 
                   <input name="customer_id" type="text" value="<?php echo $val;?>" placeholder="Customer Name " id="customer_id" class="form-control"  autocomplete="off"/> 
<div id="displaysale" class="oneway-roundtrip"></div></td>
				   <td>
				   <br>
				   <input type="submit" name="ADD" value="Next" class="btn bg-btn-save"/>	 
				   </td>
				 
                 
                </tr>  
			   </tbody>
			   </form>
              </table>
			  <br>
			   
			  <br>
			  
			  
			  
			  
			  
			  
			  
            </div>
            <!-- /.box-body -->
			
			 </div> </div>
			</div>
		
      
    </section></div>
    <!-- /.content -->
  <!-- /.content-wrapper -->
<script type="text/javascript" src="js/date-time-picker.js"></script>

     <? include'footer.php'; ?>
