OXIESEC PANEL
- Current Dir:
/
/
home
/
cubot
/
docroot
/
edash
/
jscripts_main
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
02/03/2023 07:49:02 AM
rwxr-xr-x
📄
.navigate.js.swo
52 KB
08/14/2022 11:11:46 AM
rw-r--r--
📄
access.js
1.53 KB
08/14/2022 11:11:46 AM
rw-r--r--
📄
ajax.js
7.17 KB
08/14/2022 11:11:46 AM
rw-r--r--
📄
dragdrop.js
36.78 KB
08/14/2022 11:11:46 AM
rw-r--r--
📄
dtpick.html
10.86 KB
08/14/2022 11:11:46 AM
rwxr-xr-x
📄
dtree.js
15.2 KB
08/14/2022 11:11:46 AM
rw-r--r--
📄
jquery.js
242.42 KB
08/14/2022 11:11:46 AM
rw-r--r--
📄
navigate.js
40.62 KB
08/14/2022 11:11:46 AM
rw-r--r--
📄
sorttable.js
16.52 KB
08/14/2022 11:11:46 AM
rw-r--r--
📄
tools.js
1.26 KB
08/14/2022 11:11:46 AM
rw-r--r--
📄
validate.js
10.53 KB
08/14/2022 11:11:46 AM
rw-r--r--
📄
validate_admin.js
4.7 KB
08/14/2022 11:11:46 AM
rw-r--r--
Editing: validate.js
Close
function doUnload(site, id){ var web; /*if (window.event.clientX < 0 && window.event.clientY < 0){ web = "http://" + site + "/logout.rx?conn=" + id + "&close=1"; cubeout=window.open(web, 'Cubeclose','height=150,width=200,left=10,top=10,scrollbars=no,resizable=0'); cubeout.close(); }*/ } function vfiltersel(href) { var filselect=0; var ml = document.setfiltforform; var len = ml.elements.length; for(var i=0;i < len; i++){ if(ml.elements[i].name == "filval" && ml.elements[i].checked){ filselect++; if(filselect > 50){ alert("Filter is restricted to 50 elements"); return false; } } } return true; } function vadminfiltersel(href) { var filselect=0; var ml = document.cfgform; var len = ml.elements.length; for(var i=0;i < len; i++){ if(ml.elements[i].name == "filval" && ml.elements[i].checked){ filselect++; if(filselect > 50){ alert("Filter is restricted to 50 elements"); return false; } } } return true; } function vmailtime(myref) { var timePat = /^(\d{1,2}):(\d{2})(:(\d{2}))?(\s?(AM|am|PM|pm))?$/; var list= document.mailform.time; var matchArray = list.value.match(timePat); if (matchArray == null) { alert("Time is not in a valid format."); return false; } hour = matchArray[1]; minute = matchArray[2]; second = matchArray[4]; ampm = matchArray[6]; if (second=="") { second = null; } if (ampm=="") { ampm = null } if (hour < 0 || hour > 23) { alert("Hour must be between 1 and 12. (or 0 and 23 for military time)"); return false; } if (hour <= 12 && ampm == null) { if (confirm("Please indicate which time format you are using. OK = Standard Time, CANCEL = Military Time")) { alert("You must specify AM or PM."); return false; } } if (hour > 12 && ampm != null) { alert("You can't specify AM or PM for military time."); return false; } if (minute<0 || minute > 59) { alert ("Minute must be between 0 and 59."); return false; } if (second != null && (second < 0 || second > 59)) { alert ("Second must be between 0 and 59."); return false; } return true; } function AMPM(from, to) { var list= document.mailform.time; var value = ""; if(list && list.value.length){ value = list.value.replace(/\s/g,""); value = value.replace(from,""); } if(value.length == 5 || value.length == 4) list.value = value+" "+to; return true; } function PM(myref) { var list= document.mailform.time; if(list.value.length == 5 || list.value.length == 4) list.value = list.value+" PM"; return true; } function confirmUpdate() { var agree=confirm("Are you sure you want to Update?"); if (agree) return this.submit; else return false ; } function confirmDelete() { var agree=confirm("Are you sure you want to delete?"); if (agree) return true ; else return false ; } function txtfldval(myref){ var val= document.userform.userid; if (val.value == ""){ alert("Please Enter Userid."); val.focus(); return (false); } return (true); } function confirmTableChange(myref){ var val= confirm("Are you sure to change the table category?"); if(val) return true; else return false; } function screenpos(pos) { window.location.href="#" + pos } /**************************/ function Help(HTMLName) { var myWind; myWind = open( "", "myWindow","status = 1, height = 600, width = 600, resizable = 0" ); myWind.document.open(); myWind.document.write("<HTML><head><title>CUBOT HELP</title></head>"); myWind.document.write('<FRAMESET rows="6%,*" frameborder="0">'); myWind.document.write('<FRAME src="/edash/help/close.html" scrolling=no>'); myWind.document.write("<FRAME src=" + HTMLName + ">"); myWind.document.write("</FRAMESET>"); myWind.document.write("</HTML>"); myWind.document.close(); return myWind; } function closeHTML(myWin) { if(confirm("Want to close Help Window ?")) myWin.close(); } //iadd-E function stradd(myref) { var i,j,k,l=0; var frmlist, tolist; frmlist = document.storeform.stores; tolist = document.storeform.srcstr; for (i=0; i < frmlist.options.length; ++i) { if (frmlist.options[i].selected == true) { tolist.options[tolist.options.length] = new Option(frmlist.options[i].text); l++; } } for (j=0; j < l;j++ ) { for(k=0; k < frmlist.options.length; k++){ if (frmlist.options[k].selected == true) { frmlist.options[k] = null; break; } } } return false; } function confirmUpload(){ x = document.uploadfrm.upfile.value.charAt(0); if((x == '') || (x == ' ') ) { alert("Please enter a valid file name."); return false; } return true ; } function confirmSubmit(){ var agree=confirm("Are you sure you want to change column names?"); if (agree) return true ; else return false ; } function textLimit(field, maxlen, e) { var characterCode; if(e && e.which){ e = e; characterCode = e.which; }else{ e = event; characterCode = e.keyCode; } if((characterCode != 13) && (characterCode != 9) && (characterCode != 8)){ if (field.value.length >= maxlen ){ var str= 'Only ' + maxlen + ' characters can be entered' alert(str); } if (field.value.length > maxlen) { field.value = field.value.substring(0, maxlen); } } } function confirm_java(){ var agree=confirm("Are you sure you want to change table type?"); if (agree) return true ; else return false ; } function confirmParentId() { var agree=confirm("Are you sure you want to change Parent Id ?"); if (agree) return true ; else return false ; } function chkValidName(inpbox, onerrmsg){ var valid = /^[A-Za-z0-9\-_]+.*[A-Za-z0-9]+/; myfrm = document.forms[0]; if(myfrm.name != "saveform") /* BUG NO: 711 */ myfrm = document.forms[1]; if(!myfrm.fldname.value.length || !valid.test(myfrm.fldname.value)){ alert(onerrmsg); return (false); } return (true); } /** This function can be used to validate number of input chars in any of input box. We are using this for textarea's maxchar validation. */ function chkInput(str, inpbox, max){ x = inpbox.length - max; if(inpbox.length > max){ alert(str + " should not be more than " + max + " chars.\n" + x + " chars are extra."); return false; } return true; } function confirmTemplateDelete() { var agree=confirm("There are reports saved under this template. Are you sure you want to delete?"); if (agree) return true ; else return false ; } function enableField(cb1, edit1) { var datatype = cb1.value; // Selection from datatype combo var cr = edit1.value; //Value in size text box if((datatype == "DATE")||(datatype == "DATETIME")){ edit1.value=""; edit1.disabled=true; } else{ edit1.disabled=false; } if((datatype == "DOUBLE")||((datatype == "FLOAT"))){ alert("Size for DOUBLE/FLOAT is not proper."); edit1.value=""; } else if(datatype == "TINYINT"){ if(cr > 4){ alert("Size for TINYINT can't be more than 4"); edit1.value=4; } else if((cr < 1)||(cr == "")){ edit1.value=4; } } else if(datatype == "MEDIUMINT"){ if(cr > 9){ alert("Size for MEDIUMINT can't be more than 9"); edit1.value=9; } else if((cr < 1)||(cr == "")){ edit1.value=9; } } else if(datatype == "SMALLINT"){ if(cr > 6){ alert("Size for SMALLINT can't be more than 6"); edit1.value=6; } else if((cr < 1)||(cr == "")){ edit1.value=6; } } else if(datatype == "INT"){ if(cr > 11){ alert("Size for INT can't be more than 11"); edit1.value=11; } else if((cr < 1)||(cr == "")){ edit1.value=11; } } else if(datatype == "BIGINT"){ if(cr > 20){ alert("Size for BIGINT can't be more than 20"); edit1.value=20; } else if((cr < 1)||(cr == "")){ edit1.value=20; } } else if(datatype == "CHAR"){ if(cr > 255){ alert("Size for CHAR can't be more than 255"); edit1.value=255; } else if((cr < 1)||(cr == "")){ edit1.value=255; } } } /** Added for upload logo */ function validateFilename() { if (document.uploadfrm.upfile.value == "") { alert("Browse file for upload."); return false; } var ext = document.uploadfrm.upfile.value; var result = ext.lastIndexOf('.'); if (result < 0) { alert("Browse a proper file (Only files with extension jpg, jpeg, gif, png are suported)."); return false; } ext = ext.substr(result+1).toLowerCase(); switch (ext) { case 'jpeg': case 'jpg': case 'gif': case 'png': break; default: alert("Only files with extension jpg, jpeg, gif, png are suported."); return false; } return true; } function isvalidfactselected(){ var factfrm = document.facts; var len = factfrm.elements.length; var i = 0; for(i=0; i < len; i++){ if(factfrm.elements[i].name == "factid" && factfrm.elements[i].checked){ return true; } } alert("Please select some items from meta check box.\n\nNote: If you are not getting any checkbox:\n[1]. Detail meta may be not defined for your report selection.\n[2]. Ask admin to check meta items."); return false; } function validatecomp(){ /*alert(document.fcomp.computesel.value); alert(document.fcomp.computesel.checked); */ return true; } function today() { /*BUG No-:464 */ var now=new Date(); var nowYear=now.getYear(); if (nowYear < 1000) nowYear+=1900; var nowDay=now.getDay(); var nowMonth=now.getMonth()+1; if (nowMonth<10) nowMonth="0"+nowMonth; var nowDayMonth=now.getDate(); if (nowDayMonth<10) nowDayMonth="0"+nowDayMonth; var curr_hour = now.getHours(); var curr_hour1 = now.getHours(); var curr_min = now.getMinutes(); if(curr_hour > 12){ curr_hour = curr_hour1 - 12; } if(curr_hour1 > 12){ mailform.textfield.value = nowMonth + "/" + nowDayMonth + "/"+ nowYear; mailform.time.value = curr_hour + ":" + curr_min + " " +"PM"; document.getElementById('PM').checked =true; } else{ mailform.textfield.value = nowMonth + "/" + nowDayMonth + "/"+ nowYear ; mailform.time.value = curr_hour + ":" + curr_min + " " + "AM"; document.getElementById('AM').checked = true; } } function unselect() { /*BUG No-:464 */ mailform.textfield.value = " "; mailform.time.value = " " ; } // Check Box Validater only one selection allowed function checkBoxValidate(totchk, form) { var gn=form.brkdimid; var chked = 0; for (j=0; j < totchk; j++ ){ if(gn[j].checked==true && chked<1) { chked++; } else if(gn[j].checked==true && chked >= 1){ chked++; gn[j].checked=false; alert("Select Only one Dimension"); return false; } } }