if (SQL_NUMROWS($result_action) == 1) {
// Is valid but does the inlcude file exists?
- $INC = sprintf("%sinc/modules/admin/action-%s.php", PATH, $act);
+ $INC = sprintf("inc/modules/admin/action-%s.php", $act);
if ((FILE_READABLE($INC)) && (VALIDATE_MENU_ACTION("admin", $act, $wht)) && (__ACL_ALLOW == true)) {
// Ok, we finally load the admin action module
- require($INC);
+ LOAD_INC($INC);
} elseif (__ACL_ALLOW == false) {
// Access denied
LOAD_TEMPLATE("admin_menu_failed", false, getMessage('ADMIN_ACCESS_DENIED'));
<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", PATH, $wht_sub);
+ $INC = sprintf("%sinc/modules/admin/what-%s.php", constant('PATH'), $wht_sub);
if ((EXT_IS_ACTIVE("admins")) && (GET_EXT_VERSION("admins") > "0.2")) {
$ACL = ADMINS_CHECK_ACL("", $wht_sub);
} else {
// Generate a selection box
function ADMIN_MAKE_MENU_SELECTION ($menu, $type, $name, $default="") {
// Open the requested menu directory
- $handle = opendir(sprintf("%sinc/modules/%s/", PATH, $menu)) or mxchange_die("Cannot load menu ".$menu."!");
+ $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";
// Is this a PHP script?
if (($file != ".") && ($file != "..") && ($file != "lost+found") && (strpos($file, "".$type."-") > -1) && (strpos($file, ".php") > 0)) {
// Then test if the file is readable
- $test = sprintf("%sinc/modules/%s/%s", PATH, $menu, $file);
+ $test = sprintf("%sinc/modules/%s/%s", constant('PATH'), $menu, $file);
// Is the file there?
if (FILE_READABLE($test)) {