]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-usage.php
Floater added, admin_header.tpl added, EL code improved:
[mailer.git] / inc / modules / admin / what-usage.php
index 1ff86f45f9fc1816818da5a8987539ad87cfb4ef..cf5ba9b2ad9a6d14520798aa010801f7f44a51bc 100644 (file)
@@ -14,8 +14,6 @@
  * $Date::                                                            $ *
  * $Tag:: 0.2.1-FINAL                                                 $ *
  * $Author::                                                          $ *
- * Needs to be in all Files and every File needs "svn propset           *
- * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
  * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
@@ -40,7 +38,7 @@
 // Some security stuff...
 if ((!defined('__SECURITY')) || (!isAdmin())) {
        die();
-}
+} // END - if
 
 // Add description as navigation point
 addMenuDescription('admin', __FILE__);
@@ -48,6 +46,12 @@ addMenuDescription('admin', __FILE__);
 // Base directory (should be moved to database)
 $usage = getConfig('usage_base') . '/';
 
+// Init FQFN
+$FQFN = sprintf("%s%s/index.html",
+       getPath(),
+       getConfig('usage_base')
+);
+
 if (isGetRequestParameterSet('image')) {
        if (getRequestParameter('type') == 'usage') {
                $FQFN = sprintf("%s%s/usage.png",
@@ -71,12 +75,7 @@ if (isGetRequestParameterSet('image')) {
                imagedestroy($image);
        }
        shutdown();
-} elseif (!isGetRequestParameterSet('usage')) {
-       $FQFN = sprintf("%s%s/index.html",
-               getPath(),
-               getConfig('usage_base')
-       );
-} else {
+} elseif (isGetRequestParameterSet('usage')) {
        $FQFN = sprintf("%s%s/usage_%s.html",
                getPath(),
                getConfig('usage_base'),
@@ -94,7 +93,7 @@ if ((!empty($FQFN)) && (isFileReadable($FQFN))) {
        $content = str_replace('daily_usage_' , '{?URL?}/modules.php?module=admin&what=' . getWhat() . '&type=daily&image='     , $content);
        $content = str_replace('hourly_usage_', '{?URL?}/modules.php?module=admin&what=' . getWhat() . '&type=hourly&image='    , $content);
        $content = str_replace('ctry_usage_'  , '{?URL?}/modules.php?module=admin&what=' . getWhat() . '&type=ctry&image='      , $content);
-       $content = str_replace('usage_'       , '{?URL?}/modules.php?module=admin&what=' . getWhat() . '&usage='                , str_replace('.html', '', $content));
+       $content = str_replace('usage_'       , '{?URL?}/modules.php?module=admin&what=' . getWhat() . '&usage='                    , str_replace('.html', '', $content));
        $test = strtolower($content);
 
        // Do we need to strip out above and including <body> plus trailing </html> tag?