]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-cache_stats.php
Updated copyright notice as there are changes in this year
[mailer.git] / inc / modules / admin / what-cache_stats.php
index 684e3b60206142e0fc1bde76ae8e9b6ebb4f3a0a..735b3a3abc420a77199357ac712f27aeaf16a03c 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /************************************************************************
- * MXChange v0.2.1                                    Start: 04/29/2005 *
- * ================                             Last change: 04/29/2005 *
+ * Mailer v0.2.1-FINAL                                Start: 04/29/2005 *
+ * ===================                          Last change: 04/29/2005 *
  *                                                                      *
  * -------------------------------------------------------------------- *
  * File              : what-cache_stats.php                             *
  * $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 - 2008 by Roland Haeder                           *
- * For more information visit: http://www.mxchange.org                  *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009 - 2013 by Mailer Developer Team                   *
+ * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
  * it under the terms of the GNU General Public License as published by *
  ************************************************************************/
 
 // Some security stuff...
-if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
-       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
-       require($INC);
-}
+if ((!defined('__SECURITY')) || (!isAdmin())) {
+       die();
+} // END - if
 
 // Add description as navigation point
-ADD_DESCR('admin', __FILE__);
-
-// Calculate total hits
-$totalHits = (getConfig('db_hits') + getConfig('cache_hits'));
+addYouAreHereLink('admin', __FILE__);
 
-// Prepare data for the template
-define('__DB_HITS'   , TRANSLATE_COMMA(getConfig('db_hits')));
-define('__CACHE_HITS', TRANSLATE_COMMA(getConfig('cache_hits')));
-define('__TOTAL_HITS', TRANSLATE_COMMA($totalHits));
-define('__CACHE_PERC', TRANSLATE_COMMA((getConfig('cache_hits') / $totalHits * 100)));
+// Activated?
+if (ifInternalStatsEnabled()) {
+       // Prepare data for the template
+       $content['total_hits'] = (getStatsEntry('db_hits') + getStatsEntry('cache_hits'));
+       $content['cache_perc'] = (getStatsEntry('cache_hits') / $content['total_hits'] * 100);
 
-// Load template
-LOAD_TEMPLATE("admin_cache_stats");
+       // Load template
+       loadTemplate('admin_cache_stats', FALSE, $content);
+} else {
+       // Deactivated, which is good for performance
+       displayMessage('{--ADMIN_CACHE_DB_STATS_DEACTIVATED--}');
+}
 
-//
+// [EOF]
 ?>