X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-surfbar_stats.php;h=2696de21fae58a7ca0f4ffc0bb2ab0c7fd39ba7a;hp=12f405332d3059cf8fb8dd6f9c7e5a66fd941f09;hb=c47144dd555bbab4acdf9085e4623900dedb0e7c;hpb=0f700bd2b9e033aad0990f42739cd75d41e372ff diff --git a/inc/modules/admin/what-surfbar_stats.php b/inc/modules/admin/what-surfbar_stats.php index 12f405332d..2696de21fa 100644 --- a/inc/modules/admin/what-surfbar_stats.php +++ b/inc/modules/admin/what-surfbar_stats.php @@ -44,7 +44,7 @@ ADD_DESCR("admin", __FILE__); if (isset($_GET['url_id'])) { // Generate general statistics $result = SQL_QUERY_ESC("SELECT `userid`, `count` AS `total_visits`, UNIX_TIMESTAMP(`last_online`) AS `last_online` -FROM `"._MYSQL_PREFIX."_surfbar_stats` +FROM `{!_MYSQL_PREFIX!}_surfbar_stats` WHERE `url_id`=%s ORDER BY `userid` ASC", array(bigintval($_GET['url_id'])), __FILE__, __LINE__); @@ -61,10 +61,11 @@ ORDER BY `userid` ASC", $content['userid'] = ADMIN_USER_PROFILE_LINK($content['userid']); $content['total_visits'] = TRANSLATE_COMMA($content['total_visits']); $content['last_online'] = MAKE_DATETIME($content['last_online'], "2"); + $content['sw'] = $SW; // Load row template $OUT .= LOAD_TEMPLATE("admin_surfbar_url_stats_row", true, $content); - $cnt++; + $cnt++; $SW = 3 - $SW; } // END - while // Prepare content @@ -79,12 +80,12 @@ ORDER BY `userid` ASC", LOAD_TEMPLATE("admin_surfbar_url_stats", false, $content); } else { // No statistics so far - LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_SURFBAR_NO_URL_STATS); + LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_SURFBAR_NO_URL_STATS')); } } else { // Generate general statistics $result = SQL_QUERY("SELECT `userid`, COUNT(`url_id`) AS `visited_urls`, SUM(`count`) AS `total_visits` -FROM `"._MYSQL_PREFIX."_surfbar_stats` +FROM `{!_MYSQL_PREFIX!}_surfbar_stats` GROUP BY `userid` ORDER BY `userid` ASC", __FILE__, __LINE__); @@ -101,9 +102,11 @@ ORDER BY `userid` ASC", __FILE__, __LINE__); $content['userid'] = ADMIN_USER_PROFILE_LINK($content['userid']); $content['visited_urls'] = TRANSLATE_COMMA($content['visited_urls']); $content['total_visits'] = TRANSLATE_COMMA($content['total_visits']); + $content['sw'] = $SW; // Load row template $OUT .= LOAD_TEMPLATE("admin_surfbar_stats_row", true, $content); + $SW = 3 - $SW; } // END - while // Prepare content @@ -118,7 +121,7 @@ ORDER BY `userid` ASC", __FILE__, __LINE__); LOAD_TEMPLATE("admin_surfbar_stats", false, $content); } else { // No statistics so far - LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_SURFBAR_NO_STATS); + LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_SURFBAR_NO_STATS')); } }