+ 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($GLOBALS['userid'], "user_points", "points") - GET_TOTAL_DATA($GLOBALS['userid'], "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')),
+ );
+
+ // Load template for "stats" page
+ LOAD_TEMPLATE("surfbar_frame_stats", false, $content);
+ } elseif ((REQUEST_ISSET_GET(('frame'))) && (REQUEST_GET('frame') == "textlinks")) {
+ // Prepare content
+ $content = array(
+ 'online' => SURFBAR_DETERMINE_TOTAL_ONLINE(),
+ 'reload' => (getConfig('surfbar_stats_reload') * 1000)
+ );
+
+ // Load template for "stats" page
+ LOAD_TEMPLATE("surfbar_frame_textlinks", false, $content);
+ } else {
+ // Prepare content
+ $content = array(
+ 'restart' => getConfig('surfbar_restart_time'),
+ 'start' => str_repeat("X", strlen(getConfig('surfbar_restart_time'))),
+ 'autostart' => (getConfig('surfbar_autostart') == "Y") ? "true" : "false"
+ );
+
+ // Load template for stopped surfbar
+ LOAD_TEMPLATE("surfbar_stopped", false, $content);
+ }
+ } elseif ((REQUEST_ISSET_GET(('check'))) && (REQUEST_ISSET_GET(('id'))) && (REQUEST_ISSET_GET(('salt')))) {