* $Author:: $ *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009 - 2011 by Mailer Developer Team *
- * For more information visit: http://www.mxchange.org *
+ * 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 *
* it under the terms of the GNU General Public License as published by *
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...
);
// Load row template
- $OUT .= loadTemplate('admin_edit_guest_menu_row', true, $content);
+ $OUT .= loadTemplate('admin_edit_guest_menu_row', TRUE, $content);
} else {
// Entry not found
$content = array(
'sel' => $sel
);
- $OUT .= loadTemplate('admin_menu_404_row', true, $content);
+ $OUT .= loadTemplate('admin_menu_404_row', TRUE, $content);
}
// Free result and switch color
$content['count'] = $count;
// Load template
- loadTemplate('admin_edit_guest_menu_form', false, $content);
+ loadTemplate('admin_edit_guest_menu_form', FALSE, $content);
} elseif ((isFormSent('delete')) && (ifPostContainsSelections()) && (!isDemoModeActive())) {
// Del menu entries with or without confirmation
$content['sub'] = $subMenu;
'menu' => $content['title'],
'sel' => $sel,
);
- $OUT .= loadTemplate('admin_delete_guest_menu_row', true, $content);
+ $OUT .= loadTemplate('admin_delete_guest_menu_row', TRUE, $content);
} else {
// Entry not found?
$content = array(
'sel' => $sel
);
- $OUT .= loadTemplate('admin_menu_404_row', true, $content);
+ $OUT .= loadTemplate('admin_menu_404_row', TRUE, $content);
}
SQL_FREERESULT($result);
} // END - if
$content['count'] = $count;
// Load template
- loadTemplate('admin_delete_guest_menu', false, $content);
+ loadTemplate('admin_delete_guest_menu', FALSE, $content);
} elseif ((isPostRequestElementSet('status')) && (ifPostContainsSelections()) && (!isDemoModeActive())) {
// Change status (visible / locked)
$content['sub'] = $subMenu;
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...
);
// Load template
- $OUT .= loadTemplate('admin_menu_status_row', true, $content);
+ $OUT .= loadTemplate('admin_menu_status_row', TRUE, $content);
} else {
// Entry not found?
$content = array(
'sel' => $sel
);
- $OUT .= loadTemplate('admin_menu_404_row', true, $content);
+ $OUT .= loadTemplate('admin_menu_404_row', TRUE, $content);
}
SQL_FREERESULT($result);
$content['count'] = $count;
// Load template
- loadTemplate('admin_guest_menu_status', false, $content);
+ loadTemplate('admin_guest_menu_status', FALSE, $content);
} elseif ((isFormSent()) && (!isDemoModeActive())) {
// An action is done...
adminProcessMenuEditForm('guest', $subMenu);
// 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';
if (($content['sort'] == '0') || (($content['sort'] == 1) && (!empty($subMenu)))) {
// Is highest position
$NAVI = '<a href="{%url=modules.php?module=admin&what=guestedit&sub=' . $content['sub'] . '&act=' . $content['action'] . '&w=' . $content['what'] . '&tid=' . ($content['sort']+1) . '&fid=' . $content['sort'] . '%}">{--LOWER--}</a>';
- } elseif ($count == SQL_NUMROWS($result)) {
+ } elseif (SQL_NUMROWS($result) == $count) {
// Is lowest position
$NAVI = '<a href="{%url=modules.php?module=admin&what=guestedit&sub=' . $content['sub'] . '&act=' . $content['action'] . '&w=' . $content['what'] . '&tid=' . ($content['sort']-1) . '&fid=' . $content['sort'] . '%}">{--HIGHER--}</a>';
} elseif ($content['sort'] > 0) {
'what' => $content['what'],
'title' => $content['title'],
'navi' => $NAVI,
- 'mode' => 'guest'
+ 'do' => 'guest'
);
// Load row template
- $OUT .= loadTemplate('admin_menu_overview_row', true, $content);
+ $OUT .= loadTemplate('admin_menu_overview_row', TRUE, $content);
} // END - while
// Add rows/sub
SQL_FREERESULT($result);
// Load template
- loadTemplate('admin_edit_guest_menu', false, $content);
+ loadTemplate('admin_edit_guest_menu', FALSE, $content);
} else {
// Menu entries are missing... (???)
displayMessage('{--ADMIN_NO_MENUS_FOUND--}');