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

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

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


        $getoms = mysqli_query($conn, "SELECT `statecode` FROM `accmast` WHERE  `accode` = '$party' ") or die(mysqli_error($conn));
        $fetch = mysqli_fetch_array($getoms);

        if ($fetch["statecode"] != "27" && $fetch["statecode"] != "" ) {
            $goms = "1";
        } else {
            $goms = "";
        }

        $oms = $goms;
        header('Content-Type: application/json');
        echo json_encode($oms);
}
