// 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__);
+ $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();
} // END - foreach
} // END - if
- $OUT = "<select class=\"admin_select\" name=\"sort\" size=\"1\">
- <option value=\"\">{--IS_FIRST_MENU--}</option>\n";
+ $OUT = '<select class="form_select" name="sort" size="1">
+ <option value="">{--ADMIN_IS_FIRST_MENU--}</option>';
foreach ($below as $key => $m) {
if (is_array($m)) {
foreach ($m as $key2 => $m2) {
- $OUT .= " <option value=\"" . $m2 . "\">" . $titles[$key][$key2];
+ $OUT .= '<option value="' . $m2 . '">' . $titles[$key][$key2];
foreach ($menus as $k => $v) {
if (($v == $key) && (!is_array($v))) {
- $OUT .= " (" . $titles[$k] . ')';
+ $OUT .= ' (' . $titles[$k] . ')';
} // END - if
} // END - foreach
- $OUT .= "</option>\n";
+ $OUT .= '</option>';
} // END - foreach
} else {
- $OUT .= " <option value=\"" . $m . "\">" . $titles[$key] . "</option>\n";
+ $OUT .= '<option value="' . $m . '">' . $titles[$key] . '</option>';
}
}
- $OUT .= "</select>";
+ $OUT .= '</select>';
// Prepare selection boxes for template
$content['below_selection'] = $OUT;
$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')) {