<?php
require("includes/check_auth_user.php");
require("includes/dbconnect.php");
include ('includes/function.php');

$zdb = $_SESSION["zdbyear_" . $dbname];
mysqli_select_db($conn, $zdb);

$admin      = $_SESSION["admin_" . $dbname];
$series     = $_SESSION["series_" . $dbname];
$success    = false;
$pvouchno   = $_SESSION['print_voucher'];
$vouchno    = $_REQUEST['vouchno'];

if ($_REQUEST["vouchno"] != "") {
    
    if($pvouchno == $vouchno){
        $success = true;
        unset($_SESSION['print_voucher']);
    }
    
    $rows = array('success' => $success);
    header("Content-type: application\json");
    echo json_encode($rows);
}

