X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-usage.php;h=b30a2f3e6f3f8bfca3baae5533b1d74f40dcefc7;hp=09da0a61ee5b991fc1c2a9ca447fe2d6f92f20ea;hb=4001187f22197f55e5a1f211fc8defcc180f7c32;hpb=7989ec603971c0dc8dc35d8be4e72f8098b83baa diff --git a/inc/modules/admin/what-usage.php b/inc/modules/admin/what-usage.php index 09da0a61ee..b30a2f3e6f 100644 --- a/inc/modules/admin/what-usage.php +++ b/inc/modules/admin/what-usage.php @@ -43,19 +43,19 @@ ADD_DESCR("admin", __FILE__); // Base directory (should be moved to database) $usage = getConfig('usage_base')."/"; -if (!empty($_GET['image'])) { - if ($_GET['type'] == "usage") { +if (REQUEST_ISSET_GET(('image'))) { + if (REQUEST_GET('type') == "usage") { $FQFN = sprintf("%s%s/usage.png", constant('PATH'), getConfig('usage_base') ); } else { - if (strpos($_GET['image'], "\\") > 0) $_GET['image'] = substr($_GET['image'], 0, strpos($_GET['image'], "\\")); + if (strpos(REQUEST_GET('image'), "\\") > 0) REQUEST_SET_GET('image', substr(REQUEST_GET('image'), 0, strpos(REQUEST_GET('image'), "\\"))); $FQFN = sprintf("%s%s/%s_usage_%s.png", constant('PATH'), getConfig('usage_base'), - SQL_ESCAPE($_GET['type']), - SQL_ESCAPE($_GET['image']) + REQUEST_GET(('type')), + REQUEST_GET(('image')) ); } @@ -65,8 +65,8 @@ if (!empty($_GET['image'])) { imagepng($image); imagedestroy($image); } - exit(); -} elseif (empty($_GET['usage'])) { + exit; +} elseif (!REQUEST_ISSET_GET(('usage'))) { $FQFN = sprintf("%s%s/index.html", constant('PATH'), getConfig('usage_base') @@ -75,7 +75,7 @@ if (!empty($_GET['image'])) { $FQFN = sprintf("%s%s/usage_%s.html", constant('PATH'), getConfig('usage_base'), - SQL_ESCAPE($_GET['usage']) + REQUEST_GET(('usage')) ); } @@ -111,7 +111,7 @@ if ((!empty($FQFN)) && (FILE_READABLE($FQFN))) { "); } else { // Nothing to load, then we have no directory "usage" - LOAD_TEMPLATE("admin_settings_saved", false, sprintf(ADMIN_USAGE_DIRECTORY_404, getConfig('usage_base'))); + LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('ADMIN_USAGE_DIRECTORY_404'), getConfig('usage_base'))); } //