chore: version inicial del codigo fuente del LMS Estafeta

This commit is contained in:
2026-10-02 20:33:12 -06:00
commit c8bb6b97b9
1572 changed files with 457520 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
<?php
require_once __DIR__.'/auth_guard.php';
error_reporting(0);
require_once "../config.php";
$pregunta = $_POST['idpreguntarespuesta'];
$texto = $_POST['respuesta'];
$valor = $_POST['valor'];
$habilitado = $_POST['habilitado-respuesta'];
global $link;
dbConnect();
$return = new stdClass();
$sql = "INSERT INTO evaluaciones_opciones(idpregunta, texto, respuesta, habilitado) VALUES ($pregunta,'$texto',$valor,$habilitado)";
if($result = mysqli_query($link, $sql)){
$return->code = "200";
$return->icon = "success";
$return->msg = "Respuesta registrada exitosamente";
}else{
$return->code = "400";
$return->icon = "error";
$return->msg = "Consulta fallo! SQL: ".$sql."<br><br> Error: ".mysqli_error($link);
}
echo json_encode($return, JSON_UNESCAPED_UNICODE);
exit;
?>