<?php

//require_once("class.conectar.php");

//class UsuarioAprueba extends Conectar
class UsuarioAprueba
{
   	private $ask_publica=array();
	private $ask_valida=array();
	private $ask_valida_eje=array();
	
		
	public function ask_prog_publicado($con,$anno,$mm,$ids,$idj,$idtp)
	{
		$sql="select * from tb_usuaprueba where uap_anno='$anno' and uap_mes='$mm' and s_id='$ids' and j_id='$idj' and uap_idtp='$idtp' and uap_tipoproc='0'";
		//echo $sql;
		$res=mysqli_query($con, $sql);
		while ($reg=mysqli_fetch_assoc($res))
		{
			$this->ask_publica[]=$reg;
		}
			return $this->ask_publica;
	}
	
	public function ask_prog_validado($con,$anno,$mm,$ids,$idj,$idtp)
	{
		$sql="select * from tb_usuaprueba where uap_anno='$anno' and uap_mes='$mm' and s_id='$ids' and j_id='$idj' and uap_idtp='$idtp' and uap_tipoproc='1'";
		//echo $sql;
		$res=mysqli_query($con, $sql);
		while ($reg=mysqli_fetch_assoc($res))
		{
			$this->ask_valida[]=$reg;
		}
			return $this->ask_valida;
	}
	
	public function ask_eje_validado($con,$anno,$mm,$ids,$idj)
	{
		$sql="select * from tb_usuaprueba where uap_anno='$anno' and uap_mes='$mm' and s_id='$ids' and j_id='$idj' and uap_tipoproc='3'";
		
		$res=mysqli_query($con, $sql);
		while ($reg=mysqli_fetch_assoc($res))
		{
			$this->ask_valida_eje[]=$reg;
		}
			return $this->ask_valida_eje;
	}
	
}
?>