Explorar el Código

- Logout Funktion hinzugefügt

- app.js aufgeräumt von funktionen die nicht benötigt werden
- Debug vardumps entfernt
- SKS: Versionsnummer, alle versionen und Titlebar editifeld hinzugefügt
master
Marcel Völkel hace 7 años
padre
commit
dc757d1eef

+ 7
- 0
Application/Data/Logout.php Ver fichero

@@ -0,0 +1,7 @@
1
+<?php
2
+use SCF\Core\DI;
3
+use SCF\Core\Authentication;
4
+
5
+$auth->logout();
6
+header("Location: ".$settings->getValue('siteaddr'),true, 301);
7
+exit();

+ 1
- 1
Application/scf/Core/Authentication.php Ver fichero

@@ -127,7 +127,7 @@ class Authentication
127 127
     public function logout()
128 128
     {
129 129
         if(isset($_COOKIE['scf_identifier'])) {
130
-            $this->_db->query("DELETE FROM users_tokens WHERE userId = {$_SESSION['admin_userId']}");
130
+            $this->_db->query("DELETE FROM users_tokens WHERE userId = {$_SESSION['scf_userId']}");
131 131
         }
132 132
         setcookie('scf_identifier', null , -1);
133 133
         setcookie('scf_token', null , -1);

+ 28
- 1
Application/templates/SmartAdmin/Data/PageAdmin/sternenkindsaga.tpl Ver fichero

@@ -43,7 +43,7 @@
43 43
                                         <section class="col col-6">
44 44
                                             <label class="label">Sternenkind Saga Download Pfad:</label>
45 45
                                             <label class="input"> <i class="icon-append fa fa-question-circle"></i>
46
-                                                <input type="text" name="sks_download_path" value="{$sksSettings.sks_download_path}">
46
+                                                <input type="text" name="sks_download_path" value="{$sksSettings.sks_download_path|addslashes}">
47 47
                                                 <b class="tooltip tooltip-top-right">
48 48
                                                     <i class="fa fa-warning txt-color-teal"></i>
49 49
                                                     Vollst&auml;ndiger Pfad zum Verzeichnis, wo die Downloaddateien f&uuml;r das Spiel und den EU-Zeichensatz liegen!</b>
@@ -89,6 +89,33 @@
89 89
                                                     Kurzbeschreibung f&uuml;r die Landingpage/Eyecatcher!</b>
90 90
                                             </label>
91 91
                                         </section>
92
+                                        <section class="col col-6">
93
+                                            <label class="label">Versionsnummer der Aktuellen Version</label>
94
+                                            <label class="input"> <i class="icon-append fa fa-question-circle"></i>
95
+                                                <input type="text" name="sks_download_version" value="{$sksSettings.sks_download_version}">
96
+                                                <b class="tooltip tooltip-top-right">
97
+                                                    <i class="fa fa-warning txt-color-teal"></i>
98
+                                                    Hier bitte die Aktuelle Version des Spieles Eintragen, da dieses Feld genutzt wird um die Version in der Browser Titel-Leiste anzuzeigen!</b>
99
+                                            </label>
100
+                                        </section>
101
+                                        <section class="col col-6">
102
+                                            <label class="label">Vergangene Versionsnummern:</label>
103
+                                            <label class="input"> <i class="icon-append fa fa-question-circle"></i>
104
+                                                <input type="text" name="sks_previous_versions" value="{$sksSettings.sks_previous_versions}">
105
+                                                <b class="tooltip tooltip-top-right">
106
+                                                    <i class="fa fa-warning txt-color-teal"></i>
107
+                                                    Alle bisherigen Versionsnummern(inkl. Aktuellster) bitte Hier eintragen, da dieses Feld genutzt wird um die DL-Zahlen der einzelnen Versionsn aufzulisten in den Statistiken!</b>
108
+                                            </label>
109
+                                        </section>
110
+                                        <section class="col col-6">
111
+                                            <label class="label">Seitenname:</label>
112
+                                            <label class="input"> <i class="icon-append fa fa-question-circle"></i>
113
+                                                <input type="text" name="sitename" value="{$sksSettings.sitename}">
114
+                                                <b class="tooltip tooltip-top-right">
115
+                                                    <i class="fa fa-warning txt-color-teal"></i>
116
+                                                    Seitenname, der oben in der Titel-Leiste des Browsers angezeigt wird. Das {literal}<strong>{1}</strong>{/literal} ist ein Platzhalter für die Versionsnummer der aktuellen Version, es muss also Platziert werden!</b>
117
+                                            </label>
118
+                                        </section>
92 119
                                     </fieldset>
93 120
                                     <footer>
94 121
                                         <button type="submit" class="btn btn-primary">&Auml;nderung speichern</button>

+ 4
- 0
Application/templates/SmartAdmin/Data/logout.tpl Ver fichero

@@ -0,0 +1,4 @@
1
+{include file="header.tpl"}
2
+
3
+
4
+{include file="footer.tpl"}

+ 0
- 1
Application/templates/SmartAdmin/auth/login.tpl Ver fichero

@@ -73,7 +73,6 @@
73 73
                         <header>
74 74
                             Anmeldung
75 75
                         </header>
76
-                        Userid:{$smarty.session.scf_userId}
77 76
                         <fieldset>
78 77
 
79 78
                             <section>

+ 2
- 2
Application/templates/SmartAdmin/footer.tpl Ver fichero

@@ -20,8 +20,8 @@
20 20
                     <ul class="dropdown-menu pull-right text-left">
21 21
                         <li>
22 22
                             <div class="padding-5">
23
-                                <p class="txt-color-darken font-sm no-margin">Backend Version: {fetch file="../version"}</p>
24
-                                <p class="txt-color-darken font-sm no-margin">Frontend Version: 1.8.8</p>
23
+                                <p class="txt-color-darken font-sm no-margin">Backend: {fetch file="../version"}</p>
24
+                                <p class="txt-color-darken font-sm no-margin">Frontend: v1.8.8</p>
25 25
 
26 26
                             </div>
27 27
                         </li>

+ 4
- 41
Application/templates/SmartAdmin/header.tpl Ver fichero

@@ -19,13 +19,13 @@
19 19
             <!-- the ID links are fetched via AJAX to the ajax container "ajax-notifications" -->
20 20
             <div class="btn-group btn-group-justified" data-toggle="buttons">
21 21
                 <label class="btn btn-default">
22
-                    <input type="radio" name="activity" id="ajax/notify/mail.html">
22
+                    <input type="radio" name="activity" id="#">
23 23
                     Msgs (0) </label>
24 24
                 <label class="btn btn-default">
25
-                    <input type="radio" name="activity" id="ajax/notify/notifications.html">
25
+                    <input type="radio" name="activity" id="#">
26 26
                     notify (0) </label>
27 27
                 <label class="btn btn-default">
28
-                    <input type="radio" name="activity" id="ajax/notify/tasks.html">
28
+                    <input type="radio" name="activity" id="#">
29 29
                     Tasks (0) </label>
30 30
             </div>
31 31
 
@@ -59,48 +59,11 @@
59 59
         </div>
60 60
         <!-- end collapse menu -->
61 61
 
62
-        <!-- #MOBILE -->
63
-        <!-- Top menu profile link : this shows only when top menu is active -->
64
-        <ul id="mobile-profile-img" class="header-dropdown-list hidden-xs padding-5">
65
-            <li class="">
66
-                <a href="#" class="dropdown-toggle no-margin userdropdown" data-toggle="dropdown">
67
-                    <img src="img/avatars/sunny.png" alt="John Doe" class="online" />
68
-                </a>
69
-                <ul class="dropdown-menu pull-right">
70
-                    <li>
71
-                        <a href="javascript:void(0);" class="padding-10 padding-top-0 padding-bottom-0"><i class="fa fa-cog"></i> Setting</a>
72
-                    </li>
73
-                    <li class="divider"></li>
74
-                    <li>
75
-                        <a href="profile.html" class="padding-10 padding-top-0 padding-bottom-0"> <i class="fa fa-user"></i> <u>P</u>rofile</a>
76
-                    </li>
77
-                    <li class="divider"></li>
78
-                    <li>
79
-                        <a href="javascript:void(0);" class="padding-10 padding-top-0 padding-bottom-0" data-action="toggleShortcut"><i class="fa fa-arrow-down"></i> <u>S</u>hortcut</a>
80
-                    </li>
81
-                    <li class="divider"></li>
82
-                    <li>
83
-                        <a href="javascript:void(0);" class="padding-10 padding-top-0 padding-bottom-0" data-action="launchFullscreen"><i class="fa fa-arrows-alt"></i> Full <u>S</u>creen</a>
84
-                    </li>
85
-                    <li class="divider"></li>
86
-                    <li>
87
-                        <a href="login.html" class="padding-10 padding-top-5 padding-bottom-5" data-action="userLogout"><i class="fa fa-sign-out fa-lg"></i> <strong><u>L</u>ogout</strong></a>
88
-                    </li>
89
-                </ul>
90
-            </li>
91
-        </ul>
92
-
93 62
         <!-- logout button -->
94 63
         <div id="logout" class="btn-header transparent pull-right">
95
-            <span> <a href="login.html" title="Sign Out" data-action="userLogout" data-logout-msg="You can improve your security further after logging out by closing this opened browser"><i class="fa fa-sign-out"></i></a> </span>
64
+            <span> <a href="/logout" title="Sign Out" data-action="userLogout" data-logout-msg="Willst Du dich wirklich ausloggen?"><i class="fa fa-sign-out"></i></a> </span>
96 65
         </div>
97 66
         <!-- end logout button -->
98
-
99
-        <!-- search mobile button (this is hidden till mobile view port) -->
100
-        <div id="search-mobile" class="btn-header transparent pull-right">
101
-            <span> <a href="javascript:void(0)" title="Search"><i class="fa fa-search"></i></a> </span>
102
-        </div>
103
-        <!-- end search mobile button -->
104 67
     </div>
105 68
     <!-- end pulled right: nav area -->
106 69
 </header>

+ 13
- 9
Application/templates/SmartAdmin/navigation/sideNavigation.tpl Ver fichero

@@ -20,23 +20,27 @@
20 20
     <!-- NAVIGATION : This navigation is also responsive-->
21 21
     <nav>
22 22
         <ul>
23
-            <li class="active">
23
+            <li {if $smarty.server.REQUEST_URI == "/"}class="active"{else}{/if}>
24 24
                 <a href="/" title="Dashboard"><i class="fa fa-lg fa-fw fa-home"></i> <span class="menu-item-parent">Dashboard</span></a>
25 25
             </li>
26
-            <li>
26
+            <li {if $smarty.server.REQUEST_URI|strpos:"statistics"}class="active open"{else}{/if}>
27 27
                 <a href="#" title="Statistiken"><i class="fa fa-lg fa-fw fa-bar-chart-o"></i> Statistiken</a>
28 28
                 <ul>
29
-                    <li>
30
-                        <a href="statistics/sternenkindsaga">Sternenkind Saga</a>
31
-                    </li>
29
+                    {if $acl->acl("see_SKS") == 1 || $acl->acl("is_developer") == 1 || $acl->acl("is_admin")}
30
+                        <li {if $smarty.server.REQUEST_URI|strpos:"statistics/sternenkindsaga"}class="active"{else}{/if}>
31
+                            <a href="statistics/sternenkindsaga">Sternenkind Saga</a>
32
+                        </li>
33
+                    {/if}
32 34
                 </ul>
33 35
             </li>
34
-            <li>
36
+            <li {if $smarty.server.REQUEST_URI|strpos:"pageadmin"}class="active open"{else}{/if}>
35 37
                 <a href="#" title="Page Administration"><i class="fa fa-lg fa-fw fa-edit"></i> Page Administration</a>
36 38
                 <ul>
37
-                    <li>
38
-                        <a href="pageadmin/sternenkindsaga">Sternenkind Saga</a>
39
-                    </li>
39
+                    {if $acl->acl("see_SKS") == 1 || $acl->acl("is_developer") == 1 || $acl->acl("is_admin")}
40
+                        <li {if $smarty.server.REQUEST_URI|strpos:"pageadmin/sternenkindsaga"}class="active"{else}{/if}>
41
+                            <a href="pageadmin/sternenkindsaga">Sternenkind Saga</a>
42
+                        </li>
43
+                    {/if}
40 44
                 </ul>
41 45
             </li>
42 46
         </ul>

+ 6
- 204
web/lib/SmartAdmin/js/app.min.js Ver fichero

@@ -177,12 +177,12 @@ var calc_navbar_height = function() {
177 177
 			
178 178
 					// ask verification
179 179
 					$.SmartMessageBox({
180
-						title : "<i class='fa fa-sign-out txt-color-orangeDark'></i> Logout <span class='txt-color-orangeDark'><strong>" + $('#show-shortcut').text() + "</strong></span> ?",
180
+						title : "<i class='fa fa-sign-out txt-color-orangeDark'></i> Abmelden <span class='txt-color-orangeDark'><strong>" + $('#show-shortcut').text() + "</strong></span> ?",
181 181
 						content : $this.data('logout-msg') || "You can improve your security further after logging out by closing this opened browser",
182
-						buttons : '[No][Yes]'
182
+						buttons : '[Nein][Ja]'
183 183
 			
184 184
 					}, function(ButtonPressed) {
185
-						if (ButtonPressed == "Yes") {
185
+						if (ButtonPressed == "Ja") {
186 186
 							$.root_.addClass('animated fadeOutUp');
187 187
 							setTimeout(logout, 1000);
188 188
 						}
@@ -192,66 +192,6 @@ var calc_navbar_height = function() {
192 192
 					}
193 193
 			
194 194
 				},
195
-		
196
-				// RESET WIDGETS
197
-			    resetWidgets: function($this){
198
-					
199
-					$.SmartMessageBox({
200
-						title : "<i class='fa fa-refresh' style='color:green'></i> Clear Local Storage",
201
-						content : $this.data('reset-msg') || "Would you like to RESET all your saved widgets and clear LocalStorage?1",
202
-						buttons : '[No][Yes]'
203
-					}, function(ButtonPressed) {
204
-						if (ButtonPressed == "Yes" && localStorage) {
205
-							localStorage.clear();
206
-							location.reload();
207
-						}
208
-			
209
-					});
210
-			    },
211
-			    
212
-			    // LAUNCH FULLSCREEN 
213
-			    launchFullscreen: function(element){
214
-			
215
-					if (!$.root_.hasClass("full-screen")) {
216
-				
217
-						$.root_.addClass("full-screen");
218
-				
219
-						if (element.requestFullscreen) {
220
-							element.requestFullscreen();
221
-						} else if (element.mozRequestFullScreen) {
222
-							element.mozRequestFullScreen();
223
-						} else if (element.webkitRequestFullscreen) {
224
-							element.webkitRequestFullscreen();
225
-						} else if (element.msRequestFullscreen) {
226
-							element.msRequestFullscreen();
227
-						}
228
-				
229
-					} else {
230
-						
231
-						$.root_.removeClass("full-screen");
232
-						
233
-						if (document.exitFullscreen) {
234
-							document.exitFullscreen();
235
-						} else if (document.mozCancelFullScreen) {
236
-							document.mozCancelFullScreen();
237
-						} else if (document.webkitExitFullscreen) {
238
-							document.webkitExitFullscreen();
239
-						}
240
-				
241
-					}
242
-			
243
-			   },
244
-			
245
-			   // MINIFY MENU
246
-			    minifyMenu: function($this){
247
-			    	if (!$.root_.hasClass("menu-on-top")){
248
-						$.root_.toggleClass("minified");
249
-						$.root_.removeClass("hidden-menu");
250
-						$('html').removeClass("hidden-menu-mobile-lock");
251
-						$this.effect("highlight", {}, 500);
252
-					}
253
-			    },
254
-			    
255 195
 			    // TOGGLE MENU 
256 196
 			    toggleMenu: function(){
257 197
 			    	if (!$.root_.hasClass("menu-on-top")){
@@ -265,50 +205,7 @@ var calc_navbar_height = function() {
265 205
 						$.root_.toggleClass("hidden-menu");
266 206
 						$.root_.removeClass("minified");
267 207
 			    	}
268
-			    },     
269
-			
270
-			    // TOGGLE SHORTCUT 
271
-			    toggleShortcut: function(){
272
-			    	
273
-					if (shortcut_dropdown.is(":visible")) {
274
-						shortcut_buttons_hide();
275
-					} else {
276
-						shortcut_buttons_show();
277
-					}
278
-		
279
-					// SHORT CUT (buttons that appear when clicked on user name)
280
-					shortcut_dropdown.find('a').click(function(e) {
281
-						e.preventDefault();
282
-						window.location = $(this).attr('href');
283
-						setTimeout(shortcut_buttons_hide, 300);
284
-				
285
-					});
286
-				
287
-					// SHORTCUT buttons goes away if mouse is clicked outside of the area
288
-					$(document).mouseup(function(e) {
289
-						if (!shortcut_dropdown.is(e.target) && shortcut_dropdown.has(e.target).length === 0) {
290
-							shortcut_buttons_hide();
291
-						}
292
-					});
293
-					
294
-					// SHORTCUT ANIMATE HIDE
295
-					function shortcut_buttons_hide() {
296
-						shortcut_dropdown.animate({
297
-							height : "hide"
298
-						}, 300, "easeOutCirc");
299
-						$.root_.removeClass('shortcut-on');
300
-				
301
-					}
302
-				
303
-					// SHORTCUT ANIMATE SHOW
304
-					function shortcut_buttons_show() {
305
-						shortcut_dropdown.animate({
306
-							height : "show"
307
-						}, 200, "easeOutCirc");
308
-						$.root_.addClass('shortcut-on');
309
-					}
310
-			
311
-			    }  
208
+			    }
312 209
 			   
313 210
 			};
314 211
 				
@@ -320,44 +217,13 @@ var calc_navbar_height = function() {
320 217
 				//clear memory reference
321 218
 				$this = null;
322 219
 				
323
-			}); 
324
-
325
-			/*
326
-			 * BUTTON ACTIONS 
327
-			 */		
328
-			$.root_.on('click', '[data-action="resetWidgets"]', function(e) {	
329
-				var $this = $(this);
330
-				smartActions.resetWidgets($this);
331
-				e.preventDefault();
332
-				
333
-				//clear memory reference
334
-				$this = null;
335 220
 			});
336 221
 			
337
-			$.root_.on('click', '[data-action="launchFullscreen"]', function(e) {	
338
-				smartActions.launchFullscreen(document.documentElement);
339
-				e.preventDefault();
340
-			}); 
341
-			
342
-			$.root_.on('click', '[data-action="minifyMenu"]', function(e) {
343
-				var $this = $(this);
344
-				smartActions.minifyMenu($this);
345
-				e.preventDefault();
346
-				
347
-				//clear memory reference
348
-				$this = null;
349
-			}); 
350
-			
351 222
 			$.root_.on('click', '[data-action="toggleMenu"]', function(e) {	
352 223
 				smartActions.toggleMenu();
353 224
 				e.preventDefault();
354 225
 			});  
355
-		
356
-			$.root_.on('click', '[data-action="toggleShortcut"]', function(e) {	
357
-				smartActions.toggleShortcut();
358
-				e.preventDefault();
359
-			}); 
360
-					
226
+
361 227
 		};
362 228
 		/* ~ END: SMART ACTIONS */
363 229
 		
@@ -396,16 +262,7 @@ var calc_navbar_height = function() {
396 262
 			if ($("[rel=tooltip]").length) {
397 263
 				$("[rel=tooltip]").tooltip();
398 264
 			}*/
399
-		
400
-			// SHOW & HIDE MOBILE SEARCH FIELD
401
-			$('#search-mobile').click(function() {
402
-				$.root_.addClass('search-mobile');
403
-			});
404
-		
405
-			$('#cancel-search-js').click(function() {
406
-				$.root_.removeClass('search-mobile');
407
-			});
408
-		
265
+
409 266
 			// ACTIVITY
410 267
 			// ajax drop
411 268
 			$('#activity').click(function(e) {
@@ -1466,28 +1323,6 @@ var calc_navbar_height = function() {
1466 1323
 	}
1467 1324
 /* ~ END: INITIALIZE JARVIS WIDGETS */
1468 1325
 
1469
-/*
1470
- * GOOGLE MAPS
1471
- * description: Append google maps to head dynamically (only execute for ajax version)
1472
- * Loads at the begining for ajax pages
1473
- */
1474
-	if ($.navAsAjax || $(".google_maps")){
1475
-		var gMapsLoaded = false;
1476
-		window.gMapsCallback = function() {
1477
-			gMapsLoaded = true;
1478
-			$(window).trigger('gMapsLoaded');
1479
-		};
1480
-		window.loadGoogleMaps = function() {
1481
-			if (gMapsLoaded)
1482
-				return window.gMapsCallback();
1483
-			var script_tag = document.createElement('script');
1484
-			script_tag.setAttribute("type", "text/javascript");
1485
-			script_tag.setAttribute("src", "https://maps.google.com/maps/api/js?sensor=false&callback=gMapsCallback");
1486
-			(document.getElementsByTagName("head")[0] || document.documentElement).appendChild(script_tag);
1487
-		};
1488
-	}
1489
-/* ~ END: GOOGLE MAPS */
1490
-
1491 1326
 /*
1492 1327
  * LOAD SCRIPTS
1493 1328
  * Usage:
@@ -1683,40 +1518,7 @@ var calc_navbar_height = function() {
1683 1518
 			dataType : 'html',
1684 1519
 			cache : true, // (warning: setting it to false will cause a timestamp and will call the request twice)
1685 1520
 			beforeSend : function() {
1686
-				
1687
-				//IE11 bug fix for googlemaps (delete all google map instances)
1688
-				//check if the page is ajax = true, has google map class and the container is #content
1689
-				if ($.navAsAjax && $(".google_maps")[0] && (container[0] == $("#content")[0]) ) {
1690
-					
1691
-					// target gmaps if any on page
1692
-					var collection = $(".google_maps"),
1693
-						i = 0;
1694
-					// run for each	map
1695
-					collection.each(function() {
1696
-					    i ++;
1697
-					    // get map id from class elements
1698
-					    var divDealerMap = document.getElementById(this.id);
1699
-					    
1700
-					    if(i == collection.length + 1) {
1701
-						    // "callback"
1702
-						} else {
1703
-							// destroy every map found
1704
-							if (divDealerMap) divDealerMap.parentNode.removeChild(divDealerMap);
1705
-
1706
-							// debugState
1707
-							if (debugState){
1708
-								root.console.log("Destroying maps.........%c" + this.id, debugStyle_warning);
1709
-							}
1710
-						}
1711
-					});
1712 1521
 
1713
-					// debugState
1714
-					if (debugState){
1715
-						root.console.log("✔ Google map instances nuked!!!");
1716
-					}
1717
-					
1718
-				} //end fix
1719
-				
1720 1522
 				// destroy all datatable instances
1721 1523
 				if ( $.navAsAjax && $('.dataTables_wrapper')[0] && (container[0] == $("#content")[0]) ) {
1722 1524
 					

Loading…
Cancelar
Guardar