X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=0.2.1%2Finc%2Fmodules%2Fadmin%2Fwhat-usage.php;h=c235fc02eec3a3c867c41a85e980825539931597;hb=7bc25dd08431c94ce9edca131d56c1a36b13c28a;hp=169f0d042067d51d503549b5d724a45fa21ba71a;hpb=157ee010917df5ca07e6d31b42f67417b2516d74;p=mailer.git diff --git a/0.2.1/inc/modules/admin/what-usage.php b/0.2.1/inc/modules/admin/what-usage.php index 169f0d0420..c235fc02ee 100644 --- a/0.2.1/inc/modules/admin/what-usage.php +++ b/0.2.1/inc/modules/admin/what-usage.php @@ -1,107 +1,107 @@ - 0) $_GET['image'] = substr($_GET['image'], 0, strpos($_GET['image'], "\\")); - $file = PATH.$usage.$_GET['type']."_usage_".$_GET['image'].".png"; - } - if (file_exists($file)) - { - $image = imagecreatefrompng($file); - header("Content-type: image/png"); - imagepng($image); - imagedestroy($image); - } - exit(); -} - elseif (empty($_GET['usage'])) -{ - $file = PATH.$usage."index.html"; -} - else -{ - $file = sprintf("%s%susage_%s.html", - PATH, - $usage, - SQL_ESCAPE($_GET['usage']) - ); -} -if ($file !="") -{ - if (file_exists($file) && is_readable($file)) - { - $tmpl_file = implode("", file($file)); - $tmpl_file = addslashes($tmpl_file); - $tmpl_file = "\$content=\"".$tmpl_file."\";"; - eval($tmpl_file); - $content = str_replace("usage.png", URL."/modules.php?module=admin&what=".$GLOBALS['what']."&type=usage&image=usage", $content); - $content = str_replace("daily_usage_", URL."/modules.php?module=admin&what=".$GLOBALS['what']."&type=daily&image=", $content); - $content = str_replace("hourly_usage_", URL."/modules.php?module=admin&what=".$GLOBALS['what']."&type=hourly&image=", $content); - $content = str_replace("ctry_usage_", URL."/modules.php?module=admin&what=".$GLOBALS['what']."&type=ctry&image=", $content); - $content = str_replace("usage_", URL."/modules.php?module=admin&what=".$GLOBALS['what']."&usage=", str_replace(".html", "", $content)); - // Disabled due to too much trouble - //$content = str_replace("HREF=\"http://", "href=\"".URL."/modules.php?module=loader&url=http://", $content); - $test = strtolower($content); - $body_start = strpos($test, ""); - if (($body_start > 0) && ($body_end > 0)) - { - $content = substr(substr($content, 0, $body_end), $body_start); - $content = substr($content, strpos($content, ">") + 1); - OUTPUT_HTML ("
- ".$content." -
"); - } - } -} -CLOSE_TABLE(); -// -?> + 0) $_GET['image'] = substr($_GET['image'], 0, strpos($_GET['image'], "\\")); + $file = PATH.$usage.$_GET['type']."_usage_".$_GET['image'].".png"; + } + if (file_exists($file)) + { + $image = imagecreatefrompng($file); + header("Content-type: image/png"); + imagepng($image); + imagedestroy($image); + } + exit(); +} + elseif (empty($_GET['usage'])) +{ + $file = PATH.$usage."index.html"; +} + else +{ + $file = sprintf("%s%susage_%s.html", + PATH, + $usage, + SQL_ESCAPE($_GET['usage']) + ); +} +if ($file !="") +{ + if (file_exists($file) && is_readable($file)) + { + $tmpl_file = implode("", file($file)); + $tmpl_file = addslashes($tmpl_file); + $tmpl_file = "\$content=\"".$tmpl_file."\";"; + eval($tmpl_file); + $content = str_replace("usage.png", URL."/modules.php?module=admin&what=".$GLOBALS['what']."&type=usage&image=usage", $content); + $content = str_replace("daily_usage_", URL."/modules.php?module=admin&what=".$GLOBALS['what']."&type=daily&image=", $content); + $content = str_replace("hourly_usage_", URL."/modules.php?module=admin&what=".$GLOBALS['what']."&type=hourly&image=", $content); + $content = str_replace("ctry_usage_", URL."/modules.php?module=admin&what=".$GLOBALS['what']."&type=ctry&image=", $content); + $content = str_replace("usage_", URL."/modules.php?module=admin&what=".$GLOBALS['what']."&usage=", str_replace(".html", "", $content)); + // Disabled due to too much trouble + //$content = str_replace("HREF=\"http://", "href=\"".URL."/modules.php?module=loader&url=http://", $content); + $test = strtolower($content); + $body_start = strpos($test, ""); + if (($body_start > 0) && ($body_end > 0)) + { + $content = substr(substr($content, 0, $body_end), $body_start); + $content = substr($content, strpos($content, ">") + 1); + OUTPUT_HTML ("
+ ".$content." +
"); + } + } +} +CLOSE_TABLE(); +// +?>