<?php header('Content-Type: text/html; charset=utf-8');?>
<?php 


include("cnf.php");?>
<?php include("selects.php");$queries = new DatabaseFunctions($db5);?>
<?php


if(isset($_POST['p1']) && 
   isset($_POST['p2']) && 
   isset($_POST['p3']) && 
   isset($_POST['ver'])
  ){

$us = $_POST['p1'];
$ps = $_POST['p2'];
$p3 = $_POST['p3'];
$ver = $_POST['ver'];
  
$valdataCheck = $queries -> getPrcWithVer("EXEC GetPrcWithVer_sp @p1='$us', @p2= '$ps', @ver = $ver, @ucid = '$p3'");


$res = json_decode($valdataCheck,true);
$res = $res[0]["getprcwithver"];
$jsn = json_encode($res, JSON_UNESCAPED_UNICODE);
$jsn = '{"getprcwithver":' . $jsn . '}';
echo $jsn;   

}else{

exit("Direct access not permitted."); 
}
 

?>
