Changeset 2160
- Timestamp:
- Jul 15, 2016, 10:01:41 AM (5 years ago)
- Location:
- admin-center/trunk/fuentes/admin-center.install/usr/share/admin-center
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
admin-center/trunk/fuentes/admin-center.install/usr/share/admin-center/js/main.js
r2002 r2160 289 289 } 290 290 291 AdminCenter.prototype.cleanSession = function cleanSession(){ 292 if(sessionStorage.hasOwnProperty('server')){ 293 sessionStorage.removeItem('server'); 294 } 295 if(sessionStorage.hasOwnProperty('password')){ 296 sessionStorage.removeItem('password'); 297 } 298 if(sessionStorage.hasOwnProperty('username')){ 299 sessionStorage.removeItem('username'); 300 } 301 } 302 303 AdminCenter.prototype.sessionIsCorrectly = function sessionIsCorrectly(){ 304 if (!sessionStorage.hasOwnProperty('server') || !sessionStorage.hasOwnProperty('password') || !sessionStorage.hasOwnProperty('username')){ 305 return false; 306 } 307 else{ 308 return true; 309 } 310 } 311 312 291 313 $(document).ready(function() { 292 314 admin_center=new AdminCenter(); 293 315 if (!admin_center.sessionIsCorrectly()){ 316 window.location="login.php"; 317 } 318 294 319 $("#bt_logout").bind("click", function(){ 295 sessionStorage.server="";320 admin_center.cleanSession(); 296 321 window.location="login.php"; 297 322 }); -
admin-center/trunk/fuentes/admin-center.install/usr/share/admin-center/main.php
r2115 r2160 20 20 echo ("<div id='snack' data-toggle='snackbar' data-html-allowed='true' data-content=''></div> "); 21 21 22 23 importCommonLibraries(); 24 importCommonScripts(); 22 25 echo ("</body>"); 23 26 echo ("</html>"); 24 25 importCommonLibraries();26 importCommonScripts();27 27 28 28 /* Main Functions */
Note: See TracChangeset
for help on using the changeset viewer.