<link rel="stylesheet" href="css/jquery-ui.css" />
<link rel="stylesheet" href="css/jquery.autocomplete.css" type="text/css" />
<script src="js/jquery/jquery.js" type="text/javascript"></script>
<script src="js/jquery/jquery-1.8.2.js"></script>
<script src="js/jquery/jquery-ui.js"></script>
<script type="text/javascript" src="js/jquery/autocomplete_jquery_plugin.js"></script>
<script src="js/enter_event_ajax.js" type="text/javascript"></script>
<script src="js/local_delivery_conform_ajax.js" type="text/javascript"></script>
<script>
function add_local_delivery_conform(url)
	{
	onmouseover25= window.open(url,'onmouseover20','height=520,width=1300,scrollbars=yes,resizable=no,left=25,top=25,toolbar=no,location=no,directories=no,status=no,menubar=no');
	}
	
function loc_del_conform_search(branch_name,from_date,to_date)
 {
  jQuery.ajax({
  type: "POST",
  url: "booking/local_delivery_conform/local_delivery_conform_form_list.php",
  data: "branch_name="+branch_name+"&from_date="+from_date+"&to_date="+to_date,
  success: function(msg){jQuery("#local_delivery_conform_div").html(msg);
 }
    });
 }
</script>

<?php
error_reporting(0);
$edit_id=$_GET['edit_id'];
include ("include/db.php");
if($_GET['edit_id']!='')
{
$user_table_display_style='style="display:inline;"';
} 
else
{
$user_table_display_styles='style="display:none;"';
}
ob_start();
session_start();
$session_branch=$_SESSION['branch'];
$session_user_type=$_SESSION['user_type'];



 function get_branch_name_loading($session_branch)
{
$sql_quwer=mysql_query("Select * from branch_creation where branch_id='$session_branch' and delete_status!='1' ");	
while($rsdata=mysql_fetch_object($sql_quwer))
{
 $branch_name=$rsdata->branch_name;
}
return $branch_name;
}

?>

<style type="text/css">
.style7{font-family: Tahoma, Arial, Helvetica, sans-serif;font-size: 13px;}
.style9{ text-align:left;font-family:Tahoma, Arial, Helvetica, sans-serif; font-size: 15px; padding:0px; font-weight: 600;color:#333;letter-spacing: 1px;padding:10px; background-color:#f7f7f7;}
.types_class { 
    height: 25px; 
    width: 230px; 
    background-color: transparent;  
    border-style: solid;  
    border-width: 0px 0px 1px 0px;  
    border-color:#CCC; 
    outline:0;
	font-size:14px;
  } 
  
  .types_class1 { 
    height: 25px; 
    width: 230px; 
    background-color: transparent;  
    border-style: solid;  
    border-width: 0px 0px 1px 0px;  
    border-color:#CCC; 
    outline:0;
	font-size:14px;
  } 
.textbox:focus {
    border-color: #C9C9C9;
    -webkit-box-shadow: rgba(0, 0, 0, 0.15) 0 0 8px;
}  
</style>

<div class="container">
<div class="row-fluid">
<div class="span12">
<div class="table-responsive">
<form name="local_delivery_form"  id="local_delivery_form" method="post" action=""  enctype="multipart/form-data">

<table width="100%" border="0" align="center" style="border-top:solid 1px; color:#ddd;">

   <tr align="left"><div class="style9">Fabric Delivery Confirmation&nbsp;&nbsp;
    
                     <td width="25%" align="left"><img src="img/plus.png" name="add_button" id="add_button" title="ADD" onclick="javascript:add_local_delivery_conform('booking/local_delivery_conform/local_delivery_conform_form_entry.php?edit_id=<?php echo $_GET['edit_id'];?>')" align="top" width="30" height="30" border="0" tabindex="4" style="cursor:pointer; margin-left:20%; margin-top:-34px;" class="button green-button" >
</td></div><tr></table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td width="1%" height="45" align="right" class="style7">&nbsp;</td>
<td width="12%" align="center" class="style7"><strong>Branch Name</strong></td>
<td width="13%" class="style15">
  <?php if($session_user_type==1) { ?><select name="branch_name" id="branch_name" class="types_class"   style="width:200px; height:25px;font-size:14px" tabindex="5" >
    <option value="">All</option>

    <?php
	   
          $sql="select * from branch_creation where delete_status!='1' ";
		  $sql_exe=mysql_query($sql);
		  while($rsdata=mysql_fetch_object($sql_exe))
		  {
			 $branch_name=$rsdata->branch_name;
			 $branch_id=$rsdata->branch_id;
	?>
    <option value="<?php echo $branch_id;?>" <?php if($branch_name==$branch_id){?> selected="selected" <?php }?>><?php echo $branch_name;?></option>
    <?php } ?></select><?php } ?>
    <?php if($session_user_type!=1) { ?>
    <select name="branch_name" id="branch_name" class="types_class"   style="width:200px; height:25px;font-size:14px" tabindex="5" >
    <option value="<?php echo $session_branch;?>" <?php if($branch_name==$session_branch){?> selected="selected" <?php }?>><?php echo get_branch_name_loading($session_branch);?></option></select><?php } ?></td>
<td width="7%" align="right" class="style7"><strong>From Date</strong></td> 
<td width="14%" align="center"><input type="date" class="types_class1" name="from_date" id="from_date"  style="height:23px; width:150px" value="<?php  echo date("Y-m-d");?>"  /></td>
<td width="8%" align="right" class="style7"><strong>To Date</strong></td>
<td width="17%" align="center" class="style15"><input type="date" class="types_class1" name="to_date" id="to_date" style="height:23px;width:150px;" value="<?php echo date("Y-m-d");?>" /></td>
<td width="21%" align="left" class="style15"><strong></strong><a href="#"  onclick="loc_del_conform_search(branch_name.value,from_date.value,to_date.value)"><img src="img/search_icon.png" width="40" height="35" title="Search" value="Search" /></a></td>
<td width="5%" align="center">&nbsp;</td>
<td width="2%" align="left">&nbsp;</td>
</tr>
</table>
<table width="100%" >
<tr>
   <td colspan="3" align="center"><div id="local_delivery_conform_div"><?php include("local_delivery_conform_form_list.php"); ?></div></td>
</tr>
</table>
</form>

</div>
</div>
</div>
</div>