-if (isInstalled()) {
- // Only logged in users may use this surfbar!
- REDIRECT_ON_UNINSTALLED_EXTENSION("surfbar");
-
- // No member?
- if (!IS_MEMBER()) {
- // Redirect
- // @TODO Display quick login form here or redirect as configured
- LOAD_URL("modules.php?module=index");
- } // END - if
-
- // Handle tasks on self-maintenance
- SURFBAR_HANDLE_SELF_MAINTENANCE();
-
- // Is there a check value?
- if ((SURFBAR_CHECK_RELOAD_FULL()) || ((REQUEST_ISSET_GET(('frame'))) && (in_array(REQUEST_GET('frame'), array("stop", "stop2", "stats", "textlinks"))))) {
- // Reload-lock is full, surfbar stopped so...
- // Load header
- LOAD_INC_ONCE("inc/header.php");
-
- // Load template
- if (((REQUEST_ISSET_GET(('frame'))) && (REQUEST_GET('frame') == "stop")) || (!REQUEST_ISSET_GET(('frame')))) {
- // Load template for "start" page
- LOAD_TEMPLATE("surfbar_frame_start");
-
- // Load banner
- LOAD_TEMPLATE("surfbar_start_banner");
-
- // This makes the footer appear again
- REQUEST_UNSET_GET(('frame'));
- } elseif ((REQUEST_ISSET_GET(('frame'))) && (REQUEST_GET('frame') == "stats")) {
- // Get total points amount
- $points = GET_TOTAL_DATA(getUserId(), "user_points", "points") - GET_TOTAL_DATA(getUserId(), "user_data", "used_points");
-
- // Prepare content
- $content = array(
- 'points' => TRANSLATE_COMMA($points),
- 'online' => SURFBAR_DETERMINE_TOTAL_ONLINE(),
- 'reload' => (getConfig('surfbar_stats_reload') * 1000),
- 'c_total' => TRANSLATE_COMMA(getConfig('surfbar_total_counter')),
- 'c_today' => TRANSLATE_COMMA(getConfig('surfbar_daily_counter')),
- 'c_yester' => TRANSLATE_COMMA(getConfig('surfbar_yester_counter')),
- 'c_week' => TRANSLATE_COMMA(getConfig('surfbar_weekly_counter')),
- 'c_month' => TRANSLATE_COMMA(getConfig('surfbar_monthly_counter')),
- );
+if (!isInstalled()) {
+ // You have to install first!
+ redirectToUrl('install.php');
+} // END - if
+
+// Only logged in users may use this surfbar!
+redirectOnUninstalledExtension('surfbar');
+
+// No member?
+if (!IS_MEMBER()) {
+ // Redirect
+ // @TODO Display quick login form here or redirect as configured
+ redirectToUrl('modules.php?module=index');
+} // END - if
+
+// Handle tasks on self-maintenance
+SURFBAR_HANDLE_SELF_MAINTENANCE();
+
+// Is there a check value?
+if ((SURFBAR_CHECK_RELOAD_FULL()) || ((REQUEST_ISSET_GET('frame')) && (in_array(REQUEST_GET('frame'), array('stop', 'stop2', 'stats', 'textlinks'))))) {
+ // Reload-lock is full, surfbar stopped so...
+ // Load header
+ loadIncludeOnce('inc/header.php');
+
+ // Load template
+ if (((REQUEST_ISSET_GET('frame')) && (REQUEST_GET('frame') == 'stop')) || (!REQUEST_ISSET_GET('frame'))) {
+ // Load template for "start" page
+ LOAD_TEMPLATE('surfbar_frame_start');
+
+ // Load banner
+ LOAD_TEMPLATE('surfbar_start_banner');
+
+ // This makes the footer appear again
+ REQUEST_UNSET_GET('frame');
+ } elseif ((REQUEST_ISSET_GET('frame')) && (REQUEST_GET('frame') == 'stats')) {
+ // Get total points amount
+ $points = GET_TOTAL_DATA(getUserId(), 'user_points', 'points') - GET_TOTAL_DATA(getUserId(), 'user_data', 'used_points');