* $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`,`descr` FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE ".$AND." AND `id`=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT `title`, `action`, `what`, `descr` FROM `{?_MYSQL_PREFIX?}_admin_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_admin_menu_row', true, $content);
+ $OUT .= loadTemplate('admin_edit_admin_menu_row', TRUE, $content);
} else {
// Entry not found?
$content = array(
);
// Load row template
- $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_admin_menu_form', false, $content);
+ loadTemplate('admin_edit_admin_menu_form', FALSE, $content);
} elseif ((isFormSent('delete')) && (ifPostContainsSelections()) && (!isDemoModeActive())) {
// Prepare misc content
$content['sub'] = $subMenu;
'count' => $count,
'sel' => $sel,
);
- $OUT .= loadTemplate('admin_delete_admin_menu_row', true, $content);
+ $OUT .= loadTemplate('admin_delete_admin_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_admin_menu', false, $content);
+ loadTemplate('admin_delete_admin_menu', FALSE, $content);
} elseif ((isFormSent()) && (!isDemoModeActive())) {
// An action is done...
switch (postRequestElement('ok')) {
doAdminProcessMenuWeightning('admin', $AND);
// Run SQL
- $result = SQL_QUERY("SELECT `id`,`action`,`what`,`title`,`sort` FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE ".$AND." ORDER BY `sort` ASC", __FILE__, __LINE__);
+ $result = SQL_QUERY("SELECT `id`, `action`, `what`, `title`, `sort` FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE ".$AND." ORDER BY `sort` ASC", __FILE__, __LINE__);
- // Do we have entries?
+ // Are there entries?
if (!SQL_HASZERONUMS($result)) {
// Init variables
$OUT = '';
if (($content['sort'] == '0') || (($content['sort'] == 1) && (!empty($subMenu)))) {
// Is highest position
$content['navi'] = '<a href="{%url=modules.php?module=admin&what=adminedit&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
$content['navi'] = '<a href="{%url=modules.php?module=admin&what=adminedit&sub=' . $content['sub'] . '&act=' . $content['action'] . '&w=' . $content['what'] . '&tid=' . ($content['sort']-1) . '&fid=' . $content['sort'] . '%}">{--HIGHER--}</a>';
} elseif ($content['sort'] > 0) {
}
// Add more data to $content
- $content['mode'] = 'admin';
+ $content['do'] = 'admin';
// Load row template and switch colors
- $OUT .= loadTemplate('admin_menu_overview_row', true, $content);
+ $OUT .= loadTemplate('admin_menu_overview_row', TRUE, $content);
} // END - switch
// Remember all rows
SQL_FREERESULT($result);
// Load template
- loadTemplate('admin_edit_admin_menu', false, $content);
+ loadTemplate('admin_edit_admin_menu', FALSE, $content);
} else {
// Menu entries are missing... (???)
displayMessage('{--ADMIN_NO_MENUS_FOUND--}');