<?php 
header('Content-Type: text/html; charset=UTF-8'); 
function ejecutarSQLCommand($commando){
   $mysqli = new mysqli("66.70.255.14", "netempire_elsycb", "Tm3Y@1CtWn67", "netempire_elsy");
/* check connection */
if ($mysqli->connect_errno) {
    printf("Connect failed: %s\n", $mysqli->connect_error);
    exit();
}
if ( $mysqli->multi_query($commando)) {
     if ($resultset = $mysqli->store_result()) {
    	while ($row = $resultset->fetch_array(MYSQLI_BOTH)) {
    	}
    	$resultset->free();
     }
}
$mysqli->close();
}
function getSQLResultSet($commando){
   $mysqli = new mysqli("66.70.255.14", "netempire_elsycb", "Tm3Y@1CtWn67", "netempire_elsy");
if ($mysqli->connect_errno) {
    printf("Connect failed: %s\n", $mysqli->connect_error);
    exit();
}
if ( $mysqli->multi_query($commando)) {
	return $mysqli->store_result();
}
$mysqli->close();
}

function encriptar($valor){
$clave = 'MIAYUDAAPP';
$method = 'aes-256-cbc';
$iv = base64_decode("C8fBxl1g7EWtYTL1/M8jfstw==");
return openssl_encrypt(base64_encode($valor), $method, $clave, false, $iv);
}

function desencriptar($valor){
$clave = 'MIAYUDAAPP';
$method = 'aes-256-cbc';
$iv = base64_decode("C8fBxl1g7EWtYTL1/M8jfstw==");
return base64_decode(openssl_decrypt($valor, $method, $clave, false, $iv));
}

?>

