<?php 
	class ConexionEnt{
		//private $host="localhost", $usuario="root", $password="",$bdatos="aypi",$formato="SET NAMES 'utf-8'"; 
		private $host="192.168.1.101", $usuario="edgard", $password="sistemas",$bdatos="aypi",$formato="SET NAMES 'utf-8'"; 
		//private $host="localhost", $usuario="softwax9_aypined", $password="Vio-Futuro-2017",$bdatos="softwax9_aypinv",$formato="SET NAMES 'utf-8'";
		//private $host="sql308.260mb.net", $usuario="n260m_17605883", $password="sistemas",$bdatos="n260m_17605883_aypi",$formato="SET NAMES 'utf-8'";
		public function getHost(){ return $this->host;}
		public function getUsuario(){ return $this->usuario;}
		public function getPassword(){ return $this->password; }
		public function getBdatos(){ return $this->bdatos; }
		public function getFormato(){ return $this->formato;}
	}
	
	class ConexionMod{
		public static function Conectar(){
			$obj=new ConexionEnt();
			$con=mysqli_connect($obj->getHost(),$obj->getUsuario(),$obj->getPassword(),$obj->getBdatos()) or die("No hay conexion a la base de datos");
			mysqli_query($con,$obj->getFormato());
			return $con;
		}
	}
?>