<?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];

if (isset($_REQUEST["party"])) {
    $party = $_REQUEST["party"];


//    $getm = mysqli_query($conn, "SELECT `oms` FROM `accmast` WHERE `accode`='$party' ")or die(mysqli_error($conn));
    $getm = mysqli_query($conn, "SELECT left(gstno,2) as ngst FROM `accmast` WHERE `accode`='$party' ")or die(mysqli_error($conn));

    $m = mysqli_fetch_array($getm);


    if ($m['ngst'] != $_SESSION["stcode"]) {
        echo "1";
    } else {
        echo "0";
    }
}