X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-memedit.php;h=e657f36cde207caefd3882d763e6c5838237fa47;hb=1f98151ba359a81bb54a1c4c8010b24fa4c9dcf0;hp=ed4f7f918291e6bbe0f5f5422f77eb25afc76649;hpb=e2212ac50663d7da7b77040270d55c90b66d65af;p=mailer.git
diff --git a/inc/modules/admin/what-memedit.php b/inc/modules/admin/what-memedit.php
index ed4f7f9182..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 *
@@ -44,16 +49,16 @@ ADD_DESCR("admin", __FILE__);
$AND = "(`what` = '' OR `what` IS NULL)"; $SUB = "";
if (REQUEST_ISSET_GET(('sub'))) {
- $AND = sprintf("action='%s' AND `what` IS NOT NULL", SQL_ESCAPE(REQUEST_GET('sub')));
- $SUB = SQL_ESCAPE(REQUEST_GET('sub'));
+ $AND = sprintf("action='%s' AND `what` IS NOT NULL", REQUEST_GET(('sub')));
+ $SUB = REQUEST_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... (???)