From 3583ff21e4e7db1ddbe52020008d0c239ed1c85f Mon Sep 17 00:00:00 2001 From: tbrehm Date: Tue, 11 Aug 2009 19:58:55 +0000 Subject: [PATCH] Fixed: FS#827 - Version number not visible after login --- interface/web/js/scrigo.js.php | 951 +++++++++--------- .../web/themes/default/templates/main.tpl.htm | 230 ++--- 2 files changed, 591 insertions(+), 590 deletions(-) diff --git a/interface/web/js/scrigo.js.php b/interface/web/js/scrigo.js.php index bea09ab60..1eac7101b 100644 --- a/interface/web/js/scrigo.js.php +++ b/interface/web/js/scrigo.js.php @@ -1,475 +1,476 @@ - - -redirect = ''; - -function loadContentRefresh(pagename) { - var pageContentCallbackRefresh = { - success: function(o) { - document.getElementById('pageContent').innerHTML = o.responseText; - }, - failure: function(o) { - alert('Ajax Request was not successful.'+pagename); - } - } - - if(document.getElementById('refreshinterval').value > 0) { - var pageContentObject2 = YAHOO.util.Connect.asyncRequest('GET', pagename+"&refresh="+document.getElementById('refreshinterval').value, pageContentCallbackRefresh); - setTimeout( "loadContentRefresh('"+pagename+"&refresh="+document.getElementById('refreshinterval').value+"')", document.getElementById('refreshinterval').value*1000 ); - } -} - -function capp(module) { - var cappCallback = { - success: function(o) { - if(o.responseText != '') { - if(o.responseText.indexOf('HEADER_REDIRECT:') > -1) { - var parts = o.responseText.split(':'); - loadContent(parts[1]); - } else { - alert(o.responseText); - } - } - loadMenus(); - }, - failure: function(o) { - alert('Ajax Request was not successful.'); - } - } - var submitFormObj = YAHOO.util.Connect.asyncRequest('GET', 'capp.php?mod='+module, cappCallback); -} - -function submitLoginForm(formname) { - - var submitFormCallback = { - success: function(o) { - if(o.responseText.indexOf('HEADER_REDIRECT:') > -1) { - var parts = o.responseText.split(':'); - //alert(parts[1]); - loadContent(parts[1]); - //redirect = parts[1]; - //window.setTimeout('loadContent(redirect)', 1000); - } else if (o.responseText.indexOf('LOGIN_REDIRECT:') > -1) { - // Go to the login page - document.location.href = 'index.php'; - } else { - document.getElementById('pageContent').innerHTML = o.responseText; - } - loadMenus(); - }, - failure: function(o) { - alert('Ajax Request was not successful.'); - } - } - - //* Validate form. TODO: username and password with strip(); - var frm = document.getElementById(formname); - var userNameObj = frm.username; - if(userNameObj.value == ''){ - userNameObj.focus(); - return; - } - var passwordObj = frm.passwort; - if(passwordObj.value == ''){ - passwordObj.focus(); - return; - } - YAHOO.util.Connect.setForm(formname); - var submitFormObj = YAHOO.util.Connect.asyncRequest('POST', 'content.php', submitFormCallback); - /* - if(redirect != '') { - loadContent(redirect); - redirect = ''; - } - */ -} - -function submitForm(formname,target) { - - var submitFormCallback = { - success: function(o) { - if(o.responseText.indexOf('HEADER_REDIRECT:') > -1) { - var parts = o.responseText.split(':'); - //alert(parts[1]); - loadContent(parts[1]); - //redirect = parts[1]; - //window.setTimeout('loadContent(redirect)', 1000); - } else { - document.getElementById('pageContent').innerHTML = o.responseText; - } - }, - failure: function(o) { - var parts = o.responseText.split(':'); - alert('Ajax Request was not successful. '+parts[1]); - } - } - - YAHOO.util.Connect.setForm(formname); - var submitFormObj = YAHOO.util.Connect.asyncRequest('POST', target, submitFormCallback); - /* - if(redirect != '') { - loadContent(redirect); - redirect = ''; - } - */ -} - -function submitUploadForm(formname,target) { - - var submitFormCallback = { - success: function(o) { - if(o.responseText.indexOf('HEADER_REDIRECT:') > -1) { - var parts = o.responseText.split(':'); - //alert(parts[1]); - loadContent(parts[1]); - //redirect = parts[1]; - //window.setTimeout('loadContent(redirect)', 1000); - } else { - document.getElementById('pageContent').innerHTML = o.responseText; - } - }, - upload: function(o) { - if(o.responseText.indexOf('HEADER_REDIRECT:') > -1) { - var parts = o.responseText.split(':'); - //alert(parts[1]); - loadContent(parts[1]); - //redirect = parts[1]; - //window.setTimeout('loadContent(redirect)', 1000); - } else { - document.getElementById('pageContent').innerHTML = o.responseText; - } - }, - failure: function(o) { - alert('Ajax Request was not successful. 1'); - } - } - - YAHOO.util.Connect.setForm(formname,true); - var submitFormObj = YAHOO.util.Connect.asyncRequest('POST', target, submitFormCallback); - /* - if(redirect != '') { - loadContent(redirect); - redirect = ''; - } - */ -} - -function loadContent(pagename) { - var pageContentCallback2 = { - success: function(o) { - if(o.responseText.indexOf('HEADER_REDIRECT:') > -1) { - var parts = o.responseText.split(':'); - loadContent(parts[1]); - } else if (o.responseText.indexOf('URL_REDIRECT:') > -1) { - var newUrl= o.responseText.substr(o.responseText.indexOf('URL_REDIRECT:') + "URL_REDIRECT:".length); - document.location.href = newUrl; - } else { - document.getElementById('pageContent').innerHTML = o.responseText; - } - }, - failure: function(o) { - alert('Ajax Request was not successful.'); - } - } - - - var pageContentObject2 = YAHOO.util.Connect.asyncRequest('GET', pagename, pageContentCallback2); -} - - -function loadInitContent() { - - var pageContentCallback = { - success: function(o) { - if(o.responseText.indexOf('HEADER_REDIRECT:') > -1) { - var parts = o.responseText.split(":"); - loadContent(parts[1]); - } else { - document.getElementById('pageContent').innerHTML = o.responseText; - } - - /* - var items = document.getElementsByTagName('input'); - for(i=0;i,<\" ")) { - points += 1; - } - - if (points == 0) { - if (length >= 5 && length <=6) { - pass_result(1); - } else if (length >= 7 && length <=8) { - pass_result(2); - } else { - pass_result(3); - } - } else if (points == 1) { - if (length >= 5 && length <=6) { - pass_result(2); - } else if (length >= 7 && length <=10) { - pass_result(3); - } else { - pass_result(4); - } - } else if (points == 2) { - if (length >= 5 && length <=8) { - pass_result(3); - } else if (length >= 9 && length <=10) { - pass_result(4); - } else { - pass_result(5); - } - } else if (points == 3) { - if (length >= 5 && length <=6) { - pass_result(3); - } else if (length >= 7 && length <=8) { - pass_result(4); - } else { - pass_result(5); - } - } else if (points >= 4) { - if (length >= 5 && length <=6) { - pass_result(4); - } else { - pass_result(5); - } - } -} - - - -function pass_result(points, message) { - if (points == 0) { - width = 10; - } else { - width = points*20; - } - document.getElementById("passBar").innerHTML = '
'; - document.getElementById("passText").innerHTML = pass_messages[points]['text']; -} -function pass_contains(pass, check) { - for (i = 0; i < pass.length; i++) { - if (check.indexOf(pass.charAt(i)) > -1) { - return true; - } - } - return false; -} - -function addAdditionalTemplate(){ - var tpl_add = document.getElementById('template_additional').value; - if(tpl_add != '') { - var tpl_list = document.getElementById('template_additional_list').innerHTML; - var addTemplate = document.getElementById('tpl_add_select').value.split('|',2); - var addTplId = addTemplate[0]; - var addTplText = addTemplate[1]; - var newVal = tpl_add + '/' + addTplId + '/'; - newVal = newVal.replace('//', '/'); - var newList = tpl_list + '
' + addTplText; - newList = newList.replace('

', '
'); - document.getElementById('template_additional').value = newVal; - document.getElementById('template_additional_list').innerHTML = newList; - alert('additional template ' + addTplText + ' added to customer'); - } else { - alert('no additional template selcted'); - } -} - -function delAdditionalTemplate(){ - var tpl_add = document.getElementById('template_additional').value; - if(tpl_add != '') { - var tpl_list = document.getElementById('template_additional_list').innerHTML; - var addTemplate = document.getElementById('tpl_add_select').value.split('|',2); - var addTplId = addTemplate[0]; - var addTplText = addTemplate[1]; - var newVal = tpl_add; - newVal = newVal.replace(addTplId, ''); - newVal = newVal.replace('//', '/'); - var newList = tpl_list.replace(addTplText, ''); - newList = newList.replace('

', '
'); - document.getElementById('template_additional').value = newVal; - document.getElementById('template_additional_list').innerHTML = newList; - alert('additional template ' + addTplText + ' deleted from customer'); - } else { - alert('no additional template selcted'); - } - -} + + +redirect = ''; + +function loadContentRefresh(pagename) { + var pageContentCallbackRefresh = { + success: function(o) { + document.getElementById('pageContent').innerHTML = o.responseText; + }, + failure: function(o) { + alert('Ajax Request was not successful.'+pagename); + } + } + + if(document.getElementById('refreshinterval').value > 0) { + var pageContentObject2 = YAHOO.util.Connect.asyncRequest('GET', pagename+"&refresh="+document.getElementById('refreshinterval').value, pageContentCallbackRefresh); + setTimeout( "loadContentRefresh('"+pagename+"&refresh="+document.getElementById('refreshinterval').value+"')", document.getElementById('refreshinterval').value*1000 ); + } +} + +function capp(module) { + var cappCallback = { + success: function(o) { + if(o.responseText != '') { + if(o.responseText.indexOf('HEADER_REDIRECT:') > -1) { + var parts = o.responseText.split(':'); + loadContent(parts[1]); + } else { + alert(o.responseText); + } + } + loadMenus(); + }, + failure: function(o) { + alert('Ajax Request was not successful.'); + } + } + var submitFormObj = YAHOO.util.Connect.asyncRequest('GET', 'capp.php?mod='+module, cappCallback); +} + +function submitLoginForm(formname) { + + var submitFormCallback = { + success: function(o) { + if(o.responseText.indexOf('HEADER_REDIRECT:') > -1) { + var parts = o.responseText.split(':'); + //alert(parts[1]); + loadContent(parts[1]); + //redirect = parts[1]; + //window.setTimeout('loadContent(redirect)', 1000); + } else if (o.responseText.indexOf('LOGIN_REDIRECT:') > -1) { + // Go to the login page + document.location.href = 'index.php'; + } else { + document.getElementById('pageContent').innerHTML = o.responseText; + } + loadMenus(); + }, + failure: function(o) { + alert('Ajax Request was not successful.'); + } + } + + //* Validate form. TODO: username and password with strip(); + var frm = document.getElementById(formname); + var userNameObj = frm.username; + if(userNameObj.value == ''){ + userNameObj.focus(); + return; + } + var passwordObj = frm.passwort; + if(passwordObj.value == ''){ + passwordObj.focus(); + return; + } + YAHOO.util.Connect.setForm(formname); + var submitFormObj = YAHOO.util.Connect.asyncRequest('POST', 'content.php', submitFormCallback); + /* + if(redirect != '') { + loadContent(redirect); + redirect = ''; + } + */ + document.getElementById('footer').innerHTML = 'Powered by ISPConfig '; +} + +function submitForm(formname,target) { + + var submitFormCallback = { + success: function(o) { + if(o.responseText.indexOf('HEADER_REDIRECT:') > -1) { + var parts = o.responseText.split(':'); + //alert(parts[1]); + loadContent(parts[1]); + //redirect = parts[1]; + //window.setTimeout('loadContent(redirect)', 1000); + } else { + document.getElementById('pageContent').innerHTML = o.responseText; + } + }, + failure: function(o) { + var parts = o.responseText.split(':'); + alert('Ajax Request was not successful. '+parts[1]); + } + } + + YAHOO.util.Connect.setForm(formname); + var submitFormObj = YAHOO.util.Connect.asyncRequest('POST', target, submitFormCallback); + /* + if(redirect != '') { + loadContent(redirect); + redirect = ''; + } + */ +} + +function submitUploadForm(formname,target) { + + var submitFormCallback = { + success: function(o) { + if(o.responseText.indexOf('HEADER_REDIRECT:') > -1) { + var parts = o.responseText.split(':'); + //alert(parts[1]); + loadContent(parts[1]); + //redirect = parts[1]; + //window.setTimeout('loadContent(redirect)', 1000); + } else { + document.getElementById('pageContent').innerHTML = o.responseText; + } + }, + upload: function(o) { + if(o.responseText.indexOf('HEADER_REDIRECT:') > -1) { + var parts = o.responseText.split(':'); + //alert(parts[1]); + loadContent(parts[1]); + //redirect = parts[1]; + //window.setTimeout('loadContent(redirect)', 1000); + } else { + document.getElementById('pageContent').innerHTML = o.responseText; + } + }, + failure: function(o) { + alert('Ajax Request was not successful. 1'); + } + } + + YAHOO.util.Connect.setForm(formname,true); + var submitFormObj = YAHOO.util.Connect.asyncRequest('POST', target, submitFormCallback); + /* + if(redirect != '') { + loadContent(redirect); + redirect = ''; + } + */ +} + +function loadContent(pagename) { + var pageContentCallback2 = { + success: function(o) { + if(o.responseText.indexOf('HEADER_REDIRECT:') > -1) { + var parts = o.responseText.split(':'); + loadContent(parts[1]); + } else if (o.responseText.indexOf('URL_REDIRECT:') > -1) { + var newUrl= o.responseText.substr(o.responseText.indexOf('URL_REDIRECT:') + "URL_REDIRECT:".length); + document.location.href = newUrl; + } else { + document.getElementById('pageContent').innerHTML = o.responseText; + } + }, + failure: function(o) { + alert('Ajax Request was not successful.'); + } + } + + + var pageContentObject2 = YAHOO.util.Connect.asyncRequest('GET', pagename, pageContentCallback2); +} + + +function loadInitContent() { + + var pageContentCallback = { + success: function(o) { + if(o.responseText.indexOf('HEADER_REDIRECT:') > -1) { + var parts = o.responseText.split(":"); + loadContent(parts[1]); + } else { + document.getElementById('pageContent').innerHTML = o.responseText; + } + + /* + var items = document.getElementsByTagName('input'); + for(i=0;i,<\" ")) { + points += 1; + } + + if (points == 0) { + if (length >= 5 && length <=6) { + pass_result(1); + } else if (length >= 7 && length <=8) { + pass_result(2); + } else { + pass_result(3); + } + } else if (points == 1) { + if (length >= 5 && length <=6) { + pass_result(2); + } else if (length >= 7 && length <=10) { + pass_result(3); + } else { + pass_result(4); + } + } else if (points == 2) { + if (length >= 5 && length <=8) { + pass_result(3); + } else if (length >= 9 && length <=10) { + pass_result(4); + } else { + pass_result(5); + } + } else if (points == 3) { + if (length >= 5 && length <=6) { + pass_result(3); + } else if (length >= 7 && length <=8) { + pass_result(4); + } else { + pass_result(5); + } + } else if (points >= 4) { + if (length >= 5 && length <=6) { + pass_result(4); + } else { + pass_result(5); + } + } +} + + + +function pass_result(points, message) { + if (points == 0) { + width = 10; + } else { + width = points*20; + } + document.getElementById("passBar").innerHTML = '
'; + document.getElementById("passText").innerHTML = pass_messages[points]['text']; +} +function pass_contains(pass, check) { + for (i = 0; i < pass.length; i++) { + if (check.indexOf(pass.charAt(i)) > -1) { + return true; + } + } + return false; +} + +function addAdditionalTemplate(){ + var tpl_add = document.getElementById('template_additional').value; + if(tpl_add != '') { + var tpl_list = document.getElementById('template_additional_list').innerHTML; + var addTemplate = document.getElementById('tpl_add_select').value.split('|',2); + var addTplId = addTemplate[0]; + var addTplText = addTemplate[1]; + var newVal = tpl_add + '/' + addTplId + '/'; + newVal = newVal.replace('//', '/'); + var newList = tpl_list + '
' + addTplText; + newList = newList.replace('

', '
'); + document.getElementById('template_additional').value = newVal; + document.getElementById('template_additional_list').innerHTML = newList; + alert('additional template ' + addTplText + ' added to customer'); + } else { + alert('no additional template selcted'); + } +} + +function delAdditionalTemplate(){ + var tpl_add = document.getElementById('template_additional').value; + if(tpl_add != '') { + var tpl_list = document.getElementById('template_additional_list').innerHTML; + var addTemplate = document.getElementById('tpl_add_select').value.split('|',2); + var addTplId = addTemplate[0]; + var addTplText = addTemplate[1]; + var newVal = tpl_add; + newVal = newVal.replace(addTplId, ''); + newVal = newVal.replace('//', '/'); + var newList = tpl_list.replace(addTplText, ''); + newList = newList.replace('

', '
'); + document.getElementById('template_additional').value = newVal; + document.getElementById('template_additional_list').innerHTML = newList; + alert('additional template ' + addTplText + ' deleted from customer'); + } else { + alert('no additional template selcted'); + } + +} diff --git a/interface/web/themes/default/templates/main.tpl.htm b/interface/web/themes/default/templates/main.tpl.htm index 621ba94e0..8e22384e9 100644 --- a/interface/web/themes/default/templates/main.tpl.htm +++ b/interface/web/themes/default/templates/main.tpl.htm @@ -1,115 +1,115 @@ - - - - <tmpl_var name="app_title"> <tmpl_var name="app_version"> - "/> - - - - - - - - - - - - -
-
- - - - - -
- -
-
-
 
-
-
- - -
-
- - -
-
-
-
-
 
- -
- -
- - - -
-
- - + + + + <tmpl_var name="app_title"> <tmpl_var name="app_version"> + "/> + + + + + + + + + + + + +
+
+ + + + + +
+ +
+
+
 
+
+
+ + +
+
+ + +
+
+
+
+
 
+ +
+ +
+ + + +
+ + -- GitLab