var land=""; var lang=""; var resellerid=""; var page=""; // wird zZ nicht gebraucht var subX,subY; var submenugeblockt=false; // zum kurzen blocken vom submenu var texte=new Array(); // Menue-texte texte["de"]=new Array(); texte["en"]=new Array(); texte["de"]["rechbezahlen"]="Rechnung » bezahlt"; texte["en"]["rechbezahlen"]="Invoice » payed"; texte["de"]["rechstornieren"]="Rechnung » stornieren"; texte["en"]["rechstornieren"]="Invoice » cancel"; texte["de"]["recherinnert"]="Rechnung » erinnert"; texte["en"]["recherinnert"]="Invoice » reminded"; texte["de"]["rechanzeigen"]="Rechnung anzeigen"; texte["en"]["rechanzeigen"]="show invoice"; texte["de"]["rechneugen"]="Rechnung » neu generieren"; texte["en"]["rechneugen"]="Invoice » re-generate"; texte["de"]["rechistabrechnet"]="Rechnung ist abgerechnet"; texte["en"]["rechistabrechnet"]="uebersetzen"; // texte["de"]["rechistnichtabgerechnet"]="Rechnung ist nicht abgerechnet"; texte["en"]["rechistnichtabgerechnet"]="uebersetzen"; // texte["de"]["zeigeabrechnung"]="Abrechnung » anzeigen"; texte["en"]["zeigeabrechnung"]="final payments » "; texte["de"]["erinanzeigen"]="Erinnerung anzeigen"; texte["en"]["erinanzeigen"]="show reminder"; texte["de"]["storanzeigen"]="Stornierung anzeigen"; texte["en"]["storanzeigen"]="show cancellation"; texte["de"]["einloggenkunde"]="einloggen (Kunde)"; texte["en"]["einloggenkunde"]="login (Client)"; texte["de"]["einloggenverband"]="einloggen (Verband)"; texte["en"]["einloggenverband"]="login (Association)"; texte["de"]["einloggenbanner"]="einloggen (Banner)"; texte["en"]["einloggenbanner"]="login (Banner)"; texte["de"]["freischalten"]="freischalten"; texte["en"]["freischalten"]="freischalten"; texte["de"]["kundeloeschen"]="Kunde löschen"; texte["en"]["kundeloeschen"]="delete Client"; texte["de"]["verbandloeschen"]="Verband löschen"; texte["en"]["verbandloeschen"]="delete Association"; texte["de"]["platzgrunddaten"]="Platz » Grunddaten"; texte["en"]["platzgrunddaten"]="Campsite » basic data"; texte["de"]["plaetze"]="Liste Plätze"; texte["en"]["plaetze"]="List Campsites"; texte["de"]["banner"]="Liste Banner"; texte["en"]["banner"]="List Banner"; texte["de"]["platzloeschen"]="Platz » löschen"; texte["en"]["platzloeschen"]="Campsite » delete"; texte["de"]["platzbearbeiten"]="Platz » bearbeiten"; texte["en"]["platzbearbeiten"]="Campsite » edit"; texte["de"]["banneraktivieren"]="Banner » aktivieren"; texte["en"]["banneraktivieren"]="Banner » enable"; texte["de"]["bannerdeaktivieren"]="Banner » deaktivieren"; texte["en"]["bannerdeaktivieren"]="Banner » disable"; texte["de"]["banneranlegen"]="neuen Banner anlegen"; texte["en"]["banneranlegen"]="create new banner"; texte["de"]["bannergrunddaten"]="Banner » Grunddaten"; texte["en"]["bannergrunddaten"]="Banner » basic data"; texte["de"]["banneredit"]="Banner » bearbeiten"; texte["en"]["banneredit"]="Banner » edit"; texte["de"]["bannerloeschen"]="Banner » löschen"; texte["en"]["bannerloeschen"]="Banner » delete"; texte["de"]["platzanlegen"]="neuen Platz anlegen"; texte["en"]["platzanlegen"]="create new Campsite"; texte["de"]["platzreaktivieren"]="Platz » reaktivieren"; texte["en"]["platzreaktivieren"]="Campsite » reactivate"; texte["de"]["platzansehen"]="Platz » ansehen"; texte["en"]["platzansehen"]="Campsite » view"; texte["de"]["bannernotiz"]="Banner » Memo schreiben"; texte["en"]["bannernotiz"]="Banner » write Memo"; texte["de"]["rechnotiz"]="Rechnung » Memo schreiben"; texte["en"]["rechnotiz"]="Invoice » write Memo"; texte["de"]["platznotiz"]="Platz » Memo schreiben"; texte["en"]["platznotiz"]="Size » write Memo"; texte["de"]["kundennotiz"]="Kunde » Memo schreiben"; texte["en"]["kundennotiz"]="Client » write Memo"; texte["de"]["notizedit"]="Memo » ansehen/bearbeiten"; texte["en"]["notizedit"]="Memo » view/edit"; // Alert-texte texte["de"]["Frechbezahlt"]="Diese Rechnung ist wirklich bezahlt?"; texte["en"]["Frechbezahlt"]="This invoice is really payed?"; texte["de"]["Frechstornieren"]="Diese Rechnung wirklich stornieren?\nDer Campingplatz wird deaktiviert!"; texte["en"]["Frechstornieren"]="Really cancel this invoice?\nThe campsite will be disabled!"; texte["de"]["Frecherinnert"]="Diese Rechnung wurde erinnert?"; texte["en"]["Frecherinnert"]="This invoice is reminded?"; texte["de"]["Frechloeschen"]="Diese Rechnung wirklich loeschen?"; texte["en"]["Frechloeschen"]="Diese Rechnung wirklich loeschen?"; texte["de"]["Fbannerloeschen"]="Diesen Banner wirklich loeschen?"; texte["en"]["Fbannerloeschen"]="Really delete this banner?"; texte["de"]["Fkundefreischalten"]="Diesen Kunden wirklich freischalten?"; texte["en"]["Fkundefreischalten"]="Diesen Kunden wirklich freischalten?"; texte["de"]["Fkundeloeschen"]="Diesen Kunden wirklich loeschen?"; texte["en"]["Fkundeloeschen"]="Diesen Kunden wirklich loeschen?"; texte["de"]["Fverbandloeschen"]="Diesen Verband wirklich loeschen?"; texte["en"]["Fverbandloeschen"]="Diesen Verband wirklich loeschen?"; texte["de"]["Fplatzloeschen1"]="Diesen Platz wirklich loeschen?"; texte["en"]["Fplatzloeschen1"]="Diesen Platz wirklich loeschen?"; texte["de"]["Fplatzloeschen2"]="Ganz sicher diesen Platz loeschen?\nDie Platzdaten werden unwideruflich geloescht!"; texte["en"]["Fplatzloeschen2"]="Ganz sicher diesen Platz loeschen?\nDie Platzdaten werden unwideruflich geloescht!"; function handlerMM(e) { if (browser=="IE") { subX=event.clientX; subY=event.clientY; } if (browser=="FF") { subX=e.pageX; subY=e.pageY; } /* if (document.getElementById("submenu").style.display=="block") { var x=document.getElementById("submenu").offsetLeft; var y=document.getElementById("submenu").offsetTop; if ((x-subX)>100) {document.getElementById("submenu").style.display="none";} if ((y-subY)>100) {document.getElementById("submenu").style.display="none";} if ((subX-(x+document.getElementById("submenu").offsetWidth))>100) {document.getElementById("submenu").style.display="none";} if ((subY-(y+document.getElementById("submenu").offsetHeight))>100) {document.getElementById("submenu").style.display="none";} } */ } function handlerMD(e) { if (browser=="IE") { if (window.event.type=="contextmenu") {return false;} } if (browser=="FF") { if (e.type=="contextmenu") {return false;} } return true; } document.onmousemove = handlerMM; document.oncontextmenu = handlerMD; //document.getElementById("submenu").onmouseout=submenuoff(); function submenuoff() { document.getElementById("submenu").style.display="none"; } function blocksubmenu() { submenugeblockt=true; } function submenu(varr,a,b) { if (submenugeblockt==true) { submenugeblockt=false; window.status=submenugeblockt; return; } gensubmenu(varr); document.getElementById("submenu").style.display="block"; document.getElementById("submenu").style.top=subY-10+"px"; /* alte version, hat gut im FF funktioniert if ((document.getElementById("submenu").offsetTop+document.getElementById("submenu").offsetHeight)>document.getElementById("content").offsetHeight) { document.getElementById("submenu").style.top=subY-document.getElementById("submenu").offsetHeight+10; } */ /* neue version, hat in ie und ff funktioniert */ if ((document.getElementById("submenu").offsetTop+document.getElementById("submenu").offsetHeight)>document.body.offsetHeight) { document.getElementById("submenu").style.top=subY-document.getElementById("submenu").offsetHeight+10; } /* wohl die beste Version */ if ((document.getElementById("submenu").offsetTop+document.getElementById("submenu").offsetHeight)>document.body.offsetHeight) { //document.getElementById("submenu").style.top=34; } var x=subX-document.getElementById("submenu").offsetWidth+10; if (x<0) {x=0;} document.getElementById("submenu").style.left=x+"px"; document.getElementById("tr"+b).className="listetr"+a+"hover"; } function hidesubmenu() { document.getElementById("submenu").style.display="none"; } function gensubmenu(varr) { var arr=varr.split(","); var arr2=new Array(); for (i=0; i0) { a=a+''+(lang=="de" ? 'Kunde bearbeiten':'edit customer')+''; a=a+'
'; a=a+''+texte[lang]["plaetze"]+''; a=a+''+texte[lang]["platzanlegen"]+''; a=a+'
'; a=a+''+texte[lang]["banner"]+''; a=a+''+texte[lang]["banneranlegen"]+''; } // Kunden (sess) if (arr2['sess']) { if (a>"") {a=a+'
';} if (arr2['sess'].length==64) { a=a+''+texte[lang]["einloggenkunde"]+''; } else if (arr2['sess'].length==96) { a=a+''+texte[lang]["einloggenverband"]+''; } else { a=a+''+texte[lang]["freischalten"]+''; } if (resellerid==1 && !arr2['campid']) { a=a+'
'; if (arr2['sess'].length==64 || arr2['sess'].length==10) { a=a+''+texte[lang]["kundeloeschen"]+''; } else if (arr2['sess'].length==96){ a=a+''+texte[lang]["verbandloeschen"]+''; } } } // Campingplaetze if (arr2['campid']) { if (a>"") {a=a+'
';} a=a+''+texte[lang]["platzgrunddaten"]+''; a=a+''+texte[lang]["platzbearbeiten"]+''; a=a+'Daten-PDF exportieren'; a=a+'Preis-PDF exportieren'; if (!arr2['campabgelaufen']) { a=a+''+texte[lang]["platzansehen"]+''; } if (arr2['campabgelaufen']) { a=a+''+texte[lang]["platzreaktivieren"]+''; } if (resellerid==1) { a=a+''+texte[lang]["platzloeschen"]+''; a=a+'Platz » kündigen'; } } // Rechnungen if (arr2['rechid']) { if (a>"") {a=a+'
';} a=a+''+texte[lang]["rechanzeigen"]+''; a=a+''+texte[lang]["rechanzeigen"]+' (PDF)'; rc=0; for (i=0; i<25; i++) { if (document.getElementById("rechprint"+i)) { if (document.getElementById("rechprint"+i).checked) { rc++; } } } if (rc>0) { a=a+'Seriendruck Rechnungen ('+rc+')'; } if (arr2['erinnert']) { a=a+''+texte[lang]["erinanzeigen"]+''; } if (arr2['storniert']) { a=a+''+texte[lang]["storanzeigen"]+''; } a=a+'
'; // a=a+''+(lang=="de" ? 'Rechnung bearbeiten':'edit invoice')+''; a=a+''+texte[lang]["rechneugen"]+''; if (!arr2['bezahlt'] && !arr2['storniert']) { a=a+''+texte[lang]["rechbezahlen"]+''; } if (!arr2['storniert'] && !arr2['bezahlt']) { a=a+''+texte[lang]["rechstornieren"]+''; } if (!arr2['erinnert'] && !arr2['storniert'] && !arr2['bezahlt']) { a=a+''+texte[lang]["recherinnert"]+''; } if (resellerid==1) { a=a+'Rechnung » löschen'; } } // Banner if (arr2['bannerid']) { if (a>"") {a=a+'
';} a=a+''+texte[lang]["bannergrunddaten"]+''; if (arr2['aktiv']==1) { a=a+''+texte[lang]["bannerdeaktivieren"]+''; } if (arr2['aktiv']==0) { a=a+''+texte[lang]["banneraktivieren"]+''; } a=a+''+texte[lang]["banneredit"]+''; if (arr2['ressess']) { a=a+''+texte[lang]["einloggenbanner"]+''; } if (resellerid==1) { a=a+''+texte[lang]["bannerloeschen"]+''; } } // abrechnung if (arr2['rechforabrech']) { if (arr2['status']!="1") { a=a+''+texte[lang]["rechistabrechnet"]+''; } else { a=a+''+texte[lang]["rechistnichtabgerechnet"]+''; } } // abrechnung 2 if (arr2['abrechid']) { a=a+''+texte[lang]["zeigeabrechnung"]+''; } /* Notizen */ if (arr2['kundenid'] || arr2['campid'] || arr2['bannerid'] || arr2['rechid']) { a=a+'
'; if (arr2['kundenid']) { a=a+''+texte[lang]["kundennotiz"]+''; } if (arr2['campid']) { a=a+''+texte[lang]["platznotiz"]+''; } if (arr2['bannerid']) { a=a+''+texte[lang]["bannernotiz"]+''; } if (arr2['rechid']) { a=a+''+texte[lang]["rechnotiz"]+''; } } if (arr2['notizid']) { if (a>"") {a=a+'
';} a=a+''+texte[lang]["notizedit"]+''; } if (arr2['aliascamp']) { a=a+'Alias bearbeiten'; } /* meldungen */ if (arr2['newsid']) { a=a+'Meldung ansehen'; if (arr2['newsstatus']=="neu" || arr2['newsstatus']=="off") { a=a+'Meldung freischalten'; } if (arr2['newsstatus']=="on") { a=a+'Meldung sperren'; } a=a+'Meldung löschen'; } /* ausgabe */ document.getElementById("submenu").innerHTML=''+a+''; } function wirklich(a,t) { if (confirm(t)) { if (a.substring(0,1)=="?") { document.location="/"+a; } else { jumpto(a); } } } function aliascamp(id,campid) { var a=''; setuniversalcontainer(a); } function notiz(typ,id) { var a=''; setuniversalcontainer(a); } function kuendigen(campid,elementverlaengerung,elementkuendigungsdatum) { var a=''; setuniversalcontainer(a); } function abrech_show(id) { document.getElementById("abrechframe").src="abrechnungzeige.php?id="+id; document.getElementById("abrechframe").style.height="500px"; } function abrech_bezahlt_ausgezahlt(id) { document.location=lokation("abrechid")+"&aktion=abrechistabgerechnet&abrechid="+id; } function rechseriendruck() { var a=''; setuniversalcontainer(a); } function rech_setgedruckt(id) { document.location=lokation("rechid")+"&aktion=rechsetgedruckt&rechid="+id; } function rech_swapabgerechnet(id) { document.location=lokation("rechid")+"&aktion=rechswapabrechnen&rechid="+id; } function banner_aktivieren(id) { document.location=lokation("bannerid")+"&aktion=banneraktivieren&bannerid="+id; } function banner_deaktivieren(id) { document.location=lokation("bannerid")+"&aktion=bannerdeaktivieren&bannerid="+id; } function rechnung_bezahlt(id) { if (confirm(texte[lang]["Frechbezahlt"])) { // document.location="/?page=rechnungen&aktion=payed&rechid="+id; document.location=lokation("rechid")+"&aktion=rechnungpayed&rechid="+id; } } function rechnung_stornieren(id) { if (confirm(texte[lang]["Frechstornieren"])) { // document.location="/?page=rechnungen&aktion=cancel&rechid="+id; document.location=lokation("rechid")+"&aktion=rechnungcancel&rechid="+id; } } function rechnung_erinnern(id) { if (confirm(texte[lang]["Frecherinnert"])) { // document.location="/?page=rechnungen&aktion=remind&rechid="+id; document.location=lokation("rechid")+"&aktion=rechnungremind&rechid="+id; } } function rechnung_loeschen(id) { if (confirm(texte[lang]["Frechloeschen"])) { // document.location="/?page=rechnungen&aktion=loeschen&rechid="+id; document.location=lokation("rechid")+"&aktion=rechnungloeschen&rechid="+id; } } function banner_loeschen(id) { if (confirm(texte[lang]["Fbannerloeschen"])) { // document.location="/?page=rechnungen&aktion=loeschen&rechid="+id; document.location=lokation("bannerid")+"&aktion=bannerloeschen&bannerid="+id; } } function kunde_freischalten(ksess) { if (confirm(texte[lang]["Fkundefreischalten"])) { // document.location="/?page=kunden&aktion=freischalten&ksess="+ksess+(land>"" ? '&land='+land:''); document.location=lokation("")+"&aktion=kundefreischalten&ksess="+ksess; } } function kunde_loeschen(ksess) { if (confirm(texte[lang]["Fkundeloeschen"])) { // document.location="/?page=kunden&aktion=loeschen&ksess="+ksess+(land>"" ? '&land='+land:''); document.location=lokation("")+"&aktion=kundeloeschen&ksess="+ksess; } } function verband_loeschen(ksess) { if (confirm(texte[lang]["Fverbandloeschen"])) { // document.location="/?page=kunden&aktion=loeschen&ksess="+ksess+(land>"" ? '&land='+land:''); document.location=lokation("")+"&aktion=verbandloeschen&ksess="+ksess; } } function platz_loeschen(id) { //lokation(); if (confirm(texte[lang]["Fplatzloeschen1"])) { if (confirm(texte[lang]["Fplatzloeschen2"])) { // document.location="/?page=plaetze&aktion=loeschen&id="+id+(land>"" ? '&land='+land:''); document.location=lokation("")+"&aktion=platzloeschen&id="+id; } } } function rechnung_neugenerieren(rechid) { document.location=lokation("")+"&aktion=rechregenerate&rechid="+rechid; } function meldung_freischalten(newsid) { document.location=lokation("")+"&aktion=newsfreischalten&newsid="+newsid; } function meldung_sperren(newsid) { document.location=lokation("")+"&aktion=newssperren&newsid="+newsid; } function meldung_loeschen(newsid) { if (confirm("Diese Meldung wirklich loeschen?")) { alert("Funktion noch nicht programmiert"); document.location=lokation("")+"&aktion=newsloeschen&newsid="+newsid; } } function lokation(ersatz) { vv=generatevv(); var u="?"; if (ersatz.search(",")>0) { // mehrere Variablen, komma getrennt a,b ersatz=","+ersatz+","; for (var Eigenschaft in vv) { if (Eigenschaft=="aktion" || ersatz.search(","+Eigenschaft+",")>-1) {continue;} u=u+(u>"?" ? '&':'')+Eigenschaft+"="+vv[Eigenschaft]; } } else { // nur eine variable for (var Eigenschaft in vv) { if (Eigenschaft=="aktion" || Eigenschaft==ersatz) {continue;} u=u+(u>"?" ? '&':'')+Eigenschaft+"="+vv[Eigenschaft]; } } return "/"+u; } function machemd5(original) { function array(n) { for(i=0;i> 4 zu berechnen.. * Die nun verwendeten Funktionen sind zwar langsamer als die Originale, * aber sie funktionieren. */ function integer(n) { return n%(0xffffffff+1); } function shr(a,b) { a=integer(a); b=integer(b); if (a-0x80000000>=0) { a=a%0x80000000; a>>=b; a+=0x40000000>>(b-1); } else a>>=b; return a; } function shl1(a) { a=a%0x80000000; if (a&0x40000000==0x40000000) { a-=0x40000000; a*=2; a+=0x80000000; } else a*=2; return a; } function shl(a,b) { a=integer(a); b=integer(b); for (var i=0;i=0) if (t2>=0) return ((t1&t2)+0x80000000); else return (t1&b); else if (t2>=0) return (a&t2); else return (a&b); } function or(a,b) { a=integer(a); b=integer(b); var t1=(a-0x80000000); var t2=(b-0x80000000); if (t1>=0) if (t2>=0) return ((t1|t2)+0x80000000); else return ((t1|b)+0x80000000); else if (t2>=0) return ((a|t2)+0x80000000); else return (a|b); } function xor(a,b) { a=integer(a); b=integer(b); var t1=(a-0x80000000); var t2=(b-0x80000000); if (t1>=0) if (t2>=0) return (t1^t2); else return ((t1^b)+0x80000000); else if (t2>=0) return ((a^t2)+0x80000000); else return (a^b); } function not(a) { a=integer(a); return (0xffffffff-a); } /* Beginn des Algorithmus */ var state = new array(4); var count = new array(2); count[0] = 0; count[1] = 0; var buffer = new array(64); var transformBuffer = new array(16); var digestBits = new array(16); var S11 = 7; var S12 = 12; var S13 = 17; var S14 = 22; var S21 = 5; var S22 = 9; var S23 = 14; var S24 = 20; var S31 = 4; var S32 = 11; var S33 = 16; var S34 = 23; var S41 = 6; var S42 = 10; var S43 = 15; var S44 = 21; function F(x,y,z) { return or(and(x,y),and(not(x),z)); } function G(x,y,z) { return or(and(x,z),and(y,not(z))); } function H(x,y,z) { return xor(xor(x,y),z); } function I(x,y,z) { return xor(y ,or(x , not(z))); } function rotateLeft(a,n) { return or(shl(a, n),(shr(a,(32 - n)))); } function FF(a,b,c,d,x,s,ac) { a = a+F(b, c, d) + x + ac; a = rotateLeft(a, s); a = a+b; return a; } function GG(a,b,c,d,x,s,ac) { a = a+G(b, c, d) +x + ac; a = rotateLeft(a, s); a = a+b; return a; } function HH(a,b,c,d,x,s,ac) { a = a+H(b, c, d) + x + ac; a = rotateLeft(a, s); a = a+b; return a; } function II(a,b,c,d,x,s,ac) { a = a+I(b, c, d) + x + ac; a = rotateLeft(a, s); a = a+b; return a; } function transform(buf,offset) { var a=0, b=0, c=0, d=0; var x = transformBuffer; a = state[0]; b = state[1]; c = state[2]; d = state[3]; for (i = 0; i < 16; i++) { x[i] = and(buf[i*4+offset],0xff); for (j = 1; j < 4; j++) { x[i]+=shl(and(buf[i*4+j+offset] ,0xff), j * 8); } } /* Runde 1 */ a = FF ( a, b, c, d, x[ 0], S11, 0xd76aa478); /* 1 */ d = FF ( d, a, b, c, x[ 1], S12, 0xe8c7b756); /* 2 */ c = FF ( c, d, a, b, x[ 2], S13, 0x242070db); /* 3 */ b = FF ( b, c, d, a, x[ 3], S14, 0xc1bdceee); /* 4 */ a = FF ( a, b, c, d, x[ 4], S11, 0xf57c0faf); /* 5 */ d = FF ( d, a, b, c, x[ 5], S12, 0x4787c62a); /* 6 */ c = FF ( c, d, a, b, x[ 6], S13, 0xa8304613); /* 7 */ b = FF ( b, c, d, a, x[ 7], S14, 0xfd469501); /* 8 */ a = FF ( a, b, c, d, x[ 8], S11, 0x698098d8); /* 9 */ d = FF ( d, a, b, c, x[ 9], S12, 0x8b44f7af); /* 10 */ c = FF ( c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */ b = FF ( b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */ a = FF ( a, b, c, d, x[12], S11, 0x6b901122); /* 13 */ d = FF ( d, a, b, c, x[13], S12, 0xfd987193); /* 14 */ c = FF ( c, d, a, b, x[14], S13, 0xa679438e); /* 15 */ b = FF ( b, c, d, a, x[15], S14, 0x49b40821); /* 16 */ /* Runde 2 */ a = GG ( a, b, c, d, x[ 1], S21, 0xf61e2562); /* 17 */ d = GG ( d, a, b, c, x[ 6], S22, 0xc040b340); /* 18 */ c = GG ( c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */ b = GG ( b, c, d, a, x[ 0], S24, 0xe9b6c7aa); /* 20 */ a = GG ( a, b, c, d, x[ 5], S21, 0xd62f105d); /* 21 */ d = GG ( d, a, b, c, x[10], S22, 0x2441453); /* 22 */ c = GG ( c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */ b = GG ( b, c, d, a, x[ 4], S24, 0xe7d3fbc8); /* 24 */ a = GG ( a, b, c, d, x[ 9], S21, 0x21e1cde6); /* 25 */ d = GG ( d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */ c = GG ( c, d, a, b, x[ 3], S23, 0xf4d50d87); /* 27 */ b = GG ( b, c, d, a, x[ 8], S24, 0x455a14ed); /* 28 */ a = GG ( a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */ d = GG ( d, a, b, c, x[ 2], S22, 0xfcefa3f8); /* 30 */ c = GG ( c, d, a, b, x[ 7], S23, 0x676f02d9); /* 31 */ b = GG ( b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */ /* Runde 3 */ a = HH ( a, b, c, d, x[ 5], S31, 0xfffa3942); /* 33 */ d = HH ( d, a, b, c, x[ 8], S32, 0x8771f681); /* 34 */ c = HH ( c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */ b = HH ( b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */ a = HH ( a, b, c, d, x[ 1], S31, 0xa4beea44); /* 37 */ d = HH ( d, a, b, c, x[ 4], S32, 0x4bdecfa9); /* 38 */ c = HH ( c, d, a, b, x[ 7], S33, 0xf6bb4b60); /* 39 */ b = HH ( b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */ a = HH ( a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */ d = HH ( d, a, b, c, x[ 0], S32, 0xeaa127fa); /* 42 */ c = HH ( c, d, a, b, x[ 3], S33, 0xd4ef3085); /* 43 */ b = HH ( b, c, d, a, x[ 6], S34, 0x4881d05); /* 44 */ a = HH ( a, b, c, d, x[ 9], S31, 0xd9d4d039); /* 45 */ d = HH ( d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */ c = HH ( c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */ b = HH ( b, c, d, a, x[ 2], S34, 0xc4ac5665); /* 48 */ /* Runde 4 */ a = II ( a, b, c, d, x[ 0], S41, 0xf4292244); /* 49 */ d = II ( d, a, b, c, x[ 7], S42, 0x432aff97); /* 50 */ c = II ( c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */ b = II ( b, c, d, a, x[ 5], S44, 0xfc93a039); /* 52 */ a = II ( a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */ d = II ( d, a, b, c, x[ 3], S42, 0x8f0ccc92); /* 54 */ c = II ( c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */ b = II ( b, c, d, a, x[ 1], S44, 0x85845dd1); /* 56 */ a = II ( a, b, c, d, x[ 8], S41, 0x6fa87e4f); /* 57 */ d = II ( d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */ c = II ( c, d, a, b, x[ 6], S43, 0xa3014314); /* 59 */ b = II ( b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */ a = II ( a, b, c, d, x[ 4], S41, 0xf7537e82); /* 61 */ d = II ( d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */ c = II ( c, d, a, b, x[ 2], S43, 0x2ad7d2bb); /* 63 */ b = II ( b, c, d, a, x[ 9], S44, 0xeb86d391); /* 64 */ state[0] +=a; state[1] +=b; state[2] +=c; state[3] +=d; } /* Mit der Initialisierung von Dobbertin: state[0] = 0x12ac2375; state[1] = 0x3b341042; state[2] = 0x5f62b97c; state[3] = 0x4ba763ed; gibt es eine Kollision: begin 644 Message1 M7MH=JO6_>MG!X?!51$)W,CXV!A"=(!AR71,TF$W()/MEHR%C4:G1R:Q"= ` end begin 644 Message2 M7MH=JO6_>MG!X?!51$)W,CXV!A"=(!AR71,TF$W()/MEHREC4:G1R:Q"= ` end */ function init() { count[0]=count[1] = 0; state[0] = 0x67452301; state[1] = 0xefcdab89; state[2] = 0x98badcfe; state[3] = 0x10325476; for (i = 0; i < digestBits.length; i++) digestBits[i] = 0; } function update(b) { var index,i; index = and(shr(count[0],3) , 0x3f); if (count[0]<0xffffffff-7) count[0] += 8; else { count[1]++; count[0]-=0xffffffff+1; count[0]+=8; } buffer[index] = and(b,0xff); if (index >= 63) { transform(buffer, 0); } } function finish() { var bits = new array(8); var padding; var i=0, index=0, padLen=0; for (i = 0; i < 4; i++) { bits[i] = and(shr(count[0],(i * 8)), 0xff); } for (i = 0; i < 4; i++) { bits[i+4]=and(shr(count[1],(i * 8)), 0xff); } index = and(shr(count[0], 3) ,0x3f); padLen = (index < 56) ? (56 - index) : (120 - index); padding = new array(64); padding[0] = 0x80; for (i=0;i?@ABCDEFGHIJKLMNOPQRSTUVWXYZ"+ "[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"; function MD5(nachricht) { var l,s,k,ka,kb,kc,kd; init(); for (k=0;k