-
Notifications
You must be signed in to change notification settings - Fork 0
/
ASP 2
2375 lines (2124 loc) · 106 KB
/
ASP 2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!--="(document.getElementById(""Ziparean"").value == """&B4&""")||"-->
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/con1.asp" -->
<SCRIPT LANGUAGE=vbscript>
<!--
DIM ValidForm
Sub ValidateEmployee
'If Document.form1.ppiloan.value <> "" then
'-----Verifier code script------
If Document.form1.ppiloan.value <> "lead15" and Document.form1.ppiloan.value <> "sanam77" and Document.form1.ppiloan.value <> "lead85" Then
MsgBox "Enter the Proper Verifier Code"
Else
SET Add = document.form1
ValidForm = True
End If
' --------------------------------------
'If Document.form1.ppiloan.value <> "" then
'SET Add = document.form1
'ValidForm = True
'Else
' MsgBox "Enter the Verifier Code"
'End If
'call checkfield(add.Phone.value, "Please Enter the Customer's Phone No",50)
'sdate = add.smonth(add.smonth.selectedindex).text & "/" & add.sday(add.sday.selectedindex).text & "/" & add.sYear(add.sYear.selectedindex).text
'Call CheckDate(sdate, "Please Select the Valid Sale Date")
IF ValidForm THEN
Add.submit
END IF
END Sub
Sub SubmitPhone
if document.form1.SrPhone.value <> "" then
document.form1.status.value = ""
document.form1.submit
else
msgbox "Enter the Phone No. to Find"
end if
END Sub
sub window_onload()
Shipto_onClick
Ship1_onClick
Ship2_onClick
Ship3_onClick
Ship4_onClick
Ship5_onClick
end sub
sub ProductAmt_onkeypress()
if not isnumeric(form1.ProductAmt.value & chr(window.event.keyCode)) then window.event.keyCode = 0
end sub
sub Shipping_onkeypress()
if not isnumeric(form1.Shipping.value & chr(window.event.keyCode)) then window.event.keyCode = 0
end sub
sub Tax_onkeypress()
if not isnumeric(form1.Tax.value & chr(window.event.keyCode)) then window.event.keyCode = 0
end sub
sub Shipto_onClick()
if form1.shipto.checked = true then
ShowFrame(form1.all.DivShipto)
else
HideFrame(form1.all.DivShipto)
end if
end sub
sub Ship1_onClick()
if form1.ship1.checked = true then
ShowFrame(form1.all.DivShip1)
else
HideFrame(form1.all.DivShip1)
end if
end sub
sub Ship2_onClick()
if form1.ship2.checked = true then
ShowFrame(form1.all.DivShip2)
else
HideFrame(form1.all.DivShip2)
end if
end sub
sub Ship3_onClick()
if form1.ship3.checked = true then
ShowFrame(form1.all.DivShip3)
else
HideFrame(form1.all.DivShip3)
end if
end sub
sub Ship4_onClick()
if form1.ship4.checked = true then
ShowFrame(form1.all.DivShip4)
else
HideFrame(form1.all.DivShip4)
end if
end sub
sub Ship5_onClick()
if form1.ship5.checked = true then
ShowFrame(form1.all.DivShip5)
else
HideFrame(form1.all.DivShip5)
end if
end sub
sub ShowFrame(FrameName)
framename.style.visibility = "visible"
framename.style.position = ""
end sub
sub HideFrame(FrameName)
FrameName.style.visibility = "hidden"
FrameName.style.position = "absolute"
end sub
//-->
</SCRIPT>
<SCRIPT LANGUAGE=javascript type="text/JavaScript">
var score1 = 0;
var score2 = 0;
var score3 = 0;
var score4 = 0;
var score5 = 0;
var score6 = 0;
var score7 = 0;
var score8 = 0;
function psi1()
{
var x1 = document.all("PSI_Ptype").options[document.all("PSI_Ptype").selectedIndex].text;
var x2 = document.all("PSI_Bprop").options[document.all("PSI_Bprop").selectedIndex].text;
var x3 = document.all("PSI_Sprop").options[document.all("PSI_Sprop").selectedIndex].text;
var x4 = document.all("PSI_wprop").options[document.all("PSI_wprop").selectedIndex].text;
var x5 = document.all("PSI_cprop").options[document.all("PSI_cprop").selectedIndex].text;
var x6 = document.all("PSI_aprop").options[document.all("PSI_aprop").selectedIndex].text;
var x7 = document.all("PSI_iprop").options[document.all("PSI_iprop").selectedIndex].text;
var x8 = document.all("PSI_eprop").options[document.all("PSI_eprop").selectedIndex].text;
if (x1 == "Flat") { score1 = 1;}
if (x1 == "Bungalow") { score1 = 2;}
if (x1 == "House") { score1 = 3; }
if (x2 == "Detached") { score2 = 4; }
if (x2 == "Semi detached") { score2 = 3; }
if (x2 == "End Terraced") { score2 = 2; }
if (x2 == "Terraced") { score2 = 1; }
if (x3 == "2") { score3 = 2; }
if (x3 == "3") { score3 = 3; }
if (x3 == "4") { score3 = 4; }
if (x3 == "5+") { score3 = 5; }
if (x4 == "Double glazed") { score4 = 1; }
if (x4 == "Single glazed") { score4 = 3; }
if (x4 == "Mixture of both") { score4 = 2; }
if (x5 == "Solid brick walls") { score5 = 2; }
if (x5 == "cavity brick walls") { score5 = 1; }
if (x6 == "<30years") { score6 = 1; }
if (x6 == "30-50 years") { score6 = 2; }
if (x6 == "50-70 years") { score6 = 3; }
if (x6 == "70 years plus") { score6 = 4; }
if (x7 == "Loft insulation in last 10 years") { score7 = 1; }
if (x7 == "no loft insulation") { score7 = 3; }
if (x7 == "cavity wall insulation") { score7 = 1; }
if (x8 == "Loft conversion") { score8 = 3; }
if (x8 == "single story extension") { score8 = 3; }
if (x8 == "double story extension") { score8 = 4; }
/*msg = score1 + " Question 1 Score\n";
msg = msg + score2 + " Question 2 Score\n";
msg = msg + score3 + " Question 3 Score\n";
msg = msg + score4 + " Question 4 Score\n";
msg = msg + score5 + " Question 5 Score\n";
msg = msg + score6 + " Question 6 Score\n";
msg = msg + score7 + " Question 7 Score\n";
msg = msg + score8 + " Question 8 Score\n";
alert(msg);*/
var tot1 = score1 + score2 + score3 + score4 + score5 + score6 + score7 + score8
document.form1.lead_score.value = tot1;
}
/*function ddr()
{
var x = document.all("Insutenyrs");
var y = x.options[x.selectedIndex].text;
if(y == "Yes")
{
document.form1.paymode[0].disabled = true;
alert("No more Loft Questions");
}
if(y == "No")
{
document.form1.paymode[0].disabled = false;
}
}*/
function dds()
{
var x = document.all("InsuJoist");
var y = x.options[x.selectedIndex].text;
if(y == "Above")
{
document.form1.InsuLoftTen.disabled = true;
document.form1.InsuJoist.disabled = true;
document.form1.InsuLoftBoard.disabled = true;
document.form1.InsuLoftBoard1.disabled = true;
document.form1.InsuLoftEmp.disabled = true;
document.form1.InsuLoftEmp1.disabled = true;
document.form1.InsuWorkLoft.disabled = true;
document.form1.InsuLoftConv.disabled = true;
/*document.form1.paymode[1].checked = true;*/
alert("No more Loft Questions");
}
}
function ddsub()
{
var x = document.all("OwnProper");
var y = x.options[x.selectedIndex].text;
if(y == "No") {
document.form1.Submitform.disabled = true;
alert("This is Invalid Record");
}
if(y == "Yes")
{
document.form1.Submitform.disabled = false;
alert("This is Valid Lead Proceed");
}
}
function ddQsix()
{
var x = document.all("InsuCustAllow");
var y = x.options[x.selectedIndex].text;
if(y == "No")
{
document.form1.InsuBenefits.disabled = true;
document.form1.InsuBenefits2.disabled = true;
document.form1.InsuBenefits3.disabled = true;
}
if(y == "Yes")
{
document.form1.InsuBenefits.disabled = false;
document.form1.InsuBenefits2.disabled = false;
document.form1.InsuBenefits3.disabled = false;
}
}
function ddQsix1()
{
var x = document.all("InsuBenefits");
var y = x.options[x.selectedIndex].text;
if(y == "Pension Credit")
{
document.form1.InsuBenefits2.disabled = true;
document.form1.InsuBenefits3.disabled = true;
}
if(y == "Child Tax Credit - Income Less Than £ 15,860")
{
document.form1.InsuBenefits2.disabled = true;
document.form1.InsuBenefits3.disabled = true;
}
if(y == "Income-based job seeker's allowance")
{
document.form1.InsuBenefits3.disabled = true;
document.form1.InsuBenefits2.disabled = false;
}
if(y == "Income related employment and support allowance")
{
document.form1.InsuBenefits3.disabled = true;
document.form1.InsuBenefits2.disabled = false;
}
if(y == "Income support")
{
document.form1.InsuBenefits3.disabled = true;
document.form1.InsuBenefits2.disabled = false;
}
if(y == "Working tax credit with a relevant income below £15860")
{
document.form1.InsuBenefits2.disabled = true;
document.form1.InsuBenefits3.disabled = false;
}
if(y == "Receive Universal Credit with monthly earned income of £ 1,250 or less in any one of the assessment periods in the previous 12 months")
{
document.form1.InsuBenefits2.disabled = true;
document.form1.InsuBenefits3.disabled = false;
}
}
function ddbuilt()
{
var x = document.all("InsuBuiltYear");
var y = x.options[x.selectedIndex].text;
if(y == "Yes")
{
document.form1.InsuBuiltBefo.disabled = true;
document.form1.InsuHaveCavity.disabled = true;
document.form1.InsuTimFra.disabled = true;
document.form1.InsuTileCla.disabled = true;
document.form1.InsuDampWall.disabled = true;
alert("Dont ask cavity questions");
}
}
function ddbefo()
{
var x = document.all("InsuBuiltBefo");
var y = x.options[x.selectedIndex].text;
if(y == "Yes")
{
document.form1.InsuHaveCavity.disabled = true;
document.form1.InsuTimFra.disabled = true;
document.form1.InsuTileCla.disabled = true;
document.form1.InsuDampWall.disabled = true;
alert("Dont ask cavity questions");
}
}
function ddcav()
{
var x = document.all("InsuHaveCavity");
var y = x.options[x.selectedIndex].text;
if(y == "No")
{
document.form1.InsuTimFra.disabled = true;
document.form1.InsuTileCla.disabled = true;
document.form1.InsuDampWall.disabled = true;
alert("Dont ask cavity questions");
}
}
function ddfra()
{
var x = document.all("InsuTimFra");
var y = x.options[x.selectedIndex].text;
if(y == "Yes")
{
document.form1.InsuTileCla.disabled = true;
document.form1.InsuDampWall.disabled = true;
alert("Dont ask cavity questions");
}
}
function ddcla()
{
var x = document.all("InsuTileCla");
var y = x.options[x.selectedIndex].text;
if(y == "Yes")
{
document.form1.InsuDampWall.disabled = true;
alert("Dont ask cavity questions");
}
}
function ddwall()
{
var x = document.all("InsuDampWall");
var y = x.options[x.selectedIndex].text;
if(y == "Yes")
{
alert("Dont ask cavity questions");
}
}
function valid()
{
if(document.form1.Shipto.checked==false && document.form1.Ship1.checked==false && document.form1.Ship3.checked == false && document.form1.Ship2.checked==false)
{
alert("Please Fill the Form Completely");
}
else if(document.form1.Shipto.checked==true)
{
var msg="";
if((document.getElementById("OwnProper").value =="")||(document.getElementById("Tenure").value == "")||(document.getElementById("InsuInterest").value =="")||(document.getElementById("InsuProp").value == "")||(document.getElementById("InsuPropBuilt").value =="")||(document.getElementById("InsuCustAllow").value == "")||(document.getElementById("Insucert").value =="")||(document.getElementById("stonew").value ==""))
{
if(document.getElementById("OwnProper").value == "")
msg = msg + "1. Does the Customer Own the Property?\n";
if(document.getElementById("Tenure").value == "")
msg = msg + "2. Tenure\n";
if(document.getElementById("InsuInterest").value == "")
msg = msg + "3. What type of Insulation are you Interested In?\n";
if(document.getElementById("InsuProp").value == "")
msg = msg + "4. what type of Property?\n";
if(document.getElementById("InsuPropBuilt").value == "")
msg = msg + "5. When was the Property Built?\n";
if(document.getElementById("InsuCustAllow").value == "")
msg = msg + "6. Is the Customer on any Benefits Allowances Or Credits?\n";
if(document.getElementById("Insucert").value == "")
msg = msg + "9. CERT 70\n";
if(document.getElementById("stonew").value == "")
msg = msg + "12. Does your property have stone walls?\n";
alert(msg);
return false;
}
else if(document.form1.Ship1.checked==true)
{
var msg="";
if((document.getElementById("InsuBuiltYear").value =="")||(document.getElementById("InsuBuiltBefo").value == "")||(document.getElementById("InsuHaveCavity").value =="")||(document.getElementById("InsuTimFra").value == "")||(document.getElementById("InsuTileCla").value =="")||(document.getElementById("InsuDampWall").value == ""))
{
if(document.getElementById("InsuBuiltYear").value == "")
msg = msg + "Please Select Property Built Year After 1985\n";
if(document.getElementById("InsuBuiltBefo").value == "")
msg = msg + "Please Select Property Built Year Before 1900\n";
if(document.getElementById("InsuHaveCavity").value == "")
msg = msg + "Please Select Cavity wall present or not\n";
if(document.getElementById("InsuTimFra").value == "")
msg = msg + "Please Select Property Structure Timber Frame / Steel\n";
if(document.getElementById("InsuTileCla").value == "")
msg = msg + "Please Select Property ties details\n";
if(document.getElementById("InsuDampWall").value == "")
msg = msg + "Please Select Property damp wall details\n";
alert(msg);
return false;
}
else
{
document.form1.submit();
}
}
else if(form1.Ship3.checked == true)
{
var msg="";
if((document.getElementById("InsuLoftTen").value == "")||(document.getElementById("InsuLoftBoard").value == "")||(document.getElementById("InsuLoftEmp").value == "")||(document.getElementById("InsuWorkLoft").value == "")||(document.getElementById("InsuLoftConv").value == ""))
{
if(document.getElementById("InsuLoftTen").value == "")
msg=msg+"Please Select the Question number 16.\n";
if(document.getElementById("InsuLoftBoard").value == "")
msg=msg+"Please Select the Question number 18.\n";
if(document.getElementById("InsuLoftEmp").value == "")
msg=msg+"Please Select the Question number 19.\n";
if(document.getElementById("InsuWorkLoft").value == "")
msg=msg+"Please Select the Question number 20.\n";
if(document.getElementById("InsuLoftConv").value == "")
msg=msg+"Please Select the Question number 21.\n";
alert(msg);
return false;
}
else
{
document.form1.submit();
}
}
else
{
document.form1.submit();
}
}
else if(document.form1.Ship1.checked==true)
{
var msg="";
if((document.getElementById("InsuBuiltYear").value =="")||(document.getElementById("InsuBuiltBefo").value == "")||(document.getElementById("InsuHaveCavity").value =="")||(document.getElementById("InsuTimFra").value == "")||(document.getElementById("InsuTileCla").value =="")||(document.getElementById("InsuDampWall").value == ""))
{
if(document.getElementById("InsuBuiltYear").value == "")
msg = msg + "Please Select Question number 23.\n";
if(document.getElementById("InsuBuiltBefo").value == "")
msg = msg + "Please Select Question number 24.\n";
if(document.getElementById("InsuHaveCavity").value == "")
msg = msg + "Please Select Question number 25.\n";
if(document.getElementById("InsuTimFra").value == "")
msg = msg + "Please Select Question number 26.\n";
if(document.getElementById("InsuTileCla").value == "")
msg = msg + "Please Select Question number 27.\n";
if(document.getElementById("InsuDampWall").value == "")
msg = msg + "Please Select Question number 28.\n";
alert(msg);
return false;
}
else
{
document.form1.submit();
}
}
else if(form1.Ship3.checked == true)
{
var msg="";
if((document.getElementById("InsuLoftTen").value == "")||(document.getElementById("InsuLoftBoard").value == "")||(document.getElementById("InsuLoftEmp").value == "")||(document.getElementById("InsuWorkLoft").value == "")||(document.getElementById("InsuLoftConv").value == ""))
{
if(document.getElementById("InsuLoftTen").value == "")
msg=msg+"Please Select Question number 16.\n";
if(document.getElementById("InsuLoftBoard").value == "")
msg=msg+"Please Select Question number 18.\n";
if(document.getElementById("InsuLoftEmp").value == "")
msg=msg+"Please Select Question number 19.\n";
if(document.getElementById("InsuWorkLoft").value == "")
msg=msg+"Please Select Question number 20.\n";
if(document.getElementById("InsuLoftConv").value == "")
msg=msg+"Please Select Question number 21.\n";
alert(msg);
return false;
}
else
{
document.form1.submit();
}
}
else if(form1.Ship2.checked == true)
{
var msg="";
if((document.getElementById("InsuBedRoom").value == "")||(document.getElementById("InsuPrice").value == "")||(document.getElementById("InsuPInterest").value == ""))
{
if(document.getElementById("InsuBedRoom").value == "")
msg=msg+"How Many Bedrooms are there in the Property?\n";
if(document.getElementById("InsuPrice").value == "")
msg=msg+"Price Quoted?\n";
if(document.getElementById("InsuPInterest").value == "")
msg=msg+"Would you be interested to have the property insulted\n";
alert(msg);
return false;
}
else
{
document.form1.submit();
}
}
else
{
document.form1.submit();
}
}
</SCRIPT>
<%if session("agentid") = "" then
Response.Redirect("logout.asp")
end if
mess = Request.querystring("mess")
actype = Request.querystring("type")
CustId = trim(Request.querystring("CustId"))
if Request.Form("status")="" then
agentid = session("agentid")
set r1 = Server.CreateObject("ADODB.Recordset")
r1.Open "select * from dialer_agent where agent_uid = '"& agentid &"'",con,adOpenDynamic
if not r1.eof then
name = r1("agent_uid")
end if
r1.Close
if CustId <> "" then
set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "select * from Insu where CustId='"& CustId &"'",con,2,2
if not rs.EOF then
Title = rs("Title")
Fname = rs("FName")
Mname = rs("MName")
Lname = rs("LName")
Address1 = rs("Address1")
Address2 = rs("Address2")
Address3 = rs("Address3")
City = rs("City")
State = rs("State")
Zip = rs("Zip")
ZipArea = rs("ZipArea")
ZipAreaN = rs("ZipAreaN")
LeadID = rs("LeadID")
SupplierBatchNo = rs("SupplierBatchNo")
BT_YoN = rs("BT_YoN")
hPhone = rs("hPhone")
AhPhone = rs("AhPhone")
mobile = rs("mobile")
CusEmail = rs("CusEmail")
CavityWalls = rs("CavityWalls")
'Insutenyrs = rs("Insutenyrs")
InsuJoist = rs("InsuJoist")
sday = day(rs("made_at"))
smon = month(rs("made_at"))
syear = year(rs("made_at"))
EstTime = rs("EstTime")
if rs("shipto") = true then
shipto = true
OwnProper = rs("OwnProper")
Tenure = rs("Tenure")
InsuInterest = rs("InsuInterest")
InsuProp = rs("InsuProp")
InsuPropBuilt = rs("InsuPropBuilt")
InsuCustAllow = rs("InsuCustAllow")
InsuBenefits = rs("InsuBenefits")
InsuBenefits2 = rs("InsuBenefits2")
InsuBenefits3 = rs("InsuBenefits3")
'InsuHomeIncome = rs("InsuHomeIncome")
Insucert = rs("Insucert")
InsuAgeProof = rs("InsuAgeProof")
cust_dob = rs("cust_dob")
InsuUtilBill = rs("InsuUtilBill")
stonew = rs("stonew")
CDigNews1 = rs("CDigNews1")
CDigNews2 = rs("CDigNews2")
CDigNews3 = rs("CDigNews3")
CDigNews4 = rs("CDigNews4")
CDigNews5 = rs("CDigNews5")
boiler_Type = rs("boiler_Type")
boiler_life = rs("boiler_life")
boiler_replace = rs("boiler_replace")
InsuGas = rs("InsuGas")
InsuUtilProv = rs("InsuUtilProv")
InsuUtilProvOth = rs("InsuUtilProvOth")
InsuElecSub = rs("InsuElecSub")
InsuElecSub1 = rs("InsuElecSub1")
InsuElecSubOth = rs("InsuElecSubOth")
Boiler_make_model = rs("Boiler_make_model")
boiler_breakdown_policy = rs("boiler_breakdown_policy")
B_emp_unemp = rs("B_emp_unemp")
Boiler_fault = rs("Boiler_fault")
end if
'paymode = rs("paymode")
if rs("ship3") = true then
InsuLoftTen = rs("InsuLoftTen")
InsuDeep = rs("InsuDeep")
InsuLoftBoard = rs("InsuLoftBoard")
InsuLoftBoard1 = rs("InsuLoftBoard1")
InsuLoftEmp = rs("InsuLoftEmp")
InsuLoftEmp1 = rs("InsuLoftEmp1")
InsuWorkLoft = rs("InsuWorkLoft")
InsuLoftConv = rs("InsuLoftConv")
'InsuRInfo = rs("InsuRInfo")
end if
if rs("ship1") = true then
ship1 = true
Cavity_problem = rs("Cavity_problem")
InsuBuiltYear = rs("InsuBuiltYear")
InsuBuiltBefo = rs("InsuBuiltBefo")
InsuHaveCavity = rs("InsuHaveCavity")
InsuTimFra = rs("InsuTimFra")
InsuTileCla = rs("InsuTileCla")
InsuDampWall = rs("InsuDampWall")
end if
if rs("ship2") = true then
ship2 = true
''CProducts1 = rs("CProducts1")
''CProducts2 = rs("CProducts2")
InsuBedRoom = rs("InsuBedRoom")
''InsuBedRoom1 = rs("InsuBedRoom1")
InsuPrice = rs("InsuPrice")
InsuPInterest = rs("InsuPInterest")
'InsuShower = rs("InsuShower")
InsuPwd = rs("InsuPwd")
InsuBTCall = rs("InsuBTCall")
InsuBTCall1 = rs("InsuBTCall1")
cday2 = day(rs("Demo2"))
cmon2 = month(rs("Demo2"))
cyear2 = year(rs("Demo2"))
CTime2 = rs("CTime2")
end if
disposition = rs("disposition")
ppiloan = rs("ppiloan")
Location = rs("Location")
epc = rs("epc")
epc_r = rs("epc_r")
Threshold = rs("Threshold")
Verified = rs("Verified")
madeby = rs("made_by")
remarks = rs("remarks")
'SpeciTime = rs("SpeciTime")
Qremarks = rs("Qremarks")
Pending= rs("Pending")
end if
rs.close
else
if Request.Form("SrPhone") <> "" then
set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "select * from Insu where hphone <> '' and hphone='"& Request.Form("SrPhone") &"'",con,2,2
if not rs.EOF then
'SaleRec = True
Title = rs("Title")
Fname = rs("FName")
Mname = rs("MName")
Lname = rs("LName")
Address1 = rs("Address1")
Address2 = rs("Address2")
Address3 = rs("Address3")
City = rs("City")
State = rs("State")
Zip = rs("Zip")
ZipArea = rs("ZipArea")
ZipAreaN = rs("ZipAreaN")
LeadID = rs("LeadID")
SupplierBatchNo = rs("SupplierBatchNo")
hPhone = rs("hPhone")
AhPhone = rs("AhPhone")
mobile = rs("mobile")
CusEmail = rs("CusEmail")
CavityWalls = rs("CavityWalls")
'Insutenyrs = rs("Insutenyrs")
InsuJoist = rs("InsuJoist")
sday = day(rs("made_at"))
smon = month(rs("made_at"))
syear = year(rs("made_at"))
EstTime = rs("EstTime")
'EstTime = hour(rs("EstTime")) & ":" & minute(rs("EstTime"))
'right("00" & hour(now)+5,2) & ":" & right("00" & minute(now)+15,2)
if rs("shipto") = true then
shipto = true
OwnProper = rs("OwnProper")
Tenure = rs("Tenure")
InsuInterest = rs("InsuInterest")
InsuProp = rs("InsuProp")
InsuPropBuilt = rs("InsuPropBuilt")
InsuCustAllow = rs("InsuCustAllow")
InsuBenefits = rs("InsuBenefits")
InsuBenefits2 = rs("InsuBenefits2")
InsuBenefits3 = rs("InsuBenefits3")
'InsuHomeIncome = rs("InsuHomeIncome")
Insucert = rs("Insucert")
InsuAgeProof = rs("InsuAgeProof")
cust_dob = rs("cust_dob")
InsuUtilBill = rs("InsuUtilBill")
stonew = rs("stonew")
CDigNews1 = rs("CDigNews1")
CDigNews2 = rs("CDigNews2")
CDigNews3 = rs("CDigNews3")
CDigNews4 = rs("CDigNews4")
CDigNews5 = rs("CDigNews5")
boiler_Type = rs("boiler_Type")
boiler_life = rs("boiler_life")
boiler_replace = rs("boiler_replace")
InsuGas = rs("InsuGas")
InsuUtilProv = rs("InsuUtilProv")
InsuUtilProvOth = rs("InsuUtilProvOth")
InsuElecSub = rs("InsuElecSub")
InsuElecSub1 = rs("InsuElecSub1")
InsuElecSubOth = rs("InsuElecSubOth")
Boiler_make_model = rs("Boiler_make_model")
boiler_breakdown_policy = rs("boiler_breakdown_policy")
B_emp_unemp = rs("B_emp_unemp")
Boiler_fault = rs("Boiler_fault")
end if
'paymode = rs("paymode")
if rs("ship3") = true then
InsuLoftTen = rs("InsuLoftTen")
InsuDeep = rs("InsuDeep")
InsuLoftBoard = rs("InsuLoftBoard")
InsuLoftBoard1 = rs("InsuLoftBoard1")
InsuLoftEmp = rs("InsuLoftEmp")
InsuLoftEmp1 = rs("InsuLoftEmp1")
InsuWorkLoft = rs("InsuWorkLoft")
InsuLoftConv = rs("InsuLoftConv")
'InsuRInfo = rs("InsuRInfo")
end if
if rs("ship1") = true then
ship1 = true
Cavity_problem = rs("Cavity_problem")
InsuBuiltYear = rs("InsuBuiltYear")
InsuBuiltBefo = rs("InsuBuiltBefo")
InsuHaveCavity = rs("InsuHaveCavity")
InsuTimFra = rs("InsuTimFra")
InsuTileCla = rs("InsuTileCla")
InsuDampWall = rs("InsuDampWall")
end if
if rs("ship2") = true then
ship2 = true
''CProducts1 = rs("CProducts1")
''CProducts2 = rs("CProducts2")
InsuBedRoom = rs("InsuBedRoom")
''InsuBedRoom1 = rs("InsuBedRoom1")
InsuPrice = rs("InsuPrice")
InsuPInterest = rs("InsuPInterest")
'InsuShower = rs("InsuShower")
InsuPwd = rs("InsuPwd")
InsuBTCall = rs("InsuBTCall")
InsuBTCall1 = rs("InsuBTCall1")
cday2 = day(rs("Demo2"))
cmon2 = month(rs("Demo2"))
cyear2 = year(rs("Demo2"))
CTime2 = rs("CTime2")
end if
disposition = rs("disposition")
ppiloan = rs("ppiloan")
Location = rs("Location")
epc = rs("epc")
epc_r = rs("epc_r")
Threshold = rs("Threshold")
Verified = rs("Verified")
madeby = rs("made_by")
remarks = rs("remarks")
'SpeciTime = rs("SpeciTime")
Qremarks = rs("Qremarks")
Pending= rs("Pending")
else
SaleRec = False
end if
rs.close
set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "select * from dhans..Insulation_data where cust_offtelno1='"& trim(Request.Form("SrPhone")) &"'",con,2,2
if not rs.EOF Then%>
<TABLE align=center cellPadding=0 cellSpacing=0 border=1 bordercolor="White" width="90%" style="COLOR: Black; FONT-FAMILY: Georgia; FONT-SIZE: 12pt" ID="clsTable">
<TR bgcolor=Black height=25>
<TH width="30%"><FONT color=Orange size=2>Area</FONT></TH>
<TH width="40%"><FONT color=Orange size=2>Campaign</FONT></TH>
<TH width="30%"><FONT color=Orange size=2>Lead Type</FONT></TH>
</TR>
<%set rst = Server.CreateObject("ADODB.Recordset")
rst.Open "select * from Insu_Campaign_Postcodes where Active='Yes' and Ziparea='"& trim(rs("Custom8")) &"'",con,adOpenDynamic
if not rst.EOF Then
i = 1
do while not rst.eof%>
<TR bgColor=Orange height=25>
<TD width="30%" align=middle><FONT color=Black size=2><%=rst("Ziparea")%></FONT></TD>
<TD width="40%" align=middle><FONT color=Black size=2><%=rst("Campaign")%></FONT></TD>
<TD width="30%" align=middle><FONT color=Black size=2><%=rst("Lead_type")%></FONT></TD>
</TR>
<%i = i + 1
rst.movenext
loop
end if
set rstn = Server.CreateObject("ADODB.Recordset")
rstn.Open "select * from Insu_Campaign_Postcodes where Active='Yes' and Ziparean='"& trim(rs("Custom9")) &"'",con,adOpenDynamic
if not rstn.EOF Then
i = 1
do while not rstn.eof%>
<TR bgColor=Orange height=25>
<TD width="30%" align=middle><FONT color=Black size=2><%=rstn("Ziparean")%></FONT></TD>
<TD width="40%" align=middle><FONT color=Black size=2><%=rstn("Campaign")%></FONT></TD>
<TD width="30%" align=middle><FONT color=Black size=2><%=rstn("Lead_type")%></FONT></TD>
</TR>
<%i = i + 1
rstn.movenext
loop
end If
set rswg1 = Server.CreateObject("ADODB.Recordset")
rswg1.Open "select * from jerrydnc where cust_offtelno1='"& trim(rs("cust_offtelno1")) &"'",con,adOpenDynamic
if not rswg1.EOF Then
i = 1
do while not rswg1.eof%>
<TR bgColor=yellow height=25>
<P align=center><strong><FONT face="serif" color="red" size=4 align="center"> This Number in UK TPS List Please cut the call </FONT></strong></P>
</TR>
<%i = i + 1
rswg1.movenext
loop
end if
set rswg2 = Server.CreateObject("ADODB.Recordset")
rswg2.Open "select * from WG2016 where Active='Yes' and cust_city1='"& trim(rs("cust_City1")) &"'",con,adOpenDynamic
if not rswg2.EOF Then
i = 1
do while not rswg2.eof%>
<TR bgColor=Orange height=25>
<TD width="30%" align=middle><FONT color=Black size=2><%=rswg2("cust_city1")%></FONT></TD>
<TD width="40%" align=middle><FONT color=Black size=2>WarmGen 2016</FONT></TD>
<TD width="30%" align=middle><FONT color=Black size=2>Free Loft/Cavity</FONT></TD>
</TR>
<%i = i + 1
rswg2.movenext
loop
end if
set rsp = Server.CreateObject("ADODB.Recordset")
rsp.Open "select disposition,hphone,made_at from insuqc where hphone='"& trim(Request.Form("SrPhone")) &"' order by made_at desc",con,adOpenDynamic
if not rsp.EOF Then
i = 1
do while not rsp.eof%>
<TR bgColor=white height=25>
<TD width="30%" align=middle><FONT color=Black size=2><b><%=rsp("disposition")%></b></FONT></TD>
<TD width="40%" align=middle><FONT color=Black size=2><b><%=rsp("hphone")%></b></FONT></TD>
<TD width="30%" align=middle><FONT color=Black size=2><b><%=rsp("made_at")%></b></FONT></TD>
</TR>
<%i = i + 1
rsp.movenext
loop
end if
set rstnc = Server.CreateObject("ADODB.Recordset")
rstnc.Open "select * from CSCO where Zip='"& trim(rs("cust_City1")) &"'",con,adOpenDynamic
if not rstnc.EOF Then
i = 1
do while not rstnc.eof%>
<TR bgColor=Black height=25>
<TD width="30%" align=middle><FONT color=white size=2><%=rstnc("Zip")%></FONT></TD>
<TD width="40%" align=middle><FONT color=white size=2></FONT></TD>
<TD width="30%" align=middle><FONT color=white size=2>CSCO Area</FONT></TD>
</TR>
<%i = i + 1
rstnc.movenext
loop%>
</Table>
<%end if
rst.close
rstn.close
rstnc.close
rswg1.close
rswg2.close
rsp.close
Fname = trim(rs("cust_FName"))
Mname = trim(rs("cust_MidName"))
Lname = trim(rs("cust_LName"))
title = trim(rs("cust_title"))
Address1 = trim(rs("cust_ResidenceAdd"))
Address2 = trim(rs("cust_Address1"))
Address3 = trim(rs("cust_Address2"))
City = trim(rs("cust_ResPincode"))