<? 
session_start();
if(strlen($brcode)<=0)
{
 print "<script> alert('Session timed out'); parent.document.location='../ind.php'; </script>";
 return;
}

include("../opendb.php");
include("../test.php");

$jour_sql=mysqli_query($db,"select jvno from down_payment where brcode='$brcode' and id='$id'  ");

$jour="select jvno from down_payment where brcode='$brcode' and id='$id'  ";
echo $jour;
exit;

$j_row=mysqli_fetch_array($jour_sql);
$jvno=$j_row[0];

if($jvno=='0'){

print "<script>window.close();</script>";

}

else{

print "<script>document.location='prnvoucher.php?jvno=$jvno'</script>";

}

?>


