From 7ff0fc7d3d077a16b24e74c017c4418d131772ad Mon Sep 17 00:00:00 2001 From: Markines16 <80280295+Markines16@users.noreply.github.com> Date: Thu, 20 May 2021 11:42:06 +0200 Subject: [PATCH] Add files via upload --- assets/php/common/session.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/assets/php/common/session.php b/assets/php/common/session.php index 275fafa..9d769ca 100644 --- a/assets/php/common/session.php +++ b/assets/php/common/session.php @@ -62,10 +62,16 @@ $origin = array("cinema" => $cinema,"hall" => $or_hall,"start" => $or_start,"date" => $or_date); $bd->editSession($film, $hall, $cinema, $date, $start, $price, $format,$origin); return "Se ha editado la session con exito"; - }else + }else if($or_hall == $hall && $or_start == $start && $or_date == $date){ + $origin = array("cinema" => $cinema,"hall" => $or_hall,"start" => $or_start,"date" => $or_date); + $bd->editSession($film, $hall, $cinema, $date, $start, $price, $format, $origin); + return "Se ha editado la session con exito"; + }else{ return "Ya existe una sesion con los parametros nuevos"; + } + } else - return "Esta session no existe"; + return "La session a editar no existe"; } else return "Error al conectarse a la base de datos"; }