Update bridges.php

This commit is contained in:
Nate 2019-08-28 21:16:15 -06:00
parent 3d15a1c8b6
commit 4b6f8c8b65
2 changed files with 10 additions and 10 deletions

View File

@ -107,7 +107,7 @@
if ($action == "update") { if ($action == "update") {
$_SESSION["message"] = $text['message-update']; $_SESSION["message"] = $text['message-update'];
} }
header('Location: bridge_edit.php?id='.$bridge_uuid); header('Location: bridges.php');
return; return;
} }
} //(is_array($_POST) && strlen($_POST["persistformvar"]) == 0) } //(is_array($_POST) && strlen($_POST["persistformvar"]) == 0)
@ -171,7 +171,6 @@
echo "</td>\n"; echo "</td>\n";
echo "<td class='vtable' style='position: relative;' align='left'>\n"; echo "<td class='vtable' style='position: relative;' align='left'>\n";
echo " <select class='formfld' name='bridge_enabled'>\n"; echo " <select class='formfld' name='bridge_enabled'>\n";
echo " <option value=''></option>\n";
if ($bridge_enabled == "true") { if ($bridge_enabled == "true") {
echo " <option value='true' selected='selected'>".$text['label-true']."</option>\n"; echo " <option value='true' selected='selected'>".$text['label-true']."</option>\n";
} }

View File

@ -43,17 +43,18 @@ if (!class_exists('bridges')) {
//delete the checked rows //delete the checked rows
if ($action == 'delete') { if ($action == 'delete') {
$database = new database; $database = new database;
foreach($bridges as $row) { foreach($bridges as $x => $row) {
if ($row['action'] == 'delete' or $row['checked'] == 'true') { if ($row['action'] == 'delete' or $row['checked'] == 'true') {
$array['bridges'][0]['bridge_uuid'] = $row['bridge_uuid']; $array['bridges'][$x]['bridge_uuid'] = $row['bridge_uuid'];
$array['bridges'][0]['domain_uuid'] = $_SESSION['domain_uuid']; $array['bridges'][$x]['domain_uuid'] = $_SESSION['domain_uuid'];
$database->app_name = 'bridges';
$database->app_uuid = 'a6a7c4c5-340a-43ce-bcbc-2ed9bab8659d';
$database->delete($array);
unset($array);
} }
} }
if (is_array($array) && @sizeof($array) != 0) {
$database->app_name = 'bridges';
$database->app_uuid = 'a6a7c4c5-340a-43ce-bcbc-2ed9bab8659d';
$database->delete($array);
unset($array);
}
unset($bridges); unset($bridges);
} }
} }