<?
/*
Autor: Lic. Carlos Alberto Vaca Coronado
Version: 3.2.0
*/

session_name('portal_absa');session_start();if(!isset($_SESSION['usuario_p_prov_absa']) || trim($_SESSION['usuario_p_prov_absa']) == "" || trim(strtoupper($_SESSION["URL_PORTAL"]."admin.php")) != trim(strtoupper($_SERVER['HTTP_REFERER']))){?><script>window.location.href="<?=$_SESSION["URL_PORTAL"]."index.php"?>"</script><?exit;}

require "../conexion/conectar.php";

$conexion = new CONDB();
$conexion->conectar();


mysqli_query($conexion->CONEXION,str_replace("\\","",$_POST['query']));

if(mysqli_errno($conexion->CONEXION) > 0){
	echo "Ocurrio un error al eliminar el registro";
}else if($_POST['reloadGridAfterSave'] != ""){
	if($_POST['valLiga'] != ""){
			$valLiga = explode("|",$_POST['valLiga']);
			$ids = "";
			for($i = 0; $i < count($valLiga); $i++){
					$ids.=",'".$valLiga[$i]."'";
			}
		}
	?><script>tools('<?=@$_POST['reloadGridAfterSave']?>'<?=@$ids?>);</script><?
}
?>
