X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-mem_add.php;h=cbfdf8b23a4997bc30709933a57f1b6c1b6b68fa;hb=e8ca54fe91872ab95a6ffdc4f1268bf18889021d;hp=102e4ca1bb1211063e055e1aa58ba63225c61b91;hpb=f2aeaab0cd313b2eeb151642455ed558f6b186dc;p=mailer.git diff --git a/inc/modules/admin/what-mem_add.php b/inc/modules/admin/what-mem_add.php index 102e4ca1bb..cbfdf8b23a 100644 --- a/inc/modules/admin/what-mem_add.php +++ b/inc/modules/admin/what-mem_add.php @@ -15,8 +15,6 @@ * $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 - 2009 by Roland Haeder * * Copyright (c) 2009, 2010 by Mailer Developer Team * @@ -41,10 +39,10 @@ // Some security stuff... if ((!defined('__SECURITY')) || (!isAdmin())) { die(); -} +} // END - if // Add desciption as navigation point -addMenuDescription('admin', __FILE__); +addYouAreHereLink('admin', __FILE__); // Check if the admin has entered title and what-php file name... if ((!isPostRequestParameterSet('title')) && (isFormSent())) { @@ -60,7 +58,7 @@ if (!isFormSent()) { // Get all available main menus $result = SQL_QUERY("SELECT `action`, `title`, `sort` FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE (`what`='' OR `what` IS NULL) ORDER BY `sort` ASC", __FILE__, __LINE__); - if (SQL_NUMROWS($result) > 0) { + if (!SQL_HASZERONUMS($result)) { // Read menu structure // @TODO Cant this be rewritten? while ($content = SQL_FETCHARRAY($result)) { @@ -99,9 +97,9 @@ if (!isFormSent()) { // Load sub menus :) foreach ($menus as $key_main => $value_main) { - $result = SQL_QUERY_ESC("SELECT what, title, sort FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `action`='%s' AND `what` != '' ORDER BY `sort`", - array($value_main), __FILE__, __LINE__); - if (SQL_NUMROWS($result) > 0) { + $result = SQL_QUERY_ESC("SELECT `what`, `title`, `sort` FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `action`='%s' AND `what` != '' ORDER BY `sort` ASC", + array($value_main), __FILE__, __LINE__); + if (!SQL_HASZERONUMS($result)) { // Initialize arrays $menus[$value_main] = array(); $titles[$value_main] = array(); @@ -143,24 +141,24 @@ if (!isFormSent()) { } // END - foreach } // END - if - $OUT = " + '; foreach ($below as $key => $m) { if (is_array($m)) { foreach ($m as $key2 => $m2) { - $OUT .= " \n"; + $OUT .= ''; } // END - foreach } else { - $OUT .= " \n"; + $OUT .= ''; } } - $OUT .= ""; + $OUT .= ''; // Prepare selection boxes for template $content['below_selection'] = $OUT; @@ -168,7 +166,7 @@ if (!isFormSent()) { $content['action_selection'] = adminAddMenuSelectionBox('member', 'action', 'menu'); // Display form - loadTemplate('admin_member_add', false, $content); + loadTemplate('admin_add_member_menu', false, $content); } elseif (!isDemoModeActive()) { // Insert new menu entry if (isPostRequestParameterSet('menu')) {