<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 type="text/javascript" src="js/media_entry_ajax.js"></script>
<script>
 function media_entry_search(from_date,to_date)
 {
  jQuery.ajax({
  type: "GET",
  url: "jobcard/media_entry/media_entry_list.php",
  data: "from_date="+from_date+"&to_date="+to_date,
  success: function(msg){jQuery("#media_main_list_div").html(msg);
 }
    });
 }
 
function media_open()
{
window.location.href="main_fram.php?file=media_entry";
window.location.reaload(true);
}

</script>
<style> 
.someclass{ 
background:url(img/plus.png) no-repeat 0 0 ; 
} 
</style> 
<?php
error_reporting(0);
date_default_timezone_set('Asia/Kolkata');
$edit_id=$_GET['edit_id'];
include ("include/db.php");
ob_start();
session_start();

function get_user_types1($login_user_name,$login_pass_word)
{
    $sql_user="select * from  user_creation where user_name='$login_user_name' and password='$login_pass_word'";
	$rs_user=mysql_query($sql_user);
	while($rsdata_user=mysql_fetch_object($rs_user))
	{ 
	$user_type=$rsdata_user->user_type;
	}
	return $user_type;
}


function get_branch_names1($book_branch)
{
    $sql_user="select * from  branch_creation where branch_id='$book_branch'";
	$rs_user=mysql_query($sql_user);
	while($rsdata_user=mysql_fetch_object($rs_user))
	{ 
	$branch_name=$rsdata_user->branch_name;
	}
	return $branch_name;
}


$login_user_name=$_SESSION['login_user_name'];
$login_pass_word=$_SESSION['login_pass_word'];
$book_branch=$_SESSION['branch'];
$get_user_type=get_user_types1($login_user_name,$login_pass_word);
$get_branch_names=get_branch_names1($book_branch);
 
if($_GET['edit_id']!='')
{
$table_display_styles1='style="display:inline;"';
} 
else
{
$table_display_stylesss='style="display:none;"';
}
 
?>
<style type="text/css">
.style2 {color: #FF0000}
.style7{font-family: Tahoma, Arial, Helvetica, sans-serif;font-size: 13px;}
.style8{ text-align:center;font-family:Tahoma, Arial, Helvetica, sans-serif; font-size: 15px; padding:40px; font-weight: 500;color:#32328e;letter-spacing: 1px;}
.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: 200px; 
    background-color: transparent;  
    border-style: solid;  
    border-width: 0px 0px 1px 0px;  
    border-color:#CCC; 
    outline:0;
	font-size:14px;
	font-weight:normal
  } 
  
  .types_class1 { 
    height: 25px; 
    width: 200px; 
    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="media_form"  id="media_form" method="post" action=""  enctype="multipart/form-data">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" style="border-top:solid 1px; color:#ddd;">
<tr align="left" style="font-size:14px"><div class="style9">Media Entry List</div></tr>
<td width="12%" align="left"><img src="img/plus.png" name="add_button" id="add_button" title="Add Inward Details" onclick="javascript:media_open()" align="top" width="30" height="30" border="0" tabindex="4" style="cursor:pointer; margin-left:96%; margin-top:-34px;" class="button green-button" >
</td>
<tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td width="1%" height="45" align="right" class="style15">&nbsp;</td>
<td width="8%" 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="15%" 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="5%" align="center"><a href="#"  onClick="media_entry_search(from_date.value,to_date.value)"><img src="img/search_icon.png" width="40" height="35" title="Search" value="Search" /></a></td>
<td width="2%" align="left">&nbsp;</td>
</tr>
</table>
<table width="100%" >
    <tr>
      <td colspan="10" align="center">
      <div id="media_main_list_div">
        <?php include("media_entry_list.php"); ?></div>
    </td>
  </tr>
</table>
</form>
</div>
</div>
</div>
</div>