| | |
| | | <?php |
| | | session_start(); |
| | | include('../../lib/config.inc.php'); |
| | | header('Content-Type: text/javascript; charset=utf-8'); // the config file sets the content type header so we have to override it here! |
| | | require_once('../../lib/app.inc.php'); |
| | | $lang = (isset($_SESSION['s']['language']) && $_SESSION['s']['language'] != '')?$_SESSION['s']['language']:'en'; |
| | | include_once(ISPC_ROOT_PATH.'/web/strengthmeter/lib/lang/'.$lang.'_strengthmeter.lng'); |
| | | |
| | | $app->uses('ini_parser,getconf'); |
| | | $server_config_array = $app->getconf->get_global_config(); |
| | | session_start(); |
| | | include '../../lib/config.inc.php'; |
| | | header('Content-Type: text/javascript; charset=utf-8'); // the config file sets the content type header so we have to override it here! |
| | | require_once '../../lib/app.inc.php'; |
| | | $lang = (isset($_SESSION['s']['language']) && $_SESSION['s']['language'] != '')?$_SESSION['s']['language']:'en'; |
| | | include_once ISPC_ROOT_PATH.'/web/strengthmeter/lib/lang/'.$lang.'_strengthmeter.lng'; |
| | | |
| | | $app->uses('ini_parser,getconf'); |
| | | $server_config_array = $app->getconf->get_global_config(); |
| | | ?> |
| | | var pageFormChanged = false; |
| | | var tabChangeWarningTxt = ''; |
| | |
| | | redirect = ''; |
| | | |
| | | function reportError(request) { |
| | | /* Error reporting is disabled by default as some browsers like safari |
| | | sometimes throw errors when a ajax request is delayed even if the |
| | | /* Error reporting is disabled by default as some browsers like safari |
| | | sometimes throw errors when a ajax request is delayed even if the |
| | | ajax request worked. */ |
| | | |
| | | |
| | | /*alert(request);*/ |
| | | } |
| | | |
| | |
| | | if($server_config_array['misc']['use_loadindicator'] == 'y'){ |
| | | ?> |
| | | requestsRunning += 1; |
| | | |
| | | |
| | | if(requestsRunning < 2) { |
| | | var indicator = jQuery('#ajaxloader'); |
| | | if(indicator.length < 1) { |
| | |
| | | var parent = jQuery('#content'); |
| | | if(parent.length < 1) return; |
| | | indicatorCompleted = false; |
| | | |
| | | |
| | | var atx = parent.offset().left + 150; //((parent.outerWidth(true) - indicator.outerWidth(true)) / 2); |
| | | var aty = parent.offset().top + 150; |
| | | indicator.css( {'left': atx, 'top': aty } ).fadeIn('fast', function() { |
| | |
| | | } |
| | | |
| | | function loadContentRefresh(pagename) { |
| | | |
| | | |
| | | if(document.getElementById('refreshinterval').value > 0) { |
| | | var pageContentObject2 = jQuery.ajax({ type: "GET", |
| | | var pageContentObject2 = jQuery.ajax({ type: "GET", |
| | | url: pagename, |
| | | data: "refresh="+document.getElementById('refreshinterval').value, |
| | | dataType: "html", |
| | |
| | | } |
| | | |
| | | function capp(module, redirect) { |
| | | var submitFormObj = jQuery.ajax({ type: "GET", |
| | | url: "capp.php", |
| | | var submitFormObj = jQuery.ajax({ type: "GET", |
| | | url: "capp.php", |
| | | data: "mod="+module+((redirect != undefined) ? '&redirect='+redirect : ''), |
| | | dataType: "html", |
| | | beforeSend: function() { |
| | |
| | | passwordObj.focus(); |
| | | return; |
| | | } |
| | | |
| | | |
| | | $('#dummy_username').val(userNameObj.value); |
| | | $('#dummy_passwort').val(passwordObj.value); |
| | | $('#dummy_login_form').submit(); |
| | | |
| | | var submitFormObj = jQuery.ajax({ type: "POST", |
| | | var submitFormObj = jQuery.ajax({ type: "POST", |
| | | url: "content.php", |
| | | data: jQuery('#'+formname).serialize(), |
| | | dataType: "html", |
| | |
| | | } |
| | | document.getElementById('footer').innerHTML = 'Powered by <a href="http://www.ispconfig.org" target="_blank">ISPConfig</a>'; |
| | | */ |
| | | |
| | | |
| | | } |
| | | |
| | | function submitForm(formname,target) { |
| | | var submitFormObj = jQuery.ajax({ type: "POST", |
| | | var submitFormObj = jQuery.ajax({ type: "POST", |
| | | url: target, |
| | | data: jQuery('#'+formname).serialize(), |
| | | dataType: "html", |
| | |
| | | function submitFormConfirm(formname,target,confirmation) { |
| | | var successMessage = arguments[3]; |
| | | if(window.confirm(confirmation)) { |
| | | var submitFormObj = jQuery.ajax({ type: "POST", |
| | | var submitFormObj = jQuery.ajax({ type: "POST", |
| | | url: target, |
| | | data: jQuery('#'+formname).serialize(), |
| | | dataType: "html", |
| | |
| | | } |
| | | } |
| | | |
| | | function submitUploadForm(formname,target) { |
| | | function submitUploadForm(formname,target) { |
| | | var handleResponse = function(loadedFrame) { |
| | | var response, responseStr = loadedFrame.contentWindow.document.body.innerHTML; |
| | | |
| | | |
| | | try { |
| | | response = JSON.parse(responseStr); |
| | | } catch(e) { |
| | |
| | | msg = msg+'<div id="errorMsg">'+errormsg+'</div>'; |
| | | } |
| | | return msg; |
| | | |
| | | |
| | | }; |
| | | |
| | | |
| | | var frame_id = 'ajaxUploader-iframe-' + Math.round(new Date().getTime() / 1000); |
| | | jQuery('body').after('<iframe width="0" height="0" style="display:none;" name="'+frame_id+'" id="'+frame_id+'"/>'); |
| | | jQuery('input[type="file"]').closest("form").attr({target: frame_id, action: target}).submit(); |
| | |
| | | |
| | | function loadContent(pagename) { |
| | | var params = arguments[1]; |
| | | var pageContentObject2 = jQuery.ajax({ type: "GET", |
| | | var pageContentObject2 = jQuery.ajax({ type: "GET", |
| | | url: pagename, |
| | | data: (params ? params : null), |
| | | dataType: "html", |
| | |
| | | //var reponse = jQuery(jqXHR.responseText); |
| | | //var reponseScript = reponse.filter("script"); |
| | | //jQuery.each(reponseScript, function(idx, val) { eval(val.text); } ); |
| | | |
| | | |
| | | jQuery('#pageContent').html(jqXHR.responseText); |
| | | onAfterContentLoad(); |
| | | pageFormChanged = false; |
| | |
| | | |
| | | |
| | | function loadInitContent() { |
| | | var pageContentObject = jQuery.ajax({ type: "GET", |
| | | var pageContentObject = jQuery.ajax({ type: "GET", |
| | | url: "content.php", |
| | | data: "s_mod=login&s_pg=index", |
| | | dataType: "html", |
| | |
| | | reportError('Ajax Request was not successful. 114'); |
| | | } |
| | | }); |
| | | |
| | | |
| | | loadMenus(); |
| | | keepalive(); |
| | | setTimeout("setFocus()",1000); |
| | |
| | | |
| | | |
| | | function loadMenus() { |
| | | var sideNavObject = jQuery.ajax({ type: "GET", |
| | | var sideNavObject = jQuery.ajax({ type: "GET", |
| | | url: "nav.php", |
| | | data: "nav=side", |
| | | dataType: "html", |
| | |
| | | reportError('Ajax Request was not successful. 115'); |
| | | } |
| | | }); |
| | | |
| | | var topNavObject = jQuery.ajax({ type: "GET", |
| | | |
| | | var topNavObject = jQuery.ajax({ type: "GET", |
| | | url: "nav.php", |
| | | data: "nav=top", |
| | | dataType: "html", |
| | |
| | | function changeTab(tab,target,force) { |
| | | //document.forms[0].next_tab.value = tab; |
| | | document.pageForm.next_tab.value = tab; |
| | | |
| | | |
| | | var idel = jQuery('form#pageForm').find('[name="id"]'); |
| | | var id = null; |
| | | if(idel.length > 0) id = idel.val(); |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | function del_record(link,confirmation) { |
| | | if(window.confirm(confirmation)) { |
| | | loadContent(link); |
| | |
| | | } |
| | | |
| | | function loadContentInto(elementid,pagename) { |
| | | var pageContentObject2 = jQuery.ajax({ type: "GET", |
| | | var pageContentObject2 = jQuery.ajax({ type: "GET", |
| | | url: pagename, |
| | | dataType: "html", |
| | | beforeSend: function() { |
| | |
| | | } |
| | | |
| | | function loadOptionInto(elementid,pagename) { |
| | | var pageContentObject2 = jQuery.ajax({ type: "GET", |
| | | var pageContentObject2 = jQuery.ajax({ type: "GET", |
| | | url: pagename, |
| | | dataType: "html", |
| | | beforeSend: function() { |
| | |
| | | } |
| | | |
| | | function keepalive() { |
| | | var pageContentObject3 = jQuery.ajax({ type: "GET", |
| | | var pageContentObject3 = jQuery.ajax({ type: "GET", |
| | | url: "keepalive.php", |
| | | dataType: "html", |
| | | success: function(data, textStatus, jqXHR) { |
| | |
| | | pass_result(0); |
| | | return; |
| | | } |
| | | |
| | | |
| | | if (length < 5) { |
| | | pass_result(1); |
| | | return; |
| | | } |
| | | |
| | | |
| | | if (pass_contains(password, "ABCDEFGHIJKLNMOPQRSTUVWXYZ")) { |
| | | points += 1; |
| | | } |
| | | |
| | | |
| | | if (pass_contains(password, "0123456789")) { |
| | | points += 1; |
| | | } |
| | | |
| | | |
| | | if (pass_contains(password, "`~!@#$%^&*()_+|\=-[]}{';:/?.>,<\" ")) { |
| | | points += 1; |
| | | } |
| | | |
| | | |
| | | if (points == 0) { |
| | | if (length >= 5 && length <=6) { |
| | | pass_result(1); |
| | |
| | | var $el = jQuery('#template_additional_list ul').find('li[rel="' + tpl_id + '"]').eq(0); // only the first |
| | | var addTplText = $el.text(); |
| | | $el.remove(); |
| | | |
| | | |
| | | var oldVal = tpl_add.split('/'); |
| | | var newVal = new Array(); |
| | | for(var i = 0; i < oldVal.length; i++) { |
| | |
| | | } |
| | | return this; |
| | | }); |
| | | |
| | | |
| | | var newVal = tpl_add; |
| | | var repl = new RegExp('(^|\/)' + addTplId + '(\/|$)'); |
| | | newVal = newVal.replace(repl, ''); |
| | |
| | | } else { |
| | | alert('no additional template selcted'); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | function getInternetExplorerVersion() { |
| | |
| | | var template2 = jQuery(this).siblings(':input'); |
| | | template2.insertAtCaret(placeholderContentText); |
| | | }); |
| | | |
| | | |
| | | jQuery.fn.extend({ |
| | | insertAtCaret: function(myValue){ |
| | | return this.each(function(i) { |
| | |
| | | }) |
| | | } |
| | | }); |
| | | |