X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-stats_mods.php;h=ade4dda8f1cd96c0d5281f829967b7cad73cc2fe;hb=64a295f456672ada94a6e957543de554be2792c7;hp=9d9fc055063be13c1e9bdb375c7965379edcf23d;hpb=cca98f57dff720b174d21d071cee8303462485d7;p=mailer.git
diff --git a/inc/modules/admin/what-stats_mods.php b/inc/modules/admin/what-stats_mods.php
index 9d9fc05506..ade4dda8f1 100644
--- a/inc/modules/admin/what-stats_mods.php
+++ b/inc/modules/admin/what-stats_mods.php
@@ -1,6 +1,6 @@
$SW,
- 'title' => $title,
- 'action' => $act,
- 'clicks' => $clicks,
- );
+ $OUT = ''; $SW = 2;
+ while ($content = SQL_FETCHARRAY($result)) {
+ // Add color switch
+ $content['sw'] = $SW;
// Load row template
- $OUT .= LOAD_TEMPLATE("admin_mods_stats2_row", true, $content);
+ $OUT .= loadTemplate('admin_mods_stats2_row', true, $content);
// Switch colors
$SW = 3 - $SW;
- }
+ } // END - while
// Free memory
SQL_FREERESULT($result);
- define('__MODS_ROWS', $OUT);
// Load final template
- LOAD_TEMPLATE("admin_mods_stats2");
-}
- else
-{
+ loadTemplate('admin_mods_stats2', false, $OUT);
+} else {
// Load module statics
- $result = SQL_QUERY("SELECT module, title, clicks FROM `{!MYSQL_PREFIX!}_mod_reg` ORDER BY clicks DESC, module", __FILE__, __LINE__);
- $SW = 2; $OUT = "";
- while(list($mod, $title, $clicks) = SQL_FETCHROW($result))
- {
- if (empty($title)) $title = "---";
- if (($mod == "index") || ($mod == "login"))
- {
+ $result = SQL_QUERY("SELECT module, title, clicks FROM `{?_MYSQL_PREFIX?}_mod_reg` ORDER BY clicks DESC, module", __FILE__, __LINE__);
+ $OUT = ''; $SW = 2;
+ while ($content = SQL_FETCHARRAY($result)) {
+ if (empty($content['title'])) $content['title'] = '---';
+
+ if (($content['module'] == 'index') || ($content['module'] == 'login')) {
// Add link to detail statistics
- $mod = "".$mod."";
- }
- // Prepare array for the template
- $content = array(
- 'sw' => $SW,
- 'title' => $title,
- 'mod' => $mod,
- 'clicks' => $clicks,
- );
+ $content['module'] = "".$content['module']."";
+ } // END - if
+
+ // Add color switch
+ $content['sw'] = $SW;
// Load row template
- $OUT .= LOAD_TEMPLATE("admin_mods_stats_row", true, $content);
- }
+ $OUT .= loadTemplate('admin_mods_stats_row', true, $content);
+ } // END - while
// Free memory
SQL_FREERESULT($result);
- define('__MODS_ROWS', $OUT);
// Load final template
- LOAD_TEMPLATE("admin_mods_stats");
+ loadTemplate('admin_mods_stats', false, $OUT);
}
-//
+
+// [EOF]
?>