File "FOR-S-CCI-14.php"
Full Path: C:/wamp64/www/CALIDADWEB/CALIDADWEB/BACKEND/controller/FOR-S-CCI-14.php
File size: 5.46 KB
MIME-type: text/x-php
Charset: utf-8
<?php
// 1. ELIMINA CUALQUIER ESPACIO O SALTO DE LÍNEA ANTES DE ESTA LÍNEA
// 2. Asegúrate de que session_start() se llama aquí o en un archivo incluido.
if (session_status() !== PHP_SESSION_ACTIVE) { session_start(); }
// ... el resto de tu código de includes y errores ...
require_once "../conexiones/BD.php";
// Habilitar errores de PDO para debugging
error_reporting(E_ALL);
ini_set('display_errors', 1);
$bdc->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
if (isset($_POST["formInspVetAntemor"])) {
$antMor1 = $_POST["antMorLotProduc"];
$antMor3 = $_POST["antMorPollo"];
$antMor4 = $_POST["antMorPavo"];
$antMor5 = $_POST["antMorGallina"];
$antMor6 = $_POST["antMorViaje"];
$antMor7 = $_POST["antMorGranja"];
$antMor8 = $_POST["sex"];
$antMor9 = $_POST["antMorEdad"];
$antMor10 = $_POST["antMorCadenaAves"];
$antMor11 = $_POST["antMorAyuno"];
$antMor12 = $_POST["plumasErizadas"];
$antMor13 = $_POST["inflamOjoCabe"];
$antMor14 = $_POST["secreNarizOjo"];
$antMor15 = $_POST["edemaBarbilla"];
$antMor16 = $_POST["FaltaRespEstim"];
$antMor17 = $_POST["estornudo"];
$antMor18 = $_POST["deshidratado"];
$antMor19 = $_POST["lesionPiel"];
$antMor20 = $_POST["heridaSupurante"];
$antMor21 = $_POST["diarreaAcumulaFecal"];
$antMor22 = $_POST["sintomaNervio"];
$antMor23 = $_POST["golpeHematoma"];
$antMor24 = $_POST["huesoEngrosado"];
$antMor25 = $_POST["asfis"];
$antMor26 = $_POST["antMorObserv"];
$antMor27 = $_POST["antMorCorrec"];
$antMor28 = $_POST["Anterealizo"];
$antMor29 = $_POST["Anteaprobo"];
$sss = "INSERT INTO `02iv-f01 antemortem`( `fecha`, `lotProduc`, `pollo`, `pavo`, `gallina`, `viaje`, `granja`, `sexo`, `edad`, `avesCadena`,
`tiempoAyuno`, `plumasErizadas`, `inflamacionCabezaOjos`, `secrecionNarizOjos`, `edemaBarbilla`, `sinRespEstimulo`, `estornudos`, `diarreaAcumulacionFecal`,
`lesionPiel`, `heridaSupurante`, `deshidratacion`, `sintomasNerviosos`, `golpesHematomas`, `huesosEngrosados`, `avesAsfixiadas`, `observaciones`, `accionesCorrectivas`,
`realiza`, `aprueba`)
VALUES (CURRENT_DATE(),?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
$sent = $bdc->prepare($sss);
$sent->execute([
$antMor1,
$antMor3,
$antMor4,
$antMor5,
$antMor6,
$antMor7,
$antMor8,
$antMor9,
$antMor10,
$antMor11,
$antMor12,
$antMor13,
$antMor14,
$antMor15,
$antMor16,
$antMor17,
$antMor18,
$antMor19,
$antMor20,
$antMor21,
$antMor22,
$antMor23,
$antMor24,
$antMor25,
$antMor26,
$antMor27,
$antMor28,
$antMor29,
]);
if ($sent->rowCount()) {
$_SESSION["mensaje"] = "¡¡¡Registro Realizado de Manera Exitosa!!!";
$_SESSION["tipo"] = "success";
$_SESSION["icon"] = "check-circle-fill";
} else {
$_SESSION["mensaje"] = "Ha Ocurrido Un Error En El Envio del Formulario";
$_SESSION["tipo"] = "danger";
$_SESSION["icon"] = "exclamation-triangle-fill";
}header('Location: ../../FRONTED/HTML/FOR-S-CCI-14.php');
exit;
}
/* */
if (isset($_POST["formInspVetPostmor"])) {
$postMor2 = $_POST["postPollo"];
$postMor3 = $_POST["postPavo"];
$postMor4 = $_POST["postGallina"];
$postMor5 = $_POST["postViaje"];
$postMor6 = $_POST["absceso"];
$postMor7 = $_POST["aerosaculitis"];
$postMor8 = $_POST["ascitis"];
$postMor9 = $_POST["dermatitis"];
$postMor10 = $_POST["procesoInflamator"];
$postMor11 = $_POST["tumor"];
$postMor12 = $_POST["contaminacion"];
$postMor13 = $_POST["cianosis"];
$postMor14 = $_POST["caquexia"];
$postMor15 = $_POST["contusionFractura"];
$postMor16 = $_POST["ictericia"];
$postMor17 = $_POST["marek"];
$postMor18 = $_POST["sobreEscalado"];
$postMor19 = $_POST["olor"];
$postMor20 = $_POST["osteomielitis"];
$postMor21 = $_POST["septicemia"];
$postMor22 = $_POST["malSangrado"];
$postMor23 = $_POST["avesDecomisadas"];
$postMor24 = $_POST["postObservacion"];
$postMor25 = $_POST["postCorrec"];
$postMor26 = $_POST["postAprobo"];
$sll = "INSERT INTO `02iv-f01 postmortem`(`fecha`, `pollo`, `pavo`, `gallina`, `viaje`, `absesos`, `aerosaculitis`, `ascitis`, `dermatitis`, `procesoInflamatorio`, `tumor`, `contaminacion`,
`cianosis`, `caquexia`, `contusionFractura`, `ictericia`, `marek`, `sobreEscaldado`, `olor`, `osteomielitis`, `septicemia`, `polloMalSangrado`, `totalAveDecomisada`, `observaciones`, `accionesCorrectivas`, `aprobo`)
VALUES (CURRENT_DATE(),?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
$sen = $bdc->prepare($sll);
$sen->execute([
$postMor2,
$postMor3,
$postMor4,
$postMor5,
$postMor6,
$postMor7,
$postMor8,
$postMor9,
$postMor10,
$postMor11,
$postMor12,
$postMor13,
$postMor14,
$postMor15,
$postMor16,
$postMor17,
$postMor18,
$postMor19,
$postMor20,
$postMor21,
$postMor22,
$postMor23,
$postMor24,
$postMor25,
$postMor26,
]);
if ($sen->rowCount()) {
$_SESSION["mensaje"] = "¡¡¡Registro Realizado de Manera Exitosa!!!";
$_SESSION["tipo"] = "success";
$_SESSION["icon"] = "check-circle-fill";
} else {
$_SESSION["mensaje"] = "Ha Ocurrido Un Error En El Envio del Formulario";
$_SESSION["tipo"] = "danger";
$_SESSION["icon"] = "exclamation-triangle-fill";
}header('Location: ../../FRONTED/HTML/FOR-S-CCI-14.php');
exit;
}
?>