X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-memedit.php;h=b65af84b28864f9cf42a982e438f5de9cdf9687e;hp=4d86acd021bd2ddc05e9a93d5e1d93d1752126d4;hb=4001187f22197f55e5a1f211fc8defcc180f7c32;hpb=a47a9c49a7813304ac78deb3741bdd85e6d50912 diff --git a/inc/modules/admin/what-memedit.php b/inc/modules/admin/what-memedit.php index 4d86acd021..b65af84b28 100644 --- a/inc/modules/admin/what-memedit.php +++ b/inc/modules/admin/what-memedit.php @@ -247,42 +247,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'] = " "; - $content = array( - 'sw' => $SW, - 'id' => $id, - 'action' => $act, - 'what' => $wht, - 'title' => $title, - 'navi' => $NAVI, - 'mode' => "mem", - ); + // Add more entries + $content['sw'] = $SW; + $content['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... (???)