X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-memedit.php;h=e657f36cde207caefd3882d763e6c5838237fa47;hb=1f98151ba359a81bb54a1c4c8010b24fa4c9dcf0;hp=038b52fd0ce5f14591554aaf5336b00339a0ed20;hpb=594c7972b8abcf8086547d43e30aa8c26fb54ac4;p=mailer.git
diff --git a/inc/modules/admin/what-memedit.php b/inc/modules/admin/what-memedit.php
index 038b52fd0c..e657f36cde 100644
--- a/inc/modules/admin/what-memedit.php
+++ b/inc/modules/admin/what-memedit.php
@@ -10,7 +10,12 @@
* -------------------------------------------------------------------- *
* Kurzbeschreibung : Editieren Sie das Menue fuer Ihre Mitglieder *
* -------------------------------------------------------------------- *
- * *
+ * $Revision:: $ *
+ * $Date:: $ *
+ * $Tag:: 0.2.1-FINAL $ *
+ * $Author:: $ *
+ * Needs to be in all Files and every File needs "svn propset *
+ * svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2008 by Roland Haeder *
* For more information visit: http://www.mxchange.org *
@@ -50,10 +55,10 @@ if (REQUEST_ISSET_GET(('sub'))) {
// Get count of (maybe) selected menu points
$chk = 0;
-if (REQUEST_ISSET_POST(('sel'))) $chk = SELECTION_COUNT(REQUEST_POST('sel'));
+if (REQUEST_ISSET_POST('sel')) $chk = SELECTION_COUNT(REQUEST_POST('sel'));
// List all menu points and make them editable
-if ((REQUEST_ISSET_POST(('edit'))) && ($chk > 0) && (!IS_DEMO())) {
+if ((REQUEST_ISSET_POST('edit')) && ($chk > 0) && (!IS_DEMO())) {
// Edit menu entries
define('__SUB_VALUE', $SUB);
define('__CHK_VALUE', $chk);
@@ -93,7 +98,7 @@ if ((REQUEST_ISSET_POST(('edit'))) && ($chk > 0) && (!IS_DEMO())) {
// Load template
LOAD_TEMPLATE("admin_mmenu_edit");
-} elseif ((REQUEST_ISSET_POST(('del'))) && ($chk > 0) && (!IS_DEMO())) {
+} elseif ((REQUEST_ISSET_POST('del')) && ($chk > 0) && (!IS_DEMO())) {
// Del menu entries with or without confirmation
define('__SUB_VALUE', $SUB);
define('__CHK_VALUE', $chk);
@@ -247,42 +252,46 @@ if ((REQUEST_ISSET_POST(('edit'))) && ($chk > 0) && (!IS_DEMO())) {
$max = SQL_NUMROWS($result);
if ($max > 0) {
// Set sub value
+ // @TODO Rewrite this constant
define('__SUB_VALUE', $SUB);
$SW = 2; $cnt = 0; $OUT = "";
- while (list($id, $act, $wht, $title, $sort) = SQL_FETCHROW($result)) {
+ while ($content = SQL_FETCHARRAY($result)) {
+ // Init navigation
+ $content['navi'] = "";
$cnt++;
- if (($sort == 0) || (($sort == 1) && (!empty($SUB)))) {
+ if (($content['sort'] == 0) || (($content['sort'] == 1) && (!empty($SUB)))) {
// Is highest position
- $NAVI = "{--LOWER--}";
+ $content['navi'] = "{--LOWER--}";
} elseif ($cnt == $max) {
// Is lowest position
- $NAVI = "{--HIGHER--}";
- } elseif ($sort > 0) {
+ $content['navi'] = "{--HIGHER--}";
+ } elseif ($content['sort'] > 0) {
// Anything else between highest and lowest
- $NAVI = "{--HIGHER--}/{--LOWER--}";
+ $content['navi'] = "{--HIGHER--}/{--LOWER--}";
}
- if (empty($act)) $act = " ";
- if (empty($wht)) $wht = " ";
- if (empty($title)) $title = " ";
+ // Fix empty values for Firefox
+ if (empty($content['action'])) $content['action'] = " ";
+ if (empty($content['what'])) $content['what'] = " ";
+ if (empty($content['title'])) $content['title'] = " ";
+
+ // Add more entries
+ $content['sw'] = $SW;
+ $content['mode'] = "mem";
- $content = array(
- 'sw' => $SW,
- 'id' => $id,
- 'action' => $act,
- 'what' => $wht,
- 'title' => $title,
- 'navi' => $NAVI,
- 'mode' => "mem",
- );
+ // Load row template and switch color
$OUT .= LOAD_TEMPLATE("admin_menu_overview_row", true, $content);
$SW = 3 - $SW;
}
// Free memory
SQL_FREERESULT($result);
+
+ // @TODO Rewrite this constant
define('__MENU_ROWS', $OUT);
+
+ // Load main template
LOAD_TEMPLATE("admin_mmenu_overview");
} else {
// Menu entries are missing... (???)