Response message updates.

This commit is contained in:
Nate Jones 2014-02-23 05:48:33 +00:00
parent 9bad127c98
commit 78a4cbee5e
8 changed files with 74 additions and 111 deletions

View File

@ -57,13 +57,8 @@ else {
//write the provision files
require_once "app/provision/provision_write.php";
//redirect the user
require_once "resources/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=devices.php\">\n";
echo "<div align='center'>\n";
echo $text['message-delete']."\n";
echo "</div>\n";
require_once "resources/footer.php";
return;
$_SESSION["message"] = $text['message-delete'];
header("Location: devices.php");
return;
?>

View File

@ -55,13 +55,8 @@ if (strlen($id)>0) {
unset($sql);
}
//redirect the user
require_once "resources/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=device_edit.php?id=$device_uuid\">\n";
echo "<div align='center'>\n";
echo $text['message-delete']."\n";
echo "</div>\n";
require_once "resources/footer.php";
return;
$_SESSION["message"] = $text['message-delete'];
header("Location: device_edit.php?id=".$device_uuid);
return;
?>

View File

@ -125,12 +125,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$db->exec(check_sql($sql));
unset($sql);
require_once "resources/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=device_edit.php?id=$device_uuid\">\n";
echo "<div align='center'>\n";
echo " ".$text['message-add']."\n";
echo "</div>\n";
require_once "resources/footer.php";
$_SESSION["message"] = $text['message-add'];
header("Location: device_edit.php?id=".$device_uuid);
return;
} //if ($action == "add")
@ -148,12 +144,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$db->exec(check_sql($sql));
unset($sql);
require_once "resources/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=device_edit.php?id=$device_uuid\">\n";
echo "<div align='center'>\n";
echo " ".$text['message-update']."\n";
echo "</div>\n";
require_once "resources/footer.php";
$_SESSION["message"] = $text['message-update'];
header("Location: device_edit.php?id=".$device_uuid);
return;
} //if ($action == "update")
} //if ($_POST["persistformvar"] != "true")

View File

@ -55,13 +55,8 @@ if (strlen($id)>0) {
unset($sql);
}
//redirect the user
require_once "resources/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=device_edit.php?id=$device_uuid\">\n";
echo "<div align='center'>\n";
echo $text['message-delete']."\n";
echo "</div>\n";
require_once "resources/footer.php";
return;
$_SESSION["message"] = $text['message-delete'];
header("Location: device_edit.php?id=".$device_uuid);
return;
?>

View File

@ -165,19 +165,15 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
unset($sql);
} //if ($action == "update")
//redirect the browser
require_once "resources/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=device_edit.php?id=$device_uuid\">\n";
echo "<div align='center'>\n";
if ($action == "add") {
echo " ".$text['message-add']."\n";
}
if ($action == "update") {
echo " ".$text['message-update']."\n";
}
echo "</div>\n";
require_once "resources/footer.php";
return;
if ($action == "add") {
$_SESSION["message"] = $text['message-add'];
}
if ($action == "update") {
$_SESSION["message"] = $text['message-update'];
}
header("Location: device_edit.php?id=".$device_uuid);
return;
} //if ($_POST["persistformvar"] != "true")
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)

View File

@ -55,13 +55,8 @@ if (strlen($id)>0) {
unset($sql);
}
//redirect the user
require_once "resources/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=device_edit.php?id=$device_uuid\">\n";
echo "<div align='center'>\n";
echo $text['message-delete']."\n";
echo "</div>\n";
require_once "resources/footer.php";
return;
$_SESSION["message"] = $text['message-delete'];
header("Location: device_edit.php?id=".$device_uuid);
return;
?>

View File

@ -127,19 +127,14 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
unset($sql);
} //if ($action == "update")
//redirect the browser
require_once "resources/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=device_edit.php?id=$device_uuid\">\n";
echo "<div align='center'>\n";
if ($action == "add") {
echo $text['message-add']."\n";
}
if ($action == "update") {
echo $text['message-update']."\n";
}
echo "</div>\n";
require_once "resources/footer.php";
return;
if ($action == "add") {
$_SESSION["message"] = $text['message-add'];
}
if ($action == "update") {
$_SESSION["message"] = $text['message-update'];
}
header("Location: device_edit.php?id=".$device_uuid);
return;
} //if ($_POST["persistformvar"] != "true")
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)

View File

@ -141,10 +141,10 @@ require_once "resources/paging.php";
echo " <td valign='top' class='".$row_style[$c]."'>".$row['device_setting_description']."&nbsp;</td>\n";
echo " <td valign='top' align='right'>\n";
if (permission_exists('device_setting_edit')) {
echo " <a href='device_settings_edit.php?device_uuid=".$row['device_uuid']."&id=".$row['device_setting_uuid']."' alt='".$text['button-edit']."'>$v_link_label_edit</a>\n";
echo " <a href='device_setting_edit.php?device_uuid=".$row['device_uuid']."&id=".$row['device_setting_uuid']."' alt='".$text['button-edit']."'>$v_link_label_edit</a>\n";
}
if (permission_exists('device_setting_delete')) {
echo " <a href='device_settings_delete.php?device_uuid=".$row['device_uuid']."&id=".$row['device_setting_uuid']."' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>\n";
echo " <a href='device_setting_delete.php?device_uuid=".$row['device_uuid']."&id=".$row['device_setting_uuid']."' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>\n";
}
echo " </td>\n";
echo "</tr>\n";
@ -162,7 +162,7 @@ require_once "resources/paging.php";
echo " <td width='33.3%' align='center' nowrap>$paging_controls</td>\n";
echo " <td width='33.3%' align='right'>\n";
if (permission_exists('device_setting_add')) {
echo " <a href='device_settings_edit.php?device_uuid=".$_GET['id']."' alt='".$text['button-add']."'>$v_link_label_add</a>\n";
echo " <a href='device_setting_edit.php?device_uuid=".$_GET['id']."' alt='".$text['button-add']."'>$v_link_label_add</a>\n";
}
else {
echo " &nbsp;\n";