root/templates/main.html

Revision 9fc4d8797d8b9f3e36c7d5871eda34d7fa44f1f4, 16.1 kB (checked in by Christopher Jung <bktheg@web.de>, 4 months ago)

[feature] Es wird nun eine Java-Session aufgebaut und ueber Requests hinweg erhalten

  • Property mode set to 100755
Line 
1 <style type="text/css">
2         @import url("{global.datadir}data/css/menu.css");
3 </style>
4 <script type="text/javascript" language="JavaScript">
5 <!--
6         {if show.gfxpakwarning}
7                 alert('Die von ihnen verwendete Version des Grafikpaks ist veraltet. Die Benutzung des Grafikpaks wurde daher deaktiviert.\nBitte laden sie sich die neuste Version des Grafikpaks herunter!');
8         {/endif}
9        
10         /*
11                 Mail Check
12         */
13
14         PeriodicalExecuter.prototype.registerCallback = function() {
15                 this.intervalID = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);
16         }
17
18         PeriodicalExecuter.prototype.stop = function() {
19                 clearInterval(this.intervalID);
20         }
21
22         function checkPMStatus() {
23                 var url = location.href;
24                 var params = 'module={global.module}&sess={global.sess}&action=hasNewPm';
25
26                 var myAjax = new Ajax.Request( url, {
27                                 method: 'get',
28                                 parameters: params,
29                                 onComplete: updatePMStatus
30                         });
31         }
32        
33         function updatePMStatus( originalRequest ) {
34                 var response = originalRequest.responseText;
35                
36                 if( response.indexOf('nicht eingeloggt') > -1 ) {
37                         checkPMStatusExecuter.stop();
38                         return;
39                 }
40                
41                 if( originalRequest.responseText == '1' ) {
42                         $('mailicon').style.display='inline';
43                 }
44                 else {
45                         $('mailicon').style.display='none';
46                 }
47         }
48
49         var checkPMStatusExecuter = new PeriodicalExecuter(checkPMStatus, 30);
50        
51         /*
52                 Boxfunktionen
53         */
54        
55         function boxClose(box) {
56                 $(box).style.display = 'none';
57         }
58        
59         function boxOpen(box) {
60                 $(box).style.display = 'block';
61                
62                 if( box == 'helpbox' ) {
63                         helpBox.fetchHelpText();
64                 }
65         }
66        
67         var helpBox = {
68                 isVisible : function() {
69                         if( $('helpbox').style.display == 'block' ) {
70                                 return true;
71                         }
72                         return false;
73                 },
74                 fetchHelpText : function() {
75                         $('helpboxtext').innerHTML = '';
76                        
77                         var myAjax = new Ajax.Request( location.href,  {
78                                 method: 'get',
79                                 parameters: 'module={global.module}&sess={global.sess}&action=getHelpText&page='+currentModule,
80                                 onComplete: helpBox.updateHelpText
81                         });
82                 },
83                 updateHelpText : function( originalRequest ) {
84                         var response = originalRequest.responseText;
85                        
86                         if( response.indexOf('nicht eingeloggt') > -1 ) {
87                                 return;
88                         }
89                        
90                         $('helpboxtext').innerHTML = response;
91                 }
92         }
93        
94         var adminBox = {
95                 execute : function() {
96                         var cmd = $('adminConsoleCommand').value;
97                         $('adminConsoleResponse').innerHTML = '';
98                         var myAjax = new Ajax.Request( location.href,  {
99                                 method: 'get',
100                                 parameters: 'module=admin&sess={global.sess}&action=ajax&namedplugin=net.driftingsouls.ds2.server.modules.admin.AdminConsole&responseOnly=1&cmd='+encodeURIComponent(cmd),
101                                 onComplete: adminBox.showResponse
102                         });
103                 },
104                
105                 showResponse : function( originalRequest ) {
106                         var response = originalRequest.responseText;
107                        
108                         if( response.indexOf('nicht eingeloggt') > -1 ) {
109                                 return;
110                         }
111                        
112                         $('adminConsoleResponse').innerHTML = response;
113                 }
114         }
115        
116         /*
117                 Page-Funktionen
118         */
119         var currentModule;
120         var currentTitle;
121        
122         function setCurrentPage(module, title) {
123                 var link = $('page_'+currentModule);
124                 if( link ) {
125                         link.className='';
126                 }
127                 else {
128                         $('page_currentpage').style.display='none';
129                        
130                         // Submenue leeren
131                         var currentPageLi = $('currentpage');
132                         var dl = currentPageLi.getElementsByTagName('dl')[0];
133                         var dds = dl.getElementsByTagName('dd');
134                         while( dds.length > 0 ) {
135                                 dl.removeChild(dds[0]);
136                         }
137                 }
138        
139                 var link = $('page_'+module);
140                 if( link ) {
141                         link.className='currentPage';
142                 }
143                 else if( title != 'null' ) {
144                         $('page_currentpage').firstChild.nodeValue = title;
145                         $('page_currentpage').style.display='inline';
146                         $('page_currentpage_dropdown').style.display = 'none';
147                 }
148                
149                 var oldModule = currentModule;
150                
151                 currentModule = module;
152                 currentTitle = title;
153                
154                 if( helpBox.isVisible() && oldModule != currentModule ) {
155                         helpBox.fetchHelpText();
156                 }
157         }
158        
159         function addPageMenuEntry(title, url) {
160                 var currentPageLi = $('currentpage');
161                
162                 var dl = currentPageLi.getElementsByTagName('dl')[0];
163                 var dd = document.createElement('dd');
164                 var a = document.createElement('a');
165                 a.href = url;
166                 a.appendChild(document.createTextNode(title));
167                 a.target = 'main';
168                 dd.appendChild(a);
169                 dl.appendChild(dd);
170                
171                 $('page_currentpage_dropdown').style.display = 'inline';
172         }
173        
174         function completePage() {
175                 var currentPageLi = $('currentpage');
176                 var dds = currentPageLi.getElementsByTagName('dd');
177                
178                 if( dds.length > 0 ) {
179                         var dl = currentPageLi.getElementsByTagName('dl')[0];
180                         var dd = document.createElement('dd');
181                         dd.className = 'lastelement';
182                        
183                         var span = document.createElement('span');
184                         dd.appendChild(span);
185                         dl.appendChild(dd);
186                 }
187         }
188 -->
189 </script>
190 <ul id="menu">
191 <li class="statusfield">
192         <a id="mailicon" href="./ds?module=comm&amp;sess={global.sess}&action=showInbox" target="main"><img src="{global.datadir}/data/interface/menubar/mail.png" alt="Neue Nachricht" title="Du hast neue Nachrichten erhalten" /></a>
193 </li>
194 <li id="currentpage">
195         <dl>
196                 <dt>
197                         <span id="page_currentpage" class="currentPage">empty <img id="page_currentpage_dropdown" src="{global.datadir}/data/interface/menubar/submenu.png" alt="" /></span>
198                 </dt>
199         </dl>
200 </li>
201 <li>
202         <dl>
203                 <dt>
204                         <a id="page_ueber" href="./ds?sess={global.sess}&amp;module=ueber" target="main">&Uuml;bersicht</a>
205                 </dt>
206         </dl>
207 </li>
208 <li>
209         <dl>
210                 <dt>
211                         <a id="page_basen" href="./ds?module=basen&amp;sess={global.sess}" target="main">Basen <img src="{global.datadir}/data/interface/menubar/submenu.png" alt="" /></a>
212                 </dt>
213                 <!-- BEGIN bases.listitem -->
214                         <dd>
215                                 <a href="./ds?module=base&amp;sess={global.sess}&amp;col={base.id}" target="main">
216                                         {base.name}
217                                 </a>
218                         </dd>
219                 <!-- END bases.listitem -->
220                 {if bases.list}
221                         <dd class="lastelement">
222                                 <span></span>
223                         </dd>
224                 {/endif}
225         </dl>
226 </li>
227 <li>   
228         <dl>
229                 <dt>
230                         <a id="page_schiffe" href="./ds?module=schiffe&amp;sess={global.sess}" target="main">Schiffe</a>
231                         <a class="low" href="./ds?module=schiffe&amp;sess={global.sess}&amp;low=9" target="main">X</a>
232                         <img src="{global.datadir}/data/interface/menubar/submenu.png" alt="" />
233                 </dt>
234                 <dd>
235                         <span>
236                                 <a href="./ds?module=schiffe&amp;sess={global.sess}&amp;only=zivil" target="main">
237                                         Zivilschiffe
238                                 </a>
239                                 <a class="low" href="./ds?module=schiffe&amp;sess={global.sess}&amp;only=zivil&amp;low=9" target="main">X</a>
240                         </span>
241                 </dd>
242                 <dd>
243                         <span>
244                                 <a href="./ds?module=schiffe&amp;sess={global.sess}&amp;only=tank" target="main">
245                                         Tanker
246                                 </a>
247                                 <a class="low" href="./ds?module=schiffe&amp;sess={global.sess}&amp;only=tank&amp;low=9" target="main">X</a>
248                         </span>
249                 </dd>
250                 <dd>
251                         <span>
252                                 <a href="./ds?module=schiffe&amp;sess={global.sess}&amp;only=trans" target="main">
253                                         Frachter
254                                 </a>
255                                 <a class="low" href="./ds?module=schiffe&amp;sess={global.sess}&amp;only=trans&amp;low=9" target="main">X</a>
256                         </span>
257                 </dd>
258                 <dd>
259                         <span>
260                                 <a href="./ds?module=schiffe&amp;sess={global.sess}&amp;only=cargo" target="main">
261                                         Stationen
262                                 </a>
263                                 <a class="low" href="./ds?module=schiffe&amp;sess={global.sess}&amp;only=cargo&amp;low=9" target="main">X</a>
264                         </span>
265                 </dd>
266                 <dd>
267                         <span>
268                                 <a href="./ds?module=schiffe&amp;sess={global.sess}&amp;only=werften" target="main">
269                                         Werften
270                                 </a>
271                                 <a class="low" href="./ds?module=schiffe&amp;sess={global.sess}&amp;only=werften&amp;low=9" target="main">X</a>
272                         </span>
273                 </dd>
274                 <dd>
275                         <span>
276                                 <a href="./ds?module=schiffe&amp;sess={global.sess}&amp;only=sensor" target="main">
277                                         Awacs
278                                 </a>
279                                 <a class="low" href="./ds?module=schiffe&amp;sess={global.sess}&amp;only=sensor&amp;low=9" target="main">X</a>
280                         </span>
281                 </dd>
282                 <dd>
283                         <span>
284                                 <hr style="margin:0px;" noshade="noshade" size="1" style="color:#cccccc" />
285                         </span>
286                 </dd>
287                 <dd>
288                         <span>
289                                 <a href="./ds?module=schiffe&amp;sess={global.sess}&amp;only=kampf" target="main">
290                                         Kriegsschiffe
291                                 </a>
292                                 <a class="low" href="./ds?module=schiffe&amp;sess={global.sess}&amp;only=kampf&amp;low=9" target="main">X</a>
293                         </span>
294                 </dd>
295                 <dd>
296                         <span>
297                                 <a href="./ds?module=schiffe&sess={global.sess}&only=kampf&kampf_only=2" target="main">
298                                         Zerst&ouml;rer
299                                 </a>
300                                 <a class="low" href="./ds?module=schiffe&sess={global.sess}&only=kampf&kampf_only=2&low=9" target="main">X</a>
301                         </span>
302                 </dd>
303                 <dd>
304                         <span>
305                                 <a href="./ds?module=schiffe&sess={global.sess}&only=kampf&kampf_only=5" target="main">
306                                         Korvetten
307                                 </a>
308                                 <a class="low" href="./ds?module=schiffe&sess={global.sess}&only=kampf&kampf_only=5&low=9" target="main">X</a>
309                         </span>
310                 </dd>
311                 <dd>
312                         <span>
313                                 <a href="./ds?module=schiffe&sess={global.sess}&only=kampf&kampf_only=6" target="main">
314                                         Kreuzer
315                                 </a>
316                                 <a class="low" href="./ds?module=schiffe&sess={global.sess}&only=kampf&kampf_only=6&low=9" target="main">X</a>
317                         </span>
318                 </dd>
319                 <dd>
320                         <span>
321                                 <a href="./ds?module=schiffe&sess={global.sess}&only=kampf&kampf_only=7" target="main">
322                                         Schwere Kreuzer
323                                 </a>
324                                 <a class="low" href="./ds?module=schiffe&sess={global.sess}&only=kampf&kampf_only=7&low=9" target="main">X</a>
325                         </span>
326                 </dd>
327                 <dd>
328                         <span>
329                                 <a href="./ds?module=schiffe&sess={global.sess}&only=kampf&kampf_only=15" target="main">
330                                         Tr&auml;ger
331                                 </a>
332                                 <a class="low" href="./ds?module=schiffe&sess={global.sess}&only=kampf&kampf_only=15&low=9" target="main">X</a>
333                         </span>
334                 </dd>
335                 <dd>
336                         <span>
337                                 <a href="./ds?module=schiffe&sess={global.sess}&only=kampf&kampf_only=9" target="main">
338                                         J&auml;ger
339                                 </a>
340                                 <a class="low" href="./ds?module=schiffe&sess={global.sess}&only=kampf&kampf_only=9&low=9" target="main">X</a>
341                         </span>
342                 </dd>
343                 <dd>
344                         <span>
345                                 <a href="./ds?module=schiffe&sess={global.sess}&only=kampf&kampf_only=17" target="main">
346                                         Bomber
347                                 </a>
348                                 <a class="low" href="./ds?module=schiffe&sess={global.sess}&only=kampf&kampf_only=17&low=9" target="main">X</a>
349                         </span>
350                 </dd>
351                 <dd>
352                         <span>
353                                 <a href="./ds?module=schiffe&sess={global.sess}&only=def" target="main">
354                                         Orbitalabwehr
355                                 </a>
356                                 <a class="low" href="./ds?module=schiffe&sess={global.sess}&only=def&low=9" target="main">X</a>
357                         </span>
358                 </dd>
359                 <dd class="lastelement">
360                         <span></span>
361                 </dd>
362         </dl>
363 </li>
364 <li>   
365         <dl>
366                 <dt>
367                         Optionen <img src="{global.datadir}/data/interface/menubar/submenu.png" alt="" />
368                 </dt>
369                 <dd>
370                         <a href="./ds?module=options&amp;sess={global.sess}" target="main">
371                                 Allgemein
372                         </a>
373                 </dd>
374                 <dd>
375                         <a href="./ds?module=options&amp;sess={global.sess}&amp;action=changeNamePass" target="main">
376                                 Passwort
377                         </a>
378                 </dd>
379                 <dd>
380                         <a href="./ds?module=options&amp;sess={global.sess}&amp;action=xtra" target="main">
381                                 Erweitert
382                         </a>
383                 </dd>
384                 <dd>
385                         <a style="color:red" href="./ds?module=options&amp;sess={global.sess}&amp;action=delAccount" target="main">
386                                 L&ouml;schantrag
387                         </a>
388                 </dd>
389                 <dd class="lastelement">
390                         <span></span>
391                 </dd>
392         </dl>
393 </li>
394 <li>   
395         <dl>
396                 <dt>
397                         Kommunikation <img src="{global.datadir}/data/interface/menubar/submenu.png" alt="" />
398                 </dt>
399                 <dd>
400                         <a href="./ds?module=comm&amp;sess={global.sess}&action=showInbox" target="main">
401                                 PMs
402                         </a>
403                 </dd>
404                 <dd>
405                         <a href="./ds?module=comnet&amp;sess={global.sess}" target="main">
406                                 Com-Net
407                         </a>
408                 </dd>
409                 <dd>
410                         <a href="./ds?module=handel&amp;sess={global.sess}" target="main">
411                                 Handel
412                         </a>
413                 </dd>
414                 <dd>
415                         <a href="./ds?module=ersteigern&amp;sess={global.sess}" target="main">
416                                 Fraktionen
417                         </a>
418                 </dd>
419                 <dd>
420                         <a href="./ds?module=ally&amp;sess={global.sess}" target="main">
421                                 Allianzen
422                         </a>
423                 </dd>
424                 <dd>
425                         <a href="{SCRIPT_FORUM}" target="main">
426                                 Forum
427                         </a>
428                 </dd>
429                 <dd class="lastelement">
430                         <span></span>
431                 </dd>
432         </dl>
433 </li>
434 <li>   
435         <dl>
436                 <dt>   
437                         Datenbank <img src="{global.datadir}/data/interface/menubar/submenu.png" alt="" />
438                 </dt>
439                 <dd>
440                         <a href="./ds?module=map&amp;sess={global.sess}&amp;sys=1" target="main">Sternenkarte</a>
441                 </dd>
442                 <dd>
443                         <a href="./ds?module=stats&amp;sess={global.sess}" target="main">Statistik</a>
444                 </dd>
445                 <dd>
446                         <a href="./ds?module=techliste&amp;sess={global.sess}" target="main">Forschungen</a>
447                 </dd>
448                 <dd>
449                         <a href="./ds?module=buildings&amp;sess={global.sess}" target="main">Geb&auml;ude</a>
450                 </dd>
451                 <dd>
452                         <a href="./ds?module=iteminfo&amp;sess={global.sess}&amp;action=known" target="main">Gegenst&auml;nde</a>
453                 </dd>
454                 <dd>
455                         <a href="./ds?module=techdatabase&amp;sess={global.sess}&amp;action=schiffsliste" target="main">
456                                 Schiffe
457                         </a>
458                 </dd>
459                 <dd>
460                         <a href="http://wiki.drifting-souls.net/" target="main">Wiki</a>
461                 </dd>
462                 <dd class="lastelement">
463                         <span></span>
464                 </dd>
465         </dl>
466 </li>
467 {if user.npc}
468         <li>   
469                 <dl>
470                         <dt>   
471                                 Spezial <img src="{global.datadir}/data/interface/menubar/submenu.png" alt="" />
472                         </dt>
473                         <dd>
474                                 <a id="page_npcorder" href="./ds?module=npcorder&amp;sess={global.sess}" target="main">NPC</a>
475                         </dd>
476                         {if user.admin}
477                                 <dd>
478                                         <a id="page_admin" href="./ds?module=admin&amp;sess={global.sess}" target="main">Admin</a>
479                                 </dd>
480                         {/endif}
481                         <dd class="lastelement">
482                                 <span></span>
483                         </dd>
484                 </dl>
485         </li>
486 {else}
487         {if user.admin}
488                 <li>   
489                         <dl>
490                                 <dt>   
491                                         Spezial <img src="{global.datadir}/data/interface/menubar/submenu.png" alt="" />
492                                 </dt>
493                                 <dd>
494                                         <a id="page_admin" href="./ds?module=admin&amp;sess={global.sess}" target="main">Admin</a>
495                                 </dd>
496                                 <dd class="lastelement">
497                                         <span></span>
498                                 </dd>
499                         </dl>
500                 </li>
501         {/endif}
502 {/endif}
503 <li class="actionfield">
504         <a href="#" onclick="boxOpen('helpbox')">
505                 <img id="helpicon" src="{global.datadir}/data/interface/menubar/help.png" alt="Hilfe" title="Hilfe" />
506         </a>
507         {if admin.showconsole}
508                 <a href="#" onclick="boxOpen('adminconsolebox')">
509                         <img id="adminconsoleicon" src="{global.datadir}/data/interface/menubar/adminconsole.png" alt="Adminconsole" title="Adminconsole" />
510                 </a>
511         {/endif}
512         <a href="#" onclick="boxOpen('searchbox')">
513                 <img id="searchicon" src="{global.datadir}/data/interface/menubar/search.png" alt="Suchen" title="Suchen" />
514         </a>
515         <a href="#" onclick="boxOpen('noticebox')">
516                 <img id="noticeicon" src="{global.datadir}/data/interface/menubar/notice.png" alt="Notizen" title="Notizen verwalten" />
517         </a>
518         &nbsp;
519         <a href="./ds?module=logout&amp;sess={global.sess}" target="main">
520                 <img src="{global.datadir}/data/interface/menubar/logout.png" alt="Logout" title="Ausloggen" />
521         </a>
522 </li>
523 </ul>
524
525 <!-- Notizbox -->
526 <div id="noticebox" class="gfxbox"><div><div><div>
527         <h3>Notizen</h3>
528         <textarea rows="15" cols="50">Deine Notizen</textarea>
529         <button type="button" onclick="boxClose('noticebox')" value="Schlie&szlig;en">Schlie&szlig;en</button>
530 </div></div></div></div>
531
532 <!-- Hilfebox -->
533 <div id="helpbox" class="gfxbox"><div><div><div>
534         <h3>Hilfe</h3>
535         <div id="helpboxtext"></div>
536         <button type="button" onclick="boxClose('helpbox')" value="Schlie&szlig;en">Schlie&szlig;en</button>
537 </div></div></div></div>
538
539 {if admin.showconsole}
540         <!-- Adminconsole -->
541         <div id="adminconsolebox" class="gfxbox"><div><div><div>
542                 <h3>Adminconsole</h3>
543                 <input id="adminConsoleCommand" type="text" name="search" style="width:300px" />
544                 <button type="button" onclick="adminBox.execute()" style="width:80px">ausf&uuml;hren</button>
545                 <div id="adminConsoleResponse"> </div>
546                 <button type="button" onclick="boxClose('adminconsolebox')" value="Schlie&szlig;en">Schlie&szlig;en</button>
547         </div></div></div></div>
548 {/endif}
549
550 <!-- Suche -->
551 <div id="searchbox" class="gfxbox"><div><div><div>
552         <h3>Suchen</h3>
553         <form action="./ds" method="post" target="search">
554                 <input type="text" name="search" style="width:300px" />
555                 <input class="submit" type="submit" value="Suchen" style="width:60px" />
556                 {!form_create_hidden default, module:search}
557         </form>
558         <iframe id="searchframe" name="search" scrolling="auto" frameborder="0" src="./ds?sess={global.sess}&amp;module=search"></iframe>
559         <button type="button" onclick="boxClose('searchbox')" value="Schlie&szlig;en">Schlie&szlig;en</button>
560 </div></div></div></div>
561
562 <!-- Frame -->
563 <iframe id="mainframe" name="main" scrolling="auto" frameborder="0" src="./ds?module=ueber&amp;sess={global.sess}">
564         Dein Browser unterst&uuml;tzt leider keine iframes. Am besten installierst du einen Browser neueren Datums wie z.B. den <a class="forschinfo" href="http://www.mozilla.org">Mozilla Firefox</a>
565 </iframe>
566 <script type="text/javascript" language="JavaScript">
567 <!--
568         checkPMStatus();
569         new Draggable('noticebox');
570         new Draggable('adminconsolebox');
571         new Draggable('helpbox');
572         new Draggable('searchbox');
573 -->
574 </script>
Note: See TracBrowser for help on using the browser.