templates/de/html/admin/admin_sponsor_paytypes.tpl -text
templates/de/html/admin/admin_sub_points.tpl -text
templates/de/html/admin/admin_sub_points_all.tpl -text
+templates/de/html/admin/admin_surfbar_stats.tpl -text
+templates/de/html/admin/admin_surfbar_stats_row.tpl -text
+templates/de/html/admin/admin_surfbar_url_stats.tpl -text
+templates/de/html/admin/admin_surfbar_url_stats_row.tpl -text
templates/de/html/admin/admin_task_holiday.tpl -text
templates/de/html/admin/admin_theme_404.tpl -text
templates/de/html/admin/admin_theme_edit.tpl -text
define('SERVER_URL', "http://www.mxchange.org");
// This current patch level
-define('CURR_SVN_REVISION', "507");
+define('CURR_SVN_REVISION', "508");
// Take a prime number which is long (if you know a longer one please try it out!)
define('_PRIME', 591623);
define('ADMIN_SURFBAR_URL_NOT_ADDED', "URL wurde wegen Fehler nicht hinzugefügt. Ist die URL bereits vorhanden?");
define('ADMIN_SURFBAR_ADD_URL', "URL hinzufügen");
define('ADMIN_BUILD_STATUS_HANDLER', "Status-Handler");
+define('ADMIN_SURFBAR_NO_STATS', "Keine Surfbar-Statistiken vorhanden!");
+define('ADMIN_SURFBAR_STATS_TITLE', "Mitglieder-Statistik der Surfbar");
+define('ADMIN_SURFBAR_VISITED_URLS', "Aufgerufene URLs");
+define('ADMIN_SURFBAR_TOTAL_VISITS', "Gesamtbesuche");
+define('ADMIN_SURFBAR_TOTALS', "Zusammenfassung");
+define('ADMIN_SURFBAR_LAST_ONLINE', "Letzter Aufruf der URL");
+define('ADMIN_SURFBAR_URL_STATS_TITLE', "URL-bezogene Statistik der Surfbar");
// Admin titles
define('ADMIN_SURFBAR_LIST_URLS_TITLE', "Surfbar - URLs aufisten");
//
function RALLYE_GET_REFCOUNT($uid, $old=0) {
global $_CONFIG, $cacheArray;
+
// Check current refs
if (GET_EXT_VERSION("cache") >= "0.1.2") {
// Get refs from cache
// Add description as navigation point
ADD_DESCR("admin", __FILE__);
+// Is the 'url_id' set?
+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`
+WHERE `url_id`=%s
+ORDER BY `userid` ASC",
+ array(bigintval($_GET['url_id'])), __FILE__, __LINE__);
+
+ // Entries found?
+ if (SQL_NUMROWS($result) > 0) {
+ // Get all rows
+ $OUT = ""; $SW = 2; $cnt = 0; $visits = 0;
+ while ($content = SQL_FETCHARRAY($result)) {
+ // Count totals
+ $visits += $content['total_visits'];
+
+ // "Translate" some data
+ $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");
+
+ // Load row template
+ $OUT .= LOAD_TEMPLATE("admin_surfbar_url_stats_row", true, $content);
+ $cnt++;
+ } // END - while
+
+ // Prepare content
+ $content = array(
+ 'rows' => $OUT,
+ 'userids' => $cnt,
+ 'visits' => $visits
+ );
+
+
+ // Load main template
+ LOAD_TEMPLATE("admin_surfbar_url_stats", false, $content);
+ } else {
+ // No statistics so far
+ LOAD_TEMPLATE("admin_settings_saved", false, 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`
+GROUP BY `userid`
+ORDER BY `userid` ASC", __FILE__, __LINE__);
+
+ // Entries found?
+ if (SQL_NUMROWS($result) > 0) {
+ // Get all rows
+ $OUT = ""; $SW = 2; $urls = 0; $visits = 0;
+ while ($content = SQL_FETCHARRAY($result)) {
+ // Count totals
+ $urls += $content['visited_urls'];
+ $visits += $content['total_visits'];
+
+ // "Translate" some data
+ $content['userid'] = ADMIN_USER_PROFILE_LINK($content['userid']);
+ $content['visited_urls'] = TRANSLATE_COMMA($content['visited_urls']);
+ $content['total_visits'] = TRANSLATE_COMMA($content['total_visits']);
+
+ // Load row template
+ $OUT .= LOAD_TEMPLATE("admin_surfbar_stats_row", true, $content);
+ } // END - while
+
+ // Prepare content
+ $content = array(
+ 'rows' => $OUT,
+ 'urls' => $urls,
+ 'visits' => $visits
+ );
+
+
+ // Load main template
+ LOAD_TEMPLATE("admin_surfbar_stats", false, $content);
+ } else {
+ // No statistics so far
+ LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_SURFBAR_NO_STATS);
+ }
+}
+
+// Free result
+SQL_FREERESULT($result);
+
//
?>
--- /dev/null
+<table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" width="600">
+<tr>
+ <td colspan="3" align="center" class="admin_header bottom2" height="30">
+ <strong>{--ADMIN_SURFBAR_STATS_TITLE--}</strong>
+ </td>
+</tr>
+<tr>
+ <td align="center" width="33%" class="admin_title bottom2 right2">
+ <strong>{--_UID--}:</strong>
+ </td>
+ <td align="center" width="34%" class="admin_title bottom2 right2">
+ <strong>{--ADMIN_SURFBAR_VISITED_URLS--}:</strong>
+ </td>
+ <td align="center" width="33%" class="admin_title bottom2">
+ <strong>{--ADMIN_SURFBAR_TOTAL_VISITS--}:</strong>
+ </td>
+</tr>
+$content[rows]
+<tr>
+ <td class="admin_footer right2" align="right" style="padding-right:2px">
+ <strong>{--ADMIN_SURFBAR_TOTALS--}:</strong>
+ </td>
+ <td class="admin_footer right2">
+ <strong>$content[urls]</strong>
+ </td>
+ <td class="admin_footer">
+ <strong>$content[visits]</strong>
+ </td>
+</tr>
+</table>
--- /dev/null
+<tr>
+ <td align="center" class="bottom2 right2">[<strong>$content[userid]</strong>]</td>
+ <td align="center" class="bottom2 right2">$content[visited_urls]</td>
+ <td align="center" class="bottom2">$content[total_visits]</td>
+</tr>
--- /dev/null
+<table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" width="600">
+<tr>
+ <td colspan="3" align="center" class="admin_header bottom2" height="30">
+ <strong>{--ADMIN_SURFBAR_URL_STATS_TITLE--}</strong>
+ </td>
+</tr>
+<tr>
+ <td align="center" width="33%" class="admin_title bottom2 right2">
+ <strong>{--_UID--}:</strong>
+ </td>
+ <td align="center" width="34%" class="admin_title bottom2 right2">
+ <strong>{--ADMIN_SURFBAR_TOTAL_VISITS--}:</strong>
+ </td>
+ <td align="center" width="33%" class="admin_title bottom2">
+ <strong>{--ADMIN_SURFBAR_LAST_ONLINE--}:</strong>
+ </td>
+</tr>
+$content[rows]
+<tr>
+ <td class="admin_footer right2" align="right" style="padding-right:2px">
+ <strong>{--ADMIN_SURFBAR_TOTALS--}:</strong>
+ </td>
+ <td class="admin_footer right2">
+ <strong>$content[visits]</strong>
+ </td>
+ <td class="admin_footer">
+ <strong>$content[userids]</strong>
+ </td>
+</tr>
+</table>
--- /dev/null
+<tr>
+ <td align="center" class="bottom2 right2">[<strong>$content[userid]</strong>]</td>
+ <td align="center" class="bottom2 right2">$content[total_visits]</td>
+ <td align="center" class="bottom2">$content[last_online]</td>
+</tr>