Allow multiple messages
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@393 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
6431d52800
commit
ff74bf07a1
|
@ -39,9 +39,9 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") {
|
||||||
echo "$title</p>\n";
|
echo "$title</p>\n";
|
||||||
}
|
}
|
||||||
echo "<h2>$title" . (strlen($title2) ? ": " . htmlspecialchars($title2) : "") . "</h2>\n";
|
echo "<h2>$title" . (strlen($title2) ? ": " . htmlspecialchars($title2) : "") . "</h2>\n";
|
||||||
if ($_SESSION["message"]) {
|
if ($_SESSION["messages"]) {
|
||||||
echo "<p class='message'>$_SESSION[message]</p>\n";
|
echo "<p class='message'>" . implode("<br />", $_SESSION["messages"]) . "</p>\n";
|
||||||
$_SESSION["message"] = "";
|
$_SESSION["messages"] = array();
|
||||||
}
|
}
|
||||||
if (!$_SESSION["tokens"][$_GET["server"]]["?logout"]) {
|
if (!$_SESSION["tokens"][$_GET["server"]]["?logout"]) {
|
||||||
$_SESSION["tokens"][$_GET["server"]]["?logout"] = rand(1, 1e6);
|
$_SESSION["tokens"][$_GET["server"]]["?logout"] = rand(1, 1e6);
|
||||||
|
|
|
@ -186,7 +186,7 @@ function token_delete() {
|
||||||
|
|
||||||
function redirect($location, $message = null) {
|
function redirect($location, $message = null) {
|
||||||
if (isset($message)) {
|
if (isset($message)) {
|
||||||
$_SESSION["message"] = $message;
|
$_SESSION["messages"][] = $message;
|
||||||
}
|
}
|
||||||
token_delete();
|
token_delete();
|
||||||
if (strlen(SID)) {
|
if (strlen(SID)) {
|
||||||
|
|
Loading…
Reference in a new issue