}
// Add menu description pending on given file name (without path!)
-function ADD_DESCR ($ACC_LVL, $file, $return = false, $output = true) {
+function ADD_DESCR ($ACC_LVL, $FQFN, $return = false, $output = true) {
global $NAV_DEPTH;
- // Use only filename of the file ;)
- $file = basename($file);
+ // Use only filename of the FQFN...
+ $file = basename($FQFN);
// Init variables
- $LINK_ADD = ""; $OUT = ""; $AND = "";
+ $LINK_ADD = "";
+ $OUT = "";
+ $AND = "";
// First we have to do some analysis...
if (substr($file, 0, 7) == "action-") {
// This is an action file!
$type = "action";
$search = substr($file, 7);
- switch ($ACC_LVL)
- {
+ switch ($ACC_LVL) {
case "admin":
$modCheck = "admin";
break;
$type = "what";
$search = substr($file, 5);
$AND = "";
- switch ($ACC_LVL)
- {
+ switch ($ACC_LVL) {
case "admin":
$modCheck = "admin";
break;
$AND .= " AND `action`='".GET_ACTION($ACC_LVL, $dummy)."'";
} elseif (($ACC_LVL == "sponsor") || ($ACC_LVL == "engine")) {
// Sponsor / engine menu
- $type = "what";
- $search = $file;
+ $type = "what";
+ $search = $file;
$modCheck = $GLOBALS['module'];
- $AND = "";
+ $AND = "";
} else {
// Other
- $type = "menu";
- $search = $file;
+ $type = "menu";
+ $search = $file;
$modCheck = $GLOBALS['module'];
- $AND = "";
+ $AND = "";
}
+
+ // Begin the navigation line
if ((!isset($NAV_DEPTH)) && (!$return)) {
$NAV_DEPTH = 0;
$prefix = "<div class=\"you_are_here\">{--YOU_ARE_HERE--} <strong><a class=\"you_are_here\" href=\"{!URL!}/modules.php?module=".$GLOBALS['module'].$LINK_ADD."\">Home</a></strong>";
}
// Get password hash from administrator's login name
-function GET_ADMIN_HASH ($aid)
-{
+function GET_ADMIN_HASH ($aid) {
global $cacheArray;
$ret = "-1";
if (isset($cacheArray['admins']['password'][$aid])) {
// Both are arrays
foreach ($id as $idx => $value) {
$ret .= "<option value=\"".$value."\"";
- if ($default == $value) $ret .= " selected checked";
+ if ($default == $value) $ret .= " selected=\"selected\"";
$ret .= ">".$name[$idx]."</option>\n";
} // END - foreach
} // END - if
while (list($value, $title, $add) = SQL_FETCHROW($result)) {
if (empty($special)) $add = "";
$ret .= "<option value=\"".$value."\"";
- if ($default == $value) $ret .= " selected checked";
+ if ($default == $value) $ret .= " selected=\"selected\"";
if (!empty($add)) $add = " (".$add.")";
$ret .= ">".$title.$add."</option>\n";
} // END - while