<?php
$Valor = $_GET['id'];
$prueba = $_GET['prueba'];
switch ($prueba) {
    case '1':
        $SQL = "DELETE FROM bayley3 Where id = '$Valor'";

        include("../Php/Conexion.php");
        $Con = Conectar();
        $Result = Ejecutar($Con, $SQL);

        $RegistrosAfectados = mysqli_affected_rows($Con);
        if ($RegistrosAfectados == 1) {
            print('<META HTTP-EQUIV="REFRESH" CONTENT="1;URL=../Bayley/DPacientes.php?m=1"> </head>');
        } else {
            print('<META HTTP-EQUIV="REFRESH" CONTENT="1;URL=../Bayley/DPacientes.php?n=1"> </head>');
        }
        Cerrar($Con);
        break;
    case '2':
        $SQL = "DELETE FROM wisc Where id = '$Valor'";

        include("../Php/Conexion.php");
        $Con = Conectar();
        $Result = Ejecutar($Con, $SQL);

        $RegistrosAfectados = mysqli_affected_rows($Con);
        if ($RegistrosAfectados == 1) {
            print('<META HTTP-EQUIV="REFRESH" CONTENT="1;URL=../Wisc/DPacientes.php?m=1"> </head>');
        } else {
            print('<META HTTP-EQUIV="REFRESH" CONTENT="1;URL=../Wisc/DPacientes.php?n=1"> </head>');
        }
        Cerrar($Con);
        break;
    case '3':
        $SQL = "DELETE FROM wppsi Where id = '$Valor'";

        include("../Php/Conexion.php");
        $Con = Conectar();
        $Result = Ejecutar($Con, $SQL);

        $RegistrosAfectados = mysqli_affected_rows($Con);
        if ($RegistrosAfectados == 1) {
            print('<META HTTP-EQUIV="REFRESH" CONTENT="1;URL=../wppsi/DPacientes.php?m=1"> </head>');
        } else {
            print('<META HTTP-EQUIV="REFRESH" CONTENT="1;URL=../wppsi/DPacientes.php?n=1"> </head>');
        }
        Cerrar($Con);
        break;
    case '4':
        $SQL = "DELETE FROM banpe_fe Where id = '$Valor'";

        include("../Php/Conexion.php");
        $Con = Conectar();
        $Result = Ejecutar($Con, $SQL);

        $RegistrosAfectados = mysqli_affected_rows($Con);
        if ($RegistrosAfectados == 1) {
            print('<META HTTP-EQUIV="REFRESH" CONTENT="1;URL=../banpe_fe/DPacientes.php?m=1"> </head>');
        } else {
            print('<META HTTP-EQUIV="REFRESH" CONTENT="1;URL=../banpe_fe/DPacientes.php?n=1"> </head>');
        }
        Cerrar($Con);
        break;
    case '5':
        $SQL = "DELETE FROM cumanin Where id = '$Valor'";

        include("../Php/Conexion.php");
        $Con = Conectar();
        $Result = Ejecutar($Con, $SQL);

        $RegistrosAfectados = mysqli_affected_rows($Con);
        if ($RegistrosAfectados == 1) {
            print('<META HTTP-EQUIV="REFRESH" CONTENT="1;URL=../cumanin/DPacientes.php?m=1"> </head>');
        } else {
            print('<META HTTP-EQUIV="REFRESH" CONTENT="1;URL=../cumanin/DPacientes.php?n=1"> </head>');
        }
        Cerrar($Con);
        break;
    case '6':
        $SQL = "DELETE FROM eni Where id = '$Valor'";

        include("../Php/Conexion.php");
        $Con = Conectar();
        $Result = Ejecutar($Con, $SQL);

        $RegistrosAfectados = mysqli_affected_rows($Con);
        if ($RegistrosAfectados == 1) {
            print('<META HTTP-EQUIV="REFRESH" CONTENT="1;URL=../eni/DPacientes.php?m=1"> </head>');
        } else {
            print('<META HTTP-EQUIV="REFRESH" CONTENT="1;URL=../eni/DPacientes.php?n=1"> </head>');
        }
        Cerrar($Con);
        break;
    case '7':
        $SQL = "DELETE FROM banfe Where id = '$Valor'";

        include("../Php/Conexion.php");
        $Con = Conectar();
        $Result = Ejecutar($Con, $SQL);

        $RegistrosAfectados = mysqli_affected_rows($Con);
        if ($RegistrosAfectados == 1) {
            print('<META HTTP-EQUIV="REFRESH" CONTENT="1;URL=../banfe/DPacientes.php?m=1"> </head>');
        } else {
            print('<META HTTP-EQUIV="REFRESH" CONTENT="1;URL=../banfe/DPacientes.php?n=1"> </head>');
        }
        Cerrar($Con);
        break;
    case '8':
        $SQL = "DELETE FROM frostig Where id = '$Valor'";

        include("../Php/Conexion.php");
        $Con = Conectar();
        $Result = Ejecutar($Con, $SQL);

        $RegistrosAfectados = mysqli_affected_rows($Con);
        if ($RegistrosAfectados == 1) {
            print('<META HTTP-EQUIV="REFRESH" CONTENT="1;URL=../frostig/DPacientes.php?m=1"> </head>');
        } else {
            print('<META HTTP-EQUIV="REFRESH" CONTENT="1;URL=../frostig/DPacientes.php?n=1"> </head>');
        }
        Cerrar($Con);
        break;
    case '9':
        $SQL = "DELETE FROM conners Where id = '$Valor'";

        include("../Php/Conexion.php");
        $Con = Conectar();
        $Result = Ejecutar($Con, $SQL);

        $RegistrosAfectados = mysqli_affected_rows($Con);
        if ($RegistrosAfectados == 1) {
            print('<META HTTP-EQUIV="REFRESH" CONTENT="1;URL=../conners/DPacientes.php?m=1"> </head>');
        } else {
            print('<META HTTP-EQUIV="REFRESH" CONTENT="1;URL=../conners/DPacientes.php?n=1"> </head>');
        }
        Cerrar($Con);
        break;

    default:
        # code...
        break;
}
