X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Fmodules%2Fadmin%2Fwhat-guestedit.php;h=10ee27a8c1b1363d4101c11735ac79044fc58731;hb=7b50f1945e168fcd2daa82898c3bb71d59bc653a;hp=cb9f00d1ee4c751205bb240382fc11c1563c298d;hpb=0a37fc5afcd828646d4e62e68fea07c3d2c54a87;p=mailer.git
diff --git a/inc/modules/admin/what-guestedit.php b/inc/modules/admin/what-guestedit.php
index cb9f00d1ee..10ee27a8c1 100644
--- a/inc/modules/admin/what-guestedit.php
+++ b/inc/modules/admin/what-guestedit.php
@@ -16,7 +16,7 @@
* $Author:: $ *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009 - 2011 by Mailer Developer Team *
+ * Copyright (c) 2009 - 2012 by Mailer Developer Team *
* For more information visit: http://mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -61,7 +61,7 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive()
foreach (postRequestElement('sel') as $sel => $confirm) {
if ($confirm == 1) {
$count++;
- $result = SQL_QUERY_ESC("SELECT `title`,`action`,`what` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE ".$AND." AND `id`=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT `title`, `action`, `what` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE ".$AND." AND `id`=%s LIMIT 1",
array(bigintval($sel)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Entry found so we load the stuff...
@@ -149,7 +149,7 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive()
foreach (postRequestElement('sel') as $sel => $confirm) {
if ($confirm == 1) {
$count++;
- $result = SQL_QUERY_ESC("SELECT `title`,`visible`,`locked` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE ".$AND." AND `id`=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT `title`, `visible`, `locked` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE ".$AND." AND `id`=%s LIMIT 1",
array(bigintval($sel)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Entry found so we load the stuff...
@@ -193,14 +193,14 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive()
// By default list menus
if (empty($subMenu)) {
// List only main menus
- $result = SQL_QUERY("SELECT `id`,`action`,`what`,`title`,`sort` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE (`what`='' OR `what` IS NULL) ORDER BY `sort` ASC", __FILE__, __LINE__);
+ $result = SQL_QUERY("SELECT `id`, `action`, `what`, `title`, `sort` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE (`what`='' OR `what` IS NULL) ORDER BY `sort` ASC", __FILE__, __LINE__);
} else {
// List sub menus
- $result = SQL_QUERY_ESC("SELECT `id`,`action`,`what`,`title`,`sort` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort` ASC",
+ $result = SQL_QUERY_ESC("SELECT `id`, `action`, `what`, `title`, `sort` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort` ASC",
array($subMenu), __FILE__, __LINE__);
}
- // Do we have entries?
+ // Are there entries?
if (!SQL_HASZERONUMS($result)) {
// Init variables
$count = '0';
@@ -215,7 +215,7 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive()
if (($content['sort'] == '0') || (($content['sort'] == 1) && (!empty($subMenu)))) {
// Is highest position
$NAVI = '{--LOWER--}';
- } elseif ($count == SQL_NUMROWS($result)) {
+ } elseif (SQL_NUMROWS($result) == $count) {
// Is lowest position
$NAVI = '{--HIGHER--}';
} elseif ($content['sort'] > 0) {
@@ -230,7 +230,7 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive()
'what' => $content['what'],
'title' => $content['title'],
'navi' => $NAVI,
- 'mode' => 'guest'
+ 'do' => 'guest'
);
// Load row template