X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-stats_mods.php;h=15657d9ad508e3548b0379dd82d04f30cbede1fb;hb=e5527fd38a6585c8466dc28d013f12d21eb7c07a;hp=4380734071d81ccf8731f3b6b6f751d71f749c7f;hpb=357b2ca133fc1f89db74097955c366cb4bee6996;p=mailer.git diff --git a/inc/modules/admin/what-stats_mods.php b/inc/modules/admin/what-stats_mods.php index 4380734071..15657d9ad5 100644 --- a/inc/modules/admin/what-stats_mods.php +++ b/inc/modules/admin/what-stats_mods.php @@ -1,7 +1,7 @@ $SW, - 'title' => $title, - 'action' => $act, - 'clicks' => $clicks, - ); - + $result = sqlQueryEscaped("SELECT `action`, `title`, `counter` FROM `{?_MYSQL_PREFIX?}_%s_menu` WHERE `what` != '' AND `what` IS NOT NULL ORDER BY `counter` DESC, `action` ASC, `sort` ASC", + array($mod), __FILE__, __LINE__); + $OUT = ''; + while ($content = sqlFetchArray($result)) { // Load row template - $OUT .= LOAD_TEMPLATE("admin_mods_stats2_row", true, $content); - - // Switch colors - $SW = 3 - $SW; - } + $OUT .= loadTemplate('admin_list_mods_stats2_row', TRUE, $content); + } // END - while // Free memory - SQL_FREERESULT($result); - define('__MODS_ROWS', $OUT); + sqlFreeResult($result); // Load final template - LOAD_TEMPLATE("admin_mods_stats2"); -} - else -{ + loadTemplate('admin_list_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 = sqlQuery('SELECT `module`, `title`, `clicks` FROM `{?_MYSQL_PREFIX?}_mod_reg` ORDER BY `clicks` DESC, `module` ASC', __FILE__, __LINE__); + $OUT = ''; + while ($content = sqlFetchArray($result)) { + 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 // Load row template - $OUT .= LOAD_TEMPLATE("admin_mods_stats_row", true, $content); - } + $OUT .= loadTemplate('admin_list_mods_stats_row', TRUE, $content); + } // END - while // Free memory - SQL_FREERESULT($result); - define('__MODS_ROWS', $OUT); + sqlFreeResult($result); // Load final template - LOAD_TEMPLATE("admin_mods_stats"); + loadTemplate('admin_list_mods_stats', FALSE, $OUT); } -// + +// [EOF] ?>