More rewrites to make use of the EL
[mailer.git] / templates / de / html / surfbar / surfbar_frame_top.tpl
1 <div align="center">
2 <table border="0" cellspacing="0" cellpadding="0" width="100%" id="surfbar_table">
3 <tr>
4         <td id="surfbar_td">
5                 <div>
6                 &raquo;<span id="surfbar_points">$content[xxx]=$content[xxx] {?POINTS?}</span> in
7                 <span id="surfbar_counter">$content[xxx]</span>
8                 <span id="surfbar_counter_word">Sekunden</span>&laquo;
9                 &raquo;<span id="surfbar_reload">X</span> von
10                 <span id="surfbar_max">X</span> im Reload&laquo;
11                 </div>
12
13                 <div>
14                 &raquo;<a href="{%pipe,SURFBAR_GET_URL=$content[url_id]%}" target="_blank">Aktuelle Seite in neuem
15                 Fenster &ouml;ffnen</a>&laquo;
16                 <span id="surfbar_navi">[<a href="#" onclick="return startStopCounter();"
17                  id="start">Anhalten</a>|<a target="_parent"
18                  href="{%url=login.php%}">Loginbereich</a>|<a target="_parent"
19                  href="{%url=modules.php?module=login&amp;what=logout%}">Ausloggen</a>|<a
20                  href="javascript:window.close()">Schliessen</a>]</span>
21                 </div>
22
23                 <div>
24                 &raquo;{?MAIN_TITLE?} ist f&uuml;r den Inhalt nicht verantwortlich!&laquo;
25                 </div>
26         </td>
27 </tr>
28 </table>
29 </div>
30 <script type="text/javascript">
31 <!--
32 // @TODO Try to rewrite this JavaScript to js.php?js=surfbar_frame_top (wouldn't be easy)
33 var currCounter = "$content[reload]";
34 var maxCounter = "$content[reload]";
35 var counter = document.getElementById("surfbar_counter");
36 var points = document.getElementById("surfbar_points");
37 var reload = document.getElementById("surfbar_reload");
38 var max = document.getElementById("surfbar_max");
39 var countDown = null;
40
41 function startStopCounter () {
42         if (countDown == null) {
43                 // Start counter
44                 document.getElementById("start").innerHTML = "Anhalten";
45                 countDown = window.setInterval("startCounter()", 1000);
46         } else {
47                 document.getElementById("start").innerHTML = "Weiter";
48                 window.clearInterval(countDown);
49                 countDown = null;
50         }
51         return false;
52 }
53
54 function init () {
55         countDown = window.setInterval("startCounter()", 1000);
56         window.setTimeout("initCounter()", 500);
57 }
58
59 function confirm () {
60         parent.surfbar_url.location="{%url=surfbar.php?id=$content[url_id]&check={%pipe,SURFBAR_GENERATE_VALIDATION_CODE=$content[url_id]%}&salt={%pipe,SURFBAR_GET_SALT%}%}";
61 }
62
63 function reloadSurfbar () {
64         parent.surfbar_stats.location.reload();
65         this.location.reload();
66 }
67
68 function initCounter () {
69         parent.surfbar_url.location.href = '{%pipe,SURFBAR_GET_URL=$content[url_id]%}';
70         counter.innerHTML = '{%pipe,SURFBAR_GET_RELOAD_TIME=$content[url_id]%}';
71         points.innerHTML  = '{%pipe,SURFBAR_GET_REWARD,translateComma=$content[url_id]%}';
72         reload.innerHTML  = '{%pipe,SURFBAR_GET_USER_LOCKS%}';
73         max.innerHTML     = '{%pipe,SURFBAR_GET_TOTAL_URLS%}';
74 }
75
76 function startCounter () {
77         if (currCounter < 1) {
78                 return false;
79         }
80
81         currCounter--;
82         counter.innerHTML = currCounter;
83
84         if (currCounter == 0) {
85                 clearInterval(countDown);
86                 confirm();
87                 window.setTimeout("reloadSurfbar()", 500);
88         }
89 }
90
91 init();
92
93 //-->
94 </script>