Autostart/manual-start added to surfbar
[mailer.git] / templates / de / html / surfbar / surfbar_stopped.tpl
index 9e39f077fe021b30ffce62c0bedc67e9106e1bd2..d08da48a3f961a7b7422e1cb348ad7c85a1b6dcd 100644 (file)
@@ -1,26 +1,39 @@
 <div align="center">
-       <div class="member_table dashed" style="width:500px">
+       <div class="member_table dashed" style="width:500px;height:50px">
                <div class="member_title2 bottom2">
                        <strong>Surfbar angehalten!</strong>
                </div>
 
-               Keine URLs mehr verf&uuml;rgbar oder Datenbankfehler liegt vor.<br />
-               Neustart in <span id="surfbar_restart">$content[start]</span> Sekunden
+               <div id="surfbar_button">
+                       Keine URLs mehr verf&uuml;rgbar oder Datenbankfehler liegt vor.<br />
+                       Neustart in <span id="surfbar_counter">$content[start]</span> Sekunden
+               </div>
        </div>
 </div>
 
 <script language="JavaScript" type="text/javascript">
 <!--
-var counter = "$content[restart]";
-var timer   = document.getElementById("surfbar_restart");
+var interval  = null;
+var counter   = "$content[restart]";
+var timer     = document.getElementById("surfbar_counter");
+var buttonDiv = document.getElementById("surfbar_button");
 
-function Restart() {
+function Restart () {
        this.location.reload();
 }
 
+function ShowButton () {
+       buttonDiv.innerHTML = "<form action='{!URL!}/surfbar.php' target='_parent' method='GET'><input type='submit' class='member_submit' value='Surfbar erneut starten' /></form>";
+}
+
 function Counter () {
        if (counter == 0) {
-               Restart();
+               if ($content[autostart] == true) {
+                       Restart();
+               } else {
+                       ShowButton();
+               }
+               window.clearInterval(interval);
        } else {
                counter--;
                timer.innerHTML = counter;
@@ -28,11 +41,10 @@ function Counter () {
 }
 
 function Init () {
-       window.setInterval("Counter()", 1000);
+       interval = window.setInterval("Counter()", 1000);
        timer.innerHTML = "$content[restart]";
 }
 
 window.setTimeout("Init()", 500);
-
 //-->
-</script>
\ No newline at end of file
+</script>