Add files via upload

This commit is contained in:
Markines16 2021-04-15 23:47:16 +02:00 committed by GitHub
parent 2a09ad18b9
commit 6e168e6682
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -36,7 +36,7 @@
<fieldset id=\"datos\"> <fieldset id=\"datos\">
<legend>Datos</legend> <legend>Datos</legend>
<div class=\"_price\"> <div class=\"_price\">
<input type=\"number\" name=\"price\" id=\"price\" value=\"". $_POST['price'] ."\"min=\"0\" placeholder=\"Precio de la entrada\" required/> <input type=\"number\" name=\"price\" step=\"0.01\"id=\"price\" value=\"". $_POST['price'] ."\"min=\"0\" placeholder=\"Precio de la entrada\" required/>
</div> </div>
<select name=\"hall\" class=\"button large\">"; <select name=\"hall\" class=\"button large\">";
foreach($formHall->getReply() as $r){ foreach($formHall->getReply() as $r){
@ -89,7 +89,7 @@
<legend>Datos</legend> <legend>Datos</legend>
<input type=\"hidden\" name=\"cinema\" value =\"1\" /> <input type=\"hidden\" name=\"cinema\" value =\"1\" />
<div class=\"_price\"> <div class=\"_price\">
<input type=\"number\" name=\"price\" id=\"price\" min=\"0\" placeholder=\"Precio de la entrada\" required/> <input type=\"number\" name=\"price\" step=\"0.01\" id=\"price\" min=\"0\" placeholder=\"Precio de la entrada\" required/>
</div> </div>
<select name=\"hall\" class=\"button large\">"; <select name=\"hall\" class=\"button large\">";
foreach($formHall->getReply() as $r){ foreach($formHall->getReply() as $r){

View File

@ -15,7 +15,7 @@
$startTime = date('H:i:s', strtotime( $startTime ) ); $startTime = date('H:i:s', strtotime( $startTime ) );
$sql = sprintf( "INSERT INTO `session` (`id`, `idfilm`, `idhall`, `idcinema`, `date`, `start_time`, `seat_price`, `format`) $sql = sprintf( "INSERT INTO `session` (`id`, `idfilm`, `idhall`, `idcinema`, `date`, `start_time`, `seat_price`, `format`)
VALUES ('%d', '%d', '%d', '%d', '%s', '%s', '%d', '%s')", VALUES ('%d', '%d', '%d', '%d', '%s', '%s', '%f', '%s')",
$id, $idfilm, $idhall, $idcinema, $date, $startTime, $seatPrice, $format); $id, $idfilm, $idhall, $idcinema, $date, $startTime, $seatPrice, $format);
$resul = mysqli_query($this->mysqli, $sql) or die ('Error into query database'); $resul = mysqli_query($this->mysqli, $sql) or die ('Error into query database');
@ -75,7 +75,7 @@
$sql = sprintf( "UPDATE `session` $sql = sprintf( "UPDATE `session`
SET `idfilm` = '%d' , `idhall` = '%d', `idcinema` = '%d', `date` = '%s', SET `idfilm` = '%d' , `idhall` = '%d', `idcinema` = '%d', `date` = '%s',
`start_time` = '%s', `seat_price` = '%d', `format` = '%s' `start_time` = '%s', `seat_price` = '%f', `format` = '%s'
WHERE WHERE
idcinema = '%s' AND idhall = '%s' AND date = '%s' AND start_time = '%s'", idcinema = '%s' AND idhall = '%s' AND date = '%s' AND start_time = '%s'",
$idfilm, $idhall, $idcinema, $date, $startTime, $seatPrice, $format, $_SESSION["cinema"],$_SESSION["hall"],$_SESSION["date"],$_SESSION["start"]); $idfilm, $idhall, $idcinema, $date, $startTime, $seatPrice, $format, $_SESSION["cinema"],$_SESSION["hall"],$_SESSION["date"],$_SESSION["start"]);