Hej hej alla glada pellesoftare...Vad är detta?
I min skola finns det en massa elever som sitter och surfar, surfar två på "samma sätt"
samtidigt blir det tok och man får se källkoden för den specifikan händelsen.
Detta är vad jag hittade i torsdags när satt och fipplade. Det är en filöverförings funktion eller nåt i den stillen, MEN vad är det skrivit i? och hur funkar det?
ar bodyTarget = null; var attachmentElement = null; var popUpWin = null; var
messageForm = null; var actionButton = null; var envelopeWin = null; var
bodyWin = null; var submitOK = false; var charset = "ISO-8859-1"; var
fillFactor = 7; var
attachURL="/Login/Login/Mailbox/%2310672055/Attach?UnSent=1"; function
sendMessage(sendMode) { var recipientNames; var proceed = true; var fieldIDs
= new Array(9,11,30); submitOK = false; if(!sendMode && (field[9].length +
field[11].length)==0 && field[30].length > 0 && (150)) proceed =
confirm("Varning:<BR>n Ditt meddelande har bara Bcc-mottagare.<BR>n Det kan
bli markerat som skräppost/spam.<BR>n Vill du skicka det ändå?");
if(!sendMode && (field[9].length + field[11].length + field[30].length)==0)
{ if(60) alert("Fel: Inga mottagarnamn. Det går inte att skicka
meddelandet"); } else if(proceed && customSend(sendMode)) { if(bodySource)
bodyTarget.value = bodySource.value; if(messageForm.elements["Priority"])
messageForm.elements["Priority"].value = field[36];
if(messageForm.elements["Sensitivity"])
messageForm.elements["Sensitivity"].value = field[34]; for(var type=0; type
< fieldIDs.length; type++) if(typeof(field[fieldIDs[type]]) != "undefined"
&& field[fieldIDs[type]].length) { for(var index=0, recipientNames=""; index
< field[fieldIDs[type]].length; index++) { recipientNames +=
field[fieldIDs[type]][index][1]; if(index != field[fieldIDs[type]].length-1)
recipientNames += "\n"; } recipientTarget[type].value = recipientNames; }
if(sendMode==0 || sendMode==2) actionButton.name = "Send"; else
if(sendMode==1) actionButton.name = "Save"; submitOK = true; } } function
makeTargetElements(outDoc,includeBody,includeCc,includeBcc) { outDoc =
(outDoc?outDoc:envelopeWin.document); outDoc.write(""); messageForm =
outDoc.forms[outDoc.forms.length - 1]; outDoc.write(""); actionButton =
messageForm.elements[messageForm.elements.length - 1]; outDoc.write("");
recipientTarget[0] = messageForm.elements[messageForm.elements.length - 1];
if(includeBody) { outDoc.write(""); bodyTarget =
messageForm.elements[messageForm.elements.length - 1]; } if(includeCc) {
outDoc.write(""); recipientTarget[1] =
messageForm.elements[messageForm.elements.length - 1]; } if(includeBcc) {
outDoc.write(""); recipientTarget[2] =
messageForm.elements[messageForm.elements.length - 1]; } outDoc.write("");
outDoc.write(""); outDoc.write(""); outDoc.write(""); outDoc.write(""); }
function makePostmark() { if(formEnabled) return " "; else return ""; }
function openPopUp(evnt,file,width,height,options) { killPopUpWin(); var
optionsString = options?options:"left=" +
(evnt.screenX<(window.screen.width-(width+15))?evnt.screenX:(window.screen.width0-(width+15)))
+ ",top=" +
(evnt.screenY<(window.screen.height-(height+35))?evnt.screenY:(window.screen.height-(height+35)))
+ ",width=" + width + ",height=" + height +
",location=no,menubar=no,resizable=yes,scrollbars=no,status=no,toolbar=no,directories=no";
popUpWin = window.open((file.charAt(0)!="/"?"/Login/.templates/":"") + file
+
(file.charAt(0)!='/'?"?charset=ISO-8859-1":""),"PopUpWindow",optionsString);
return false; } function openAbsolutePopUp(evnt, file, width, height,
options) { killPopUpWin(); var optionsString = options?options:"left=" +
(evnt.screenX<(window.screen.width-(width+15))?evnt.screenX:(window.screen.width0-(width+15)))
+ ",top=" +
(evnt.screenY<(window.screen.height-(height+35))?evnt.screenY:(window.screen.height-(height+35)))
+ ",width=" + width + ",height=" + height +
",location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no,directories=no";
popUpWin = window.open(file,"PopUpWindow",optionsString); return false; }
function killPopUpWin(popUpFunction) { if(popUpWin != null &&
!popUpWin.closed &&
(popUpFunction?popUpWin.currentFunction==popUpFunction:true))
popUpWin.close(); } function validateFormat() { for(var formatArg = 1;
formatArg < arguments.length; formatArg++) arguments[0][formatArg] =
arguments[0][formatArg]?arguments[0][formatArg]:arguments[formatArg]; return
arguments[0]; } function changeCheckboxState(ID,source,dataType,CBtype) {
CBtype = (CBtype?3:2); field[ID] = (field[ID]+1)%CBtype; switch(field[ID]) {
case 1: source.src = "/Icons/15001"; break; case 2: source.src =
"/Icons/15003"; break; default: source.src = "/images/pixel.gif"; break; }
switch(ID) { case 39: messageForm.elements["ReadRcpt"].value = field[39];
break; case 40: messageForm.elements["DeliveryRcpt"].value = field[40];
break; case 41: messageForm.elements["RouteRcpt"].value = field[41]; break;
default: messageForm.elements["FieldID:" + ID + "=" + dataType].value =
field[ID]; break; } } function makeBody(element) {
if(typeof(element)=="undefined" || element==null) {
if(typeof(bodyWin.document.forms[0].elements[0]) == "undefined") element =
null; else element = bodyWin.document.forms[0].elements[0]; } bodySource =
element; } function customSend(){ return true; } function addFile(filename)
{ if(typeof(field) != "undefined" && typeof(field[13]) != "undefined") { var
ID = field[13].length; field[13][ID] = new Array("-7004", filename, "",
"/Login/Login/Mailbox/%2310672055?Unsent=1." + ID + "/" + filename);
envelopeWin.location.reload(false); } }
Det verkar dock också va skrivit i JS...