$menus = array(); $titles = array(); $below = array();
// Get all available main menus
- $result = SQL_QUERY("SELECT action, title, sort FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE (`what`='' OR `what` IS NULL) ORDER BY `sort`", __FILE__, __LINE__);
- if (SQL_NUMROWS($result) > 0) {
+ $result = SQL_QUERY("SELECT `action`, `title`, `sort` FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE (`what`='' OR `what` IS NULL) ORDER BY `sort` ASC", __FILE__, __LINE__);
+ if (!SQL_HASZERONUMS($result)) {
// Read menu structure
// @TODO Cant this be rewritten?
while ($content = SQL_FETCHARRAY($result)) {
// Load sub menus :)
foreach ($menus as $key_main => $value_main) {
- $result = SQL_QUERY_ESC("SELECT `what`, `title`, `sort` FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`",
- array($value_main), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) > 0) {
+ $result = SQL_QUERY_ESC("SELECT `what`, `title`, `sort` FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort` ASC",
+ array($value_main), __FILE__, __LINE__);
+ if (!SQL_HASZERONUMS($result)) {
// Init arrays
$menus[$value_main] = array();
$titles[$value_main] = array();
}
}
- $OUT = ' <select class="admin_select" name="sort" size="1">
- <option value="0">{--IS_FIRST_MENU--}</option>';
+ $OUT = ' <select class="form_select" name="sort" size="1">
+ <option value="0">{--ADMIN_IS_FIRST_MENU--}</option>';
foreach ($below as $key => $m) {
if (is_array($m)) {
foreach ($m as $key2 => $m2) {
$content['action_selection'] = adminAddMenuSelectionBox('admin', 'action', 'menu');
// Display form
- loadTemplate('admin_admin_add', false, $content);
+ loadTemplate('admin_add_admin_menu', false, $content);
} elseif (!isDemoModeActive()) {
// Insert new menu entry
if (isPostRequestParameterSet('menu')) {
), __FILE__, __LINE__
);
}
- loadTemplate('admin_settings_saved', false, getMessage('SETTINGS_SAVED'));
+ loadTemplate('admin_settings_saved', false, '{--SETTINGS_SAVED--}');
} else {
// Is demo login!
- loadTemplate('admin_settings_saved', false, getMessage('SETTINGS_NOT_SAVED'));
+ loadTemplate('admin_settings_saved', false, '{--SETTINGS_NOT_SAVED--}');
}
// [EOF]