chore: version inicial del codigo fuente del LMS Estafeta
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
require_once __DIR__.'/auth_guard.php';
|
||||
error_reporting(0);
|
||||
require_once "../config.php";
|
||||
|
||||
$idencuesta = $_POST['idencuesta'];
|
||||
$catsuperior = $_POST['catsuperior'];
|
||||
$titulo = $_POST['titulo'];
|
||||
$desc = $_POST['desc'];
|
||||
$orden = $_POST['orden'];
|
||||
$estilo= $_POST['estilo'];
|
||||
$habilitado = $_POST['habilitado'];
|
||||
if( $_POST['urlimgencuesta'] == "" ){
|
||||
$urlimgencuesta = $CFG->wwwroot.'img/icons/211-gift.png';
|
||||
}else{
|
||||
$urlimgencuesta =$_POST['urlimgencuesta'];
|
||||
}
|
||||
|
||||
global $link;
|
||||
dbConnect();
|
||||
|
||||
|
||||
$sql = "UPDATE encuestas SET titulo='$titulo',descripcion='$desc',idcategoria='$catsuperior',order_desc= $orden, estilo = '$estilo',imagen='$urlimgencuesta',habilitado= '$habilitado' WHERE idencuesta = $idencuesta";
|
||||
|
||||
|
||||
if($result = mysqli_multi_query($link, $sql)){
|
||||
$return->code = "200";
|
||||
$return->data = array('id' => $idencuesta);
|
||||
$return->msg = "Exito!";
|
||||
}else{
|
||||
$return->code = "400";
|
||||
$return->msg = "Consulta fallo! SQL: ".$sql."<br><br> Error: ".mysqli_error($link);
|
||||
}
|
||||
|
||||
|
||||
echo json_encode($return, JSON_UNESCAPED_UNICODE);
|
||||
exit;
|
||||
?>
|
||||
Reference in New Issue
Block a user