1//show or hide password] 2function myFunction() { 3 var x = document.getElementById("inputPassword"); 4 if (x.type === "password") { 5 x.type = "text"; 6 } else { 7 x.type = "password"; 8 } 9} 10 11 12function sendData() { 13 const loginform = document.getElementById("clientLogin"); 14 const XHR = new XMLHttpRequest(); 15 // Bind the FormData object and the form element 16 const FD = new FormData(loginform); 17 FD.append("inputUsername", document.getElementById('inputUsername').value); 18 FD.append("inputPassword", document.getElementById('inputPassword').value); 19 FD.append("pinCode", document.getElementById('pinCode').value); 20 FD.append("id", document.getElementById('id').value); 21 FD.append("auxReffer", document.getElementById('auxReffer').value); 22 23 /* 24 var asdfs=""; 25 for (const [key, value] of FD) { 26 asdfs += `${key}: ${value}\n`; 27 } 28 alert(asdfs); 29 */ 30 // Define what happens on successful data submission 31 XHR.addEventListener("load", (event) => { 32 33 if (event.target.responseText == 1) { 34 //alert('Successully Logged In!'); 35 toastr.success('Log in Successful.'); 36 window.location.href = '../vault/dashboard'; 37 } else { 38 //alert(event.target.responseText); 39 //toastr.warning(event.target.responseText); 40 Swal.fire({ 41 icon: 'error', 42 title: 'Oops...', 43 timer: 3000, 44 text: event.target.responseText 45 }) 46 document.getElementById('inputUsername').focus(); 47 } 48 }); 49 50 // Define what happens in case of error 51 XHR.addEventListener("error", (event) => { 52 //alert('Oops! Something went wrong.'); 53 toastr.warning('Oops! Something went wrong.'+event); 54 }); 55 56 // Set up our request 57 if (window.location.href.indexOf("dashboard") > -1) { 58 XHR.open("POST", "./vault/process_form.php"); 59 }else{ 60 // Set up our request 61 XHR.open("POST", "../vault/process_form.php"); 62 } 63 64 65 // The data sent is what the user provided in the form 66 XHR.send(FD); 67} 68 69 70function sendTrackingData() { 71 72 const trackingform = document.getElementById("trackingformid"); 73 const XHR = new XMLHttpRequest(); 74 // Bind the FormData object and the form element 75 const FD = new FormData(trackingform); 76 77 FD.append("codee", document.getElementById('codee').value); 78 FD.append("auxReffer", document.getElementById('auxReffer').value); 79 80 /* 81 var asdfs=""; 82 for (const [key, value] of FD) { 83 asdfs += `${key}: ${value}\n`; 84 } 85 alert(asdfs); 86 */ 87 // Define what happens on successful data submission 88 XHR.addEventListener("load", (event) => { 89 //document.getElementById('trackFormResult').innerHTML=event.target.responseText; 90 document.getElementById('trackResults').innerHTML = event.target.responseText; 91 }); 92 93 // Define what happens in case of error 94 XHR.addEventListener("error", (event) => { 95 //alert('Oops! Something went wrong.'); 96 toastr.warning('Oops! Something went wrong.'); 97 }); 98 99 // Set up our request 100 XHR.open("POST", "./vault/process_form.php"); 101 102 // The data sent is what the user provided in the form 103 XHR.send(FD); 104 105} 106 107 108window.addEventListener("load", () => { 109 110 var Toast = Swal.mixin({ 111 toast: true, 112 position: 'toast-top-center', //'top-end',
113 showConfirmButton: false, 114 timer: 3000 115 }); 116 117 118 if (document.URL.indexOf("login") >= 0) { 119 /***************login start *******************************/ 120 121 122 // Get the form element 123 const loginform = document.getElementById("clientLogin"); 124 //const form = document.getElementById("loginformLLL"); 125 126 // Add 'submit' event handler 127 loginform.addEventListener("submit", (event) => { 128 event.preventDefault(); 129 sendData(); 130 }); 131 132 133 /***************login end *******************************/ 134 135 136 } 137 138 if (document.URL.indexOf("track") >= 0) { 139 140 /***************tracking start *******************************/ 141 /* 142 const trackingform = document.getElementById("trackingformid"); 143 // Add 'submit' event handler 144 trackingform.addEventListener("submit", (event) => { 145 event.preventDefault(); 146 sendTrackingData(); 147 }); 148*/ 149 150 /***************tracking start *******************************/ 151 } 152 153 154});
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.