<?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 *
* -------------------------------------------------------------------- *
* Kurzbeschreibung : Statistiken fuer die Cache-Erweiterung *
* -------------------------------------------------------------------- *
- * *
+ * $Revision:: $ *
+ * $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 *
+ * Copyright (c) 2003 - 2009 by Roland Haeder *
+ * Copyright (c) 2009, 2010 by Mailer Developer Team *
* For more information visit: http://www.mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
************************************************************************/
// 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__);
+addMenuDescription('admin', __FILE__);
-// Calculate total hits
-$totalHits = ($_CONFIG['db_hits'] + $_CONFIG['cache_hits']);
+// Activated?
+if (ifStatsAreEnabled()) {
+ // Prepare data for the template
+ $content['db_hits'] = getStatsEntry('db_hits');
+ $content['cache_hits'] = getStatsEntry('cache_hits');
+ $content['total_hits'] = (getStatsEntry('db_hits') + getStatsEntry('cache_hits'));
+ $content['cache_perc'] = (getStatsEntry('cache_hits') / $content['total_hits'] * 100);
-// Prepare data for the template
-define('__DB_HITS' , TRANSLATE_COMMA($_CONFIG['db_hits']));
-define('__CACHE_HITS', TRANSLATE_COMMA($_CONFIG['cache_hits']));
-define('__TOTAL_HITS', TRANSLATE_COMMA($totalHits));
-define('__CACHE_PERC', TRANSLATE_COMMA(($_CONFIG['cache_hits'] / $totalHits * 100)));
-
-// Load template
-LOAD_TEMPLATE("admin_cache_stats");
+ // Load template
+ loadTemplate('admin_cache_stats', false, $content);
+} else {
+ // Deactivated, which is good for performance
+ loadTemplate('admin_settings_saved', false, '{--ADMIN_CACHE_DB_STATS_DEACTIVATED--}');
+}
-//
+// [EOF]
?>