<?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['ver'])
  ){

$us = $_POST['p1'];
$ps = $_POST['p2'];
$ucd = "NONE";
$ver = $_POST['ver'];
$valdata = $queries -> chkuseval($us, $ps);  
if(!is_null($valdata) && is_array($valdata) && (sizeof($valdata) === 1)){
        
	    $ucd = $valdata[0];
	  
} 
  
$valdataCheck = $queries -> getnewfactors("EXEC getfactorsbyfids @ucid = '$ucd'");

 
echo $valdataCheck;   

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

	
}
 

?>