<?php
session_start();
error_reporting(E_ERROR | E_PARSE);
date_default_timezone_set('asia/kolkata');
include '../Auth.php';
include '../../class/ClassForm.php';

if(isset($_REQUEST['template'])){
    $Authenticate = "select * from inv_template where template_name ='".$_REQUEST['template']."'";
    $Access = $ClassForm->Fetch_Result_Array($Authenticate);    
    if($Access['template_name'] == $_REQUEST['template']){
        $return_array = array(
            'status_code' => '1',
            'status_info' => 'Template Name already exist. Please choose other one.'
        );
        echo $jsonformat = json_encode($return_array);
        exit;
    }
    else{
        $return_array = array(
            'status_code' => '0',
            'status_info' => ''
        );
        echo $jsonformat = json_encode($return_array);
        exit;
    }
}else{
    $return_array = array(
        'status_code' => '2',
        'status_info' => 'posted data problem'
    );
    echo $jsonformat = json_encode($return_array);
    exit;
}

?>

