X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fadmin-inc.php;h=f73c5c7782f40c452769ac04fabbe07a0b04019c;hp=f96c247a98d1e07dbe9edf4f3e6bdc095520c4fe;hb=c78089215285d52d483760699d07a96dfbbe0671;hpb=5a76136d3ab00e158fc9d0ee1b867bc06f9a8fbb diff --git a/inc/modules/admin/admin-inc.php b/inc/modules/admin/admin-inc.php index f96c247a98..f73c5c7782 100644 --- a/inc/modules/admin/admin-inc.php +++ b/inc/modules/admin/admin-inc.php @@ -349,25 +349,21 @@ function ADD_ADMIN_MENU($act, $wht, $return=false) { } $OUT .= " -  · "; - if (($menu == $act) && (empty($wht))) - { +  · "; + if (($menu == $act) && (empty($wht))) { $OUT .= ""; - } - else - { + } else { $OUT .= "["; } + $OUT .= $title; - if (($menu == $act) && (empty($wht))) - { + + if (($menu == $act) && (empty($wht))) { $OUT .= ""; - } - else - { + } else { $OUT .= "]"; } - $OUT .= " + $OUT .= " \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__); @@ -381,53 +377,47 @@ function ADD_ADMIN_MENU($act, $wht, $return=false) { \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 .= " + $OUT .= "\n"; } } @@ -652,7 +642,8 @@ function ADMIN_MAKE_MENU_SELECTION ($menu, $type, $name, $default="") { $handle = opendir(sprintf("%sinc/modules/%s/", constant('PATH'), $menu)) or mxchange_die("Cannot load menu ".$menu."!"); // Init the selection box - $OUT = " + \n"; // Walk through all files while ($file = readdir($handle)) { @@ -772,7 +763,7 @@ function ADMIN_CHANGE_ACTIVATION_STATUS ($IDs, $table, $row, $idRow = "id") { } // 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')); @@ -1001,7 +992,7 @@ function ADMIN_DELETE_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFu 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 @@ -1091,7 +1082,7 @@ function ADMIN_EDIT_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFunc 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
-  --> "; - if ($readable === true) - { - if ($wht == $wht_sub) - { +  --> "; + if ($readable === true) { + if ($wht == $wht_sub) { $OUT .= ""; - } - else - { + } else { $OUT .= "["; } - } - else - { + } else { $OUT .= ""; } + $OUT .= $title_what; - if ($readable === true) - { - if ($wht == $wht_sub) - { + + if ($readable === true) { + if ($wht == $wht_sub) { $OUT .= ""; - } - else - { + } else { $OUT .= "]"; } - } - else - { + } else { $OUT .= ""; } - $OUT .= "