<?php
//include("JSON.php");
//$gServer="66.70.255.14";
//$gUsubd="netempire_elsycb";
//$gPassbd="Tm3Y@1CtWn67";
//$gNombd="netempire_elsy";
class DBController {
	private $conn = "";
	private $host = "66.70.255.14";
	private $user = "netempire_elsycb";
	private $password = "Tm3Y@1CtWn67";
	private $database = "netempire_elsy";
	//private $host = "localhost";
	//private $user = "em-empire";
	//private $password = "188919391945";
	//private $database = "mcm";
	function __construct() {
		$conn = $this->connectDB();
		if(!empty($conn)) {
			$this->conn = $conn;			
		}
	}
	function connectDB() {
		$conn = mysqli_connect($this->host,$this->user,$this->password,$this->database);
		$conn-> set_charset("utf8");
		return $conn;
	}
	function executeSelectQuery($query) {
		$result = mysqli_query($this->conn,$query);
		while($row=mysqli_fetch_assoc($result)) {
			$resultset[] = $row;
		}
		if(!empty($resultset))
			return $resultset;
	}
	function executeInsertQuery($query) {
		//echo $query;
		if (mysqli_query($this->conn,$query)) {
      		return "ok";
		} else {
      		return "Error: " . $query . "<br>" . mysqli_error($conn);
		}
		
	}
}
class DBControllerfe {
	private $conn = "";
	private $host = "69.197.152.107";
	private $user = "usufe";
	private $password = "Naty@2012*";
	private $database = "dnd";
	function __construct() {
		$conn = $this->connectDB();
		if(!empty($conn)) {
			$this->conn = $conn;			
		}
	}
	function connectDB() {
		$conn = mysqli_connect($this->host,$this->user,$this->password,$this->database);
		$conn-> set_charset("utf8");
		return $conn;
	}
	function executeSelectQuery($query) {
		$result = mysqli_query($this->conn,$query);
		while($row=mysqli_fetch_assoc($result)) {
			$resultset[] = $row;
		}
		if(!empty($resultset))
			return $resultset;
	}
	function executeInsertQuery($query) {
		//echo $query;
		if (mysqli_query($this->conn,$query)) {
      		return "ok";
		} else {
      		return "Error: " . $query . "<br>" . mysqli_error($conn);
		}
		
	}
}

class DBCdnd {
	private $conn = "";
	private $host = "66.70.255.14";
	private $user = "netempire_elsycb";
	private $password = "Tm3Y@1CtWn67";
	private $database = "netempire_elsy";
	function __construct() {
		$conn = $this->connectDB();
		if(!empty($conn)) {
			$this->conn = $conn;			
		}
	}
	function connectDB() {
		$conn = mysqli_connect($this->host,$this->user,$this->password,$this->database);
		$conn-> set_charset("utf8");
		return $conn;
	}
	function executeSelectQuery($query) {
		$result = mysqli_query($this->conn,$query);

		while($row=mysqli_fetch_assoc($result)) {
			$resultset[] = $row;
		}
		if(!empty($resultset))
			return $resultset;
	}
	function executeInsertQuery($query) {
		//echo $query;
		if (mysqli_query($this->conn,$query)) {
      		return "ok";
		} else {
      		return "Error: " . $query . "<br>" . mysqli_error($conn);
		}
		
	}
}
class DBCdndvps {
	private $conn = "";
	private $host = "69.197.152.107";
	private $user = "usufe";
	private $password = "Naty@2012*";
	private $database = "dnd";
	function __construct() {
		$conn = $this->connectDB();
		if(!empty($conn)) {
			$this->conn = $conn;			
		}
	}
	function connectDB() {
		$conn = mysqli_connect($this->host,$this->user,$this->password,$this->database);
		$conn-> set_charset("utf8");
		return $conn;
	}
	function executeSelectQuery($query) {
		$result = mysqli_query($this->conn,$query);

		while($row=mysqli_fetch_assoc($result)) {
			$resultset[] = $row;
		}
		if(!empty($resultset))
			return $resultset;
	}
	function executeInsertQuery($query) {
		//echo $query;
		if (mysqli_query($this->conn,$query)) {
      		return "ok";
		} else {
      		return "Error: " . $query . "<br>" . mysqli_error($conn);
		}
		
	}
}

class DBCecos22 {
	private $conn = "";
	private $host = "em-empire.com";
	private $user = "emempire_ecos22";
	private $password = "9f2py+SZ2tWS";
	private $database = "emempire_ecos22";
	function __construct() {
		$conn = $this->connectDB();
		if(!empty($conn)) {
			$this->conn = $conn;			
		}
	}
	function connectDB() {
		$conn = mysqli_connect($this->host,$this->user,$this->password,$this->database);
		$conn-> set_charset("utf8");
		return $conn;
	}
	function executeSelectQuery($query) {
		$result = mysqli_query($this->conn,$query);
		while($row=mysqli_fetch_assoc($result)) {
			$resultset[] = $row;
		}
		if(!empty($resultset))
			return $resultset;
	}
	function executeInsertQuery($query) {
		//echo $query;
		if (mysqli_query($this->conn,$query)) {
      		return "ok";
		} else {
      		return "Error: " . $query . "<br>" . mysqli_error($conn);
		}
	}
	
}

class DBChalicia {
	private $conn = "";
	private $host = "66.70.255.14";
	private $user = "netempir_usuario";
	private $password = "]fQJcs74Lw?D";
	private $database = "netempir_bd";
	function __construct() {
		$conn = $this->connectDB();
		if(!empty($conn)) {
			$this->conn = $conn;			
		}
	}
	function connectDB() {
		$conn = mysqli_connect($this->host,$this->user,$this->password,$this->database);
		$conn-> set_charset("utf8");
		return $conn;
	}
	function executeSelectQuery($query) {
		$result = mysqli_query($this->conn,$query);
		while($row=mysqli_fetch_assoc($result)) {
			$resultset[] = $row;
		}
		if(!empty($resultset))
			return $resultset;
	}
	function executeInsertQuery($query) {
		//echo $query;
		if (mysqli_query($this->conn,$query)) {
      		return "ok";
		} else {
      		return "Error: " . $query . "<br>" . mysqli_error($conn);
		}
		
	}
}

class DBCfunrosario {
	private $conn = "";
	private $host = "66.70.255.14";
	private $user = "netempir_rosario";
	private $password = "rosario2018+-";
	private $database = "netempir_funrosario";
	function __construct() {
		$conn = $this->connectDB();
		if(!empty($conn)) {
			$this->conn = $conn;			
		}
	}
	function connectDB() {
		$conn = mysqli_connect($this->host,$this->user,$this->password,$this->database);
		$conn-> set_charset("utf8");
		return $conn;
	}
	function executeSelectQuery($query) {
		$result = mysqli_query($this->conn,$query);
		while($row=mysqli_fetch_assoc($result)) {
			$resultset[] = $row;
		}
		if(!empty($resultset))
			return $resultset;
	}
	function executeInsertQuery($query) {
		//echo $query;
		if (mysqli_query($this->conn,$query)) {
      		return "ok";
		} else {
      		return "Error: " . $query . "<br>" . mysqli_error($conn);
		}
		
	}
}
class DBCladeuth {
	private $conn = "";
	private $host = "66.70.255.14";
	private $user = "emempire_JEISON";
	private $password = "6^xTXeGT1Suy";
	private $database = "emempire_LADEUTH";
	function __construct() {
		$conn = $this->connectDB();
		if(!empty($conn)) {
			$this->conn = $conn;			
		}
	}
	function connectDB() {
		$conn = mysqli_connect($this->host,$this->user,$this->password,$this->database);
		$conn-> set_charset("utf8");
		return $conn;
	}
	function executeSelectQuery($query) {
		$result = mysqli_query($this->conn,$query);
		while($row=mysqli_fetch_assoc($result)) {
			$resultset[] = $row;
		}
		if(!empty($resultset))
			return $resultset;
	}
	function executeInsertQuery($query) {
		//echo $query;
		if (mysqli_query($this->conn,$query)) {
      		return "ok";
		} else {
      		return "Error: " . $query . "<br>" . mysqli_error($conn);
		}
		
	}
}
class DBCakdcomunicate {
	private $conn = "";
	private $host = "66.70.255.14";
	private $user = "netempir_usuakd";
	private $password = "6fAEUk+WcGN$";
	private $database = "netempir_akd";
	function __construct() {
		$conn = $this->connectDB();
		if(!empty($conn)) {
			$this->conn = $conn;			
		}
	}
	function connectDB() {
		$conn = mysqli_connect($this->host,$this->user,$this->password,$this->database);
		$conn-> set_charset("utf8");
		return $conn;
	}
	function executeSelectQuery($query) {
		$result = mysqli_query($this->conn,$query);
		while($row=mysqli_fetch_assoc($result)) {
			$resultset[] = $row;
		}
		if(!empty($resultset))
			return $resultset;
	}
	function executeInsertQuery($query) {
		//echo $query;
		if (mysqli_query($this->conn,$query)) {
      		return "ok";
		} else {
      		return "Error: " . $query . "<br>" . mysqli_error($conn);
		}
		
	}
}

class DBCdentalplus {
	private $conn = "";
	private $host = "66.70.255.14";
	private $user = "emempire_denta";
	private $password = "6^xTXeGT1Suy";
	private $database = "emempire_dentalp";
	function __construct() {
		$conn = $this->connectDB();
		if(!empty($conn)) {
			$this->conn = $conn;			
		}
	}
	function connectDB() {
		$conn = mysqli_connect($this->host,$this->user,$this->password,$this->database);
		$conn-> set_charset("utf8");
		return $conn;
	}
	function executeSelectQuery($query) {
		$result = mysqli_query($this->conn,$query);
		while($row=mysqli_fetch_assoc($result)) {
			$resultset[] = $row;
		}
		if(!empty($resultset))
			return $resultset;
	}
	function executeInsertQuery($query) {
		//echo $query;
		if (mysqli_query($this->conn,$query)) {
      		return "ok";
		} else {
      		return "Error: " . $query . "<br>" . mysqli_error($conn);
		}
		
	}
}

class DBClucky {
	private $conn = "";
	private $host = "69.197.152.107";
	private $user = "usulucky";
	private $password = "Dany@2012web";
	private $database = "luckyaudio";
	function __construct() {
		$conn = $this->connectDB();
		if(!empty($conn)) {
			$this->conn = $conn;			
		}
	}
	function connectDB() {
		$conn = mysqli_connect($this->host,$this->user,$this->password,$this->database);
		$conn-> set_charset("utf8");
		return $conn;
	}
	function executeSelectQuery($query) {
		$result = mysqli_query($this->conn,$query);
		while($row=mysqli_fetch_assoc($result)) {
			$resultset[] = $row;
		}
		if(!empty($resultset))
			return $resultset;
	}
	function executeInsertQuery($query) {
		//echo $query;
		if (mysqli_query($this->conn,$query)) {
      		return "ok";
		} else {
      		return "Error: " . $query . "<br>" . mysqli_error($conn);
		}
		
	}
}
class DBCUT_ODONTOMEDIC {
	private $conn = "";
	private $host = "66.70.255.14";
	private $user = "apli_cli_utod";
	private $password = "1Xr0b5Xl9H-N";
	private $database = "apli_cli_utodonm";
	function __construct() {
		$conn = $this->connectDB();
		if(!empty($conn)) {
			$this->conn = $conn;			
		}
	}
	function connectDB() {
		$conn = mysqli_connect($this->host,$this->user,$this->password,$this->database);
		$conn-> set_charset("utf8");
		return $conn;
	}
	function executeSelectQuery($query) {
		$result = mysqli_query($this->conn,$query);
		while($row=mysqli_fetch_assoc($result)) {
			$resultset[] = $row;
		}
		if(!empty($resultset))
			return $resultset;
	}
	function executeInsertQuery($query) {
		//echo $query;
		if (mysqli_query($this->conn,$query)) {
      		return "ok";
		} else {
      		return "Error: " . $query . "<br>" . mysqli_error($conn);
		}
		
	}
}

class DBCSUCASA {
	private $conn = "";
	private $host = "69.197.152.107";
	private $user = "usufe";
	private $password = "Naty@2012*";
	private $database = "sucasa";
	function __construct() {
		$conn = $this->connectDB();
		if(!empty($conn)) {
			$this->conn = $conn;			
		}
	}
	function connectDB() {
		$conn = mysqli_connect($this->host,$this->user,$this->password,$this->database);
		$conn-> set_charset("utf8");
		return $conn;
	}
	function executeSelectQuery($query) {
		$result = mysqli_query($this->conn,$query);
		while($row=mysqli_fetch_assoc($result)) {
			$resultset[] = $row;
		}
		if(!empty($resultset))
			return $resultset;
	}
	function executeInsertQuery($query) {
		//echo $query;
		if (mysqli_query($this->conn,$query)) {
      		return "ok";
		} else {
      		return "Error: " . $query . "<br>" . mysqli_error($conn);
		}
		
	}
}

class DBCALMACENBC{
	private $conn = "";
	private $host = "66.70.255.14";
	private $user = "netempire_elsycb";
	private $password = "Tm3Y@1CtWn67";
	private $database = "netempire_elsy";
	function __construct() {
		$conn = $this->connectDB();
		if(!empty($conn)) {
			$this->conn = $conn;			
		}
	}
	function connectDB() {
		$conn = mysqli_connect($this->host,$this->user,$this->password,$this->database);
		$conn-> set_charset("utf8");
		return $conn;
	}
	function executeSelectQuery($query) {
		$result = mysqli_query($this->conn,$query);

		while($row=mysqli_fetch_assoc($result)) {
			$resultset[] = $row;
		}
		if(!empty($resultset))
			return $resultset;
	}
	function executeInsertQuery($query) {
		//echo $query;
		if (mysqli_query($this->conn,$query)) {
      		return "ok";
		} else {
      		return "Error: " . $query . "<br>" . mysqli_error($conn);
		}
		
	}
}
?>