This commit has been accessed 522 times via Git panel.
commit 70dc934a9f3221acba244824384acfb4e2ba8e35
tree c1ff9dc4747662edd792c8530558bcd97cc432ba
parent 796d3da732db5b9e57cc49d34040361a0f35acad
author Psylocke Antonio <psylocke@majcms.org> 1321880695 +0800
committer Psylocke Antonio <psylocke@majcms.org> 1321880695 +0800
Fix blank page in album image delete
diff --git a/album.php b/album.php
index e32729d..bb622d5 100644
--- a/album.php
+++ b/album.php
@@ -29,8 +29,16 @@ if (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_us
if (count(glob("images/$maj_req_entry/album/*")) < 1) {
header("Location: index.php?entry=$maj_req_entry");
}
-
- header("Location: album.php?entry=$maj_req_entry&show={$_REQUEST['next']}");
+ else {
+ if (!empty($_REQUEST['next'])) {
+ header("Location: album.php?entry=$maj_req_entry&show={$_REQUEST['next']}");
+ }
+ else {
+ if (!empty($_REQUEST['prev'])) {
+ header("Location: album.php?entry=$maj_req_entry&show={$_REQUEST['prev']}");
+ }
+ }
+ }
}
if (isset($_POST['filename']) and !empty($_POST['filename']) and isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username) and isset($_POST['edit']) and ($_POST['edit'] == "rename") and !file_exists("images/$maj_req_entry/album/{$_POST['filename']}")) {
@@ -205,6 +213,7 @@ if (file_exists("images/$maj_req_entry/album/$maj_req_show")) {
echo "<form enctype=\"multipart\/form-data\" action=\"{$_SERVER['PHP_SELF']}\" method=\"post\">";
echo "<input type=hidden name=entry value=$maj_req_entry>";
echo "<input type=hidden name=show value=$maj_req_show>";
+ echo "<input type=hidden name=prev value=$show_prev>";
echo "<input type=hidden name=next value=$show_next>";
echo "<input type=hidden name=edit value=delete>";
echo "<tr bgcolor=#ffffff><td colspan=\"$album_image_colspan\"><input type=submit class=click value=\"click here to delete image\"></td></tr>";
tree c1ff9dc4747662edd792c8530558bcd97cc432ba
parent 796d3da732db5b9e57cc49d34040361a0f35acad
author Psylocke Antonio <psylocke@majcms.org> 1321880695 +0800
committer Psylocke Antonio <psylocke@majcms.org> 1321880695 +0800
Fix blank page in album image delete
diff --git a/album.php b/album.php
index e32729d..bb622d5 100644
--- a/album.php
+++ b/album.php
@@ -29,8 +29,16 @@ if (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_us
if (count(glob("images/$maj_req_entry/album/*")) < 1) {
header("Location: index.php?entry=$maj_req_entry");
}
-
- header("Location: album.php?entry=$maj_req_entry&show={$_REQUEST['next']}");
+ else {
+ if (!empty($_REQUEST['next'])) {
+ header("Location: album.php?entry=$maj_req_entry&show={$_REQUEST['next']}");
+ }
+ else {
+ if (!empty($_REQUEST['prev'])) {
+ header("Location: album.php?entry=$maj_req_entry&show={$_REQUEST['prev']}");
+ }
+ }
+ }
}
if (isset($_POST['filename']) and !empty($_POST['filename']) and isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username) and isset($_POST['edit']) and ($_POST['edit'] == "rename") and !file_exists("images/$maj_req_entry/album/{$_POST['filename']}")) {
@@ -205,6 +213,7 @@ if (file_exists("images/$maj_req_entry/album/$maj_req_show")) {
echo "<form enctype=\"multipart\/form-data\" action=\"{$_SERVER['PHP_SELF']}\" method=\"post\">";
echo "<input type=hidden name=entry value=$maj_req_entry>";
echo "<input type=hidden name=show value=$maj_req_show>";
+ echo "<input type=hidden name=prev value=$show_prev>";
echo "<input type=hidden name=next value=$show_next>";
echo "<input type=hidden name=edit value=delete>";
echo "<tr bgcolor=#ffffff><td colspan=\"$album_image_colspan\"><input type=submit class=click value=\"click here to delete image\"></td></tr>";