-
Notifications
You must be signed in to change notification settings - Fork 0
/
cl_infos.php
2190 lines (2031 loc) · 85.7 KB
/
cl_infos.php
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
<!DOCTYPE HTML>
<html>
<?php
include("config.php");
require_once('functions.php');
if ('Production' != constant('DEPLOY_MODE')) {
echo '<h3>Site is running in ' . constant('DEPLOY_MODE') . ': all warnings and errors will be displayed!</h3>';
echo "<pre>";
require 'dump-errors.php';
echo "</pre>";
}
$whoisdis = $_SERVER['REMOTE_USER'];
?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>
Circles USA CEPT
</title>
<style>
.nextbutton {
background-color: #069B54; /* GREEN */
border: none;
color: white;
padding: 5px 5px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 10px;
margin: 4px 2px;
cursor: pointer;
}
.donebutton {
background-color: #EF5F0A; /* ORANGE */
border: none;
color: white;
padding: 5px 5px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 10px;
margin: 4px 2px;
cursor: pointer;
}
.anotherbutton {
background-color: #008FD9; /* BLUE */
border: none;
color: white;
padding: 5px 5px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 10px;
margin: 4px 2px;
cursor: pointer;
}
.centered {
margin: auto;
width: 60%;
border: 6px ridge rgb(0, 159, 222);
color: rgb(0, 0, 0);
padding: 10px;
box-shadow: 5px 5px 5px #cccccc;
border-radius: 8px;
position: relative;
}
.h2 {
font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
font-weight: bold;
color: rgb(0, 163, 222);
}
.h3 {
font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
/ / font-weight: bold;
color: black;
}
.p1 {
display: inline;
font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
font-weight: bold;
color: rgb(0, 163, 222);
font-size: 18px;
}
.p2 {
display: inline;
font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
font-weight: bold;
color: rgb(0, 163, 222);
font-size: 18px;
}
.form-els {
display: inline;
font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
font-weight: bold;
}
.button-text {
display: inline;
font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
font-size: 14px;
/ / font-weight: bold;
}
.org-hr {
width: 100%;
border-style: outset;
border-width: 3px;
color: rgb(242, 117, 34);
}
</style>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript">
function ShowAll() {
document.getElementById("cl_counties").style.display = "block";
document.getElementById("cl_cities").style.display = "block";
document.getElementById("AboutHomeHR").style.display = "block";
document.getElementById("AboutHome").style.display = "block";
document.getElementById("cl_beds").style.display = "block";
document.getElementById("cl_utilsmortrent").style.display = "block";
document.getElementById("AboutFamilyLabel").style.display = "block";
document.getElementById("ArePeople21").style.display = "block";
document.getElementById("HowMany21s").style.display = "block";
document.getElementById("DoAnyPT").style.display = "block";
document.getElementById("HowManyPT").style.display = "block";
document.getElementById("DoAnyFT").style.display = "block";
document.getElementById("HowManyFT").style.display = "block";
document.getElementById("WorkExpensesReimbursed").style.display = "block";
document.getElementById("HowMuchWorkExpense").style.display = "block";
document.getElementById("ArePeople13to20").style.display = "block";
document.getElementById("HowMany13to20").style.display = "block";
document.getElementById("AreAny19to20").style.display = "block";
document.getElementById("HowMany19to20").style.display = "block";
document.getElementById("AreAny13to18").style.display = "block";
document.getElementById("HowMany13to18").style.display = "block";
document.getElementById("AreAnyUnable").style.display = "block";
document.getElementById("HowManyUnable").style.display = "block";
document.getElementById("ArePeopleLessThan13").style.display = "block";
document.getElementById("HowManyLessThan13").style.display = "block";
document.getElementById("GetChild1").style.display = "block";
document.getElementById("GetChild2").style.display = "block";
document.getElementById("GetChild3").style.display = "block";
document.getElementById("GetChild4").style.display = "block";
document.getElementById("GetChild5").style.display = "block";
document.getElementById("GetChild6").style.display = "block";
document.getElementById("GetChild7").style.display = "block";
document.getElementById("GetChild8").style.display = "block";
document.getElementById("GetChild9").style.display = "block";
document.getElementById("GetChild10").style.display = "block";
document.getElementById("GetChild11").style.display = "block";
document.getElementById("GetChild12").style.display = "block";
document.getElementById("LastChild").style.display = "block";
document.getElementById("DayCareInfos").style.display = "block";
document.getElementById("DayCareDays").style.display = "block";
document.getElementById("DayCareHours").style.display = "block";
document.getElementById("DayCarePlace").style.display = "block";
document.getElementById("DayCareFaith").style.display = "block";
document.getElementById("AddFamilyLabel").style.display = "block";
document.getElementById("FTCollegeStudents").style.display = "block";
document.getElementById("HowManyFTCollegeStudents").style.display = "block";
document.getElementById("CurrentPreg").style.display = "block";
document.getElementById("StepParent").style.display = "block";
document.getElementById("AllReceiving").style.display = "block";
document.getElementById("Adults60PlusYN").style.display = "block";
document.getElementById("HowMany60Plus").style.display = "block";
document.getElementById("ThatsAllFolks").style.display = "block";
}
window.onload = function() {
document.getElementById("cl_utilsmortrent").style.display = "none";
document.getElementById("AboutFamilyLabel").style.display = "none";
document.getElementById("ArePeople21").style.display = "none";
document.getElementById("HowMany21s").style.display = "none";
document.getElementById("DoAnyPT").style.display = "none";
document.getElementById("HowManyPT").style.display = "none";
document.getElementById("DoAnyFT").style.display = "none";
document.getElementById("HowManyFT").style.display = "none";
document.getElementById("WorkExpensesReimbursed").style.display = "none";
document.getElementById("HowMuchWorkExpense").style.display = "none";
document.getElementById("ArePeople13to20").style.display = "none";
document.getElementById("HowMany13to20").style.display = "none";
document.getElementById("AreAny19to20").style.display = "none";
document.getElementById("HowMany19to20").style.display = "none";
document.getElementById("AreAny13to18").style.display = "none";
document.getElementById("HowMany13to18").style.display = "none";
document.getElementById("AreAnyUnable").style.display = "none";
document.getElementById("HowManyUnable").style.display = "none";
document.getElementById("ArePeopleLessThan13").style.display = "none";
document.getElementById("HowManyLessThan13").style.display = "none";
document.getElementById("GetChild1").style.display = "none";
document.getElementById("GetChild2").style.display = "none";
document.getElementById("GetChild3").style.display = "none";
document.getElementById("GetChild4").style.display = "none";
document.getElementById("GetChild5").style.display = "none";
document.getElementById("GetChild6").style.display = "none";
document.getElementById("GetChild7").style.display = "none";
document.getElementById("GetChild8").style.display = "none";
document.getElementById("GetChild9").style.display = "none";
document.getElementById("GetChild10").style.display = "none";
document.getElementById("GetChild11").style.display = "none";
document.getElementById("GetChild12").style.display = "none";
document.getElementById("LastChild").style.display = "none";
document.getElementById("DayCareInfos").style.display = "none";
document.getElementById("DayCareDays").style.display = "none";
document.getElementById("DayCareHours").style.display = "none";
document.getElementById("DayCarePlace").style.display = "none";
document.getElementById("DayCareFaith").style.display = "none";
document.getElementById("AddFamilyLabel").style.display = "none";
document.getElementById("FTCollegeStudents").style.display = "none";
document.getElementById("HowManyFTCollegeStudents").style.display = "none";
document.getElementById("CurrentPreg").style.display = "none";
document.getElementById("StepParent").style.display = "none";
document.getElementById("AllReceiving").style.display = "none";
document.getElementById("Adults60PlusYN").style.display = "none";
document.getElementById("HowMany60Plus").style.display = "none";
document.getElementById("ThatsAllFolks").style.display = "none";
}
function ShowUtilRentMort() {
document.getElementById("cl_utilsmortrent").style.display = "block";
}
function ShowAboutFamily() {
document.getElementById("AboutFamilyHR").style.display = "block";
document.getElementById("AboutFamilyLabel").style.display = "block";
document.getElementById("ArePeople21").style.display = "block";
}
function ShowYes21() {
document.getElementById("HowMany21s").style.display = "block";
document.getElementById("cl_adults").focus();
}
function ShowNo21() {
document.getElementById("cl_adults").value = "";
document.getElementById("cl_adults_FT").value = "";
document.getElementById("HowMany21s").style.display = "none";
document.getElementById("DoAnyPT").style.display = "none";
document.getElementById("HowManyPT").style.display = "none";
document.getElementById("DoAnyFT").style.display = "none";
document.getElementById("HowManyFT").style.display = "none";
document.getElementById("cl_adults_PT").value = "";
document.getElementById("cl_adults_PT").focus();
document.getElementById("21orOlderPTYes").checked = false;
document.getElementById("21orOlderPTNo").checked = false;
document.getElementById("21orOlderFTYes").checked = false;
document.getElementById("21orOlderFTNo").checked = false;
document.getElementById("ArePeople13to20").style.display = "block";
document.getElementById("WorkExpensesYes").checked = false;
document.getElementById("WorkExpensesNo").checked = false;
document.getElementById("HowMuchWorkExpense").style.display = "none";
document.getElementById("WorkExpenseAmount").value = "";
document.getElementById("WorkExpensesReimbursed").style.display = "none";
}
function ShowDoAnyPT() {
document.getElementById("DoAnyPT").style.display = "block";
}
function ShowDoAnyPTNo() {
document.getElementById("cl_adults_PT").value = "";
document.getElementById("HowManyPT").style.display = "none";
document.getElementById("DoAnyFT").style.display = "block";
}
function ShowHowManyPT() {
document.getElementById("HowManyPT").style.display = "block";
document.getElementById("cl_adults_PT").focus();
}
function ShowDoAnyFT() {
document.getElementById("DoAnyFT").style.display = "block";
}
function ShowDoAnyFTNo() {
document.getElementById("cl_adults_FT").value = "";
document.getElementById("HowManyFT").style.display = "none";
document.getElementById("WorkExpensesReimbursed").style.display = "block";
}
function ShowHowManyFT() {
document.getElementById("HowManyFT").style.display = "block";
document.getElementById("cl_adults_FT").focus();
}
function ShowMonthlyWorkExpenses() {
document.getElementById("WorkExpensesReimbursed").style.display = "block";
}
function ShowMonthlyWorkExpensesYes() {
document.getElementById("HowMuchWorkExpense").style.display = "block";
document.getElementById("WorkExpenseAmount").focus();
}
function ShowMonthlyWorkExpensesNo() {
document.getElementById("HowMuchWorkExpense").style.display = "none";
document.getElementById("WorkExpenseAmount").value = "";
document.getElementById("ArePeople13to20").style.display = "block";
}
function ShowGetPeople13to20() {
document.getElementById("ArePeople13to20").style.display = "block";
}
function ShowHowMany13to20() {
document.getElementById("HowMany13to20").style.display = "block";
document.getElementById("13to20Count").focus();
}
function ShowHowMany13to20No() {
document.getElementById("13to20Count").value = "";
document.getElementById("HowMany13to20").style.display = "none";
document.getElementById("19to20Count").value = "";
document.getElementById("19to20Yes").checked = false;
document.getElementById("19to20No").checked = false;
document.getElementById("HowMany19to20").style.display = "none";
document.getElementById("AreAny19to20").style.display = "none";
document.getElementById("13to18Count").value = "";
document.getElementById("13to18Yes").checked = false;
document.getElementById("13to18No").checked = false;
document.getElementById("HowMany13to18").style.display = "none";
document.getElementById("AreAny13to18").style.display = "none";
document.getElementById("AnyUnableCount").value = "";
document.getElementById("AnyUnableYes").checked = false;
document.getElementById("AnyUnableNo").checked = false;
document.getElementById("AreAnyUnable").style.display = "none";
document.getElementById("ArePeopleLessThan13").style.display = "block";
}
function ShowAreAny19to20() {
document.getElementById("AreAny19to20").style.display = "block";
}
function ShowHowMany19to20() {
document.getElementById("HowMany19to20").style.display = "block";
document.getElementById("19to20Count").focus();
}
function ShowHowMany19to20No() {
document.getElementById("19to20Count").value = "";
document.getElementById("HowMany19to20").style.display = "none";
document.getElementById("AreAny13to18").style.display = "block";
}
function ShowAreAny13to18() {
document.getElementById("AreAny13to18").style.display = "block";
}
function ShowHowMany13to18() {
document.getElementById("HowMany13to18").style.display = "block";
document.getElementById("13to18Count").focus();
}
function ShowHowMany13to18No() {
document.getElementById("13to18Count").value = "";
document.getElementById("HowMany13to18").style.display = "none";
document.getElementById("AreAnyUnable").style.display = "block";
}
function ShowAreAnyUnable() {
document.getElementById("AreAnyUnable").style.display = "block";
}
function ShowHowManyUnable() {
document.getElementById("HowManyUnable").style.display = "block";
document.getElementById("AnyUnableCount").focus();
}
function ShowHowManyUnableNo() {
document.getElementById("AnyUnableCount").value = "";
document.getElementById("HowManyUnable").style.display = "none";
document.getElementById("ArePeopleLessThan13").style.display = "block";
}
function ShowAreAnyLessThan13() {
document.getElementById("ArePeopleLessThan13").style.display = "block";
}
function ShowAreAnyLessThan13No() {
document.getElementById("LessThan13Count").value = "";
document.getElementById("HowManyLessThan13").style.display = "none";
document.getElementById("GetChild1").style.display = "none";
document.getElementById("GetChild2").style.display = "none";
document.getElementById("GetChild3").style.display = "none";
document.getElementById("GetChild4").style.display = "none";
document.getElementById("GetChild5").style.display = "none";
document.getElementById("GetChild6").style.display = "none";
document.getElementById("GetChild7").style.display = "none";
document.getElementById("GetChild8").style.display = "none";
document.getElementById("GetChild9").style.display = "none";
document.getElementById("GetChild10").style.display = "none";
document.getElementById("GetChild11").style.display = "none";
document.getElementById("GetChild12").style.display = "none";
document.getElementById("LastChild").style.display = "none";
document.getElementById("AddFamilyLabel").style.display = "block";
document.getElementById("FTCollegeStudents").style.display = "block";
}
function ShowHowManyLessThan13() {
document.getElementById("HowManyLessThan13").style.display = "block";
document.getElementById("LessThan13Count").focus();
}
function ShowAddFamily() {
document.getElementById("AddFamilyLabel").style.display = "block";
document.getElementById("FTCollegeStudents").style.display = "block";
}
function ShowChildInfos() {
document.getElementById("GetChild1").style.display = "none";
document.getElementById("GetChild2").style.display = "none";
document.getElementById("GetChild3").style.display = "none";
document.getElementById("GetChild4").style.display = "none";
document.getElementById("GetChild5").style.display = "none";
document.getElementById("GetChild6").style.display = "none";
document.getElementById("GetChild7").style.display = "none";
document.getElementById("GetChild8").style.display = "none";
document.getElementById("GetChild9").style.display = "none";
document.getElementById("GetChild10").style.display = "none";
document.getElementById("GetChild11").style.display = "none";
document.getElementById("GetChild12").style.display = "none";
var kiddocount = document.getElementById("LessThan13Count").value;
if(kiddocount < 13) {
for(var i = 1; i <= kiddocount; i++) {
if(i <= kiddocount) {
document.getElementById("GetChild" + i).style.display = "block";
}
}
}
document.getElementById("LastChild").style.display = "block";
}
function ShowLastChild() {
document.getElementById("LastChild").style.display = "block";
}
function ShowDayCareInfos() {
document.getElementById("DayCareInfos").style.display = "block";
document.getElementById("DayCareDays").style.display = "block";
document.getElementById("DayCareDaysIn").focus();
}
function ShowDayCareHours() {
document.getElementById("DayCareHours").style.display = "block";
document.getElementById("DayCareHoursIn").focus();
}
function ShowDayCarePlace() {
document.getElementById("DayCarePlace").style.display = "block";
}
function ShowDayCareFaith() {
document.getElementById("DayCareFaith").style.display = "block";
}
function ShowHowManyFTCollege() {
document.getElementById("HowManyFTCollegeStudents").style.display = "block";
document.getElementById("FTCollegeCount").focus();
}
function ShowCurrentPreg() {
document.getElementById("CurrentPreg").style.display = "block";
}
function ShowStepParent() {
document.getElementById("StepParent").style.display = "block";
}
function ShowAllReceiving() {
document.getElementById("AllReceiving").style.display = "block";
}
function ShowAdults60Plus() {
document.getElementById("Adults60PlusYN").style.display = "block";
}
function ShowHowMany60PlusYes() {
document.getElementById("HowMany60Plus").style.display = "block";
document.getElementById("60PlusCount").focus();
}
function ShowThatsAllFolks() {
document.getElementById("ThatsAllFolks").style.display = "block";
}
// After the user selects a state
function StateSelectionSubmission() {
let cl_state = $('select#cl_state').val();
sessionStorage.setItem('cl_state', cl_state);
console.log(cl_state);
}
</script>
</head>
<body>
<!-- BEGIN OUTSIDE FORM -->
<div id="MainDIV" class="centered">
<form id="cl_infos_form" enctype="multipart/form-data" method="POST" action="cl_infos.php"
novalidate="novalidate" style="padding: 10px;" autocomplete="off">
<!-- START HEADER -->
<div style="float: left;">
<img alt="Circles USA" id="cusalogo" src="images/circles-usa-new.png" style="display: inline;"/>
</div>
<div style="text-align: center; float: right;">
<h2 class="h2">Cliff Effect Planning Tool</h2>
</div>
<div style="text-align: center; float: left; width: 100%;">
<p class="p1">
<br>Circle Leader Information
</p>
<hr class="org-hr">
</div>
<!-- END HEADER -->
<div id="AboutArea" style="opacity: 1; float:left; width: 100%;">
<div id="AboutAreaLabel">
<h2 class="h2" style="font-weight: normal; font-size: 20px;">
About your area . . .
</h2>
</div>
</div>
<div name="State" style="opacity: 1; float:left; width: 33%;">
<label class="form-els">State</label><br>
<select id="cl_state" name="cl_state" onchange='StateSelectionSubmission(); this.form.submit()'>
<?php
if(isset($_POST['cl_stateinits'])) {
$cl_stateinits = $_POST['cl_stateinits'];
}
if(isset($_POST['cl_state'])) {
// Second page someone sees
$cl_state = $_POST['cl_state'];
$dbconn = new mysqli(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
if(mysqli_connect_errno()) {
echo "Failed to connect to database: " . mysqli_connect_error();
}
$sinit_sql = "SELECT state_inits FROM state_county_city WHERE state_name=\"" . $cl_state . "\";";
$sinit_result = $dbconn->query($sinit_sql);
$scc_row = $sinit_result->fetch_assoc();
$cl_stateinits = $scc_row["state_inits"];
$dbconn->close();
echo "<option value=\"" . $cl_state . "\">" . $cl_state . "</option><option value=\"\"></option>";
} else {
// First time someone sees this page, the state is being selected
echo "<option value=\"\">Choose one</option><option value=\"\"></option>";
}
$dbconn = new mysqli(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
//$dbconn = new mysqli('localhost', 'root', 'Sunshine99', 'cusacept');
if(mysqli_connect_errno()) {
echo "Failed to connect to database: " . mysqli_connect_error();
}
$scc_sql = "SELECT DISTINCT state_name FROM state_county_city";
$scc_result = $dbconn->query($scc_sql);
while($scc_row = $scc_result->fetch_assoc()) {
echo "<option value=\"" . $scc_row["state_name"] . "\">" . $scc_row["state_name"] . "</option>";
}
$dbconn->close();
?>
</select><br><br>
<?php if(isset($cl_stateinits)) {
echo "<input type=\"hidden\" name=\"cl_stateinits\" value=\"" . $cl_stateinits . "\">";
} ?>
</div><!-- END STATES -->
<?php
if(isset($cl_state)) {
echo "<div id=\"cl_counties\" name=\"County\" style=\"opacity: 1; float:left; width: 33%;\"><label class=\"form-els\">County</label><br>
<select id=\"cl_county\" name=\"cl_county\" onchange='this.form.submit()'\">";
if(isset($_POST['cl_county'])) {
$cl_county = $_POST['cl_county'];
echo "<option value=\"" . $cl_county . "\">" . $cl_county . "</option>";
} else {
echo "<option value=\"\">Choose one</option>";
}
$dbconn = new mysqli(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
if(mysqli_connect_errno()) {
echo "Failed to connect to database: " . mysqli_connect_error();
}
$scc_sql = "SELECT DISTINCT county_name FROM state_county_city WHERE state_name='" . $cl_state . "'";
$scc_result = $dbconn->query($scc_sql);
// example IF
//if ($scc_result->num_rows > 0) {
// output data of each row
while($scc_row = $scc_result->fetch_assoc()) {
echo "<option value=\"" . $scc_row["county_name"] . "\">" . $scc_row["county_name"] . "</option>";
}
// end example IF
//}
$dbconn->close();
echo "</select>
</div><!-- END COUNTIES -->";
}
if(isset($cl_county)) {
echo "<div id=\"cl_cities\" name=\"City\" style=\"opacity: 1; float:left; width: 33%;\">
<label class=\"form-els\">City</label><br>
<select id=\"cl_city\" name=\"cl_city\" onchange='this.form.submit()'>";
if(isset($_POST['cl_city'])) {
$cl_city = $_POST['cl_city'];
echo "<option value=\"" . $cl_city . "\">" . $cl_city . "</option>";
} else {
echo "<option value=\"\">Choose one</option>";
}
$dbconn = new mysqli(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
//$dbconn = new mysqli('localhost', 'root', 'Sunshine99', 'cusacept');
if(mysqli_connect_errno()) {
echo "Failed to connect to database: " . mysqli_connect_error();
}
$scc_sql = "SELECT DISTINCT city_name FROM state_county_city WHERE county_name='" . $cl_county . "'";
$scc_result = $dbconn->query($scc_sql);
// example IF
//if ($scc_result->num_rows > 0) {
// output data of each row
while($scc_row = $scc_result->fetch_assoc()) {
echo "<option value=\"" . $scc_row["city_name"] . "\">" . $scc_row["city_name"] . "</option>";
}
// end example IF
//}
$dbconn->close();
echo "</select>
</div><!-- END CITIES -->";
}
?>
</form>
<?php
echo "<form id=\"cl_infos_form\" enctype=\"multipart/form-data\" method=\"POST\" action=\"cl_expenses.php\" novalidate=\"novalidate\" style=\"padding: 10px;\" autocomplete=\"off\">";
if(isset($cl_state)) {
echo "<input type=\"hidden\" name=\"cl_state\" value=\"" . $cl_state . "\">";
}
if(isset($cl_county)) {
echo "<input type=\"hidden\" name=\"cl_county\" value=\"" . $cl_county . "\">";
}
if(isset($cl_city)) {
echo "<input type=\"hidden\" name=\"cl_city\" value=\"" . $cl_city . "\">";
if(isset($cl_stateinits)) {
echo "<input type=\"hidden\" name=\"cl_stateinits\" value=\"" . $cl_stateinits . "\">";
}
echo "<div id=\"AboutHomeHR\" style=\"float: left; width: 100%\">
<hr class=\"org-hr\">
</div><!-- ABOUT HOME HR --><div id=\"AboutHome\" style=\"opacity: 1; float:left; width: 100%;\">
<div id=\"AboutHomeLabel\">";
echo "
<h2 class=\"h2\" style=\"font-weight: normal; font-size: 20px;\">
About your home . . .
</h2>
</div>
</div>
<div id=\"cl_beds\" name=\"Beds\" style=\"opacity: 1; float:left; width: 100%;\">
<label class=\"form-els\">Bedrooms</label><br>
<select id=\"bedrooms\" name=\"bedrooms\" onchange=\"ShowUtilRentMort()\">
<option selected id=\"item9_0_option\" value=\"\">
Choose one
</option>
<option id=\"item9_1_option\" value=\"Efficiency/Studio\">
Efficiency/Studio
</option>
<option id=\"item9_2_option\" value=\"1\">
1
</option>
<option id=\"item9_3_option\" value=\"2\">
2
</option>
<option id=\"item9_4_option\" value=\"3\">
3
</option>
<option id=\"item9_5_option\" value=\"4\">
4
</option>
</select><br><br>
</div>";
}
?>
<div id="cl_utilsmortrent" name="Utilities+Rent/Mort" style="opacity: 1; float:left; width: 100%;">
<label class="form-els">Utilities not included in Mortgage/Rent</label><br>
<input type="radio" id="cl_utilbutt1" name="cl_utilities" value="sua2" onchange="ShowAboutFamily();"/><span
class="button-text">Heating/Cooling expenses</span><br>
<input type="radio" id="cl_utilbutt2" name="cl_utilities" value="sua3" onchange="ShowAboutFamily();"/><span
class="button-text">Only (2) utilities (Not Heating/Cooling)</span><br>
<input type="radio" id="cl_utilbutt3" name="cl_utilities" value="sua4" onchange="ShowAboutFamily();"/><span
class="button-text">Only (1) utility (not Phone, Heating/Cooling)</span><br>
<input type="radio" id="cl_utilbutt4" name="cl_utilities" value="sua5" onchange="ShowAboutFamily();"/><span
class="button-text">Only phone bill (some states allow mobile/cell phones)</span><br>
<input type="radio" id="cl_utilbutt5" name="cl_utilities" value="sua6" onchange="ShowAboutFamily();"/><span
class="button-text">No utilities paid</span><br><br>
</div>
<div id="AboutFamilyHR" style="float: left; width: 100%;">
<hr class="org-hr">
</div><!-- ABOUT FAMILY HR -->
<div id="AboutFamilyLabel" style="opacity: 1; float:left; width: 100%;">
<h2 class="h2" style="font-weight: normal; font-size: 20px;">
About your family . . .
</h2>
</div>
<div id="ArePeople21" class="h2" style="opacity: 1; float:left; width:100%;">
<p style="font-weight: bold; color: rgb(242, 117, 34);">
Are there people 21 years or older (Adults) in the home?
<label id="item58_0_label"><input type="radio" id="item58_0_radio" data-hint=""
name="twentyone_or_older_check" value="Yes"
onchange="ShowYes21();"/><span style="font-size: 12px; color: black;">Yes</span></label>
<label id="item58_1_label"><input type="radio" id="item58_1_radio" name="twentyone_or_older_check"
value="No" onchange="ShowNo21();"/><span
style="font-size: 12px; color: black;">No</span></label>
</p>
</div>
<div id="HowMany21s" style="opacity: 1; float:left; width:100%;">
<label style="display: inline; font-weight: bold;" class="button-text">How many?</label>
<input type="text" id="cl_adults" name="cl_adults" placeholder="Type number here"
onkeyup="this.value=this.value.replace(/[^\d]/,'')"/>
<button type="button" class="nextbutton" onclick="ShowDoAnyPT();">Next</button>
<br><br>
</div>
<div id="DoAnyPT" class="h3" style="opacity: 1; float:right; width:90%; font-size=14;">
<p>
Do any of them work Part-Time?
<input type="radio" id="21orOlderPTYes" name="twentyone_or_older_PTcheck" value="Yes"
onchange="ShowHowManyPT();"/><span style="font-size: 12px; color: black;">Yes</span>
<input type="radio" id="21orOlderPTNo" name="twentyone_or_older_PTcheck" value="No"
onchange="ShowDoAnyPTNo();"/><span style="font-size: 12px; color: black;">No</span>
</p>
</div>
<div id="HowManyPT" style="opacity: 1; float:right; width:90%;">
<label style="display: inline; font-size: 13px;" class="button-text">How many?</label>
<input type="text" id="cl_adults_PT" maxlength="25" placeholder="Type number here" name="cl_adults_PT"
onkeyup="this.value=this.value.replace(/[^\d]/,'')"/>
<button type="button" class="nextbutton" onclick="ShowDoAnyFT();">Next</button>
<br><br>
</div>
<div id="DoAnyFT" class="h3" style="opacity: 1; float:right; width:90%; font-size=14;">
<p>
Do any of them work Full-Time?
<label id="item58_0_label"><input type="radio" id="21orOlderFTYes" name="twentyone_or_older_FTcheck"
value="Yes" onchange="ShowHowManyFT();"/><span
style="font-size: 12px; color: black;">Yes</span></label>
<label id="item58_1_label"><input type="radio" id="21orOlderFTNo" name="twentyone_or_older_FTcheck"
value="No" onchange="ShowDoAnyFTNo();"/><span
style="font-size: 12px; color: black;">No</span></label>
</p>
</div>
<div id="HowManyFT" style="opacity: 1; float:right; width:90%;">
<label id="item99_label_0" style="display: inline; font-size: 13px;" class="button-text">How many?</label>
<input type="text" id="cl_adults_FT" maxlength="25" placeholder="Type number here"
onkeyup="this.value=this.value.replace(/[^\d]/,'')" name="cl_adults_FT"/>
<button type="button" class="nextbutton" onclick="ShowMonthlyWorkExpenses();">Next</button>
<br><br>
</div>
<div id="WorkExpensesReimbursed" class="h3" style="opacity: 1; float:right; width:90%;">
<p>
Are there monthly expenses to work (not reimbursed)?
<input type="radio" id="WorkExpensesYes" name="twentyone_or_older_Expcheck" value="Yes"
onclick="ShowMonthlyWorkExpensesYes();"/><span style="font-size: 12px; color: black;">Yes</span>
<input type="radio" id="WorkExpensesNo" name="twentyone_or_older_Expcheck" value="No"
onclick="ShowMonthlyWorkExpensesNo();"/><span style="font-size: 12px; color: black;">No</span>
</p>
</div>
<div id="HowMuchWorkExpense" style="opacity: 1; float:right; width:90%;">
<label id="item99_label_0" style="display: inline; font-size: 13px;" " class="button-text">How much?</label>
$ <input type="text" id="WorkExpenseAmount" name="WorkExpenseAmount" maxlength="25"
placeholder="Type amount here" name="cl_adults_workexpense"
onkeyup="this.value=this.value.replace(/[^\d]/,'')"/>
<button type="button" class="nextbutton" onclick="ShowGetPeople13to20();">Next</button>
<br><br>
</div>
<div id="ArePeople13to20" class="h2" style="opacity: 1; float: left; width: 100%">
<p style="font-weight: bold; color: rgb(242, 117, 34);">
Are there people 13 to 20 years old in the home?
<input type="radio" id="item59_0_radio" name="thirteen_to_twenty_check" value="Yes"
onchange="ShowHowMany13to20();"/><span style="font-size: 12px; color: black;">Yes</span></label>
<label id="item59_1_label"><input type="radio" id="item59_1_radio" name="thirteen_to_twenty_check"
value="No" onchange="ShowHowMany13to20No();"/><span
style="font-size: 12px; color: black;">No</span></label>
</p>
</div>
<div id="HowMany13to20" style="opacity: 1; float:left; width:100%;">
<label id="item102_label_0" style="display: inline; font-weight: bold;" class="button-text">How
many?</label>
<input type="text" id="13to20Count" maxlength="25" placeholder="Type number here"
name="cl_thirteen_to_twenty" onkeyup="this.value=this.value.replace(/[^\d]/,'')"/>
<button type="button" class="nextbutton" onclick="ShowAreAny19to20();">Next</button>
<br><br>
</div>
<div id="AreAny19to20" class="h3" style="opacity: 1; float:right; width:90%;">
<p>
Are any of them 19 to 20 years old?
<label id="item58_0_label"><input type="radio" id="19to20Yes" name="19to20_check" value="Yes"
onchange="ShowHowMany19to20();"/><span
style="font-size: 12px; color: black;">Yes</span></label>
<label id="item58_1_label"><input type="radio" id="19to20No" name="19to20_check" value="No"
onchange="ShowHowMany19to20No();"/><span
style="font-size: 12px; color: black;">No</span></label>
</p>
</div>
<div id="HowMany19to20" style="opacity: 1; float:right; width:90%;">
<label id="item99_label_0" style="display: inline; font-size: 13px;" " class="button-text">How many?</label>
<input type="text" id="19to20Count" maxlength="25" placeholder="Type number here" name="cl_19to20"
onkeyup="this.value=this.value.replace(/[^\d]/,'')"/>
<button type="button" class="nextbutton" onclick="ShowAreAny13to18();">Next</button>
<br><br>
</div>
<div id="AreAny13to18" class="h3" style="opacity: 1; float:right; width:90%;">
<p>
Are any of them 13 to 18 years old?
<input type="radio" id="13to18Yes" name="13to18_check" value="Yes" onchange="ShowHowMany13to18();"/><span
style="font-size: 12px; color: black;">Yes</span>
<input type="radio" id="13to18No" name="13to18_check" value="No" onchange="ShowHowMany13to18No();"/><span
style="font-size: 12px; color: black;">No</span>
</p>
</div>
<div id="HowMany13to18" style="opacity: 1; float:right; width:90%;">
<label style="display: inline; font-size: 13px;" " class="button-text">How many?</label>
<input id="13to18Count" type="text" maxlength="25" placeholder="Type number here" name="cl_13to18"
onkeyup="this.value=this.value.replace(/[^\d]/,'')"/>
<button type="button" class="nextbutton" onclick="ShowAreAnyUnable();">Next</button>
<br><br>
</div>
<div id="AreAnyUnable" class="h3" style="opacity: 1; float:right; width:90%;">
<p>
Are any of them UNABLE to care for themselves?
<input type="radio" id="AnyUnableYes" name="unable_check" value="Yes"
onchange="ShowHowManyUnable();"/><span style="font-size: 12px; color: black;">Yes</span>
<input type="radio" id="AnyUnableNo" name="unable_check" value="No"
onchange="ShowHowManyUnableNo();"/><span style="font-size: 12px; color: black;">No</span>
</p>
</div>
<div id="HowManyUnable" style="opacity: 1; float:right; width:90%;">
<label style="display: inline; font-size: 13px;" " class="button-text">How many?</label>
<input id="AnyUnableCount" type="text" maxlength="25" placeholder="Type number here" name="cl_unable"
onkeyup="this.value=this.value.replace(/[^\d]/,'')"/>
<button type="button" class="nextbutton" onclick="ShowAreAnyLessThan13();">Next</button>
<br><br>
</div>
<div id="ArePeopleLessThan13" class="h2" style="opacity: 1; float: left; width: 100%">
<p style="font-weight: bold; color: rgb(242, 117, 34);">
Are there people less than 13 years old in the home?
<input type="radio" id="PeopleLessThan13Yes" name="less_than_thirteen_check" value="Yes"
onchange="ShowHowManyLessThan13();"/><span style="font-size: 12px; color: black;">Yes</span>
<input type="radio" id="PeopleLessThan13No" name="less_than_thirteen_check" value="No"
onchange="ShowAreAnyLessThan13No();"/><span style="font-size: 12px; color: black;">No</span>
</p>
</div>
<div id="HowManyLessThan13" style="opacity: 1; float:left; width:100%;">
<label id="item102_label_0" style="display: inline; font-weight: bold;" class="button-text">How
many?</label>
<input type="text" id="LessThan13Count" maxlength="25" placeholder="Type number here"
name="cl_less_than_thirteen" onkeyup="this.value=this.value.replace(/[^\d]/,'')"/>
<button type="button" onclick="ShowChildInfos();" class="nextbutton">Next</button>
</div>
<div id="GetChild1"
style="opacity: 1; float:left; width: 100%; text-align: right; padding-bottom: 10px; padding-top: 20px;">
<label class="h2">Child 1: </label>
<div id="Child1Infos"
style="opacity: 1; float:right; width:85%; border: 1px solid; padding-left: 10px; padding-bottom: 10px; text-align: left;">
<div id="Child1Years" style="float: left; width:10%;">
<label id="item107_label_0" style="display: inline;" class="button-text">Years</label><br>
<input type="text" id="item107_text_1" maxlength="5" size="5" placeholder="0" name="cl_child1_years"
class="button-text" onkeyup="this.value=this.value.replace(/[^\d]/,'')"/>
</div>
<div id="Child1Months" style="float: left; width:15%;">
<label id="item108_label_0" style="display: inline;" class="button-text">Months</label><br>
<input type="text" id="item108_text_1" maxlength="5" size="5" placeholder="0" name="cl_child1_months"
class="button-text" onkeyup="this.value=this.value.replace(/[^\d]/,'')"/>
</div>
<div id="Child1Grade" style="float: left; width:20%;">
<label id="item56_label_0" style="display: inline;" class="button-text">Grade Level</label><br>
<select id="item56_select_1" name="cl_child1_grade">
<option selected id="item56_0_option" value="">
Choose one
</option>
<option id="item56_1_option" value="N/A">
N/A
</option>
<option id="item56_2_option" value="Kindergarten">
Kindergarten
</option>
<option id="item56_3_option" value="1">
1
</option>
<option id="item56_4_option" value="2">
2
</option>
<option id="item56_5_option" value="3">
3
</option>
<option id="item56_6_option" value="4">
4
</option>
<option id="item56_7_option" value="5">
5
</option>
<option id="item56_8_option" value="6">
6
</option>
<option id="item56_9_option" value="7">
7
</option>
<option id="item56_10_option" value="8">
8
</option>
<option id="item56_11_option" value="9">
9
</option>
<option id="item56_12_option" value="10">
10
</option>
<option id="item56_13_option" value="11">
11
</option>
<option id="item56_14_option" value="12">
12
</option>
</select>
</div>
<div id="Child1DayCare" style="opacity: 1; float:left; width: 20%;">
<label id="child1DC_label" style="display: inline;" class="button-text">Day Care Need</label><br>
<select id="child1DCNeedsv2" name="child1DCNeedsv2">
<option value="">
Choose one
</option>
<option value="Full Time, 30 or more">
Full Time, 30 or more
</option>
<option value="Part time 1, 8-29 hours">
Part time 1, 8-29 hours
</option>
<option value="Part time 2, split coustody or two providers">
Part time 2, split coustody or two providers
</option>
<option value="Part time 3, 1-7 hours">
Part time 3, 1-7 hours
</option>
</select>
</div>
</div>
</div><!-- END CHILD1 INFOS -->