fixed typo and added close button to edit pages
This commit is contained in:
@@ -11,25 +11,27 @@
|
||||
}
|
||||
|
||||
if($_SERVER['REQUEST_METHOD'] == "POST") {
|
||||
$station_id = sanitize_input($_POST['station_id']);
|
||||
$station_name = sanitize_input($_POST['station_name']);
|
||||
$station_pos = sanitize_input($_POST['station_pos']);
|
||||
$station_gewertet = sanitize_input($_POST['gewertet']);
|
||||
$station = get_station_all($con, $station_id)->fetch();
|
||||
$s_id = intval($station['s_id']);
|
||||
$name = strval($station['name']);
|
||||
$standort = strval($station['standort']);
|
||||
$gewertet = intval($station['gewertet']);
|
||||
if($name != $station_name) {
|
||||
update_station_name($con, $s_id, $station_name);
|
||||
}
|
||||
if(!isset($_POST['close'])){
|
||||
$station_id = sanitize_input($_POST['station_id']);
|
||||
$station_name = sanitize_input($_POST['station_name']);
|
||||
$station_pos = sanitize_input($_POST['station_pos']);
|
||||
$station_gewertet = sanitize_input($_POST['gewertet']);
|
||||
$station = get_station_all($con, $station_id)->fetch();
|
||||
$s_id = intval($station['s_id']);
|
||||
$name = strval($station['name']);
|
||||
$standort = strval($station['standort']);
|
||||
$gewertet = intval($station['gewertet']);
|
||||
if($name != $station_name) {
|
||||
update_station_name($con, $s_id, $station_name);
|
||||
}
|
||||
|
||||
if($standort != $station_pos) {
|
||||
update_station_pos($con, $s_id, $station_pos);
|
||||
}
|
||||
if($standort != $station_pos) {
|
||||
update_station_pos($con, $s_id, $station_pos);
|
||||
}
|
||||
|
||||
if($gewertet != $station_gewertet) {
|
||||
update_station_gewertet($con, $s_id, $station_gewertet);
|
||||
if($gewertet != $station_gewertet) {
|
||||
update_station_gewertet($con, $s_id, $station_gewertet);
|
||||
}
|
||||
}
|
||||
header("Location: stationen.php");
|
||||
die;
|
||||
@@ -61,7 +63,10 @@
|
||||
</select>
|
||||
</div>
|
||||
<input type="hidden" name="station_id" <?php echo "value=\"" . $row ['s_id'] . "\""?>/>
|
||||
<input type="submit" value="Speichern" class="btn-confirm"/>
|
||||
<div>
|
||||
<input type="submit" value="Speichern" class="btn-confirm"/>
|
||||
<input type="submit" value="Schließen" class="btn-confirm" name="close">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user