X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-memedit.php;h=0d5f0e4e71da1be36c07dfc44913ae19cb02fdb6;hb=9c7762b58197f49b318942d22cf3db0d21f625f5;hp=195ae9510a29996efd81a0c897a086a0272c72a5;hpb=1ebf518b9552f71ee95de6f4b80e6de3a27716d1;p=mailer.git diff --git a/inc/modules/admin/what-memedit.php b/inc/modules/admin/what-memedit.php index 195ae9510a..0d5f0e4e71 100644 --- a/inc/modules/admin/what-memedit.php +++ b/inc/modules/admin/what-memedit.php @@ -1,7 +1,7 @@ 0) && (!isDemoModeActive())) { +if ((isPostRequestElementSet('edit')) && (countPostSelection() > 0) && (!isDemoModeActive())) { // Edit menu entries $content['sub'] = $SUB; - $content['chk'] = $chk; - $SW = 2; $cnt = 0; $OUT = ''; + $content['chk'] = countPostSelection(); + $SW = 2; $cnt = '0'; $OUT = ''; foreach (postRequestElement('sel') as $sel => $confirm) { if ($confirm == 1) { $cnt++; @@ -100,11 +96,11 @@ if ((isPostRequestElementSet('edit')) && ($chk > 0) && (!isDemoModeActive())) { // Load template loadTemplate('admin_mmenu_edit', false, $content); -} elseif ((isPostRequestElementSet('del')) && ($chk > 0) && (!isDemoModeActive())) { +} elseif ((isPostRequestElementSet('del')) && (countPostSelection() > 0) && (!isDemoModeActive())) { // Del menu entries with or without confirmation $content['sub'] = $SUB; - $content['chk'] = $chk; - $SW = 2; $cnt = 0; $OUT = ''; + $content['chk'] = countPostSelection(); + $SW = 2; $cnt = '0'; $OUT = ''; foreach (postRequestElement('sel') as $sel => $confirm) { if ($confirm == 1) { $cnt++; @@ -139,11 +135,11 @@ if ((isPostRequestElementSet('edit')) && ($chk > 0) && (!isDemoModeActive())) { // Load template loadTemplate('admin_mmenu_delete', false, $content); -} elseif ((isPostRequestElementSet('status')) && ($chk > 0) && (!isDemoModeActive())) { +} elseif ((isPostRequestElementSet('status')) && (countPostSelection() > 0) && (!isDemoModeActive())) { // Change status (visible / locked) $content['sub'] = $SUB; - $content['chk'] = $chk; - $SW = 2; $cnt = 0; $OUT = ''; + $content['chk'] = countPostSelection(); + $SW = 2; $cnt = '0'; $OUT = ''; foreach (postRequestElement('sel') as $sel => $confirm) { if ($confirm == 1) { $cnt++; @@ -214,7 +210,7 @@ if ((isPostRequestElementSet('edit')) && ($chk > 0) && (!isDemoModeActive())) { // Init $tid = ''; $fid = ''; - // Get IDs + // Get ids if (isGetRequestElementSet('w')) { // Sub menus selected $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `action`='%s' AND `sort`='%s' LIMIT 1", @@ -260,12 +256,12 @@ if ((isPostRequestElementSet('edit')) && ($chk > 0) && (!isDemoModeActive())) { // Set sub value $content['sub'] = $SUB; - $SW = 2; $cnt = 0; $OUT = ''; + $SW = 2; $cnt = '0'; $OUT = ''; while ($data = SQL_FETCHARRAY($result)) { // Init navigation $data['navi'] = ''; $cnt++; - if (($data['sort'] == 0) || (($data['sort'] == 1) && (!empty($SUB)))) { + if (($data['sort'] == '0') || (($data['sort'] == 1) && (!empty($SUB)))) { // Is highest position $data['navi'] = "{--LOWER--}"; } elseif ($cnt == $max) {