X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-mem_add.php;h=5c87bf8f84ae94a1164bc2b6cfb6dea13431183d;hb=0fada672e2066043b76ed5d57f852f451a49a3a3;hp=008915782e6d8b9e7e0c531d431f37af28a8f1d5;hpb=57227d33e870ec5cd271209c4a978a52b45c2dd6;p=mailer.git diff --git a/inc/modules/admin/what-mem_add.php b/inc/modules/admin/what-mem_add.php index 008915782e..5c87bf8f84 100644 --- a/inc/modules/admin/what-mem_add.php +++ b/inc/modules/admin/what-mem_add.php @@ -15,10 +15,9 @@ * $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 - 2011 by Mailer Developer Team * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -40,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())) { @@ -59,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)) { @@ -98,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(); @@ -142,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; @@ -167,11 +166,11 @@ 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')) { - SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('%s','%s','%s','%s','%s','%s')", + SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`, `what`, `title`, `visible`, `locked`, `sort`) VALUES ('%s','%s','%s','%s','%s','%s')", array( postRequestParameter('menu'), postRequestParameter('name'), @@ -181,7 +180,7 @@ if (!isFormSent()) { bigintval(postRequestParameter('sort')), ), __FILE__, __LINE__); } else { - SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`title`,`visible`,`locked`,`sort`) VALUES ('%s','%s','%s','%s','%s')", + SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`, `title`, `visible`, `locked`, `sort`) VALUES ('%s','%s','%s','%s','%s')", array( postRequestParameter('name'), postRequestParameter('title'), @@ -190,11 +189,11 @@ if (!isFormSent()) { bigintval(postRequestParameter('sort')), ), __FILE__, __LINE__); } - loadTemplate('admin_settings_saved', false, getMessage('SETTINGS_SAVED')); + displayMessage('{--SETTINGS_SAVED'); } else { // Demo mode! - loadTemplate('admin_settings_saved', false, getMessage('SETTINGS_NOT_SAVED')); + displayMessage('{--SETTINGS_NOT_SAVED--}'); } -// +// [EOF] ?>