1var al_status; 2var al_loginForm, al_registerForm, al_lostPasswordForm; 3var al_loginMessage, al_registerMessage, al_lostPasswordMessage; 4var al_sack = new sack(); 5 6var al_otheronload = window.onload; 7window.onload = al_init; 8function al_init() { 9 10 if (al_otheronload) al_otheronload(); 11 12 al_status = 0; 13 14 al_loginForm = document.getElementById("al_loginForm"); 15 al_registerForm = document.getElementById("al_registerForm"); 16 al_lostPasswordForm = document.getElementById("al_lostPasswordForm"); 17 18 al_loginMessage = document.getElementById("al_loginMessage"); 19 al_registerMessage = document.getElementById("al_registerMessage"); 20 al_lostPasswordMessage = document.getElementById("al_lostPasswordMessage"); 21} 22 23 24function al_showLogin() { 25 26 document.getElementById("al_login").style.display = "none"; 27 document.getElementById("al_register").style.display = "none"; 28 document.getElementById("al_lostPassword").style.display = "none"; 29 30 if (0 != al_timeout) { 31 document.getElementById("al_loading").style.display = "block"; 32 setTimeout('al_showLogin2();', al_timeout); 33 } else { 34 al_showLogin2(); 35 } 36} 37 38function al_showLogin2() { 39 40 document.getElementById("al_loading").style.display = "none"; 41 document.getElementById("al_login").style.display = "block"; 42 al_loginForm.log.focus(); 43 44} 45 46function al_showRegister() { 47 48 document.getElementById("al_login").style.display = "none"; 49 document.getElementById("al_register").style.display = "none"; 50 document.getElementById("al_lostPassword").style.display = "none"; 51 52 if (0 != al_timeout) { 53 document.getElementById("al_loading").style.display = "block"; 54 setTimeout('al_showRegister2();', al_timeout); 55 } else { 56 al_showRegister2(); 57 } 58} 59 60function al_showRegister2() { 61 62 document.getElementById("al_loading").style.display = "none"; 63 document.getElementById("al_register").style.display = "block"; 64 65 al_registerForm.user_login.focus(); 66} 67 68 69function al_showLostPassword() { 70 71 document.getElementById("al_login").style.display = "none"; 72 document.getElementById("al_register").style.display = "none"; 73 document.getElementById("al_lostPassword").style.display = "none"; 74 75 if (0 != al_timeout) { 76 document.getElementById("al_loading").style.display = "block"; 77 setTimeout('al_showLostPassword2();', al_timeout); 78 } else { 79 al_showLostPassword2(); 80 } 81} 82 83function al_showLostPassword2() { 84 85 document.getElementById("al_loading").style.display = "none"; 86 document.getElementById("al_lostPassword").style.display = "block"; 87 88 al_lostPasswordForm.user_login.focus(); 89} 90 91 92function al_login() { 93 94 if (0 != al_status) { 95 return; 96 } 97 98 if (al_loginForm.log.value == '') { 99 alert("Please enter username."); 100 al_loginForm.log.focus(); 101 return; 102 } 103 104 if (al_loginForm.pwd.value == '') { 105 alert("Please enter password."); 106 al_loginForm.pwd.focus(); 107 return; 108 } 109 110 al_sack.setVar("log", al_loginForm.log.value); 111 al_sack.setVar("pwd", al_loginForm.pwd.value); 112 al_sack.setVar("rememberme", al_loginForm.rememberme.value); 113 114 al_sack.requestFile = al_base_uri + "/wp-content/plugins/ajax-login/login.php"; 115 al_sack.method = "POST"; 116 al_sack.onError = al_ajaxError; 117 al_sack.onCompletion = al_loginHandleResponse; 118 al_sack.runAJAX(); 119 al_status = 1; 120 121} 122 123function al_loginHandleResponse() { 124 125 al_status = 0; 126 127 var responselines = al_sack.response.split("\n",2); 128 if (responselines[0] == al_failure) { 129 alert(responselines[1]); 130 return; 131 } 132 if (responselines[0] == al_success) { 133 134 if (al_redirectOnLogin == '') 135 window.location.reload(true); 136 else 137 window.location.href = al_redirectOnLogin; 138 139 return; 140 } 141 142 alert("Unknown login response."); 143 144} 145 146function al_register() { 147 148 if (0 != al_status) { 149 return; 150 } 151 152 if (al_registerForm.user_login.value == '') { 153 alert("Please enter username."); 154 al_registerForm.user_login.focus(); 155 return; 156 } 157 158 if (al_registerForm.user_email.value == '') { 159 alert("Please enter e-mail address."); 160 al_registerForm.user_email.focus(); 161 return; 162 } 163 164 al_sack.setVar("user_login", al_registerForm.user_login.value); 165 al_sack.setVar("user_email", al_registerForm.user_email.value); 166 167 al_sack.requestFile = al_base_uri + "/wp-content/plugins/ajax-login/register.php"; 168 al_sack.method = "POST"; 169 al_sack.onError = al_ajaxError; 170 al_sack.onCompletion = al_registerHandleResponse; 171 al_sack.runAJAX(); 172 al_status = 1; 173 174} 175 176function al_registerHandleResponse() { 177 178 al_status = 0; 179 180 var responselines = al_sack.response.split("\n",2); 181 if (responselines[0] == al_failure) { 182 alert(responselines[1]); 183 return; 184 } 185 if (responselines[0] == al_success) { 186 alert("Registration complete. Please check your e-mail."); 187 al_loginMessage.innerHTML = "Your password is in your mail.<br/>"; 188 al_loginForm.log.value = al_registerForm.user_login.value; 189 al_registerForm.user_login.value = ""; 190 al_registerForm.user_email.value = ""; 191 al_showLogin(); 192 al_loginForm.pwd.focus(); 193 return; 194 } 195 196 alert("Unknown registration response."); 197 198} 199 200function al_retrievePassword() { 201 if (0 != al_status) { 202 return; 203 } 204 205 if (al_lostPasswordForm.user_login.value == '') { 206 alert("Please enter username."); 207 al_lostPasswordForm.user_login.focus(); 208 return; 209 } 210 211 if (al_lostPasswordForm.user_email.value == '') { 212 alert("Please enter e-mail address."); 213 al_lostPasswordForm.user_email.focus(); 214 return; 215 } 216 217 al_sack.setVar("user_login", al_lostPasswordForm.user_login.value); 218 al_sack.setVar("user_email", al_lostPasswordForm.user_email.value); 219 220 al_sack.requestFile = al_base_uri + "/wp-content/plugins/ajax-login/lostpassword.php"; 221 al_sack.method = "POST"; 222 al_sack.onError = al_ajaxError;
223 al_sack.onCompletion = al_lostPasswordHandleResponse; 224 al_sack.runAJAX(); 225 al_status = 1; 226} 227 228function al_lostPasswordHandleResponse() { 229 230 al_status = 0; 231 232 var responselines = al_sack.response.split("\n",2); 233 if (responselines[0] == al_failure) { 234 alert(responselines[1]); 235 return; 236 } 237 if (responselines[0] == al_success) { 238 alert("Check your e-mail for the confirmation link."); 239 al_loginMessage.innerHTML = "Your confirmation link is in your mail.<br/>"; 240 al_loginForm.log.value = al_lostPasswordForm.user_login.value; 241 al_lostPasswordForm.user_login.value = ""; 242 al_lostPasswordForm.user_email.value = ""; 243 al_showLogin(); 244 al_loginForm.pwd.focus(); 245 return; 246 } 247 248 alert("Unknown password retrieval response."); 249 250} 251 252function al_ajaxError() { 253 alert("We are sorry, there was an error while sending the request.\nPlease try again!\nIf error persists, please contact the webmaster."); 254 255 alert(al_sack.responseStatus[0] + ':\n' + al_sack.response); 256 al_sack = new sack(); 257} 258 259function al_loginOnEnter(e) { 260 261 if(window.event) // IE 262 keynum = e.keyCode; 263 else if(e.which) // Netscape/Firefox/Opera 264 keynum = e.which; 265 else 266 keynum = 0; 267 268 if (keynum==13) 269 al_login(); 270 271} 272function al_registerOnEnter(e) { 273 274 if(window.event) // IE 275 keynum = e.keyCode; 276 else if(e.which) // Netscape/Firefox/Opera 277 keynum = e.which; 278 else 279 keynum = 0; 280 281 if (keynum==13) 282 al_register(); 283 284} 285function al_retrievePasswordOnEnter(e) { 286 287 if(window.event) // IE 288 keynum = e.keyCode; 289 else if(e.which) // Netscape/Firefox/Opera 290 keynum = e.which; 291 else 292 keynum = 0; 293 294 if (keynum==13) 295 al_retrievePassword(); 296 297}
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.