PageSourceSearch

https://allchecked.co.uk/js/aclogin.js

js allchecked.co.uk collected 2026-10-06 00:31:52 UTC 16,616 bytes, 610 lines download raw bytes

1function doACRegister(){
2	//first check that the email hasn't already got an account.
3	if(isValidEmail($("#acc_email").val())){
4	$.post("/aclogin/checkEmail.php", {e: $("#acc_email").val()}, function(data){
5		console.log(data);
6		if((data==1)&&($("#leaduid").val()==undefined)){
7			alert("An account is already associated with this email address. Please Login.")
8		}else{
9			//good to check the rest.
10			$("#acc_email").removeClass("ac_HasError");
11			//check postcode
12			$.get('https://api.postcodes.io/postcodes/'+$("#acc_postcode").val())
13				.done(function(data){
14					console.log(data.result.eastings);
15					$("#acc_easting").val(data.result.eastings);
16					$("#acc_northing").val(data.result.northings);
17					$("#acc_town").val(data.result.admin_district);
18					$("#acc_county").val(data.result.admin_county);
19					$("#acc_postcode").removeClass("ac_HasError");
20					console.log(data);
21					//check that the name and daytime nums aren't blank
22					error = false;
23					errortxt = Array();
24					if($("#acc_name").val()==""){
25						error = true;
26						$("#acc_name").addClass("ac_HasError");
27						errortxt.push('You must enter your name.');
28					}else{
29						$("#acc_name").removeClass("ac_HasError");
30					}
31					
32					if($("#acc_phone").val()==""){
33						error = true;
34						$("#acc_phone").addClass("ac_HasError");
35						errortxt.push('You must enter your daytime phone number.');
36					}else{
37						$("#acc_phone").removeClass("ac_HasError");
38					}
39					
40					if(error){
41						
42						alert(errortxt.join('\n'));
43					}else{
44						//go add the lead and setup the account - all good!
45						console.log("Creating Account");
46						$.post("/aclogin/createAccount.php", $("#ac_check_form").serialize(), function(data){
47							console.log(data);
48							window.location = '/_acpassset.php?t='+data;
49						});
50					}
51					
52					
53				})
54				.fail(function(){
55					console.log("Postcode Error");
56					alert("Please enter a valid postcode.");
57					$("#acc_postcode").addClass("ac_HasError");
58				})
59			
60			
61		}
62	});
63	}else{
64		alert("Please enter a valid email address.");
65		$("#acc_email").addClass("ac_HasError");
66	}
67	
68}
69
70function doACRegister2(){
71	
72	if($("#notstarted").is(":checked")){
73	//first check that the email hasn't already got an account.
74	if(isValidEmail($("#acc_email").val())){
75	$.post("/aclogin/checkEmail.php", {e: $("#acc_email").val()}, function(data){
76		console.log(data);
77	
78			//good to check the rest.
79			$("#acc_email").removeClass("ac_HasError");
80			//check postcode
81			$.get('https://api.postcodes.io/postcodes/'+$("#acc_postcode").val())
82				.done(function(data){
83					console.log(data.result.eastings);
84					$("#acc_easting").val(data.result.eastings);
85					$("#acc_northing").val(data.result.northings);
86					$("#acc_town").val(data.result.admin_district);
87					$("#acc_county").val(data.result.admin_county);
88					$("#acc_postcode").removeClass("ac_HasError");
89					console.log(data);
90					//check that the name and daytime nums aren't blank
91					error = false;
92					errortxt = Array();
93					if($("#acc_name").val()==""){
94						error = true;
95						$("#acc_name").addClass("ac_HasError");
96						errortxt.push('You must enter your name.');
97					}else{
98						$("#acc_name").removeClass("ac_HasError");
99					}
100					
101					if($("#acc_phone").val()==""){
102						error = true;
103						$("#acc_phone").addClass("ac_HasError");
104						errortxt.push('You must enter your daytime phone number.');
105					}else{
106						$("#acc_phone").removeClass("ac_HasError");
107					}
108					
109					if(error){
110						
111						alert(errortxt.join('\n'));
112					}else{
113						//go add the lead and setup the account - all good!
114						console.log("Creating Account");
115						$.post("/aclogin/createAccount.php", $("#ac_check_form").serialize(), function(data){
116							console.log(data);
117							//window.location = '/_acpassset.php?t='+data;
118							$("#step2").slideUp("fast");
119							 $("#formhead").html("Thank you");
120							 $("#step3").slideDown("fast");
121						});
122					}
123					
124					
125				})
126				.fail(function(){
127					console.log("Postcode Error");
128					alert("Please enter a valid postcode.");
129					$("#acc_postcode").addClass("ac_HasError");
130				})
131			
132			
133		
134	});
135	}else{
136		alert("Please enter a valid email address.");
137		$("#acc_email").addClass("ac_HasError");
138	}
139}else{
140	alert("Please confirm that you have not yet placed an order with any contractor.");
141}
142}
143
144function doACRegister3(){
145	
146	//first check that the email hasn't already got an account.
147	if(isValidEmail($("#acc_email").val())){
148	$.post("/aclogin/checkEmail.php", {e: $("#acc_email").val()}, function(data){
149		console.log(data);
150		errortxt = Array();
151		error = false;
152			if(data!="0"){
153				error = true;
154				$("#acc_email").addClass("ac_HasError");
155				errortxt.push('This email address already has an account.');
156			}else{
157				$("#acc_email").removeClass("ac_HasError");
158			}
159			//good to check the rest.
160			
161			//check postcode
162			$.get('https://api.postcodes.io/postcodes/'+$("#acc_postcode").val())
163				.done(function(data){
164					console.log(data.result.eastings);
165					$("#acc_easting").val(data.result.eastings);
166					$("#acc_northing").val(data.result.northings);
167					$("#acc_town").val(data.result.admin_district);
168					$("#acc_county").val(data.result.admin_county);
169					$("#acc_postcode").removeClass("ac_HasError");
170					console.log(data);
171					//check that the name and daytime nums aren't blank
172					
173					
174					if($("#acc_name").val()==""){
175						error = true;
176						$("#acc_name").addClass("ac_HasError");
177						errortxt.push('You must enter your name.');
178					}else{
179						$("#acc_name").removeClass("ac_HasError");
180					}
181					
182					if($("#acc_phone").attr("data-rel")=="yes"){
183					if($("#acc_phone").val()==""){
184						error = true;
185						$("#acc_phone").addClass("ac_HasError");
186						errortxt.push('You must enter your daytime phone number.');
187					}else{
188						$("#acc_phone").removeClass("ac_HasError");
189					}
190					}
191					if(error){
192						
193						alert(errortxt.join('\n'));
194					}else{
195						//go add the lead and setup the account - all good!
196						console.log("Creating Account");
197						
198						
199						 
200						// sleep(1500);
201						 
202						
203						$.post("/aclogin/createAccount.php", $("#ac_check_form").serialize(), function(data){
204							console.log(data);
205							$("#loginnextbut").html('<a href="/_acpasssetlw.php?t='+data+'"><button class="yesbut" type="button">Login >></button></a>');
206							if($("#priceb").val()==""){
207							//window.location = '/_acpassset.php?t='+data;
208							$("#step2a").html("<center><BR><BR><BR><p style=\"text-align: center;\"><i class=\"fa-3x fas fa-spinner fa-spin\" style=\"text-align: center; float: none; font-size: 48px;\"></i></p><BR><BR><BR></center>");
209							 $("#formhead").html("Searching...");
210							setTimeout(function(){
211									$("#step2a").slideUp("fast");
212								 $("#formhead").html("Thank you!");
213								 
214								 datab = data.split("|");
215								 console.log(datab);
216								 $("#s3moreID").val(datab[1]);
217								 if(datab[0] == 'EXMmatch'){
218									 $("#step3b").slideDown("fast");
219								 }else if(datab[0] == 'noEXMmatch'){
220									 $("#step3c").slideDown("fast");
221								 }else{
222									 $("#step3").slideDown("fast");
223								 }
224								 
225							},2500);
226							}else{
227								$("#step2a").slideUp("fast");
228								 $("#formhead").html("Thank you");
229								 $("#step3").slideDown("fast");
230							}
231							
232						});
233					
234					}
235					
236					
237				})
238				.fail(function(){
239					console.log("Postcode Error");
240					alert("Please enter a valid postcode.");
241					$("#acc_postcode").addClass("ac_HasError");
242				})
243			
244			
245		
246	});
247	}else{
248		alert("Please enter a valid email address.");
249		$("#acc_email").addClass("ac_HasError");
250	}
251
252}
253
254function doACRegister32024(){
255	
256	//first check that the email hasn't already got an account.
257	if(isValidEmail($("#acc_email").val())){
258	$.post("/aclogin/checkEmail.php", {e: $("#acc_email").val()}, function(data){
259		console.log(data);
260		errortxt = Array();
261		error = false;
262			if(data!="0"){
263				error = true;
264				$("#acc_email").addClass("ac_HasError");
265				errortxt.push('This email address already has an Extra Warranty Account.');
266			}else{
267				$("#acc_email").removeClass("ac_HasError");
268			}
269			//good to check the rest.
270			
271			//check postcode
272			$.get('https://api.postcodes.io/postcodes/'+$("#acc_postcode").val())
273				.done(function(data){
274					console.log(data.result.eastings);
275					$("#acc_easting").val(data.result.eastings);
276					$("#acc_northing").val(data.result.northings);
277					$("#acc_town").val(data.result.admin_district);
278					$("#acc_county").val(data.result.admin_county);
279					$("#acc_postcode").removeClass("ac_HasError");
280					console.log(data);
281					//check that the name and daytime nums aren't blank
282					
283					if($("#projectType").val()=="none"){
284						error = true;
285						$("#projectType").addClass("ac_HasError");
286						errortxt.push('You must select a project type.');
287					}else{
288						$("#projectType").removeClass("ac_HasError");
289					}
290					
291					if($("#acc_name").val()==""){
292						error = true;
293						$("#acc_name").addClass("ac_HasError");
294						errortxt.push('You must enter your name.');
295					}else{
296						$("#acc_name").removeClass("ac_HasError");
297					}
298					
299					
300					
301					if($("#acc_phone").attr("data-rel")=="yes"){
302					if($("#acc_phone").val()==""){
303						error = true;
304						$("#acc_phone").addClass("ac_HasError");
305						errortxt.push('You must enter your daytime phone number.');
306					}else{
307						$("#acc_phone").removeClass("ac_HasError");
308					}
309					}
310					if(error){
311						
312						alert(errortxt.join('\n'));
313					}else{
314						//go add the lead and setup the account - all good!
315						console.log("Creating Account");
316						
317						
318						 
319						// sleep(1500);
320						 
321						
322						$.post("/aclogin/createAccount.php", $("#ac_check_form").serialize(), function(data){
323							console.log(data);
324							//$("#loginnextbut").html('<a href="https://extrawarranty.co.uk/_acpasssetlw.php?t='+data+'"><button class="yesbut" type="button">Login >></button></a>');
325							if($("#priceb").val()==""){
326							//window.location = '/_acpassset.php?t='+data;
327							$("#step2a").html("<center><BR><BR><BR><p style=\"text-align: center;\"><i class=\"fa-3x fas fa-spinner fa-spin\" style=\"text-align: center; float: none; font-size: 48px;\"></i></p><BR><BR><BR></center>");
328							 $("#formhead").html("Submitting Information...");
329							setTimeout(function(){
330									$("#step1no2yes").html("<center>An approved contractor will contact you shortly.</center>");
331								 $("#formhead").html("Thank you!");
332								 
333								 datab = data.split("|");
334								
335								 
336							},500);
337							}else{
338								$("#step2a").slideUp("fast");
339								 $("#formhead").html("Thank you");
340								 $("#step3").slideDown("fast");
341							}
342							
343						});
344					
345					}
346					
347					
348				})
349				.fail(function(){
350					console.log("Postcode Error");
351					alert("Please enter a valid postcode.");
352					$("#acc_postcode").addClass("ac_HasError");
353				})
354			
355			
356		
357	});
358	}else{
359		alert("Please enter a valid email address.");
360		$("#acc_email").addClass("ac_HasError");
361		console.log($("#acc_email").val());
362	}
363
364}
365
366
367function sleep(milliseconds) {
368	  const date = Date.now();
369	  let currentDate = null;
370	  do {
371		currentDate = Date.now();
372	  } while (currentDate - date < milliseconds);
373	}
374
375function doACGetQuote(){
376	error = false;
377	if($("#ac_gq_desc").val()==""){
378		error = true;
379		alert("You must enter a description.");
380		$("#ac_gq_desc").addClass("ac_HasError");
381	}else{
382		$("#ac_gq_desc").removeClass("ac_HasError");
383	}
384	
385	if($("#ac_gq_price").val()==""){
386		error = true;
387		$("#ac_gq_price").addClass("ac_HasError");
388		alert("You must enter a maximum budget.")
389	}else{
390		$("#ac_gq_price").removeClass("ac_HasError");
391	}
392	
393	if(!error){
394		$.post("/aclogin/getQuote.php", $("#ac_gq_form").serialize(), function(data){
395			console.log(data);
396			alert("Thank you, we'll be in touch shortly.");
397			window.location = "/_acdash.php?t=q";
398		});
399	}
400	
401}
402
403
404function hasLowerCase(str) {
405    return (/[a-z]/.test(str));
406}
407
408function hasUpperCase(str) {
409    return (/[A-Z]/.test(str));
410}
411
412function showphonewhy(){
413	$("#phonewhy").slideDown();
414}
415function doACCheck(){
416	//check that nothing is blank/
417	error = false;
418	if($("#ac_ch_name").val()==""){
419		$("#ac_ch_name").addClass("ac_HasError");
420		error = true;
421	}else{
422		$("#ac_ch_name").removeClass("ac_HasError");
423	}
424	
425	if($("#ac_ch_desc").val()==""){
426		$("#ac_ch_desc").addClass("ac_HasError");
427		error = true;
428	}else{
429		$("#ac_ch_desc").removeClass("ac_HasError");
430	}
431	
432	if($("#ac_ch_price").val()==""){
433		$("#ac_ch_price").addClass("ac_HasError");
434		error = true;
435	}else{
436		$("#ac_ch_price").removeClass("ac_HasError");
437	}
438	
439	if(!$.isNumeric($("#ac_ch_price").val())){
440		$("#ac_ch_price").addClass("ac_HasError");
441		error = true;
442	}else{
443		$("#ac_ch_price").removeClass("ac_HasError");
444	}
445	
446	if(!error){
447		console.log("GOod to go");
448		$.post("/aclogin/addQuote.php", $("#ac_ch_form").serialize(), function(data){
449			console.log(data);
450			window.location = "/_acdash.php?t=q";
451		});
452	}
453	
454}
455
456
457
458
459
460
461
462
463	function tablick(ele){
464		console.log("Tab Clicked");
465		//switch tables.
466		$(".ac_tabhead_active").removeClass("ac_tabhead_active");
467		$(".ac_tab_active").removeClass("ac_tab_active");
468		ntab = $(ele).attr("rel");
469		
470		if(ntab=="checedeeded"){
471			window.location = "/_newcheck.prod2.php";
472		}else{
473			
474		
475		$(ele).addClass("ac_tabhead_active")
476		$('#ac_tab_'+ntab).addClass("ac_tab_active");
477		if(ntab=="messages"){
478			$(".messages").scrollTop($('.messages')[0].scrollHeight);
479			//mark messaages as read
480			$.post("/aclogin/markasread.php", {l: $("#acdleadid").val()}, function(data){
481				console.log(data);
482				setTimeout(function(){
483					$(".mnum").fadeOut();
484					}, 1000);
485			});
486			
487			
488		}
489		}
490	}
491
492
493function sendmsg(){
494	
495	if($("#newmessage").val()==""){
496		alert("You must enter a message to send.");
497	}else{
498		$.post("/aclogin/sendMsg.php", {l: $("#acdleadid").val(), m: $("#newmessage").val()}, function(data){
499			console.log(data);
500			window.location = "/_acdash.php?t=m";
501		});
502	}
503	
504}
505
506
507function doAClogin(){
508	
509	if(isValidEmail($("#acl_email").val())){
510		$.post("/aclogin/doLogin.php", {e: $("#acl_email").val(), p: $("#acl_pass").val()}, function(data){
511			console.log(data);
512			if(data=="invalid"){
513				alert("Email and Password not valid, please try again.")
514			}else{
515				$.cookie('acsess', data);
516				window.location = "/_acdash.php";
517			}
518		});
519	}else{
520		alert("You must login with a valid email.")
521	}
522}
523
524function doACforgot(){
525	if(isValidEmail($("#acl_email").val())){
526		$.post("/aclogin/doForgot.php", {e: $("#acl_email").val()}, function(data){
527			console.log(data);
528			alert("Thank you. If the email supplied has an account you will recieve a reset link shortly.");
529			window.location = "/_aclogin.php";
530		});
531	}else{
532		alert("You must enter a valid email address.")
533	}
534	
535}
536
537function savePass(){
538	$("#acl_pass").removeClass("ac_HasError");
539	$("#acl_confirm").removeClass("ac_HasError");
540	
541	if($("#acl_pass").val()!=$("#acl_confirm").val()){
542		alert("Passwords do not match.");
543		$("#acl_pass").addClass("ac_HasError");
544		$("#acl_confirm").addClass("ac_HasError");
545	}else{
546		if($("#acl_pass").val().length<8){
547			alert("Password is not long enough.");
548			$("#acl_pass").addClass("ac_HasError");
549			$("#acl_confirm").addClass("ac_HasError");
550		}else{
551			if(!hasLowerCase($("#acl_pass").val())){
552				alert("Password has no lowercase letters.");
553				$("#acl_pass").addClass("ac_HasError");
554				$("#acl_confirm").addClass("ac_HasError");
555			}else{
556				if(!hasUpperCase($("#acl_pass").val())){
557				alert("Password has no uppercase letters.");
558				$("#acl_pass").addClass("ac_HasError");
559				$("#acl_confirm").addClass("ac_HasError");
560				}else{
561					console.log("All good to save the password.");
562					$.post("/aclogin/savePass.php", {t: $("#token").val(), p: $("#acl_pass").val()}, function(data){
563						console.log(data);
564						$.cookie('acsess', data);
565						window.location = "/_acdash.php";
566					});
567				}
568			}
569		}
570		
571	}
572	
573	
574	
575	
576	
577	
578}
579
580
581function okterms(lid){
582	$.post("/aclogin/_okGQterms.php", {l:lid}, function(data){
583	console.log(data);
584	window.location = "/_acdash.php?t=a";
585	
586	});
587}
588
589
590
591function arrangeGQsur(GQuid){
592	$.post("/aclogin/_arrangeGQ.php", {i: GQuid}, function(data){
593		console.log(data);
594		window.location = "/_acdash.php?t=q";
595	});
596}
597
598function rejGQ(GQuid){
599	$.post("/aclogin/_rejectGQ.php", {i: GQuid}, function(data){
600		console.log(data);
601		window.location = "/_acdash.php?t=q";;
602	});
603}
604
605function slGQ(GQuid){
606	$.post("/aclogin/_slGQ.php", {i: GQuid}, function(data){
607		console.log(data);
608		window.location = "/_acdash.php?t=q";
609	});
610}

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.