<?php
	//Start session
	session_start();
	//Check whether the session variable SESS_MEMBER_ID is present or not
	if(!isset($_SESSION['SESS_MEMBER_ID']) || (trim($_SESSION['SESS_MEMBER_ID']) == '')) {
		header("location: index.html");
		exit();
	}
	/*if($_SESSION['SESS_MASTERS']==0) {
		header("location: logout.php");
		exit();
	}
	*/
?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<head>
<title>Master View</title>
<meta name="description" content=""/>
<meta name="keywords" content=""/>
<meta http-equiv="Content-Type"
 content="text/html; charset=iso-8859-1"/>
<script type="text/javascript" src="../javascript/jquery.js"></script>
<script type="text/javascript" src="../javascript/masterview_script.js"></script>
<script type="text/javascript" src="../javascript/jquery.autocomplete.js"></script>
<script type="text/javascript" src="../javascript/picnet.table.filter.min.js"></script>
<script type="text/javascript" src="../javascript/jquery.sticktableheader.js"></script>
<script type="text/javascript" src="../tablesorter/js/jquery.tablesorter.js"></script>
<!-- tablesorter widgets (optional) -->
<script type="text/javascript" src="../tablesorter/js/jquery.tablesorter.pager.js"></script>
<script type="text/javascript" src="../tablesorter/js/jquery.tablesorter.widgets.js"></script>
<script type="text/javascript" src="../tablesorter/js/widgets/widget-math.js"></script>
<script type="text/javascript" src="../javascript/json-to-table.js"></script>
<!-- choose a theme file -->
<script type="text/javascript" src="../javascript/jNotify.jquery.min.js"></script>
<script type="text/javascript" src="../javascript/jNotify.jquery.js"></script>
<link rel="stylesheet" href="../css/jNotify.jquery.css">



<link rel="stylesheet" href="../tablesorter/css/theme.default.css">
<link rel="icon" href="images/infosollogosmall.gif" type="image/x-icon" />
<link rel="stylesheet" href="../css/demos.css">
<link rel="stylesheet" href="../css/jquery.autocomplete.css" type="text/css" ></link>
<link rel="stylesheet" href="../css/style.css"  type="text/css"></link>
<script type="text/javascript">

function myFunction(myform)
{
if(myform.billedto.value=="")
{
jNotify("Enter Value In Billed To");
return(false);
}
}
 
</script>	




</head>

<body >
<input  id="inline_edit" type="hidden" value="0"  />
<!--<iframe src="jSuccesss.php" id="jSuccesss_iframe">
  <p>Your browser does not support iframes.</p>
</iframe>-->
<div id="transperent">
</div>


<div class="main">
  <div class="page">
     <?php include '../header.php'?>

	<div class="gap"></div>
  </div>
    <div class="left-panel">
    <?php include '../side_menu.php'?>
      
      <div class="gap"></div>
    </div>

    
    <div class="right-panel">
    <br/>
	<table cellspacing="3" id="mastertype">
    <tr>
    <td align="left" colspan="2" >
    <fieldset>
  	<legend>Master Filters</legend>
  	<table>
    <tr>
    <td align="left">
    <select type="text" name="fltselect" id="fltselect" class="fltselect">
   <option value="">--Select--</option>
    <option value="clt">Product</option>
    <option value="empinfo">Emp Info</option>
    <option value="Row">RM Master</option>
    <option value="led">Ledger</option>
    </select>
    </td>
    <td align="left"><input type="text" name="prodgencode" class="prodgencode" id="prodgencode"  placeholder="Enter Product Code"  />
    <input type="text" name="empinfoval" class="empinfoval" id="empinfoval"  style="display:none" placeholder="Enter Employee Name"  />
    <input type="text" name="rowval" class="rowval" id="rowval"  style="display:none" placeholder="Enter Rm Code"  />
    <input type="text" class="ledval" id="ledval" style="display:none" placeholder="Enter Ledger"  /></td>               
    <td align="left"> <input class="button" id="search" type="button" value="View" /></td>
    
    
    </tr>
    </table>
    </fieldset>
    </td>
    
    <td  align="left" colspan="2" >
    <fieldset>
    <legend>Company Filters</legend>
    <table>
     <tr>
    <td align="left"><input name="search_compid" class="ms" id="search_compid" type="text"  /></td>
    <td align="left"><input class="ms button" id="cmpmst" type="button" value="Buyer" /></td>
    <td align="left"><input class="ms button" id="consignee" type="button" value="Consignee" /></td>
     <td align="left"><input class="ms button" id="agency" type="button" value="Agency" /></td>
      <td align="left"><input class="ms button" id="distributor" type="button" value="Distributor" /></td>
       <td align="left"><input class="ms button" id="agent" type="button" value="Agent" /></td>
        <td align="left"><input class="ms button" id="vendor" type="button" value="Vendor" /></td>
        <td align="left"><input type="button" class="ms button" id="usr" value="User" /></td>
       </tr>
        </table>
          </fieldset>
            </td>
    </tr>
    <tr>
    <td  align="left" colspan="2" >
    <fieldset>
    <legend>General Filters</legend>
    <table>
    <tr>
    <td align="left"><select type="text" name="mstvalue" id="mstvalue"></select></td>   
    
    <td align="left"><input type="button" class="ms button" id="mst" value="View" /></td>
    <td align="left" colspan="7">&nbsp;</td>
    
    </tr>
     </table>
         </fieldset>
             </td> 
     </tr>
     </table>
      <div id="masres">
      
      
      
      </div>
      
      
 
      
      

     <div id="message"  style="color:blue; font-size:1.5em;  font-weight:bold; width:100%; background-color:transparent" align="center"></div>
      
      
    </div>
   
    
</div>

<script language="javascript" type="text/javascript">
  $(window).load(function() {
	  	  	  	$('.left-content ul li a[href="masterview.php"]').css({'font-size':'18px'});
    $('#transperent').hide();


    
   
	$("#search_compid").autocomplete(
      "../billedto.php?",
      {
  			delay:10,
  			minChars:1,
			mustMatch:1,
  			matchSubset:1,
  			matchContains:1,
  			cacheLength:10,
			showResult:function(row,data) {
    		return row+" | "+data[5];
 		 	},
  			autoFill:false
  		});
		
		$("#prodgencode").autocomplete(
      "../product_code_fill.php?mode=gcode",
      {
  			delay:10,
  			minChars:1,
  			matchSubset:1,
  			matchContains:1,
  			cacheLength:10,
			sortResults :false,
  			
			showResult:function(row,data) {
    		return row;
  			},
  			autoFill:false
  		});
		
		$("#empinfoval").autocomplete(
      "../emp_fill.php?mode=ECode",
      {
  			delay:10,
  			minChars:1,
  			matchSubset:1,
  			matchContains:1,
  			cacheLength:10,
			sortResults :false,
  			
			showResult:function(row,data) {
    		return row;
  			},
  			autoFill:false
  		});
		
		
		$("#rowval").autocomplete(
      "../rowmaterial_fill.php?mode=gcode",
      {
  			delay:10,
  			minChars:1,
  			matchSubset:1,
  			matchContains:1,
  			cacheLength:10,
			sortResults :false,
  			
			showResult:function(row,data) {
    		return row;
  			},
  			autoFill:false
  		});
		
		
		$("#ledval").autocomplete(
      "../ledgersearch.php?mode=ledval",
      {
  			delay:10,
  			minChars:1,
  			matchSubset:1,
  			matchContains:1,
  			cacheLength:10,
			sortResults :false,
  			
			showResult:function(row,data) {
    		return row;
  			},
  			autoFill:false
  		});
		
  });







</script>
</body>
</html>
