18,22d17
< var pdgh='Personal details go here ';
< var pdghce=' contenteditable=true ';
< var passwordrequired=false;
< var passwordpassed=true;
< var firstc=true;
52,56d46
< var vvd=vr_cookieVal('cpersonaldetails');
< if (clearit != -1) {
< vr_deleteCookie('cpersonaldetails');
< }
<
66a57,58
> if (clearit != -1) vr_deleteCookie('cpersonaldetails');
>
98c90
< //var vvd=vr_cookieVal('cpersonaldetails');
---
> var vvd=vr_cookieVal('cpersonaldetails');
100,107c92
< if (document.URL.toLowerCase().replace('http://localhost','https://localhost').indexOf('http:') == 0) { // || (!passwordpassed && passwordrequired)) {
< pdgh=pdgh.split(' (append ')[0];
< //alert(13);
< } else {
< pdgh=pdgh.split(' (append ')[0] + ' (append with ?password=[yourPassword] to ask for a password to access from here on)';
< //alert(14);
< }
< document.body.innerHTML=document.body.innerHTML.replace('<personal_details>','
' + vvd + '
').replace('&' + 'lt;' + theyear + '&' + 'gt;', selbit(theyear)).replace(/\<\;/g,'').replace(/\>\;/g,'');
---
> document.body.innerHTML=document.body.innerHTML.replace('<personal_details>','' + vvd + '
').replace('&' + 'lt;' + theyear + '&' + 'gt;', selbit(theyear)).replace(/\<\;/g,'').replace(/\>\;/g,'');
109c94
< vvd=vvd;
---
>
138,157c123
< function makepd(nv, pw) {
< if (passwordrequired && passwordpassed && pw == '' && nv.toLowerCase().replace('?password=','/password/').indexOf('/password/') == -1) {
< var ppw=vr_cookieVal(' cpersonaldetails');
< vr_setCookie('cpersonaldetails', nv + '/password/' + encodeURIComponent(encodeURIComponent(encodeURIComponent(theopen))));
< theopen=' open';
< } else if (pw != '') {
< vr_setCookie('cpersonaldetails', nv + '/password/' + encodeURIComponent(encodeURIComponent(encodeURIComponent(pw))));
< //document.title='0:' + nv.split('?password=')[0].split('/password/')[0];
< document.getElementById('pd').innerHTML=nv.split('?password=')[0].split('/password/')[0];
< } else if (nv.indexOf('?password=') != -1) {
< vr_setCookie('cpersonaldetails', nv.split('?password=')[0] + '/password/' + encodeURIComponent(encodeURIComponent(encodeURIComponent(nv.split('?password=')[1]))));
< //document.title='00:' + nv.split('?password=')[0].split('/password/')[0];
< document.getElementById('pd').innerHTML=nv.split('?password=')[0].split('/password/')[0];
< } else if (nv.indexOf('/password/') != -1) {
< vr_setCookie('cpersonaldetails', nv.split('/password/')[0] + '/password/' + encodeURIComponent(encodeURIComponent(encodeURIComponent(nv.split('/password/')[1]))));
< //document.title='000:' + nv.split('?password=')[0].split('/password/')[0];
< document.getElementById('pd').innerHTML=nv.split('?password=')[0].split('/password/')[0];
< } else if (!passwordpassed && passwordrequired) {
< if (3 == 6) document.title='90000:' + nv.split('?password=')[0].split('/password/')[0];
< } else {
---
> function makepd(nv) {
159,161d124
< //document.title='0000:' + nv.split('?password=')[0].split('/password/')[0];
< document.getElementById('pd').innerHTML=nv.split('?password=')[0].split('/password/')[0];
< }
208,213c171
< var newretval;
< if (document.URL.toLowerCase().replace('http://localhost','https://localhost').indexOf('http:') == 0 || (!passwordpassed && passwordrequired)) {
< newretval=prompt('What do you want to chronicle for date ' + dwo + ', ' + towhat.substring(1).substring(6) + ' ' + months[eval(-1 + eval(towhat.substring(1).substring(4,6)))] + ' ' + towhat.substring(1).substring(0,4) + '? (NB:
is line feed)', retval);
< } else {
< newretval=prompt('What do you want to chronicle for date ' + dwo + ', ' + towhat.substring(1).substring(6) + ' ' + months[eval(-1 + eval(towhat.substring(1).substring(4,6)))] + ' ' + towhat.substring(1).substring(0,4) + '? (NB:
is line feed) (append with ?password=[yourPassword] to ask for a password to access from here on)', retval);
< }
---
> var newretval=prompt('What do you want to chronicle for date ' + dwo + ', ' + towhat.substring(1).substring(6) + ' ' + months[eval(-1 + eval(towhat.substring(1).substring(4,6)))] + ' ' + towhat.substring(1).substring(0,4) + '? (NB:
is line feed)', retval);
217,226c175,176
< if (newretval.indexOf('?password=') != -1) {
< //document.getElementById('pd').innerHTML=newretval.split('?password=')[0];
< makepd(document.getElementById('pd').innerHTML, newretval.split('?password=')[1]);
< }
< if (newretval.indexOf('/password/') != -1) {
< //document.getElementById('pd').innerHTML=newretval.split('/password/')[0];
< makepd(document.getElementById('pd').innerHTML, newretval.split('/password/')[1]);
< }
< if (newretval.split('?password=')[0].split('/password/')[0] != retval) {
< vr_setCookie('c' + towhat.substring(1), newretval.split('?password=')[0].split('/password/')[0]);
---
> if (newretval != retval) {
> vr_setCookie('c' + towhat.substring(1), newretval);
234,237d183
< if (thisg != " ") {
< if (!passwordpassed && passwordrequired) {
< passwordrequired=passwordrequired;
< } else {
241,242d186
< }
< }
246,248d189
< if (!passwordpassed && passwordrequired) {
< passwordrequired=passwordrequired;
< } else {
252d192
< }
259,334c199,200
< if (("" + thisl.trim()) == tCookie[j].split("=")[0]) {
< if (decodeURIComponent(tCookie[j].split("=")[1]).indexOf('/password/') != -1) {
< if (firstc && thisl == 'cpersonaldetails') {
< firstc=false;
< if (document.URL.toLowerCase().replace('http://localhost','https://localhost').indexOf('http:') == 0) { // || passwordrequired) {
< firstc=false;
< } else {
< pdgh+=' (append with ?password=[yourPassword] to ask for a password to access from here on)';
< }
< passwordrequired=true;
< theopen='';
< passwordpassed=false;
< if (document.URL.toLowerCase().replace('http://localhost','https://localhost').indexOf('http:') == 0) {
< location.href='https:' + document.URL.substring(('http:').length);
< }
< var cp='';
< var huh=decodeURIComponent(tCookie[j].split("=")[1]).split('/password/')[0];
< if (decodeURIComponent(decodeURIComponent(tCookie[j].split("=")[1]).split('/password/')[1]) != '') {
< huh=prompt("What are your personal details immediately followed by correct password. To get this wrong does not stop the web application, just the access to HTTP Cookies to store and restore your entries.", "");
< if (huh == null) huh='';
< }
< if (huh.replace('Personal Details can Go Here','').indexOf(decodeURIComponent(tCookie[j].split("=")[1]).split('/password/')[0].replace('Personal Details can Go Here','')) == 0) {
< cp=decodeURIComponent(decodeURIComponent(tCookie[j].split("=")[1]).split('/password/')[1]);
< //alert(cp);
< if (huh.replace('Personal Details can Go Here','') == (decodeURIComponent(tCookie[j].split("=")[1]).split('/password/')[0].replace('Personal Details can Go Here','') + cp)) {
< //document.getElementById('pd').innerHTML=decodeURIComponent(tCookie[j].split("=")[1]).split('/password/')[0];
< passwordpassed=true;
< theopen=' open';
< //alert('ok');
< } else {
< //alert(cp);
< passwordrequired=true;
< theopen='';
< //document.body.innerHTML='Sorry ... No can do.';
< }
< } else {
< //alert(decodeURIComponent(tCookie[j].split("=")[1]).split('/password/')[0] + ' bAd ' + cp);
< passwordrequired=true;
< theopen='';
< //document.body.innerHTML='Sorry ... no can do.';
< }
< if (document.URL.toLowerCase().replace('http://localhost','https://localhost').indexOf('http:') == 0 || (!passwordpassed && passwordrequired)) {
< pdgh=pdgh.split(' (append ')[0];
< } else {
< pdgh=pdgh.split(' (append ')[0] + ' (append with ?password=[yourPassword] to ask for a password to access from here on)';
< }
< } else {
< if (firstc && thisl == 'cpersonaldetails') {
< //document.title='1' + thisl;
< //alert(1);
< firstc=false;
< if (thisl == 'cpersonaldetails') {
< // alert(2);
< //document.title='11';
< if (document.URL.toLowerCase().replace('http://localhost','https://localhost').indexOf('http:') == 0) { // || (!passwordpassed && passwordrequired)) {
< pdgh=pdgh.split(' (append ')[0];
< //document.title='111';
< //alert(3);
< } else {
< pdgh=pdgh.split(' (append ')[0] + ' (append with ?password=[yourPassword] to ask for a password to access from here on)';
< //document.title='1111';
< //alert(4);
< }
< }
< }
< if (thisl == ' cpersonaldetails') theopen=decodeURIComponent(decodeURIComponent(tCookie[j].split("=")[1]).split('/password/')[1]);
< //alert('bad ' + cp);
< //passwordrequired=true;
< //theopen='';
< }
< }
< if (!passwordpassed && passwordrequired) pdgh='Personal details go here ';
< if (!passwordpassed && passwordrequired) pdghce=' ';
< if (!passwordpassed && passwordrequired) clearit=false;
< if (!passwordpassed && passwordrequired) return " ";
< return decodeURIComponent(tCookie[j].split("=")[1]).split('/password/')[0];
---
> if (("" + thisl) == tCookie[j].split("=")[0]) {
> return decodeURIComponent(tCookie[j].split("=")[1]);
338,355d203
< if (firstc && thisl == 'cpersonaldetails') {
< //document.title='0' + thisl;
< //alert(11);
< firstc=false;
< if (thisl == 'cpersonaldetails') {
< //document.title='00';
< //alert(12);
< if (document.URL.toLowerCase().replace('http://localhost','https://localhost').indexOf('http:') == 0) { // || (!passwordpassed && passwordrequired)) {
< pdgh=pdgh.split(' (append ')[0];
< //document.title='000';
< //alert(13);
< } else {
< pdgh=pdgh.split(' (append ')[0] + ' (append with ?password=[yourPassword] to ask for a password to access from here on)';
< //document.title='0000';
< //alert(14);
< }
< }
< }