1/* This file is part of Mura CMS. 2 3 Mura CMS is free software: you can redistribute it and/or modify 4 it under the terms of the GNU General Public License as published by 5 the Free Software Foundation, Version 2 of the License. 6 7 Mura CMS is distributed in the hope that it will be useful, 8 but WITHOUT ANY WARRANTY; without even the implied warranty of 9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 GNU General Public License for more details. 11 12 You should have received a copy of the GNU General Public License 13 along with Mura CMS. If not, see <http://www.gnu.org/licenses/>. 14 15 Linking Mura CMS statically or dynamically with other modules constitutes the preparation of a derivative work based on 16 Mura CMS. Thus, the terms and conditions of the GNU General Public License version 2 ("GPL") cover the entire combined work. 17 18 However, as a special exception, the copyright holders of Mura CMS grant you permission to combine Mura CMS with programs 19 or libraries that are released under the GNU Lesser General Public License version 2.1. 20 21 In addition, as a special exception, the copyright holders of Mura CMS grant you permission to combine Mura CMS with 22 independent software modules (plugins, themes and bundles), and to distribute these plugins, themes and bundles without 23 Mura CMS under the license of your choice, provided that you follow these specific guidelines: 24 25 Your custom code 26 27 ⢠Must not alter any default objects in the Mura CMS database and 28 ⢠May not alter the default display of the Mura CMS logo within Mura CMS and 29 ⢠Must not alter any files in the following directories. 30 31 /admin/ 32 /tasks/ 33 /config/ 34 /requirements/mura/ 35 /Application.cfc 36 /index.cfm 37 /MuraProxy.cfc 38 39 You may copy and distribute Mura CMS with a plug-in, theme or bundle that meets the above guidelines as a combined work 40 under the terms of GPL for Mura CMS, provided that you include the source code of that other code when and as the GNU GPL 41 requires distribution of source code. 42 43 For clarity, if you create a modified version of Mura CMS, you are not obligated to grant this special exception for your 44 modified version; it is your choice whether to do so, or to make such modified version available under the GNU General Public License 45 version 2 without this exception. You may, if you choose, apply this exception to your own modified versions of Mura CMS. */function noSpam(e,t){locationstring="mailto:"+e+"@"+t;window.location=locationstring}function isInteger(e){var t;for(t=0;t<e.length;t++){var n=e.charAt(t);if(n<"0"||n>"9")return!1}return!0}function createDate(e){var t=e.split("/"),n=t[0],r=t[1],i=t[2],s=new Date(i,n-1,r);return isNaN(s.getMonth())?new Date:s}function dateToString(e){var t=e.getMonth()+1,n=e.getDate(),r=e.getFullYear();t<10&&(t="0"+t);n<10&&(n="0"+n);return t+"/"+n+"/20"+(new String(r)).substring(2,4)}function stripCharsInBag(e,t){var n,r="";for(n=0;n<e.length;n++){var i=e.charAt(n);t.indexOf(i)==-1&&(r+=i)}return r}function daysInFebruary(e){return e%4!=0||e%100==0&&e%400!=0?28:29}function DaysArray(e){for(var t=1;t<=e;t++){this[t]=31;if(t==4||t==6||t==9||t==11)this[t]=30;t==2&&(this[t]=29)}return this}function isDate(e,t){var n=DaysArray(12),r=e.split(dtCh);if(r.length!=3)return!1;var i=r[dtFormat[0]],s=r[dtFormat[1]],o=r[dtFormat[2]];strYr=o;s.charAt(0)=="0"&&s.length>1&&(s=s.substring(1));i.charAt(0)=="0"&&i.length>1&&(i=i.substring(1));for(var u=1;u<=3;u++)strYr.charAt(0)=="0"&&strYr.length>1&&(strYr=strYr.substring(1));month=parseInt(i);day=parseInt(s);year=parseInt(strYr);return month<1||month>12?!1:day<1||day>31||month==2&&day>daysInFebruary(year)||day>n[month]?!1:o.length!=4||year==0||year<minYear||year>maxYear?!1:isInteger(stripCharsInBag(e,dtCh))==0?!1:!0}function isEmail(e){var t=e;return t.indexOf("@")==-1||t.indexOf(".")==-1?!1:!0}function validate(e){return validateForm(e)}function getValidationFieldName(e){return e.getAttribute("data-label")!=undefined?e.getAttribute("data-label"):e.getAttribute("label")!=undefined?e.getAttribute("label"):e.getAttribute("name")}function getValidationIsRequired(e){return e.getAttribute("data-required")!=undefined?e.getAttribute("data-required").toLowerCase()=="true":e.getAttribute("required")!=undefined?e.getAttribute("required").toLowerCase()=="true":!1}function getValidationMessage(e,t){return e.getAttribute("data-message")!=undefined?e.getAttribute("data-message")+"\n":e.getAttribute("message")!=undefined?e.getAttribute("message")+"\n":getValidationFieldName(e).toUpperCase()+t+"\n"}function getValidationType(e){return e.getAttribute("data-validate")!=undefined?e.getAttribute("data-validate").toUpperCase():e.getAttribute("validate")!=undefined?e.getAttribute("validate").toUpperCase():""}function hasValidationMatchField(e){return e.getAttribute("data-matchfield")!=undefined&&e.getAttribute("data-matchfield")!=""?!0:e.getAttribute("matchfield")!=undefined&&e.getAttribute("matchfield")!=""?!0:!1}function getValidationMatchField(e){return e.getAttribute("data-matchfield")!=undefined?e.getAttribute("data-matchfield"):e.getAttribute("matchfield")!=undefined?e.getAttribute("matchfield"):""}function hasValidationRegex(e){if(e.value==undefined)return!1;if(e.getAttribute("data-regex")!=undefined&&e.getAttribute("data-regex")!="")return!0;
45if(e.getAttribute("regex")!=undefined&&e.getAttribute("regex")!="")return!0}function getValidationRegex(e){return e.getAttribute("data-regex")!=undefined?e.getAttribute("data-regex"):e.getAttribute("regex")!=undefined?e.getAttribute("regex"):""}function validateForm(e){var t="",n=0,r=!1,i,s,o="",u=e.getElementsByTagName("input");for(f=0;f<u.length;f++){theField=u[f];o=getValidationType(theField);if(theField.style.display=="")if(getValidationIsRequired(theField)&&theField.value==""){if(!r){r=!0;i=f;s="input"}t+=getValidationMessage(theField," is required.")}else if(o!="")if(o=="EMAIL"&&theField.value!=""&&!isEmail(theField.value)){if(!r){r=!0;i=f;s="input"}t+=getValidationMessage(theField," must be a valid email address.")}else if(o=="NUMERIC"&&isNaN(theField.value))if(!isNaN(theField.value.replace(/\$|\,|\%/g,"")))theField.value=theField.value.replace(/\$|\,|\%/g,"");else{if(!r){r=!0;i=f;s="input"}t+=getValidationMessage(theField," must be numeric.")}else if(o=="REGEX"&&theField.value!=""&&hasValidationRegex(theField)){var a=new RegExp(getValidationRegex(theField));if(!theField.value.match(a)){if(!r){r=!0;i=f;s="input"}t+=getValidationMessage(theField," is not valid.")}}else if(o=="MATCH"&&hasValidationMatchField(theField)&&theField.value!=e[getValidationMatchField(theField)].value){if(!r){r=!0;i=f;s="input"}t+=getValidationMessage(theField," must match"+getValidationMatchField(theField)+".")}else if(o=="DATE"&&theField.value!=""&&!isDate(theField.value)){if(!r){r=!0;i=f;s="input"}t+=getValidationMessage(theField," must be a valid date [MM/DD/YYYY].")}}var l=e.getElementsByTagName("textarea");for(f=0;f<l.length;f++){theField=l[f];o=getValidationType(theField);if(theField.style.display==""&&getValidationIsRequired(theField)&&theField.value==""){if(!r){r=!0;i=f;s="textarea"}t+=getValidationMessage(theField," is required.")}else if(o!=""&&o=="REGEX"&&theField.value!=""&&hasValidationRegex(theField)){var a=new RegExp(getValidationRegex(theField));if(!theField.value.match(a)){if(!r){r=!0;i=f;s="input"}t+=getValidationMessage(theField," is not valid.")}}}var c=e.getElementsByTagName("select");for(f=0;f<c.length;f++){theField=c[f];o=getValidationType(theField);if(theField.style.display==""&&getValidationIsRequired(theField)&&theField.options[theField.selectedIndex].value==""){if(!r){r=!0;i=f;s="select"}t+=getValidationMessage(theField," is required.")}}if(t!=""){alert(t);s=="input"?u[i].focus():s=="textarea"?l[i].focus():s=="select"&&c[i].focus();return!1}return!0}function submitForm(e,t,n){if(validateForm(e)){if(typeof t!="undefined"&&(t=="delete"&&confirm("Delete "+n+"?")||t!="delete")){var r=e.getElementsByTagName("input");for(f=0;f<r.length;f++)r[f].getAttribute("name")=="action"&&r[f].setAttribute("value",t)}e.submit();formSubmitted=!0}return!1}function createCookie(e,t,n){if(n){var r=new Date;r.setTime(r.getTime()+n*24*60*60*1e3);var i="; expires="+r.toGMTString()}else var i="";document.cookie=e+"="+t+i+"; path=/"}function readCookie(e){var t=e+"=",n=document.cookie.split(";");for(var r=0;r<n.length;r++){var i=n[r];while(i.charAt(0)==" ")i=i.substring(1,i.length);if(i.indexOf(t)==0)return unescape(i.substring(t.length,i.length))}return""}function eraseCookie(e){createCookie(e,"",-1)}function addLoadEvent(e){var t=window.onload;typeof window.onload!="function"?window.onload=e:window.onload=function(){t();e()}}function muraLoginCheck(e){var t=window.event?event.keyCode:e.keyCode;typeof pressed_keys=="undefined"&&(pressed_keys="");t==27?pressed_keys=t:t==76&&(pressed_keys=pressed_keys+""+t);t!=27&&t!=76&&(pressed_keys="");if(pressed_keys!=""){var n=pressed_keys;if(n.indexOf("2776")!=-1&&location.search.indexOf("display=login")==-1){typeof loginURL=="undefined"?lu="?display=login":lu=loginURL;typeof returnURL=="undefined"?ru=location.href:ru=returnURL;pressed_keys="";lu=new String(lu);lu.indexOf("?")!=-1?location.href=lu+"&returnUrl="+escape(ru):location.href=lu+"?returnUrl="+escape(ru)}}}function setMuraLoginCheck(){document.onkeydown=muraLoginCheck}function setHTMLEditors(e,t,n){var r=document.getElementsByTagName("textarea"),s=new Array;for(i=0;i<r.length;i++)if(r[i].className.toLowerCase()=="htmleditor")if(htmlEditorType=="fckeditor"){var o=new FCKeditor(r[i].id);o.ToolbarSet="htmlEditor";o.Config.EditorAreaCSS=themepath+"/css/editor.css";o.Config.StylesXmlPath=themepath+"/css/fckstyles.xml";o.BasePath=context+"/wysiwyg/";o.Height=e;o.Width=t;o.Config.ImageBrowser=!1;o.Config.ImageUpload=!1;o.Config.ForcePasteAsPlainText=!0;o.Config.StartupFocus=!1;o.ReplaceTextarea();s.push(o)}else{var u=CKEDITOR.instances[r[i].id],a={height:e,width:t};n!=null&&(a=extendObject(a,n));u&&CKEDITOR.remove(u);jQuery("#"+r[i].id).ckeditor(getHTMLEditorConfig(a),htmlEditorOnComplete)}}function htmlEditorOnComplete(e){if(htmlEditorType=="fckeditor"){e.ResetIsDirty();var t=FCKeditorAPI.Instances}else{var n=jQuery(e).ckeditorGet();n.resetDirty();var t=CKEDITOR.instances}}function getHTMLEditorConfig(e){var t="",n={toolbar:"htmlEditor",customConfig:"config.js.cfm"};typeof e=="object"&&(n=extendObject(n,e));return n}function extendObject(e,t){for(var n in t)e[n]=t[n];return e}var dtCh="/",dtCh="/",minYear=1900,maxYear=2100,dtFormat=[0,1,2],dtExample="12/31/2014",HTMLEditorLoadCount=0;$(document).ready(setMuraLoginCheck);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.