This commit has been accessed 572 times via Git panel.
commit d6784da6b67fc6c08ef54a82213a328a0f98938d
tree 6619ae50eadf123ac170af1606f83a1b78b32636
parent 8be46ac3359e96e83e21d8e5f03e3d4924da4ff0
author Engels Antonio <engels@majcms.org> 1286676711 +0800
committer Engels Antonio <engels@majcms.org> 1286676711 +0800
Couldn't resist a 10-10-10 release ;)
Add bottom panels
Fix album post image rename and delete
diff --git a/album.php b/album.php
index a55bd06..436ecc8 100644
--- a/album.php
+++ b/album.php
@@ -45,6 +45,8 @@ if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username
if (count(glob("images/{$_REQUEST['entry']}/album/*")) < 1) {
header("Location: index.php?entry={$_REQUEST['entry']}");
}
+
+ header("Location: album.php?entry={$_REQUEST['entry']}&show={$_REQUEST['next']}");
}
if (isset($_POST['filename']) and !empty($_POST['filename']) and isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username) and isset($_POST['edit']) and ($_POST['edit'] == "rename") and !file_exists("images/{$_REQUEST['entry']}/album/{$_POST['filename']}")) {
@@ -62,6 +64,8 @@ if (isset($_POST['filename']) and !empty($_POST['filename']) and isset($_SESSION
if (file_exists("data/items/{$_REQUEST['entry']}/album/views/{$_REQUEST['show']}.txt")) {
rename("data/items/{$_REQUEST['entry']}/album/views/{$_REQUEST['show']}.txt","data/items/{$_REQUEST['entry']}/album/views/{$filename}.txt");
}
+
+ header("Location: album.php?entry={$_REQUEST['entry']}&show=$filename");
}
if ((!isset($_POST['caption']) or empty($_POST['caption'])) and isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username) and isset($_POST['edit']) and ($_POST['edit'] == "caption")) {
@@ -266,7 +270,8 @@ if (file_exists("images/{$_REQUEST['entry']}/album/{$_REQUEST['show']}")) {
echo "<form enctype=\"multipart\/form-data\" action=\"{$_SERVER['PHP_SELF']}\" method=\"post\">";
echo "<input type=hidden name=entry value={$_REQUEST['entry']}>";
echo "<input type=hidden name=show value={$_REQUEST['show']}>";
- echo "<input type=hidden name=edit value=delete>";
+ 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=input value=\"click here to delete image\"></td></tr>";
echo "</form>";
echo "<form enctype=\"multipart\/form-data\" action=\"{$_SERVER['PHP_SELF']}\" method=\"post\">";
diff --git a/index.php b/index.php
index c394c97..53e263f 100644
--- a/index.php
+++ b/index.php
@@ -1032,11 +1032,21 @@ if (file_exists("data/panels")) {
continue;
}
+ if (file_exists("data/panels/$maj_panel/right.txt")) {
+ $maj_right_panels[] = $maj_panel;
+ continue;
+ }
+
if (file_exists("data/panels/$maj_panel/top.txt")) {
$maj_top_panels[] = $maj_panel;
continue;
}
+ if (file_exists("data/panels/$maj_panel/bottom.txt")) {
+ $maj_bottom_panels[] = $maj_panel;
+ continue;
+ }
+
if (file_exists("data/panels/$maj_panel/center.txt")) {
$maj_center_panels[] = $maj_panel;
continue;
@@ -1047,11 +1057,6 @@ if (file_exists("data/panels")) {
continue;
}
- if (file_exists("data/panels/$maj_panel/right.txt")) {
- $maj_right_panels[] = $maj_panel;
- continue;
- }
-
if (file_exists("data/header.txt") and (file_get_contents("data/header.txt") == $maj_panel)) {
continue;
}
@@ -1071,11 +1076,21 @@ if (file_exists("data/panels")) {
$maj_count_left_panels = count($maj_left_panels);
+ sort($maj_right_panels);
+ reset($maj_right_panels);
+
+ $maj_count_right_panels = count($maj_right_panels);
+
sort($maj_top_panels);
reset($maj_top_panels);
$maj_count_top_panels = count($maj_top_panels);
+ sort($maj_bottom_panels);
+ reset($maj_bottom_panels);
+
+ $maj_count_bottom_panels = count($maj_bottom_panels);
+
sort($maj_center_panels);
reset($maj_center_panels);
@@ -1086,11 +1101,6 @@ if (file_exists("data/panels")) {
$maj_count_entry_panels = count($maj_entry_panels);
- sort($maj_right_panels);
- reset($maj_right_panels);
-
- $maj_count_right_panels = count($maj_right_panels);
-
if ($maj_count_left_panels > 0) {
foreach ($maj_left_panels as $maj_left_panel) {
@@ -4204,6 +4214,133 @@ foreach ($maj_disp as $maj_d) {
}
}
+if ($maj_count_bottom_panels > 0) {
+
+ foreach ($maj_bottom_panels as $maj_bottom_panel) {
+
+ if (!file_exists("data/panels/$maj_bottom_panel/free.txt")) {
+
+ if (file_exists("data/panels/$maj_bottom_panel/border.txt")) {
+ $maj_bottom_panel_border = file_get_contents("data/panels/$maj_bottom_panel/border.txt");
+ }
+ else {
+ if (isset($maj_bottom_panel_border)) {
+ unset($maj_bottom_panel_border);
+ }
+ }
+
+ if (file_exists("data/panels/$maj_bottom_panel/bgcolor-t.txt")) {
+ $maj_bottom_panel_bgcolor_t = file_get_contents("data/panels/$maj_bottom_panel/bgcolor-t.txt");
+ }
+ else {
+ if (isset($maj_bottom_panel_bgcolor_t)) {
+ unset($maj_bottom_panel_bgcolor_t);
+ }
+ }
+
+ if (file_exists("data/panels/$maj_bottom_panel/bgcolor-c.txt")) {
+ $maj_bottom_panel_bgcolor_c = file_get_contents("data/panels/$maj_bottom_panel/bgcolor-c.txt");
+ }
+ else {
+ if (isset($maj_bottom_panel_bgcolor_c)) {
+ unset($maj_bottom_panel_bgcolor_c);
+ }
+ }
+
+ if (file_exists("data/panels/$maj_bottom_panel/text-t.txt")) {
+ $maj_bottom_panel_text_t = file_get_contents("data/panels/$maj_bottom_panel/text-t.txt");
+ }
+ else {
+ if (isset($maj_bottom_panel_text_t)) {
+ unset($maj_bottom_panel_text_t);
+ }
+ }
+
+ if (file_exists("data/panels/$maj_bottom_panel/text-c.txt")) {
+ $maj_bottom_panel_text_c = file_get_contents("data/panels/$maj_bottom_panel/text-c.txt");
+ }
+ else {
+ if (isset($maj_bottom_panel_text_c)) {
+ unset($maj_bottom_panel_text_c);
+ }
+ }
+
+ echo '<div class="panel_title"';
+
+ if (isset($maj_bottom_panel_border) or isset($maj_bottom_panel_bgcolor_t) or isset($maj_bottom_panel_text_t)) {
+ echo ' style="';
+ }
+
+ if (isset($maj_bottom_panel_bgcolor_t)) {
+ echo "background-color: $maj_bottom_panel_bgcolor_t;";
+ }
+
+ if (isset($maj_bottom_panel_text_t)) {
+ echo "color: $maj_bottom_panel_text_t;";
+ }
+
+ if (isset($maj_bottom_panel_border)) {
+ echo "border-color: $maj_bottom_panel_border;";
+ }
+
+ if (isset($maj_bottom_panel_border) or isset($maj_bottom_panel_bgcolor_t) or isset($maj_bottom_panel_text_t)) {
+ echo '"';
+ }
+
+ echo '>';
+
+ readfile("data/panels/$maj_bottom_panel/title.txt");
+
+ if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
+ echo "<a href=\"panels.php#{$maj_bottom_panel}\">";
+ echo '<img src="images/widget.edit.png" border="0" width="11" height="11" align="right"></a>';
+ }
+
+ if (file_exists("data/panels/$maj_bottom_panel/private.txt")) {
+ echo '<img src="images/widget.private.png" border="0" width="11" height="11" align="right">';
+ }
+
+ echo '</div>';
+
+ echo '<div class="panel_body"';
+
+ if (isset($maj_bottom_panel_border) or isset($maj_bottom_panel_bgcolor_c) or isset($maj_bottom_panel_text_c)) {
+ echo ' style="';
+ }
+
+ if (isset($maj_bottom_panel_bgcolor_c)) {
+ echo "background-color: $maj_bottom_panel_bgcolor_c;";
+ }
+
+ if (isset($maj_bottom_panel_text_c)) {
+ echo "color: $maj_bottom_panel_text_c;";
+ }
+
+ if (isset($maj_bottom_panel_border)) {
+ echo "border-color: $maj_bottom_panel_border;";
+ }
+
+ if (isset($maj_bottom_panel_border) or isset($maj_bottom_panel_bgcolor_c) or isset($maj_bottom_panel_text_c)) {
+ echo '"';
+ }
+
+ echo '>';
+ }
+
+ if (file_exists("data/panels/$maj_bottom_panel/free.txt")) {
+ echo '<div class=panel_free>';
+ }
+
+ include("data/panels/$maj_bottom_panel/panel.php");
+
+ echo '</div>';
+
+ if (file_exists("data/panels/$maj_bottom_panel/free.txt") and !file_exists("data/panels/$maj_bottom_panel/nomargin.txt")) {
+ echo "<div style=\"height:10px;\"></div>";
+ }
+ }
+}
+
?>
<table border="0" cellspacing="0" cellpadding="0" width="100%"><tr>
diff --git a/panels.php b/panels.php
index 4b1c546..6793c48 100644
--- a/panels.php
+++ b/panels.php
@@ -100,9 +100,26 @@ if ((!isset($_POST['panel_right']) or empty($_POST['panel_right'])) and ($_POST[
}
if (isset($_POST['panel_right']) and !empty($_POST['panel_right']) and ($_POST['panel_right'] == "on")) {
+
if (!file_exists("data/panels/{$_POST['panel_id']}/right.txt")) {
touch("data/panels/{$_POST['panel_id']}/right.txt");
}
+
+ if (file_exists("data/panels/{$_POST['panel_id']}/top.txt")) {
+ unlink("data/panels/{$_POST['panel_id']}/top.txt");
+ }
+
+ if (file_exists("data/panels/{$_POST['panel_id']}/bottom.txt")) {
+ unlink("data/panels/{$_POST['panel_id']}/bottom.txt");
+ }
+
+ if (file_exists("data/panels/{$_POST['panel_id']}/center.txt")) {
+ unlink("data/panels/{$_POST['panel_id']}/center.txt");
+ }
+
+ if (file_exists("data/panels/{$_POST['panel_id']}/entry.txt")) {
+ unlink("data/panels/{$_POST['panel_id']}/entry.txt");
+ }
}
if ((!isset($_POST['panel_center']) or empty($_POST['panel_center'])) and ($_POST['panel_edit'] == "on")) {
@@ -112,12 +129,25 @@ if ((!isset($_POST['panel_center']) or empty($_POST['panel_center'])) and ($_POS
}
if (isset($_POST['panel_center']) and !empty($_POST['panel_center']) and ($_POST['panel_center'] == "on")) {
+
if (!file_exists("data/panels/{$_POST['panel_id']}/center.txt")) {
touch("data/panels/{$_POST['panel_id']}/center.txt");
}
if (file_exists("data/panels/{$_POST['panel_id']}/right.txt")) {
unlink("data/panels/{$_POST['panel_id']}/right.txt");
}
+
+ if (file_exists("data/panels/{$_POST['panel_id']}/top.txt")) {
+ unlink("data/panels/{$_POST['panel_id']}/top.txt");
+ }
+
+ if (file_exists("data/panels/{$_POST['panel_id']}/bottom.txt")) {
+ unlink("data/panels/{$_POST['panel_id']}/bottom.txt");
+ }
+
+ if (file_exists("data/panels/{$_POST['panel_id']}/entry.txt")) {
+ unlink("data/panels/{$_POST['panel_id']}/entry.txt");
+ }
}
if ((!isset($_POST['panel_top']) or empty($_POST['panel_top'])) and ($_POST['panel_edit'] == "on")) {
@@ -127,15 +157,26 @@ if ((!isset($_POST['panel_top']) or empty($_POST['panel_top'])) and ($_POST['pan
}
if (isset($_POST['panel_top']) and !empty($_POST['panel_top']) and ($_POST['panel_top'] == "on")) {
+
if (!file_exists("data/panels/{$_POST['panel_id']}/top.txt")) {
touch("data/panels/{$_POST['panel_id']}/top.txt");
}
+
if (file_exists("data/panels/{$_POST['panel_id']}/right.txt")) {
unlink("data/panels/{$_POST['panel_id']}/right.txt");
}
+
+ if (file_exists("data/panels/{$_POST['panel_id']}/bottom.txt")) {
+ unlink("data/panels/{$_POST['panel_id']}/bottom.txt");
+ }
+
if (file_exists("data/panels/{$_POST['panel_id']}/center.txt")) {
unlink("data/panels/{$_POST['panel_id']}/center.txt");
}
+
+ if (file_exists("data/panels/{$_POST['panel_id']}/entry.txt")) {
+ unlink("data/panels/{$_POST['panel_id']}/entry.txt");
+ }
}
if ((!isset($_POST['panel_entry']) or empty($_POST['panel_entry'])) and ($_POST['panel_edit'] == "on")) {
@@ -145,19 +186,55 @@ if ((!isset($_POST['panel_entry']) or empty($_POST['panel_entry'])) and ($_POST[
}
if (isset($_POST['panel_entry']) and !empty($_POST['panel_entry']) and ($_POST['panel_entry'] == "on")) {
+
if (!file_exists("data/panels/{$_POST['panel_id']}/entry.txt")) {
touch("data/panels/{$_POST['panel_id']}/entry.txt");
}
+
if (file_exists("data/panels/{$_POST['panel_id']}/right.txt")) {
unlink("data/panels/{$_POST['panel_id']}/right.txt");
}
+
+ if (file_exists("data/panels/{$_POST['panel_id']}/top.txt")) {
+ unlink("data/panels/{$_POST['panel_id']}/top.txt");
+ }
+
+ if (file_exists("data/panels/{$_POST['panel_id']}/bottom.txt")) {
+ unlink("data/panels/{$_POST['panel_id']}/bottom.txt");
+ }
+
if (file_exists("data/panels/{$_POST['panel_id']}/center.txt")) {
unlink("data/panels/{$_POST['panel_id']}/center.txt");
}
+}
+
+if ((!isset($_POST['panel_bottom']) or empty($_POST['panel_bottom'])) and ($_POST['panel_edit'] == "on")) {
+ if (file_exists("data/panels/{$_POST['panel_id']}/bottom.txt")) {
+ unlink("data/panels/{$_POST['panel_id']}/bottom.txt");
+ }
+}
+
+if (isset($_POST['panel_bottom']) and !empty($_POST['panel_bottom']) and ($_POST['panel_bottom'] == "on")) {
+
+ if (!file_exists("data/panels/{$_POST['panel_id']}/bottom.txt")) {
+ touch("data/panels/{$_POST['panel_id']}/bottom.txt");
+ }
+
+ if (file_exists("data/panels/{$_POST['panel_id']}/right.txt")) {
+ unlink("data/panels/{$_POST['panel_id']}/right.txt");
+ }
if (file_exists("data/panels/{$_POST['panel_id']}/top.txt")) {
unlink("data/panels/{$_POST['panel_id']}/top.txt");
}
+
+ if (file_exists("data/panels/{$_POST['panel_id']}/center.txt")) {
+ unlink("data/panels/{$_POST['panel_id']}/center.txt");
+ }
+
+ if (file_exists("data/panels/{$_POST['panel_id']}/entry.txt")) {
+ unlink("data/panels/{$_POST['panel_id']}/entry.txt");
+ }
}
if ((!isset($_POST['panel_header']) or empty($_POST['panel_header'])) and ($_POST['panel_edit'] == "on")) {
@@ -168,26 +245,22 @@ if ((!isset($_POST['panel_header']) or empty($_POST['panel_header'])) and ($_POS
if (isset($_POST['panel_header']) and !empty($_POST['panel_header']) and ($_POST['panel_header'] == "on")) {
- if (file_exists("data/panels/{$_POST['panel_id']}/free.txt")) {
- unlink("data/panels/{$_POST['panel_id']}/free.txt");
+ if (file_exists("data/panels/{$_POST['panel_id']}/right.txt")) {
+ unlink("data/panels/{$_POST['panel_id']}/right.txt");
}
- if (file_exists("data/panels/{$_POST['panel_id']}/nomargin.txt")) {
- unlink("data/panels/{$_POST['panel_id']}/nomargin.txt");
+ if (file_exists("data/panels/{$_POST['panel_id']}/top.txt")) {
+ unlink("data/panels/{$_POST['panel_id']}/top.txt");
}
- if (file_exists("data/panels/{$_POST['panel_id']}/right.txt")) {
- unlink("data/panels/{$_POST['panel_id']}/right.txt");
+ if (file_exists("data/panels/{$_POST['panel_id']}/bottom.txt")) {
+ unlink("data/panels/{$_POST['panel_id']}/bottom.txt");
}
if (file_exists("data/panels/{$_POST['panel_id']}/center.txt")) {
unlink("data/panels/{$_POST['panel_id']}/center.txt");
}
- if (file_exists("data/panels/{$_POST['panel_id']}/top.txt")) {
- unlink("data/panels/{$_POST['panel_id']}/top.txt");
- }
-
if (file_exists("data/panels/{$_POST['panel_id']}/entry.txt")) {
unlink("data/panels/{$_POST['panel_id']}/entry.txt");
}
@@ -205,26 +278,22 @@ if ((!isset($_POST['panel_footer']) or empty($_POST['panel_footer'])) and ($_POS
if (isset($_POST['panel_footer']) and !empty($_POST['panel_footer']) and ($_POST['panel_footer'] == "on")) {
- if (file_exists("data/panels/{$_POST['panel_id']}/free.txt")) {
- unlink("data/panels/{$_POST['panel_id']}/free.txt");
+ if (file_exists("data/panels/{$_POST['panel_id']}/right.txt")) {
+ unlink("data/panels/{$_POST['panel_id']}/right.txt");
}
- if (file_exists("data/panels/{$_POST['panel_id']}/nomargin.txt")) {
- unlink("data/panels/{$_POST['panel_id']}/nomargin.txt");
+ if (file_exists("data/panels/{$_POST['panel_id']}/top.txt")) {
+ unlink("data/panels/{$_POST['panel_id']}/top.txt");
}
- if (file_exists("data/panels/{$_POST['panel_id']}/right.txt")) {
- unlink("data/panels/{$_POST['panel_id']}/right.txt");
+ if (file_exists("data/panels/{$_POST['panel_id']}/bottom.txt")) {
+ unlink("data/panels/{$_POST['panel_id']}/bottom.txt");
}
if (file_exists("data/panels/{$_POST['panel_id']}/center.txt")) {
unlink("data/panels/{$_POST['panel_id']}/center.txt");
}
- if (file_exists("data/panels/{$_POST['panel_id']}/top.txt")) {
- unlink("data/panels/{$_POST['panel_id']}/top.txt");
- }
-
if (file_exists("data/panels/{$_POST['panel_id']}/entry.txt")) {
unlink("data/panels/{$_POST['panel_id']}/entry.txt");
}
@@ -382,48 +451,75 @@ a:active {
echo "<tr><td><input type=\"text\" class=\"input\" name=\"move_id\" value=\"$panel\" autocomplete=\"off\" maxlength=\"30\"></td>";
echo "<input type=\"hidden\" name=\"old_id\" value=\"$panel\">";
- echo "<td valign=\"top\" rowspan=\"5\"><input type=\"checkbox\" name=\"panel_hide\"";
+ echo "<td valign=\"top\" rowspan=\"5\">";
+
+ echo "<input type=\"checkbox\" name=\"panel_hide\"";
if (file_exists("data/panels/$panel/private.txt")) {
echo " checked";
}
- echo "> hide<br><input type=\"checkbox\" name=\"panel_auth\"";
+ echo "> hide<br>";
+
+ echo "<input type=\"checkbox\" name=\"panel_auth\"";
if (file_exists("data/panels/$panel/auth.txt")) {
echo " checked";
}
- echo "> auth<br><input type=\"checkbox\" name=\"panel_free\"";
+ echo "> auth<br>";
+
+ echo "<input type=\"checkbox\" name=\"panel_free\"";
if (file_exists("data/panels/$panel/free.txt")) {
echo " checked";
}
- echo "> free<br><input type=\"checkbox\" name=\"panel_nomargin\"";
+ echo "> free<br>";
+
+ echo "<input type=\"checkbox\" name=\"panel_nomargin\"";
if (file_exists("data/panels/$panel/nomargin.txt")) {
echo " checked";
}
- echo "> nomargin<br><input type=\"checkbox\" name=\"panel_header\"";
+ echo "> nomargin<br>";
+
+ echo "<input type=\"checkbox\" name=\"panel_header\"";
if (file_exists("data/header.txt") and (file_get_contents("data/header.txt") == $panel)) {
echo " checked";
}
- echo "> header<br><input type=\"checkbox\" name=\"panel_footer\"";
+ echo "> header<br>";
+
+ echo "<input type=\"checkbox\" name=\"panel_footer\"";
if (file_exists("data/footer.txt") and (file_get_contents("data/footer.txt") == $panel)) {
echo " checked";
}
- echo "> footer<br><input type=\"checkbox\" name=\"panel_right\"";
+ echo "> footer<br>";
+
+ echo "<input type=\"checkbox\" name=\"panel_right\"";
if (file_exists("data/panels/$panel/right.txt")) {
echo " checked";
}
- echo "> right<br><input type=\"checkbox\" name=\"panel_center\"";
- if (file_exists("data/panels/$panel/center.txt")) {
+ echo "> right<br>";
+
+ echo "<input type=\"checkbox\" name=\"panel_top\"";
+ if (file_exists("data/panels/$panel/top.txt")) {
echo " checked";
}
- echo "> center<br><input type=\"checkbox\" name=\"panel_top\"";
- if (file_exists("data/panels/$panel/top.txt")) {
+ echo "> top<br>";
+
+ echo "<input type=\"checkbox\" name=\"panel_bottom\"";
+ if (file_exists("data/panels/$panel/bottom.txt")) {
+ echo " checked";
+ }
+ echo "> bottom<br>";
+
+ echo "<input type=\"checkbox\" name=\"panel_center\"";
+ if (file_exists("data/panels/$panel/center.txt")) {
echo " checked";
}
- echo "> top<br><input type=\"checkbox\" name=\"panel_entry\"";
+ echo "> center<br>";
+
+ echo "<input type=\"checkbox\" name=\"panel_entry\"";
if (file_exists("data/panels/$panel/entry.txt")) {
echo " checked";
}
- echo "> entry<br><input type=\"checkbox\" name=\"panel_del\"";
- echo "> delete </td></tr>";
+ echo "> entry<br>";
+
+ echo "<input type=\"checkbox\" name=\"panel_del\"> delete </td></tr>";
echo "<tr></td><td><input type=\"text\" class=\"input\" name=\"panel_title\" value=\"";
readfile("data/panels/$panel/title.txt");
diff --git a/rel.txt b/rel.txt
index 117651e..4d998e1 100644
--- a/rel.txt
+++ b/rel.txt
@@ -1 +1 @@
-201009280054
+201010101010
tree 6619ae50eadf123ac170af1606f83a1b78b32636
parent 8be46ac3359e96e83e21d8e5f03e3d4924da4ff0
author Engels Antonio <engels@majcms.org> 1286676711 +0800
committer Engels Antonio <engels@majcms.org> 1286676711 +0800
Couldn't resist a 10-10-10 release ;)
Add bottom panels
Fix album post image rename and delete
diff --git a/album.php b/album.php
index a55bd06..436ecc8 100644
--- a/album.php
+++ b/album.php
@@ -45,6 +45,8 @@ if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username
if (count(glob("images/{$_REQUEST['entry']}/album/*")) < 1) {
header("Location: index.php?entry={$_REQUEST['entry']}");
}
+
+ header("Location: album.php?entry={$_REQUEST['entry']}&show={$_REQUEST['next']}");
}
if (isset($_POST['filename']) and !empty($_POST['filename']) and isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username) and isset($_POST['edit']) and ($_POST['edit'] == "rename") and !file_exists("images/{$_REQUEST['entry']}/album/{$_POST['filename']}")) {
@@ -62,6 +64,8 @@ if (isset($_POST['filename']) and !empty($_POST['filename']) and isset($_SESSION
if (file_exists("data/items/{$_REQUEST['entry']}/album/views/{$_REQUEST['show']}.txt")) {
rename("data/items/{$_REQUEST['entry']}/album/views/{$_REQUEST['show']}.txt","data/items/{$_REQUEST['entry']}/album/views/{$filename}.txt");
}
+
+ header("Location: album.php?entry={$_REQUEST['entry']}&show=$filename");
}
if ((!isset($_POST['caption']) or empty($_POST['caption'])) and isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username) and isset($_POST['edit']) and ($_POST['edit'] == "caption")) {
@@ -266,7 +270,8 @@ if (file_exists("images/{$_REQUEST['entry']}/album/{$_REQUEST['show']}")) {
echo "<form enctype=\"multipart\/form-data\" action=\"{$_SERVER['PHP_SELF']}\" method=\"post\">";
echo "<input type=hidden name=entry value={$_REQUEST['entry']}>";
echo "<input type=hidden name=show value={$_REQUEST['show']}>";
- echo "<input type=hidden name=edit value=delete>";
+ 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=input value=\"click here to delete image\"></td></tr>";
echo "</form>";
echo "<form enctype=\"multipart\/form-data\" action=\"{$_SERVER['PHP_SELF']}\" method=\"post\">";
diff --git a/index.php b/index.php
index c394c97..53e263f 100644
--- a/index.php
+++ b/index.php
@@ -1032,11 +1032,21 @@ if (file_exists("data/panels")) {
continue;
}
+ if (file_exists("data/panels/$maj_panel/right.txt")) {
+ $maj_right_panels[] = $maj_panel;
+ continue;
+ }
+
if (file_exists("data/panels/$maj_panel/top.txt")) {
$maj_top_panels[] = $maj_panel;
continue;
}
+ if (file_exists("data/panels/$maj_panel/bottom.txt")) {
+ $maj_bottom_panels[] = $maj_panel;
+ continue;
+ }
+
if (file_exists("data/panels/$maj_panel/center.txt")) {
$maj_center_panels[] = $maj_panel;
continue;
@@ -1047,11 +1057,6 @@ if (file_exists("data/panels")) {
continue;
}
- if (file_exists("data/panels/$maj_panel/right.txt")) {
- $maj_right_panels[] = $maj_panel;
- continue;
- }
-
if (file_exists("data/header.txt") and (file_get_contents("data/header.txt") == $maj_panel)) {
continue;
}
@@ -1071,11 +1076,21 @@ if (file_exists("data/panels")) {
$maj_count_left_panels = count($maj_left_panels);
+ sort($maj_right_panels);
+ reset($maj_right_panels);
+
+ $maj_count_right_panels = count($maj_right_panels);
+
sort($maj_top_panels);
reset($maj_top_panels);
$maj_count_top_panels = count($maj_top_panels);
+ sort($maj_bottom_panels);
+ reset($maj_bottom_panels);
+
+ $maj_count_bottom_panels = count($maj_bottom_panels);
+
sort($maj_center_panels);
reset($maj_center_panels);
@@ -1086,11 +1101,6 @@ if (file_exists("data/panels")) {
$maj_count_entry_panels = count($maj_entry_panels);
- sort($maj_right_panels);
- reset($maj_right_panels);
-
- $maj_count_right_panels = count($maj_right_panels);
-
if ($maj_count_left_panels > 0) {
foreach ($maj_left_panels as $maj_left_panel) {
@@ -4204,6 +4214,133 @@ foreach ($maj_disp as $maj_d) {
}
}
+if ($maj_count_bottom_panels > 0) {
+
+ foreach ($maj_bottom_panels as $maj_bottom_panel) {
+
+ if (!file_exists("data/panels/$maj_bottom_panel/free.txt")) {
+
+ if (file_exists("data/panels/$maj_bottom_panel/border.txt")) {
+ $maj_bottom_panel_border = file_get_contents("data/panels/$maj_bottom_panel/border.txt");
+ }
+ else {
+ if (isset($maj_bottom_panel_border)) {
+ unset($maj_bottom_panel_border);
+ }
+ }
+
+ if (file_exists("data/panels/$maj_bottom_panel/bgcolor-t.txt")) {
+ $maj_bottom_panel_bgcolor_t = file_get_contents("data/panels/$maj_bottom_panel/bgcolor-t.txt");
+ }
+ else {
+ if (isset($maj_bottom_panel_bgcolor_t)) {
+ unset($maj_bottom_panel_bgcolor_t);
+ }
+ }
+
+ if (file_exists("data/panels/$maj_bottom_panel/bgcolor-c.txt")) {
+ $maj_bottom_panel_bgcolor_c = file_get_contents("data/panels/$maj_bottom_panel/bgcolor-c.txt");
+ }
+ else {
+ if (isset($maj_bottom_panel_bgcolor_c)) {
+ unset($maj_bottom_panel_bgcolor_c);
+ }
+ }
+
+ if (file_exists("data/panels/$maj_bottom_panel/text-t.txt")) {
+ $maj_bottom_panel_text_t = file_get_contents("data/panels/$maj_bottom_panel/text-t.txt");
+ }
+ else {
+ if (isset($maj_bottom_panel_text_t)) {
+ unset($maj_bottom_panel_text_t);
+ }
+ }
+
+ if (file_exists("data/panels/$maj_bottom_panel/text-c.txt")) {
+ $maj_bottom_panel_text_c = file_get_contents("data/panels/$maj_bottom_panel/text-c.txt");
+ }
+ else {
+ if (isset($maj_bottom_panel_text_c)) {
+ unset($maj_bottom_panel_text_c);
+ }
+ }
+
+ echo '<div class="panel_title"';
+
+ if (isset($maj_bottom_panel_border) or isset($maj_bottom_panel_bgcolor_t) or isset($maj_bottom_panel_text_t)) {
+ echo ' style="';
+ }
+
+ if (isset($maj_bottom_panel_bgcolor_t)) {
+ echo "background-color: $maj_bottom_panel_bgcolor_t;";
+ }
+
+ if (isset($maj_bottom_panel_text_t)) {
+ echo "color: $maj_bottom_panel_text_t;";
+ }
+
+ if (isset($maj_bottom_panel_border)) {
+ echo "border-color: $maj_bottom_panel_border;";
+ }
+
+ if (isset($maj_bottom_panel_border) or isset($maj_bottom_panel_bgcolor_t) or isset($maj_bottom_panel_text_t)) {
+ echo '"';
+ }
+
+ echo '>';
+
+ readfile("data/panels/$maj_bottom_panel/title.txt");
+
+ if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
+ echo "<a href=\"panels.php#{$maj_bottom_panel}\">";
+ echo '<img src="images/widget.edit.png" border="0" width="11" height="11" align="right"></a>';
+ }
+
+ if (file_exists("data/panels/$maj_bottom_panel/private.txt")) {
+ echo '<img src="images/widget.private.png" border="0" width="11" height="11" align="right">';
+ }
+
+ echo '</div>';
+
+ echo '<div class="panel_body"';
+
+ if (isset($maj_bottom_panel_border) or isset($maj_bottom_panel_bgcolor_c) or isset($maj_bottom_panel_text_c)) {
+ echo ' style="';
+ }
+
+ if (isset($maj_bottom_panel_bgcolor_c)) {
+ echo "background-color: $maj_bottom_panel_bgcolor_c;";
+ }
+
+ if (isset($maj_bottom_panel_text_c)) {
+ echo "color: $maj_bottom_panel_text_c;";
+ }
+
+ if (isset($maj_bottom_panel_border)) {
+ echo "border-color: $maj_bottom_panel_border;";
+ }
+
+ if (isset($maj_bottom_panel_border) or isset($maj_bottom_panel_bgcolor_c) or isset($maj_bottom_panel_text_c)) {
+ echo '"';
+ }
+
+ echo '>';
+ }
+
+ if (file_exists("data/panels/$maj_bottom_panel/free.txt")) {
+ echo '<div class=panel_free>';
+ }
+
+ include("data/panels/$maj_bottom_panel/panel.php");
+
+ echo '</div>';
+
+ if (file_exists("data/panels/$maj_bottom_panel/free.txt") and !file_exists("data/panels/$maj_bottom_panel/nomargin.txt")) {
+ echo "<div style=\"height:10px;\"></div>";
+ }
+ }
+}
+
?>
<table border="0" cellspacing="0" cellpadding="0" width="100%"><tr>
diff --git a/panels.php b/panels.php
index 4b1c546..6793c48 100644
--- a/panels.php
+++ b/panels.php
@@ -100,9 +100,26 @@ if ((!isset($_POST['panel_right']) or empty($_POST['panel_right'])) and ($_POST[
}
if (isset($_POST['panel_right']) and !empty($_POST['panel_right']) and ($_POST['panel_right'] == "on")) {
+
if (!file_exists("data/panels/{$_POST['panel_id']}/right.txt")) {
touch("data/panels/{$_POST['panel_id']}/right.txt");
}
+
+ if (file_exists("data/panels/{$_POST['panel_id']}/top.txt")) {
+ unlink("data/panels/{$_POST['panel_id']}/top.txt");
+ }
+
+ if (file_exists("data/panels/{$_POST['panel_id']}/bottom.txt")) {
+ unlink("data/panels/{$_POST['panel_id']}/bottom.txt");
+ }
+
+ if (file_exists("data/panels/{$_POST['panel_id']}/center.txt")) {
+ unlink("data/panels/{$_POST['panel_id']}/center.txt");
+ }
+
+ if (file_exists("data/panels/{$_POST['panel_id']}/entry.txt")) {
+ unlink("data/panels/{$_POST['panel_id']}/entry.txt");
+ }
}
if ((!isset($_POST['panel_center']) or empty($_POST['panel_center'])) and ($_POST['panel_edit'] == "on")) {
@@ -112,12 +129,25 @@ if ((!isset($_POST['panel_center']) or empty($_POST['panel_center'])) and ($_POS
}
if (isset($_POST['panel_center']) and !empty($_POST['panel_center']) and ($_POST['panel_center'] == "on")) {
+
if (!file_exists("data/panels/{$_POST['panel_id']}/center.txt")) {
touch("data/panels/{$_POST['panel_id']}/center.txt");
}
if (file_exists("data/panels/{$_POST['panel_id']}/right.txt")) {
unlink("data/panels/{$_POST['panel_id']}/right.txt");
}
+
+ if (file_exists("data/panels/{$_POST['panel_id']}/top.txt")) {
+ unlink("data/panels/{$_POST['panel_id']}/top.txt");
+ }
+
+ if (file_exists("data/panels/{$_POST['panel_id']}/bottom.txt")) {
+ unlink("data/panels/{$_POST['panel_id']}/bottom.txt");
+ }
+
+ if (file_exists("data/panels/{$_POST['panel_id']}/entry.txt")) {
+ unlink("data/panels/{$_POST['panel_id']}/entry.txt");
+ }
}
if ((!isset($_POST['panel_top']) or empty($_POST['panel_top'])) and ($_POST['panel_edit'] == "on")) {
@@ -127,15 +157,26 @@ if ((!isset($_POST['panel_top']) or empty($_POST['panel_top'])) and ($_POST['pan
}
if (isset($_POST['panel_top']) and !empty($_POST['panel_top']) and ($_POST['panel_top'] == "on")) {
+
if (!file_exists("data/panels/{$_POST['panel_id']}/top.txt")) {
touch("data/panels/{$_POST['panel_id']}/top.txt");
}
+
if (file_exists("data/panels/{$_POST['panel_id']}/right.txt")) {
unlink("data/panels/{$_POST['panel_id']}/right.txt");
}
+
+ if (file_exists("data/panels/{$_POST['panel_id']}/bottom.txt")) {
+ unlink("data/panels/{$_POST['panel_id']}/bottom.txt");
+ }
+
if (file_exists("data/panels/{$_POST['panel_id']}/center.txt")) {
unlink("data/panels/{$_POST['panel_id']}/center.txt");
}
+
+ if (file_exists("data/panels/{$_POST['panel_id']}/entry.txt")) {
+ unlink("data/panels/{$_POST['panel_id']}/entry.txt");
+ }
}
if ((!isset($_POST['panel_entry']) or empty($_POST['panel_entry'])) and ($_POST['panel_edit'] == "on")) {
@@ -145,19 +186,55 @@ if ((!isset($_POST['panel_entry']) or empty($_POST['panel_entry'])) and ($_POST[
}
if (isset($_POST['panel_entry']) and !empty($_POST['panel_entry']) and ($_POST['panel_entry'] == "on")) {
+
if (!file_exists("data/panels/{$_POST['panel_id']}/entry.txt")) {
touch("data/panels/{$_POST['panel_id']}/entry.txt");
}
+
if (file_exists("data/panels/{$_POST['panel_id']}/right.txt")) {
unlink("data/panels/{$_POST['panel_id']}/right.txt");
}
+
+ if (file_exists("data/panels/{$_POST['panel_id']}/top.txt")) {
+ unlink("data/panels/{$_POST['panel_id']}/top.txt");
+ }
+
+ if (file_exists("data/panels/{$_POST['panel_id']}/bottom.txt")) {
+ unlink("data/panels/{$_POST['panel_id']}/bottom.txt");
+ }
+
if (file_exists("data/panels/{$_POST['panel_id']}/center.txt")) {
unlink("data/panels/{$_POST['panel_id']}/center.txt");
}
+}
+
+if ((!isset($_POST['panel_bottom']) or empty($_POST['panel_bottom'])) and ($_POST['panel_edit'] == "on")) {
+ if (file_exists("data/panels/{$_POST['panel_id']}/bottom.txt")) {
+ unlink("data/panels/{$_POST['panel_id']}/bottom.txt");
+ }
+}
+
+if (isset($_POST['panel_bottom']) and !empty($_POST['panel_bottom']) and ($_POST['panel_bottom'] == "on")) {
+
+ if (!file_exists("data/panels/{$_POST['panel_id']}/bottom.txt")) {
+ touch("data/panels/{$_POST['panel_id']}/bottom.txt");
+ }
+
+ if (file_exists("data/panels/{$_POST['panel_id']}/right.txt")) {
+ unlink("data/panels/{$_POST['panel_id']}/right.txt");
+ }
if (file_exists("data/panels/{$_POST['panel_id']}/top.txt")) {
unlink("data/panels/{$_POST['panel_id']}/top.txt");
}
+
+ if (file_exists("data/panels/{$_POST['panel_id']}/center.txt")) {
+ unlink("data/panels/{$_POST['panel_id']}/center.txt");
+ }
+
+ if (file_exists("data/panels/{$_POST['panel_id']}/entry.txt")) {
+ unlink("data/panels/{$_POST['panel_id']}/entry.txt");
+ }
}
if ((!isset($_POST['panel_header']) or empty($_POST['panel_header'])) and ($_POST['panel_edit'] == "on")) {
@@ -168,26 +245,22 @@ if ((!isset($_POST['panel_header']) or empty($_POST['panel_header'])) and ($_POS
if (isset($_POST['panel_header']) and !empty($_POST['panel_header']) and ($_POST['panel_header'] == "on")) {
- if (file_exists("data/panels/{$_POST['panel_id']}/free.txt")) {
- unlink("data/panels/{$_POST['panel_id']}/free.txt");
+ if (file_exists("data/panels/{$_POST['panel_id']}/right.txt")) {
+ unlink("data/panels/{$_POST['panel_id']}/right.txt");
}
- if (file_exists("data/panels/{$_POST['panel_id']}/nomargin.txt")) {
- unlink("data/panels/{$_POST['panel_id']}/nomargin.txt");
+ if (file_exists("data/panels/{$_POST['panel_id']}/top.txt")) {
+ unlink("data/panels/{$_POST['panel_id']}/top.txt");
}
- if (file_exists("data/panels/{$_POST['panel_id']}/right.txt")) {
- unlink("data/panels/{$_POST['panel_id']}/right.txt");
+ if (file_exists("data/panels/{$_POST['panel_id']}/bottom.txt")) {
+ unlink("data/panels/{$_POST['panel_id']}/bottom.txt");
}
if (file_exists("data/panels/{$_POST['panel_id']}/center.txt")) {
unlink("data/panels/{$_POST['panel_id']}/center.txt");
}
- if (file_exists("data/panels/{$_POST['panel_id']}/top.txt")) {
- unlink("data/panels/{$_POST['panel_id']}/top.txt");
- }
-
if (file_exists("data/panels/{$_POST['panel_id']}/entry.txt")) {
unlink("data/panels/{$_POST['panel_id']}/entry.txt");
}
@@ -205,26 +278,22 @@ if ((!isset($_POST['panel_footer']) or empty($_POST['panel_footer'])) and ($_POS
if (isset($_POST['panel_footer']) and !empty($_POST['panel_footer']) and ($_POST['panel_footer'] == "on")) {
- if (file_exists("data/panels/{$_POST['panel_id']}/free.txt")) {
- unlink("data/panels/{$_POST['panel_id']}/free.txt");
+ if (file_exists("data/panels/{$_POST['panel_id']}/right.txt")) {
+ unlink("data/panels/{$_POST['panel_id']}/right.txt");
}
- if (file_exists("data/panels/{$_POST['panel_id']}/nomargin.txt")) {
- unlink("data/panels/{$_POST['panel_id']}/nomargin.txt");
+ if (file_exists("data/panels/{$_POST['panel_id']}/top.txt")) {
+ unlink("data/panels/{$_POST['panel_id']}/top.txt");
}
- if (file_exists("data/panels/{$_POST['panel_id']}/right.txt")) {
- unlink("data/panels/{$_POST['panel_id']}/right.txt");
+ if (file_exists("data/panels/{$_POST['panel_id']}/bottom.txt")) {
+ unlink("data/panels/{$_POST['panel_id']}/bottom.txt");
}
if (file_exists("data/panels/{$_POST['panel_id']}/center.txt")) {
unlink("data/panels/{$_POST['panel_id']}/center.txt");
}
- if (file_exists("data/panels/{$_POST['panel_id']}/top.txt")) {
- unlink("data/panels/{$_POST['panel_id']}/top.txt");
- }
-
if (file_exists("data/panels/{$_POST['panel_id']}/entry.txt")) {
unlink("data/panels/{$_POST['panel_id']}/entry.txt");
}
@@ -382,48 +451,75 @@ a:active {
echo "<tr><td><input type=\"text\" class=\"input\" name=\"move_id\" value=\"$panel\" autocomplete=\"off\" maxlength=\"30\"></td>";
echo "<input type=\"hidden\" name=\"old_id\" value=\"$panel\">";
- echo "<td valign=\"top\" rowspan=\"5\"><input type=\"checkbox\" name=\"panel_hide\"";
+ echo "<td valign=\"top\" rowspan=\"5\">";
+
+ echo "<input type=\"checkbox\" name=\"panel_hide\"";
if (file_exists("data/panels/$panel/private.txt")) {
echo " checked";
}
- echo "> hide<br><input type=\"checkbox\" name=\"panel_auth\"";
+ echo "> hide<br>";
+
+ echo "<input type=\"checkbox\" name=\"panel_auth\"";
if (file_exists("data/panels/$panel/auth.txt")) {
echo " checked";
}
- echo "> auth<br><input type=\"checkbox\" name=\"panel_free\"";
+ echo "> auth<br>";
+
+ echo "<input type=\"checkbox\" name=\"panel_free\"";
if (file_exists("data/panels/$panel/free.txt")) {
echo " checked";
}
- echo "> free<br><input type=\"checkbox\" name=\"panel_nomargin\"";
+ echo "> free<br>";
+
+ echo "<input type=\"checkbox\" name=\"panel_nomargin\"";
if (file_exists("data/panels/$panel/nomargin.txt")) {
echo " checked";
}
- echo "> nomargin<br><input type=\"checkbox\" name=\"panel_header\"";
+ echo "> nomargin<br>";
+
+ echo "<input type=\"checkbox\" name=\"panel_header\"";
if (file_exists("data/header.txt") and (file_get_contents("data/header.txt") == $panel)) {
echo " checked";
}
- echo "> header<br><input type=\"checkbox\" name=\"panel_footer\"";
+ echo "> header<br>";
+
+ echo "<input type=\"checkbox\" name=\"panel_footer\"";
if (file_exists("data/footer.txt") and (file_get_contents("data/footer.txt") == $panel)) {
echo " checked";
}
- echo "> footer<br><input type=\"checkbox\" name=\"panel_right\"";
+ echo "> footer<br>";
+
+ echo "<input type=\"checkbox\" name=\"panel_right\"";
if (file_exists("data/panels/$panel/right.txt")) {
echo " checked";
}
- echo "> right<br><input type=\"checkbox\" name=\"panel_center\"";
- if (file_exists("data/panels/$panel/center.txt")) {
+ echo "> right<br>";
+
+ echo "<input type=\"checkbox\" name=\"panel_top\"";
+ if (file_exists("data/panels/$panel/top.txt")) {
echo " checked";
}
- echo "> center<br><input type=\"checkbox\" name=\"panel_top\"";
- if (file_exists("data/panels/$panel/top.txt")) {
+ echo "> top<br>";
+
+ echo "<input type=\"checkbox\" name=\"panel_bottom\"";
+ if (file_exists("data/panels/$panel/bottom.txt")) {
+ echo " checked";
+ }
+ echo "> bottom<br>";
+
+ echo "<input type=\"checkbox\" name=\"panel_center\"";
+ if (file_exists("data/panels/$panel/center.txt")) {
echo " checked";
}
- echo "> top<br><input type=\"checkbox\" name=\"panel_entry\"";
+ echo "> center<br>";
+
+ echo "<input type=\"checkbox\" name=\"panel_entry\"";
if (file_exists("data/panels/$panel/entry.txt")) {
echo " checked";
}
- echo "> entry<br><input type=\"checkbox\" name=\"panel_del\"";
- echo "> delete </td></tr>";
+ echo "> entry<br>";
+
+ echo "<input type=\"checkbox\" name=\"panel_del\"> delete </td></tr>";
echo "<tr></td><td><input type=\"text\" class=\"input\" name=\"panel_title\" value=\"";
readfile("data/panels/$panel/title.txt");
diff --git a/rel.txt b/rel.txt
index 117651e..4d998e1 100644
--- a/rel.txt
+++ b/rel.txt
@@ -1 +1 @@
-201009280054
+201010101010