<? 
session_start();
include("test.php");
include("opendb.php");
include("includes/function.php");
if(strlen($user)<=0)
{
  print "<script> alert('Invalid User'); document.location='inde.php' </script>";
  return;
}
?>
<!DOCTYPE html>
<html><head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<title>KHADI</title>
<style>
#txt{
font-family: Arial, Helvetica;
background-color: #F2F2F2;

}
</style>
<style>
#txt{
font-family: Arial, Helvetica;
background-color: #F2F2F2;

}
</style>
<style>


#mask {
	display: none;
	background:url(images/bgimg1.gif) repeat;
	//background: #000; 
	position: fixed; left: 0; top: 0; 
	z-index: 10;
	width: 100%; height: 100%;
	opacity: 0.8;
	z-index: 999;
}

.login-popup{
		display:none;
	background:white;
	padding: 10px; 	
	border: 2px solid #ddd;
	float: left;
	font-size: 1.2em;
	position: fixed;
	top: 4%; left: 45%;
	z-index: 99999;
	box-shadow: 0px 0px 20px #999;
	-moz-box-shadow: 0px 0px 20px #999; /* Firefox */
    -webkit-box-shadow: 0px 0px 20px #999; /* Safari, Chrome */
	border-radius:3px 3px 3px 3px;
    -moz-border-radius: 3px; /* Firefox */
    -webkit-border-radius: 3px; /* Safari, Chrome */
}
}

img.btn_close {
	float: right; 
	margin: -28px -28px 0 0;
}

fieldset { 
	border:none; 
}

form.signin .textbox label { 
	display:block; 
	padding-bottom:7px; 
}

form.signin .textbox span { 
	display:block;
}

form.signin p, form.signin span { 
	color:white; 
	font-size:11px; 
	line-height:18px;
} 

form.signin .textbox input { 
	background:#666666; 
	border-bottom:1px solid #333;
	border-left:1px solid #000;
	border-right:1px solid #333;
	border-top:1px solid #000;
	color:white; 
	border-radius: 3px 3px 3px 3px;
	-moz-border-radius: 3px;
    -webkit-border-radius: 3px;
	font:13px Arial, Helvetica, sans-serif;
	padding:6px 6px 4px;
	width:200px;
}

form.signin input:-moz-placeholder { color:white; text-shadow:0 0 2px #000; }
form.signin input::-webkit-input-placeholder { color:hwite; text-shadow:0 0 2px #000;  }

.submit button { 
	background: -moz-linear-gradient(center top, #f3f3f3, #dddddd);
	background: -webkit-gradient(linear, left top, left bottom, from(#f3f3f3), to(#dddddd));
	background:  -o-linear-gradient(top, #f3f3f3, #dddddd);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#f3f3f3', EndColorStr='#dddddd');
	border-color:#000; 
	border-width:1px;
	border-radius:4px 4px 4px 4px;
	-moz-border-radius: 4px;
    -webkit-border-radius: 4px;
	color:#333;
	cursor:pointer;
	display:inline-block;
	padding:6px 6px 4px;
	margin-top:10px;
	font:12px; 
	width:100px;
}

.button:hover { background:#ddd; }

</style>



<style>
.cont
	{
	background-color:#3b5998;

	//background:url(images/bg-inner.jpg) #e9e0c3 repeat-x;
  	width: 100%;position: absolute ;
	height:99%;
    	/* Optional - just for DIV)*/
    	//border: solid 1px #000000;
	-moz-box-shadow: 0px 5px 5px #888;
	-webkit-box-shadow: 0px 5px 5px #888;
	box-shadow: 0px 5px 10px #888;
    }
.tble1 input {
background-color:transparent;
border: 0px solid;
height:20px;
//width:160px;
color:black;
}
.tble1
{
border-collapse:collapse;

}	
</style>
 	  

<link type="text/css" href="includes/style1.css" rel="stylesheet" />
      <link type="text/css" href="css/form1.css" rel="stylesheet" />
<script type="text/javascript">
		



function validnum(str)
  {
  var num=document.getElementById(str).value;
 if(isNaN(num))
  {
   alert('enter digit');
  document.getElementById(str).value=0;
  }
} 


function validateForm()
{
var x=document.forms["f1"]["inno"].value;
if (x==null || x=="")
  {
  alert("Enter invoice number");
  return false;
  }
}


		</script>
<style>
        table.my-account-menu a.my-account-menu-item {

            font-family:verdana;
            color:#1869B8;
            text-decoration:none;
            font-size:13px;
            margin-left:5px;
            padding:2px 5px 4px 5px;
        }

        table.my-account-menu a.my-account-menu-item.menu-selected{
            background: #54A0E7;
            color: #fff;


        }

        table.aynax-main-menu {
            width:100%;
            background-image:url(images/menu_background5.png);
            background-repeat:repeat-x;

        }

        table.aynax-main-menu ul.inner-table{
            width:800px;
            margin: 0 auto !important;
            list-style-type: none;

        }

        table.aynax-main-menu li.inner-table-td {
            position: relative;
            padding:0px;
            text-align:center;
            display:inline;
            height: 34px;
            float: left;
            margin: 0;
        }

        table.aynax-main-menu li.inner-table-td a{

            position: relative;
            top: 4px;
            text-decoration:none;
            color:#3c3c3c;
            font-size:13px;
            font-family:verdana;
            font-weight:normal;
            margin-right: 20px;
        }

        table.aynax-main-menu.ie li.inner-table-td a{

            position: relative;
            top: 4px;
            text-decoration:none;
            color:#3c3c3c;
            font-size:13px;
            font-family:verdana;
            font-weight:normal;
            margin-right: 15px;
        }


        table.aynax-main-menu li.inner-table-td div{

            height:26px;
            padding-left: 20px;
        }

        table.aynax-main-menu.ie li.inner-table-td div{

            height:26px;
            padding-left: 20px;
        }

        table.aynax-main-menu.ie li.inner-table-td.menu-selected div{

            height:26px;
            padding-left: 19px;
        }



        table.aynax-main-menu.ie li.inner-table-td.menu-selected a{
            color:#fff;
        }

        table.aynax-main-menu li.inner-table-td.menu-selected a{

            color:#fff;
        }


        table.aynax-main-menu .menu-selected {
            background: url("images/menu-main-bg.png") no-repeat scroll center top transparent;

        }



        .left-light-gray-border{
            position:relative;
            border-left:solid 1px #ccc;
            top: 0px;
        }

        .right-light-gray-border{
            position:relative;
            border-right:solid 1px #ccc;
            top: 0px;
        }

        .right-light-none-border{
            position:relative;
            border-right:solid 1px transparent;
            top: 0px;
        }

        .left-light-none-border{
            position:relative;
            border-left:solid 1px transparent;
            top: 0px;
        }




    </style>
<?php include('includes/top.php'); ?>
<body style="text-align: center; height:100%;width:100%;margin: 0 auto !important;">
<br><br><br><br>
 <?
  $qry=mysqli_query($db,"select distinct(invno) from itempurchase where brcode='$brcode' and qty>0 order by invno");
 ?>
 
<table align='center'>
<form name='f1' action='purchret.php' onsubmit="return validateForm()"  >
           <tr><td> <b>Purchase Number:</b></td><td><select id="cid"  name='inno' >
          <option>-Select-</option>
           <?
           while($row=mysqli_fetch_array($qry))
             {
                print "<option>$row[0]</option>"  ;
             }?>
</td><td ><input type='submit' name='edit' value='OpenPage' ></td></tr>

           








</table>




</body>