$SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_notify_admin_unlock` ENUM('N','Y') NOT NULL DEFAULT 'N'";
$SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_dynamic_percent` FLOAT(10,5) UNSIGNED NOT NULL DEFAULT '10.00000'";
$SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_max_order` INT(7) UNSIGNED NOT NULL DEFAULT '10'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_restart_time` BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(60*61)."'";
// Member menus
$SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar',NULL,'Surfbar','Y','Y',5)";
define('ADMIN_CONFIG_SURFBAR_NOTIFY_ADMIN_UNLOCK', "Admin bei Freigabe von Mailbuchungen informieren, dass die URL in die Surfbar aufgenommen wurde?");
define('ADMIN_CONFIG_SURFBAR_DYNAMIC_PERCENT', "Prozent auf dynamische Vergütung:");
define('ADMIN_CONFIG_SURFBAR_MAX_ORDER', "Maximal durch Mitglied in Surfbar buchbare URLs:(*)");
+define('ADMIN_CONFIG_SURFBAR_RESTART_TIME', "Ruhezeit der Surfbar, wenn alle URLs in Reload-Lock sind:");
define('ADMIN_SURFBAR_NOTIFY_UNLOCK_YES', "Ja, Admin(s) informieren.");
define('ADMIN_SURFBAR_NOTIFY_UNLOCK_NO', "Nein, nicht informieren.");
define('ADMIN_SURFBAR_NO_REF_LEVELS_FOUND', "Zur Zeit sind keine Referal-Ebenen für die Surfbar eingestellt.<br />\nBitte installieren Sie die Erweiterung <strong>surfbar</strong> neu.");
define('ADMIN_SURFBAR_EDIT_URL', "URL ändern");
define('ADMIN_SURFBAR_DEL_URL', "URL löschen");
define('ADMIN_SURFBAR_UNLOCK_URL', "URL ent-/sperren");
-define('ADMIN_CONFIG_SURFBAR_NOTE', "(*): Es sind auch die Übertragungen der URLs aus der Mailbuchung einbezogen.");
+define('ADMIN_CONFIG_SURFBAR_NOTE', "(*): Es sind auch die Übertragungen der URLs aus der Mailbuchung einbezogen. Es wird empfohlen, die Ruhezeit etwas länger als die Reload-Sperre einzustellen.");
// Subject lines for admins
define('ADMIN_SURFBAR_NOTIFY_URL_UNLOCK_SUBJECT', "URL in Surfbar gebucht");
$content = array(
'surfbar_static_reward' => TRANSLATE_COMMA($_CONFIG['surfbar_static_reward']),
'surfbar_static_costs' => TRANSLATE_COMMA($_CONFIG['surfbar_static_costs']),
+ // @TODO Rewrite this to tiny selection boxes
'surfbar_static_time' => $_CONFIG['surfbar_static_time'],
+ // @TODO Rewrite this to tiny selection boxes
+ 'surfbar_restart_time' => $_CONFIG['surfbar_restart_time'],
'surfbar_static_lock' => $_CONFIG['surfbar_static_lock'],
'surfbar_dynamic_percent' => TRANSLATE_COMMA($_CONFIG['surfbar_dynamic_percent']),
'surfbar_max_order' => $_CONFIG['surfbar_max_order']
OUTPUT_HTML("<br />");
LOAD_TEMPLATE("surfbar_start_banner");
} else {
+ // Prepare content
+ $content = array(
+ 'restart' => $_CONFIG['surfbar_restart_time'],
+ 'start' => str_repeat("X", strlen($_CONFIG['surfbar_restart_time']))
+ );
+
// Load template for stopped surfbar
- LOAD_TEMPLATE("surfbar_stopped");
+ LOAD_TEMPLATE("surfbar_stopped", false, $content);
}
} elseif ((isset($_GET['check'])) && (isset($_GET['id'])) && (isset($_GET['salt']))) {
// Dummy next id get
<INPUT type="text" name="surfbar_static_costs" size="6" maxlength="20" value="$content[surfbar_static_costs]" /> {!POINTS!}
</TD>
</TR>
+ <TR><TD height="3" colspan="2" class="seperator"> </TD></TR>
<TR>
<TD height="30" align="right" style="padding-right:5px">
{--ADMIN_CONFIG_SURFBAR_STATIC_TIME--}
<INPUT type="text" name="surfbar_max_order" size="6" maxlength="20" value="$content[surfbar_max_order]" />
</TD>
</TR>
+ <TR><TD height="3" colspan="2" class="seperator"> </TD></TR>
+ <TR>
+ <TD height="30" align="right" style="padding-right:5px">
+ {--ADMIN_CONFIG_SURFBAR_RESTART_TIME--}
+ </TD>
+ <TD>
+ <INPUT type="text" name="surfbar_restart_time" size="6" maxlength="20" value="$content[surfbar_restart_time]" />
+ </TD>
+ </TR>
<TR><TD height="8" colspan="2" class="seperator bottom2"> </TD></TR>
<TR>
<TD align="center" colspan="2" class="admin_footer bottom2">
<strong>Surfbar angehalten!</strong>
</div>
- Keine URLs mehr verfürgbar oder Datenbankfehler liegt vor.
+ Keine URLs mehr verfürgbar oder Datenbankfehler liegt vor.<br />
+ Neustart in <span id="surfbar_restart">$content[start]</span> Sekunden
</div>
</div>
+
+<script language="JavaScript" type="text/javascript">
+<!--
+var counter = "$content[restart]";
+var timer = document.getElementById("surfbar_restart");
+
+function Restart() {
+ this.location.reload();
+}
+
+function Counter () {
+ if (counter == 0) {
+ Restart();
+ } else {
+ counter--;
+ timer.innerHTML = counter;
+ }
+}
+
+function Init () {
+ window.setInterval("Counter()", 1000);
+ timer.innerHTML = "$content[restart]";
+}
+
+window.setTimeout("Init()", 500);
+
+//-->
+</script>
\ No newline at end of file
}
#surfbar_counter {
}
+#surfbar_restart {
+}
#counter_word {
}
.surfbar_reload {
}
.surfbar_points {
}
+#surfbar_restart {
+}
#surfbar_counter {
}
#counter_word {
}
.surfbar_points {
}
+#surfbar_restart {
+}
#surfbar_counter {
}
#counter_word {