This commit has been accessed 612 times via Git panel.
commit 5875303f2b7639c9b6b7d1710f81402c582273bd
tree cd80b7741b7122037d483ace22c818fd66b947f3
parent 8016bfb4c5f688649b03e9b7891af2b83c7d7427
author Engels Antonio <engels@majcms.org> 1308000153 +0800
committer Engels Antonio <engels@majcms.org> 1308000153 +0800
Rationalize Oops! notification
diff --git a/index.php b/index.php
index 43a89ce..65aff82 100644
--- a/index.php
+++ b/index.php
@@ -1910,30 +1910,50 @@ if (isset($maj_req_category) and !empty($maj_req_category)) {
}
}
-if ($maj_count_items == 0) {
+if ((count($maj_top_panels) == 0) and (count($maj_center_panels) == 0) and (count($maj_bottom_panels) == 0) and ($maj_count_grand == 0)) {
- echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#cccccc\" style=\"background-color: transparent;\"><tr><td width=\"$maj_wmain\">";
+ echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#cccccc\" style=\"background-color: transparent;\">";
+ echo "<tr><td width=\"$maj_wmain\"><div class=\"panel_wrapper\"><div class=\"panel_title\">Oops!</div>";
+
+ echo "<div class=\"panel_body\"><table border=\"0\" cellspacing=\"0\" cellpadding=\"4\"><tr>";
+ echo "<td valign=\"middle\"><img src=\"images/oops.png\" width=\"36\" height=\"36\" border=\"0\"></td><td valign=\"middle\">";
+
+ echo "No entries or central panels found. Perhaps this is a fresh install.";
+
+ echo "</td></tr></table></div></div>";
+ echo "</td></tr></table>";
+}
+
+if (($maj_count_items == 0) and ($maj_count_grand > 0)) {
+
+ if (count($_GET) > 0) {
- echo '<div class="panel_wrapper"><div class="panel_title">Oops!</div>';
+ echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#cccccc\" style=\"background-color: transparent;\">";
+ echo "<tr><td width=\"$maj_wmain\"><div class=\"panel_wrapper\"><div class=\"panel_title\">Oops!</div>";
- echo "<div class=panel_body><table border=0 cellspacing=0 cellpadding=4><tr>";
- echo "<td valign=middle><img src=images/oops.png width=36 height=36 border=0></td><td valign=middle>";
+ echo "<div class=\"panel_body\"><table border=\"0\" cellspacing=\"0\" cellpadding=\"4\"><tr>";
+ echo "<td valign=\"middle\"><img src=\"images/oops.png\" width=\"36\" height=\"36\" border=\"0\"></td><td valign=\"middle\">";
+
+ echo "The entry you are looking for does not exist or is off limits to you.";
+
+ echo "</td></tr></table></div></div>";
+ echo "</td></tr></table>";
- if (($maj_count_grand == 0) and (count($_GET) == 0)) {
- echo "No entries found. Perhaps this is a fresh install.";
- }
- else {
- if (count($_GET) > 0) {
- echo "The entry you are looking for does not exist or is off limits to you.";
- }
- else {
- echo "Login required. Entries are off limits without proper credentials.";
- }
}
- echo '</td></tr></table></div></div>';
+ if ((count($_GET) == 0) and (count($maj_top_panels) == 0) and (count($maj_center_panels) == 0) and (count($maj_bottom_panels) == 0)) {
- echo "</td></tr></table>";
+ echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#cccccc\" style=\"background-color: transparent;\">";
+ echo "<tr><td width=\"$maj_wmain\"><div class=\"panel_wrapper\"><div class=\"panel_title\">Oops!</div>";
+
+ echo "<div class=\"panel_body\"><table border=\"0\" cellspacing=\"0\" cellpadding=\"4\"><tr>";
+ echo "<td valign=\"middle\"><img src=\"images/oops.png\" width=\"36\" height=\"36\" border=\"0\"></td><td valign=\"middle\">";
+
+ echo "Login required. Entries are off limits without proper credentials.";
+
+ echo "</td></tr></table></div></div>";
+ echo "</td></tr></table>";
+ }
}
$maj_start = $_REQUEST['start'];
tree cd80b7741b7122037d483ace22c818fd66b947f3
parent 8016bfb4c5f688649b03e9b7891af2b83c7d7427
author Engels Antonio <engels@majcms.org> 1308000153 +0800
committer Engels Antonio <engels@majcms.org> 1308000153 +0800
Rationalize Oops! notification
diff --git a/index.php b/index.php
index 43a89ce..65aff82 100644
--- a/index.php
+++ b/index.php
@@ -1910,30 +1910,50 @@ if (isset($maj_req_category) and !empty($maj_req_category)) {
}
}
-if ($maj_count_items == 0) {
+if ((count($maj_top_panels) == 0) and (count($maj_center_panels) == 0) and (count($maj_bottom_panels) == 0) and ($maj_count_grand == 0)) {
- echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#cccccc\" style=\"background-color: transparent;\"><tr><td width=\"$maj_wmain\">";
+ echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#cccccc\" style=\"background-color: transparent;\">";
+ echo "<tr><td width=\"$maj_wmain\"><div class=\"panel_wrapper\"><div class=\"panel_title\">Oops!</div>";
+
+ echo "<div class=\"panel_body\"><table border=\"0\" cellspacing=\"0\" cellpadding=\"4\"><tr>";
+ echo "<td valign=\"middle\"><img src=\"images/oops.png\" width=\"36\" height=\"36\" border=\"0\"></td><td valign=\"middle\">";
+
+ echo "No entries or central panels found. Perhaps this is a fresh install.";
+
+ echo "</td></tr></table></div></div>";
+ echo "</td></tr></table>";
+}
+
+if (($maj_count_items == 0) and ($maj_count_grand > 0)) {
+
+ if (count($_GET) > 0) {
- echo '<div class="panel_wrapper"><div class="panel_title">Oops!</div>';
+ echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#cccccc\" style=\"background-color: transparent;\">";
+ echo "<tr><td width=\"$maj_wmain\"><div class=\"panel_wrapper\"><div class=\"panel_title\">Oops!</div>";
- echo "<div class=panel_body><table border=0 cellspacing=0 cellpadding=4><tr>";
- echo "<td valign=middle><img src=images/oops.png width=36 height=36 border=0></td><td valign=middle>";
+ echo "<div class=\"panel_body\"><table border=\"0\" cellspacing=\"0\" cellpadding=\"4\"><tr>";
+ echo "<td valign=\"middle\"><img src=\"images/oops.png\" width=\"36\" height=\"36\" border=\"0\"></td><td valign=\"middle\">";
+
+ echo "The entry you are looking for does not exist or is off limits to you.";
+
+ echo "</td></tr></table></div></div>";
+ echo "</td></tr></table>";
- if (($maj_count_grand == 0) and (count($_GET) == 0)) {
- echo "No entries found. Perhaps this is a fresh install.";
- }
- else {
- if (count($_GET) > 0) {
- echo "The entry you are looking for does not exist or is off limits to you.";
- }
- else {
- echo "Login required. Entries are off limits without proper credentials.";
- }
}
- echo '</td></tr></table></div></div>';
+ if ((count($_GET) == 0) and (count($maj_top_panels) == 0) and (count($maj_center_panels) == 0) and (count($maj_bottom_panels) == 0)) {
- echo "</td></tr></table>";
+ echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#cccccc\" style=\"background-color: transparent;\">";
+ echo "<tr><td width=\"$maj_wmain\"><div class=\"panel_wrapper\"><div class=\"panel_title\">Oops!</div>";
+
+ echo "<div class=\"panel_body\"><table border=\"0\" cellspacing=\"0\" cellpadding=\"4\"><tr>";
+ echo "<td valign=\"middle\"><img src=\"images/oops.png\" width=\"36\" height=\"36\" border=\"0\"></td><td valign=\"middle\">";
+
+ echo "Login required. Entries are off limits without proper credentials.";
+
+ echo "</td></tr></table></div></div>";
+ echo "</td></tr></table>";
+ }
}
$maj_start = $_REQUEST['start'];