}
$OUT .= "<tr>
<td class=\"admin_menu\" colspan=\"2\">
- <NOBR> <strong>·</strong> ";
- if (($menu == $act) && (empty($wht)))
- {
+ <nobr> <strong>·</strong> ";
+ if (($menu == $act) && (empty($wht))) {
$OUT .= "<strong>";
- }
- else
- {
+ } else {
$OUT .= "[<a href=\"{!URL!}/modules.php?module=admin&action=".$menu."\">";
}
+
$OUT .= $title;
- if (($menu == $act) && (empty($wht)))
- {
+
+ if (($menu == $act) && (empty($wht))) {
$OUT .= "</strong>";
- }
- else
- {
+ } else {
$OUT .= "</a>]";
}
- $OUT .= "</NOBR></td>
+ $OUT .= "</nobr></td>
</tr>\n";
$result_what = SQL_QUERY_ESC("SELECT what, title, descr FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`, id DESC",
array($menu), __FUNCTION__, __LINE__);
<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"admin_menu_sub\">\n";
while (list($wht_sub, $title_what, $desc_what) = SQL_FETCHROW($result_what)) {
// Filename
- $INC = sprintf("%sinc/modules/admin/what-%s.php", constant('PATH'), $wht_sub);
+ $INC = sprintf("inc/modules/admin/what-%s.php", $wht_sub);
if ((EXT_IS_ACTIVE("admins")) && (GET_EXT_VERSION("admins") > "0.2")) {
$ACL = ADMINS_CHECK_ACL("", $wht_sub);
} else {
// ACL is "allow"... hmmm
$ACL = true;
}
+
+ // Is the file readable?
$readable = INCLUDE_READABLE($INC);
+
+ // Access allowed?
if ($ACL === true) {
// Insert compiled title and description
$GLOBALS['menu']['title'][$wht_sub] = $title_what;
$GLOBALS['menu']['description'][$wht_sub] = $desc_what;
$OUT .= "<tr>
<td class=\"admin_menu\" colspan=\"2\">
- <NOBR> <strong>--></strong> ";
- if ($readable === true)
- {
- if ($wht == $wht_sub)
- {
+ <nobr> <strong>--></strong> ";
+ if ($readable === true) {
+ if ($wht == $wht_sub) {
$OUT .= "<strong>";
- }
- else
- {
+ } else {
$OUT .= "[<a href=\"{!URL!}/modules.php?module=admin&what=".$wht_sub."\">";
}
- }
- else
- {
+ } else {
$OUT .= "<i class=\"admin_note\">";
}
+
$OUT .= $title_what;
- if ($readable === true)
- {
- if ($wht == $wht_sub)
- {
+
+ if ($readable === true) {
+ if ($wht == $wht_sub) {
$OUT .= "</strong>";
- }
- else
- {
+ } else {
$OUT .= "</a>]";
}
- }
- else
- {
+ } else {
$OUT .= "</em>";
}
- $OUT .= "</NOBR></td>
+ $OUT .= "</nobr></td>
</tr>\n";
}
}
$handle = opendir(sprintf("%sinc/modules/%s/", constant('PATH'), $menu)) or mxchange_die("Cannot load menu ".$menu."!");
// Init the selection box
- $OUT = "<select name=\"".$name."\" class=\"admin_select\" size=\"1\">\n <option value=\"\">{--IS_TOP_MENU--}</option>\n";
+ $OUT = "<select name=\"".$name."\" class=\"admin_select\" size=\"1\">
+ <option value=\"\">{--IS_TOP_MENU--}</option>\n";
// Walk through all files
while ($file = readdir($handle)) {
} // END - foreach
// Output status
- LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_STATUS_CHANGED_1.$cnt.ADMIN_STATUS_CHANGED_2.count($IDs).ADMIN_STATUS_CHANGED_3);
+ LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('ADMIN_STATUS_CHANGED'), $cnt, count($IDs)));
} else {
// Nothing selected!
LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_NOTHING_SELECTED_CHANGE'));
LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_ALL_ENTRIES_REMOVED'));
} else {
// Some are still there :(
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(ADMIN_SOME_ENTRIES_NOT_DELETED, SQL_AFFECTEDROWS(), count($IDs)));
+ LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('ADMIN_SOME_ENTRIES_NOT_DELETED'), SQL_AFFECTEDROWS(), count($IDs)));
}
} else {
// List for deletion confirmation
LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_ALL_ENTRIES_EDITED'));
} else {
// Some are still there :(
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(ADMIN_SOME_ENTRIES_NOT_EDITED, $affected, count($IDs)));
+ LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('ADMIN_SOME_ENTRIES_NOT_EDITED'), $affected, count($IDs)));
}
} else {
// List for editing