Deberia estar todo hecho

This commit is contained in:
Markines16
2021-04-15 22:34:33 +02:00
committed by GitHub
parent a3bc2311e5
commit 2a09ad18b9
6 changed files with 40 additions and 25 deletions

View File

@ -42,7 +42,7 @@ class FormSession extends Form {
return $this->reply;
}
public function processesForm($id, $film, $hall, $cinema, $date, $start, $price, $format, $repeat, $option) {
public function processesForm($film, $hall, $cinema, $date, $start, $price, $format, $repeat, $option) {
$this->option = $option;
$this->correct = true;
@ -58,21 +58,21 @@ class FormSession extends Form {
if($searchSession) {
$this->correct = false;
} else{
$bd->createSession(null, $film, $hall,$cinema, $date, $start, $price, $format);
$bd->createSession(null,$film, $hall,$cinema, $date, $start, $price, $format);
}
} else if ($option == "del"){
$bd->deleteSession($id);
$bd->deleteSession($hall, $cinema, $date, $start);
} else if ($option == "edit"){
$bd->editSession($id, $film, $hall, $cinema, $date, $start, $price, $format);
$bd->editSession($film, $hall, $cinema, $date, $start, $price, $format);
}
if($repeat > "0"){
$repeat--;
$date = date('Y-m-d', strtotime( $date. ' +1 day') );
$this->processesForm($id, $film, $hall, $cinema, $date, $start, $price, $format, $repeat, $option);
$this->processesForm($film, $hall, $cinema, $date, $start, $price, $format, $repeat, $option);
}
}
} else {$this->correct = false;}