while ($content = SQL_FETCHARRAY($result)) {
$OUT .= " <option value=\"".bigintval($content['userid'])."\"";
- if ($def == $content['userid']) $OUT .= " selected=\"selected\"";
+ if ($def == $content['userid']) $OUT .= ' selected="selected"';
$OUT .= ">".$content['surname']." ".$content['family']." (".bigintval($content['userid']).")</option>\n";
} // END - while
}
// Create a menu selection box for given menu system
-function ADMIN_MENU_SELECTION ($MODE, $default="", $defid="") {
+function ADMIN_MENU_SELECTION ($mode, $default="", $defid="") {
$wht = "`what` != ''";
- if ($MODE == "action") $wht = "(`what`='' OR `what` IS NULL) AND action !='login'";
+ if ($mode == "action") $wht = "(`what`='' OR `what` IS NULL) AND action !='login'";
$result = SQL_QUERY_ESC("SELECT %s, title FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE ".$wht." ORDER BY `sort`",
- array($MODE), __FUNCTION__, __LINE__);
+ array($mode), __FUNCTION__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// Load menu as selection
- $OUT = "<select name=\"".$MODE."_menu";
+ $OUT = "<select name=\"".$mode."_menu";
if ((!empty($defid)) || ($defid == "0")) $OUT .= "[".$defid."]";
$OUT .= "\" size=\"1\" class=\"admin_select\">
<option value=\"\">{--SELECT_NONE--}</option>\n";
// @TODO Try to rewrite this to $content = SQL_FETCHARRAY(). Please look some lines above for the dynamic query
while (list($menu, $title) = SQL_FETCHROW($result)) {
$OUT .= " <option value=\"".$menu."\"";
- if ((!empty($default)) && ($default == $menu)) $OUT .= " selected=\"selected\"";
+ if ((!empty($default)) && ($default == $menu)) $OUT .= ' selected="selected"';
$OUT .= ">".$title."</option>\n";
} // END - while
// Is that part different from the overview?
if ($part != "overview") {
$OUT .= " <option value=\"".$part."\"";
- if ($part == $default) $OUT .= " selected=\"selected\"";
+ if ($part == $default) $OUT .= ' selected="selected"';
$OUT .= ">".$part."</option>\n";
} // END - if
} // END - if
// Check "logical-area-mode"
function ADMIN_CHECK_MENU_MODE () {
// Set the global mode as the mode for all admins
- $MODE = getConfig('admin_menu');
- $ADMIN = $MODE;
+ $mode = getConfig('admin_menu');
+ $ADMIN = $mode;
// Get admin id
$aid = GET_CURRENT_ADMIN_ID();
}
// Check what the admin wants and set it when it's not the global mode
- if ($ADMIN != "global") $MODE = $ADMIN;
+ if ($ADMIN != "global") $mode = $ADMIN;
// Return admin-menu's mode
- return $MODE;
+ return $mode;
}
// Change activation status