This commit has been accessed 631 times via Git panel.
commit 5f2d4fb53d0869511ffdeb6f78e8a97441db2996
tree d061ad77d8915663b5230c068a5887ba7abbd61e
parent 4eb87ab2e268cdd8b76ae4175bf41a490b9a094e
author Engels Antonio <engels@majcms.org> 1277314185 +0800
committer Engels Antonio <engels@majcms.org> 1277314185 +0800
maj-0.14-20060409.zip
diff --git a/index.php b/index.php
index ceaf7d9..9153337 100644
--- a/index.php
+++ b/index.php
@@ -847,7 +847,7 @@ if (file_exists("data/sticky")) {
?>
<p></p>
-</td><td width=15></td><td valign=top>
+</td><td width=15></td><td valign=top width=525>
<?php
@@ -1185,6 +1185,22 @@ else {
}
echo '</div><div id=panel_body>';
+ /* thumbnail auto-clean-up (20060409) - This should delete thumbnails of non-existent album images. */
+
+ if ($dh_album = opendir("images/$d/thumbnails")) {
+ while (($thumbnail_album = readdir($dh_album)) !== false) {
+ if ($thumbnail_album != "." && $thumbnail_album != ".." && fnmatch("*", $thumbnail_album)) {
+ $current_thumbnail = "images/$d/thumbnails/$thumbnail_album";
+ $parent_image = str_replace("-thumbnail.jpg","",$thumbnail_album);
+ $parent_image = "images/$d/album/$parent_image";
+
+ if (file_exists($current_thumbnail) and !file_exists($parent_image)) {
+ unlink($current_thumbnail);
+ }
+ }
+ }
+ }
+
if ($dh_album = opendir("images/$d/album")) {
while (($entry_album = readdir($dh_album)) !== false) {
if ($entry_album != "." && $entry_album != ".." && fnmatch("*", $entry_album)) {
@@ -1737,6 +1753,26 @@ if (file_exists("data/albums")) {
<?php
+if (file_exists("data/clustrmaps.php")) {
+ echo '<div id=panel_title>ClustrMaps</div>';
+ echo '<div id=panel_body><center>';
+ include("data/clustrmaps.php");
+ echo '</center></div><p></p>';
+}
+?>
+
+<?php
+
+if (file_exists("data/adsense.php")) {
+ echo '<div id=panel_title>AdSense</div>';
+ echo '<div id=panel_body><center>';
+ include("data/adsense.php");
+ echo '</center></div><p></p>';
+}
+?>
+
+<?php
+
if ($count_latest_items > 0) {
echo '<p><table border=0 cellspacing=2 cellpadding=0 width=100%>';
echo '<tr><td align=center><a target="_button" href="http://engels.mortega.net/index.php?entry=20050521000019"><img src=images/button.maj.png border=0 width=80 height=15></a></td></tr>';
tree d061ad77d8915663b5230c068a5887ba7abbd61e
parent 4eb87ab2e268cdd8b76ae4175bf41a490b9a094e
author Engels Antonio <engels@majcms.org> 1277314185 +0800
committer Engels Antonio <engels@majcms.org> 1277314185 +0800
maj-0.14-20060409.zip
diff --git a/index.php b/index.php
index ceaf7d9..9153337 100644
--- a/index.php
+++ b/index.php
@@ -847,7 +847,7 @@ if (file_exists("data/sticky")) {
?>
<p></p>
-</td><td width=15></td><td valign=top>
+</td><td width=15></td><td valign=top width=525>
<?php
@@ -1185,6 +1185,22 @@ else {
}
echo '</div><div id=panel_body>';
+ /* thumbnail auto-clean-up (20060409) - This should delete thumbnails of non-existent album images. */
+
+ if ($dh_album = opendir("images/$d/thumbnails")) {
+ while (($thumbnail_album = readdir($dh_album)) !== false) {
+ if ($thumbnail_album != "." && $thumbnail_album != ".." && fnmatch("*", $thumbnail_album)) {
+ $current_thumbnail = "images/$d/thumbnails/$thumbnail_album";
+ $parent_image = str_replace("-thumbnail.jpg","",$thumbnail_album);
+ $parent_image = "images/$d/album/$parent_image";
+
+ if (file_exists($current_thumbnail) and !file_exists($parent_image)) {
+ unlink($current_thumbnail);
+ }
+ }
+ }
+ }
+
if ($dh_album = opendir("images/$d/album")) {
while (($entry_album = readdir($dh_album)) !== false) {
if ($entry_album != "." && $entry_album != ".." && fnmatch("*", $entry_album)) {
@@ -1737,6 +1753,26 @@ if (file_exists("data/albums")) {
<?php
+if (file_exists("data/clustrmaps.php")) {
+ echo '<div id=panel_title>ClustrMaps</div>';
+ echo '<div id=panel_body><center>';
+ include("data/clustrmaps.php");
+ echo '</center></div><p></p>';
+}
+?>
+
+<?php
+
+if (file_exists("data/adsense.php")) {
+ echo '<div id=panel_title>AdSense</div>';
+ echo '<div id=panel_body><center>';
+ include("data/adsense.php");
+ echo '</center></div><p></p>';
+}
+?>
+
+<?php
+
if ($count_latest_items > 0) {
echo '<p><table border=0 cellspacing=2 cellpadding=0 width=100%>';
echo '<tr><td align=center><a target="_button" href="http://engels.mortega.net/index.php?entry=20050521000019"><img src=images/button.maj.png border=0 width=80 height=15></a></td></tr>';