forked from ScriptureEarth/ScriptureEarth
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path00-MainScript.inc.php
More file actions
1400 lines (1285 loc) · 63.5 KB
/
00-MainScript.inc.php
File metadata and controls
1400 lines (1285 loc) · 63.5 KB
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
<?php
if (session_status() === PHP_SESSION_NONE) @session_start();
/*
$st=
1 - eng
2 - spa
3 - por
4 - fra
5 - nld
6 - deu
7 - cmn
8 - kor
9 - rus
10 - arb
*/
/*
Can't use <div id="langBackground" in FireFox 84.0.1 with cursor: pointer; inside the id because it is a bug.
Also, <div id="langBackground_'.$st.'" won't at all. See Web Developer, Toogle Tools on Tools.
*/
?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<meta name="ObjectType" content="Document" />
<meta http-equiv="Window-target" content="_top" />
<meta name="Created-by" content="Scott Starker" />
<meta name="Updated-by" content="Scott Starker, Lærke Roager" />
<meta name="Maintained-by" content="Website" />
<meta name="Approved-by" content="Bill Dyck, Access Coordinator" />
<meta name="Copyright" content="6.2009 - <?php echo date("Y"); ?>" /> <!-- auto_copyright("2009") -->
<!-- For IE 9 and below. ICO should be 32x32 pixels in size -->
<!--[if IE]><link rel="shortcut icon" href="path/to/favicon.ico"><![endif]-->
<!-- Touch Icons - iOS and Android 2.1+ 180x180 pixels in size. -->
<link rel="apple-touch-icon-precomposed" href="./icons/apple-touch-icon-precomposed.png">
<!-- Firefox, Chrome, Safari, IE 11+ and Opera. 196x196 pixels in size. -->
<link rel="icon" href="icons/favicon.png" />
<link rel="manifest" href="manifest.webmanifest" /> <!-- The browser should behave when the PWA installs on the user's desktop or mobile device. -->
<link rel="apple-touch-icon" href="icons/apple-touch-icon.png" /> <!-- iOS mobile icon -->
<meta name="apple-mobile-web-app-title" content="Scripture Earth" /> <!-- title for iOS mobile icon -->
<link rel="icon" sizes="192x192" href="icons/nice-highres.png" /> <!-- Android mobile icon -->
<meta name="application-name" content="Scripture Earth" /> <!-- title for Android mobile icon -->
<!--link rel="stylesheet" type='text/css' href="button.css" /-->
<link rel="stylesheet" type='text/css' href="JQuery/css/style.css" />
<!-- link rel="stylesheet" type="text/css" href="_css/Scripture_Index.css" /-->
<link rel="stylesheet" type="text/css" href="_css/SpecificLanguage.css?v=0.0.4" />
<link rel='stylesheet' type='text/css' href='_css/00-Scripture.css?v=1.0.6' />
<link rel='stylesheet' type='text/css' href='_css/00-SEmobile.css?v=0.0.3' />
<!--link rel='stylesheet' type='text/css' href='_css/CountryTable.css' /-->
<!--link rel='stylesheet' type='text/css' href='_css/jplayer.BlueMonday.css' /-->
<link rel='stylesheet' type='text/css' href='_css/jplayer.blue.monday.min.css?v=0.0.3' /> <!-- Playlist Video -->
<link rel='stylesheet' type='text/css' href='_css/jplayer.playlist.BlueMonday.css' /> <!-- Playlist Audio -->
<link rel="stylesheet" type='text/css' href="JQuery/css/jquery-ui-1.12.1.css" />
<!--script type="text/javascript" language="javascript" src="_js/jquery-1.10.1.min.js"></script-->
<script type="text/javascript" language="javascript" src="JQuery/js/jquery-1.12.4.min.js"></script>
<script type="text/javascript" language="javascript" src="JQuery/js/jquery-ui-1.12.1.min.js"></script>
<script type="text/javascript" language="javascript" src="_js/jquery.jplayer-2.9.2.min.js"></script>
<script type="text/javascript" language="javascript" src="_js/jplayer.playlist.min.js"></script>
<script type="text/javascript" language="javascript" src="_js/user_events.js?v=1.0.3"></script>
<script type="text/javascript" language="javascript" src="_js/SpecificLanguage.js?v=1.0.6"></script>
<script type='text/javascript' language='javascript1.2' src="_js/00-SpecificLanguage.js?v=1.0.9"></script>
<!--script type='text/javascript' language='javascript' src="_js/LangSearch.js?v=1.0.3"></script-->
<!--link rel='stylesheet' type='text/css' href='_css/boilerplate.css' /-->
<link rel='stylesheet' type='text/css' href='_css/FGL.css' />
<link rel='stylesheet' type='text/css' href='_css/jplayer-m.css' />
<!--link rel='stylesheet' type='text/css' href='_css/CountryLangIndivlang-m.css' /-->
<style>
* {
margin: 0;
padding: 0;
}
body {
/*background: #333;*/
/*background: black;*/
height: 100vh;
width: 100vw;
margin: 0;
padding: 0;
}
/* ************************************************************************
begin hamburger css
************************************************************************* */
.toggler {
/* ALWAYS KEEPING THE TOGGLER OR THE CHECKBOX ON TOP OF EVERYTHING : */
position: absolute;
z-index: 10;
/* Can see it though. So, use the "Tools" from the menu of the browse, click on "Browser Tools", click on "Web Developer Tools". */
/* On the bottom menu click on "Inspector". Find <input id"togglerID" class="toggler" type="checkbox">. */
top: 2px; /* top position */
width: 30px; /* width of position */
right: 26px; /* right position */
height: 30px; /* height of position */
opacity: 0; /* invisible! */
cursor: pointer;
}
.toggleLanguage { /* Importent! .toggleLanguage goes AFTER .toggle! */
top: 85px;
right: 149px;
}
.hamburger {
position: absolute;
top: 8px; /* top of hamburger */
right: -62px; /* right of hamburger */
height: 40px;
width: 40px;
padding: 0.6rem 0.3rem;
/* FOR DISPLAYING EVERY ELEMENT IN THE CENTER : */
display: flex;
align-items: center;
justify-content: center;
margin-right: 68px;
margin-top: -9px;
z-index: 5;
}
/* CREATING THE MIDDLE LINE OF THE HAMBURGER : */
.hamburger>div {
/* postition of hamburger */
position: relative;
top: -13px;
right: 4px; /* right of lines */
left: -10px; /* left of lines */
background-color: white; /* color of the middle line */
height: 2px; /* height of the middle line */
width: 60%; /* width of the three lines */
transition: all 0.4s ease;
}
/* CREATING THE TOP AND BOTTOM LINES : TOP AT -10PX ABOVE THE MIDDLE ONE AND BOTTOM ONE IS 10PX BELOW THE MIDDLE: */
.hamburger>div::before,
.hamburger>div::after {
content: '';
position: absolute;
top: -10px;
right: 0;
background-color: white; /* color of the top and bottoms lines */
width: 100%; /* width of the top and bottom lines */
height: 2px;
transition: all 0.4s ease;
}
.hamburger>div::after {
top: 10px;
right: 0;
}
/* IF THE TOGGLER IS IN ITS CHECKED STATE, THEN SETTING THE BACKGROUND OF THE MIDDLE LAYER TO COMPLETE BLACK AND OPAQUE : */
/* A toggled state! No JavaScript! */
/* If the .toggler:checked is checked the label '.hamburger>div' the CSS gets executed includeing ::before and ::after. */
.toggler:checked+.hamburger>div {
background: rgba(0, 0, 0, 0); /* black so it is invisible */
}
.toggler:checked+.hamburger>div::before {
top: 0;
transform: rotate(45deg);
/* background: black; */
/* half of the color of "X"
background: white;*/
}
/* AND ROTATING THE TOP AND BOTTOM LINES : */
.toggler:checked+.hamburger>div::after {
top: 0;
transform: rotate(135deg);
/*background: black;*/
/* half of the color of "X"
background: white;*/
}
/* MAIN MENU WITH THE WHITE BACKGROUND AND THE TEXT : */
.menu {
position: absolute;
z-index: 5;
/*left: -48px;
background: white;*/
/*background-color: rgba(0, 0, 0, 0.7);*/
/*position: relative;*/
/*margin-left: auto;
margin-right: 0; right hand side */
/*width: 20%; /* what this the width for??? */
/*height: 100vh; /* what this the height for??? */
/* APPLYING TRANSITION TO THE MENU : */
/*transition: all 0.4s ease;*/
}
/* IF THE TOGGLER IS CHECKED, THEN INCREASE THE WIDTH OF THE MENU TO 30% , CREATING A SMOOTH EFFECT : */
.toggler:checked~.menu {
width: 30%; /* width of menu */
/* width: 300px; */
/* height: 600px; height: 100vh;*/
}
/* STYLING THE LIST : */
.menu>div>ul {
background-color: rgba(0, 0, 0, 0.7);
/* APPLYING TRANSITION TO THE MENU : */
/*transition: all 0.4s ease;*/
display: flex;
flex-direction: column;
position: fixed;
top: 116px;
right: 70px; /* text menu to the right */
/*padding-left: 20px;*/
width: 340px; /* position of hambuger menu texts */
height: 100vh;
margin-top: -5px; /* position of hambuger menu texts */
padding-top: 5px;
/* over from left side */
/* HIDDEN INITIALLY : */
visibility: hidden;
}
.menuDivUlLanguage { /* Importent! .menuDivUlLanguage goes AFTER .menu>div>ul! */
margin-top: -18px; /* position of hambuger menu texts */
}
.menu>div>ul>li {
display: inline flow;
list-style: none;
padding: 0.3rem;
/* line height */
margin-left: 30px;
/*margin-right: -100px;*/
text-align: left;
}
.menu>div>ul>li>a {
color: white;
text-decoration: none;
font-size: 1.2rem;
font-family: Chivo, 'Gill Sans', Tahoma, Geneva, Verdana, sans-serif;
}
/* WHEN THE TOGGLER IS CHECKED, CHANGE THE VISIBILITY TO VISIBLE : */
.toggler:checked~.menu>div>ul {
transition: visibility 0.4s ease;
transition-delay: 0.1s;
visibility: visible;
}
.toggler:checked~.menu>div>ul>li>a:hover {
/*color: orange;*/
color: #d36355;
/* 400 = normal; 700 = bold */
font-weight: 600;
}
.toggler:checked~.menu>div>ul>li>a:after {
/* won't work */
background-color: #101010;
}
.menu>div>ul>div>li {
margin-right: -100px;
}
.menu>div>ul>div>li>a {
color: white;
text-decoration: none;
font-size: 1.1em;
font-family: Chivo, 'Gill Sans', Tahoma, Geneva, Verdana, sans-serif;
margin-left: -26px;
}
.toggler:checked~.menu>div>ul>div>li>a:hover {
color: #d36355;
/* 400 = normal; 700 = bold */
font-weight: 600;
}
.toggler:checked~.menu>div>ul>div>li>a:after {
/* won't work */
background-color: #101010;
}
/* ************************************************************************
end hamburger css
************************************************************************* */
.threeMenus {
position: absolute;
top: -20px;
left: 78%;
right: 80px;
}
/* 3 menu "select"s */
#sL, #sC, #navLang {
/* "select" tag: #sL = "select Language"; $sC = "select Country"; #navLang = "select nothing" */
position: absolute;
z-index: 5;
top: -6px;
/*right: 101px;*/
left: -48px; /* left for the select nav. lang. */
/*color: #4079b0; */
color: white;
/* background-color: white;*/
font-size: 100%;
border-style: none;
padding: 3px;
padding-left: 16px;
}
#navLang {
margin-left: -7px;
}
.helpSelection {
position: relative;
z-index: 5;
margin-left: 5px;
margin-right: -8px;
margin-bottom: -10px;
}
/* .menu (up above) */
/* end */
select {
color: black;
background-color: rgba(255, 255, 255, 0.6);
border-radius: 0.3rem;
margin-top: 10px;
}
option {
color: black;
background-color: white;
font-family: Chivo, 'Gill Sans', Tahoma, Geneva, Verdana, sans-serif;
font-weight: normal;
font-size: 11pt;
/*border: 1px solid #e4e4e4;*/
/* safari */
appearance: none;
-webkit-appearance: none;
-moz-appearance: none;
/*box-shadow: inset 20px 20px #f00;
text-align-last: left;*/
}
/*option:checked,
option:hover { doesn't work for firefox
background-color: white;
/* color: #c0c0c0; * /
cursor: pointer;
/*border: 1px solid red;* /
/*box-shadow: inset 20px 20px #00f;* /
}*/
.selectOption {
/* none "navigational language" "select" tag; from 00-Scripture.css */
color: black;
/* background-color: #e4e4e4;
background-color: white;*/
border: 1px solid #111;
font-weight: normal;
font-size: 12pt;
padding: 3px;
padding-left: 10px;
margin: 0;
}
#background_header {
/* position of icon and text for "country" and "nothing" section; from 00-Scripture.css */
position: absolute;
z-index: 5;
top: 0;
background-position: top left 100px; /* top of page */
background-repeat: no-repeat; /* Do not repeat the image */
background-size: 460px;
/*width: 100%;*/
width: 450px; /* this works along side of #empty width */
/*height: auto;*/
/*height: 840px;*/
height: 190px;
/*max-width: 800px;*/
/*min-width: 1170px;*/
margin-top: -4px;
padding: 0;
padding-left: 100px;
/*overflow: auto;*/
}
#empty {
margin-left: 5px;
min-width: 440px; /* this works along side of #background_header width */
height: 80px;
}
#background {
/* position of earth; from 00-Scripture.css */
position: relative;
z-index: -20;
top: 100px;
background-position: top; /* top of page */
background-repeat: no-repeat; /* Do not repeat the image */
background-size: 740px;
/*height: auto;*/
height: 840px;
/*width: 720px;*/
width: 100%;
margin: 0;
padding: 0;
overflow: auto;
}
#copyright {
/* copyright from 00-Scripture.css */
top: 316px;
line-height: 0px;
border: none;
margin: 0;
padding: 0;
}
.mapIframe {
width: 835px;
height: 620px;
margin: 0;
padding: 0;
background-color: white;
border: 5px solid #00B1F2;
}
.mapKey {
font-size: smaller;
margin-top: 8px;
}
.formNavAndHelp {
position: absolute;
top: 100px;
right: 115px;
width: 170px;
display: block;
}
.countryBlackTopImage {
background-color: black;
height: 120px;
position: absolute;
left: 0;
width: 100%;
}
@media only screen and (max-width: 1250px) {
#langBackground {
/* position of icon and text for the "specific language" section; from 00-Scripture.css */
padding-bottom: 24px;
}
}
@media only screen and (min-width: 841px) and (max-width: 1100px) {
#background {
/* position of earth; from 00-Scripture.css */
/*background-position: top left 90px;*/
background-size: 740px; /* height of 3 input lines */
margin-top: 30px; /* top margin of both earth and 3 input lines */
}
#copyright {
/* position of earth; from 00-Scripture.css */
top: 296px;
}
}
@media only screen and (min-width: 721px) and (max-width: 840px) {
#background {
/* position of earth; from 00-Scripture.css */
background-size: 680px; /* size of earth */
height: 820px; /* height of 3 input lines */
margin-top: 40px; /* top margin of both earth and 3 input lines */
}
}
@media only screen and (min-width: 601px) and (max-width: 720px) {
#background {
/* position of earth; from 00-Scripture.css */
background-size: 600px; /* size of earth */
height: 800px; /* height of 3 input lines */
margin-top: 60px; /* top margin of both earth and 3 input lines */
}
}
@media only screen and (min-width: 481px) and (max-width: 600px) {
#background_header {
/* position of icon and text; from 00-Scripture.css */
background-position: top left 20px;
margin-top: -6px; /* top margin of icon Scipture Earth text */
background-size: 420px; /* size of icon Scipture Earth text */
width: 330px; /* this works along side of #empty width */
}
#empty {
margin-left: -90px;
width: 200px; /* this works along side of #background_header width */
height: 80px;
}
#background {
/* position of earth; from 00-Scripture.css */
background-position: top;
background-size: 480px; /* size of earth */
height: 757px; /* height of 3 input lines */ /* move to 00-Scripture.css */
margin-top: 90px; /* top margin of both earth and 3 input lines */
}
}
@media only screen and (max-width: 480px) {
.hamburger {
right: -86px; /* right of hamburger */
/*height: 40px;
width: 40px;*/
}
#background_header {
/* position of icon and text; from 00-Scripture.css */
background-position: top -7px left;
background-size: 410px; /* size of icon Scipture Earth text */
width: 300px; /* this works along side of #empty width */
}
#empty {
margin-left: -150px;
width: 100px; /* this works along side of #background_header width */
}
#background { /* move to 00-SEmobile.css */
/* position of earth; from 00-Scripture.css
background-position: top 70px left 78px;*/
background-size: 420px; /* size of the earth */
height: 670px; /* height of 3 blue input lines */
margin-top: 80px; /* top margin of both earth and 3 input lines */
}
#copyright {
/* copyright from 00-Scripture.css */
top: 160px;
bottom: 0;
font-size: 80%;
}
.threeMenus {
top: -20px;
left: 280px;
}
/* 3 menu "select"s */
#sL { /* select specific Language */ /* move to 00-SEmobile.css */
left: 0; /* navigational language selector */
margin-left: 10px; /* nav lang select */
padding-left: 6px;
font-size: 80%;
}
#sC {
left: 0; /* select Country */ /* move to 00-SEmobile.css */
margin-left: -12px; /* nav lang select */
padding-left: 10px;
margin-top: 8px;
}
#navLang { /* navigational language selector */ /* move to 00-SEmobile.css */
left: -30px;
margin-left: 18px; /* nav lang select */
padding-left: 6px;
margin-top: 8px;
}
.helpSelection { /* help */
margin-left: 106px; /* move to 00-SEmobile.css */
margin-right: 40px;
}
/* .menu (up above) */
/* end */
.mapIframe { /* move to 00-SEmobile.css */
width: 390px;
height: 520px;
border: 1px solid #00B1F2;
}
.countryBlackTopImage {
width: 100%;
margin-left: auto;
margin-right: auto;
}
}
</style>
<style>
<?php
// This has to stay in 00-MainScript.inc.php!
if ($direction == 'ltr') {
?>
/* left to right */
html, body, * {
direction: ltr;
font: 100% Verdana, Arial, Helvetica, sans-serif;
}
table {
font-family: Arial, Helvetica, sans-serif;
}
tr, td {
text-align: left;
}
#listCountriesID > button {
background-position: right;
text-align: left;
}
input[type=text] {
background-position: right;
}
#submenu > li {
text-align: left;
}
#AboutOffOn {
text-align: left;
}
#AboutOffOn > li {
margin-left: 84px;
margin-bottom: 8px;
}
div.alternativeLanguageNames,
div.Country,
div.languageCode {
font-family: Arial, Helvetica, sans-serif;
text-align: left;
margin-left: 20px;
}
div.OTAudio,
div.NTAudio {
float: left;
}
/* end left to right */
<?php
}
else {
?>
/* right to left */
html, body, * {
direction: rtl;
/*unicode-bidi: bidi-override;*/
font: 100% 'Calibri', 'Gill Sans', 'Gill Sans MT', 'Trebuchet MS', sans-serif;
}
table {
direction: rtl;
font-family: 'Calibri', 'Gill Sans', 'Gill Sans MT', 'Trebuchet MS', sans-serif;
}
tr, td {
text-align: right; /* the three row boxes AND the icon texts in the specific languages */
}
/*#AID {
text-align: right; /* third row box * /
} */
#listCountriesID > button {
background-position: left; /* third row icon */
text-align: right; /* third row box */
}
input[type=text] { /* first and second icon */
background-position: left;
}
#submenu > li {
text-align: right;
}
#AboutOffOn {
text-align: right;
}
#AboutOffOn > li {
margin-right: 34px;
margin-bottom: 8px;
}
div.alternativeLanguageNames,
div.Country,
div.languageCode {
font-family: 'Calibri', 'Gill Sans', 'Gill Sans MT', 'Trebuchet MS', sans-serif;
text-align: right;
margin-left: 20px;
}
div.OTAudio,
div.NTAudio {
float: right;
}
/* end right to left */
<?php
}
?>
</style>
<?php
if (!isset($st) || !isset($Variant_major) || !isset($MajorLanguage) || !isset($SpecificCountry) || !isset($counterName)) {
die('Suspicious behavior!');
}
/*
The following files are included in this php:
./include/00-SpecificLanguage.inc.php
./include/00-CountryTable.inc.php
./00-CountriesList.php
./00-CellPhoneModule.php
./00-DownloadStudy.php
./00-DownloadPDF.php
./00-AudioSaveZip.php
./00-BegList.php
./include/00-MainPHPFunctions.inc.php
./include/00-MajorLanguageBannerText.inc.php
./include/00-MajorLanguageChoiceSelected.inc.php
./include/00-MajorLanguageVariantCode.inc.php
*/
include './OT_Books.php'; // $OT_array
include './NT_Books.php'; // $NT_array
include './translate/functions.php'; // translation function
include './include/00-MainPHPFunctions.inc.php'; // main PHP functions
$ln_result = '';
require_once './include/conn.inc.php'; // connect to the database named 'scripture'
$db = get_my_db();
//session_unset();
if (!isset($_SESSION['MajorLanguage'])) {
$_SESSION['MajorLanguage'] = $MajorLanguage; // e.g., "LN_French"
$_SESSION['Variant_major'] = $Variant_major; // e.g., 'Variant_Fre'
$_SESSION['SpecificCountry'] = $SpecificCountry; // e.g., "French"
$_SESSION['counterName'] = $counterName; // e.g., "French"
$_SESSION['Scriptname'] = $Scriptname; // = basename($_SERVER["SCRIPT_NAME"])
$_SESSION['FacebookCountry'] = $FacebookCountry; // e.g., "fr_CA"
$_SESSION['MajorCountryAbbr'] = $MajorCountryAbbr; // e.g., "fr"
}
// master list of the naviagational languages
if (!isset($_SESSION['nav_ln_array'])) {
$_SESSION['nav_ln_array'] = [];
$ln_temp_var = '';
$ln_query = 'SELECT `translation_code`, `name`, `nav_fileName`, `ln_number`, `language_code`, `ln_abbreviation` FROM `translations` ORDER BY `name`';
$ln_result_temp = $db->query($ln_query) or die('Query failed: ' . $db->error . '</body></html>');
if ($ln_result_temp->num_rows == 0) {
die('<div style="background-color: white; color: red; font-size: 16pt; padding-top: 20px; padding-bottom: 20px; margin-top: 200px; ">' . translate('The translation_code is not found.', $st, 'sys') . '</div></body></html>');
}
while ($ln_row = $ln_result_temp->fetch_array()) {
$ln_temp[0] = $ln_row['translation_code']; // e.g., 'eng' [3 lower case letters]
$ln_temp[1] = $ln_row['name']; // e.g., 'English' [name of the navigational language]
$ln_temp[2] = $ln_row['nav_fileName']; // e.g., '00eng.php' [00[3 lower case letters].php]
$ln_temp[3] = $ln_row['ln_number']; // e.g., 1
$ln_temp[4] = $ln_row['ln_abbreviation']; // e.g., 'i'
$_SESSION['nav_ln_array'][$ln_row['language_code']] = $ln_temp; // e.g., 'en' [2 lower case letters]
$ln_temp_var .= 'LN_' . $ln_temp[1] . ', '; // must have a space (' ') here
}
$ln_result = $ln_temp_var;
$_SESSION['ln_result'] = $ln_result; // LN_English, LN_Spanish, LN_Portuguese, ...
}
/*
*************************************************************************************************************
Internet?
*************************************************************************************************************
*/
$Internet = 0; // localhost is 127.0.0.1 but '192.168.x.x' should be not-on-the-Internet because it's URL is part of the stand-alone server.
$Internet = (substr($_SERVER['REMOTE_ADDR'], 0, 7) != '192.168' ? 1 : 0);
$asset = 0;
if (isset($_GET['asset']) && (int)$_GET['asset'] == 1) $asset = 1;
?>
<style>
@media only screen and (max-width: 480px) {
/* (max-width: 412px) for Samsung S8+ 2/20/2019 */
div.colAlt2::before,
div.countryAlt2::before,
div.moreThanAlt2::before {
content: "<?php echo translate('Alternate Language Names', $st, 'sys'); ?>: ";
}
}
</style>
<script language="javascript" type="application/javascript">
$(function() {
$("#sM").selectmenu({
width: 150
});
});
function setTitle(text) {
document.title = 'Scripture Earth: ' + text;
}
</script>
</head>
<body>
<div class="gridContainer clearfix">
<div id="div1" class="fluid">
<?php
/**************************************************************************************************************
Main program
***************************************************************************************************************/
if (isset($_GET['sortby']) && (isset($_GET['name'])) || isset($_GET['iso']) || isset($_GET['ISO_ROD_index']) || isset($_GET['idx'])) { // if (sortby and name (or iso)) or search
/* *****************************************************************************************************
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
sortby = "lang" and iso/name = [ISO] or idx/ISO_ROD_index = [0-9]{1,5}
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
****************************************************************************************************** */
if ((isset($_GET['sortby']) && $_GET['sortby'] == 'lang') || isset($_GET['iso']) || isset($_GET['ISO_ROD_index']) || isset($_GET['idx'])) {
if (!isset($_GET['name']) && !isset($_GET['iso']) && !isset($_GET['ISO_ROD_index']) && !isset($_GET['idx'])) {
die('You made a mistake!</body></html>');
}
else {
$query = '';
if (!isset($asset)) {
$asset = 0;
}
if (isset($_GET['ISO_ROD_index']) || isset($_GET['idx'])) {
//$ISO_ROD_index = $_GET['ISO_ROD_index'];
$ISO_ROD_index = isset($_GET['ISO_ROD_index']) ? $_GET['ISO_ROD_index'] : $_GET['idx'];
//$ISO_ROD_index = htmlspecialchars($ISO_ROD_index, ENT_QUOTES, 'UTF-8');
$ISO_ROD_index = strval(intval($ISO_ROD_index)); // returns a string as an integer
if ($ISO_ROD_index == '0') { // if $ISO_ROD_index has a letter at the beginning then intval returns 0
die('You made a mistake!</body></html>');
}
// asset
if ($asset == 1) {
$query = "SELECT DISTINCT nav_ln.*, $SpecificCountry, countries.ISO_Country FROM nav_ln, countries, ISO_countries, CellPhone WHERE countries.ISO_Country = ISO_countries.ISO_countries AND ISO_countries.ISO = nav_ln.ISO AND nav_ln.ISO_ROD_index = '$ISO_ROD_index' AND `nav_ln`.`ISO_ROD_index` = `CellPhone`.`ISO_ROD_index` AND `CellPhone`.`Cell_Phone_Title` = 'iOS Asset Package'";
} else {
$query = "SELECT DISTINCT nav_ln.*, $SpecificCountry, countries.ISO_Country FROM nav_ln, countries, ISO_countries WHERE countries.ISO_Country = ISO_countries.ISO_countries AND ISO_countries.ISO = nav_ln.ISO AND nav_ln.ISO_ROD_index = '$ISO_ROD_index'";
}
}
else {
$ISO = isset($_GET['name']) ? $_GET['name'] : $_GET['iso'];
$ISO = str_replace('%20', ' ', $ISO); // change %20 (internet space) to space
$ISO = trim($ISO); // trim whitespace from variable
if ($ISO == '' || $ISO == '%' || $ISO == NULL) {
die('‘ISO’ ' . translate('is empty', $st, 'sys') . '.</body></html>');
}
// Cross Site Scripting (XSS) attack happens where client side code (usually JavaScript) gets injected into the output of your PHP script. The next line cleans it up.
$ISO = htmlspecialchars($ISO, ENT_QUOTES, 'UTF-8');
if (preg_match('/^([a-z]{3})/', $ISO, $matches)) {
$ISO = $matches[1];
} else {
die('You made a mistake!</body></html>');
}
if (isset($_GET['ROD_Code']) || isset($_GET['rod'])) {
//$ROD_Code = $_GET['ROD_Code'];
$ROD_Code = isset($_GET['ROD_Code']) ? $_GET['ROD_Code'] : $_GET['rod'];
// Cross Site Scripting (XSS) attack happens where client side code (usually JavaScript) gets injected into the output of your PHP script. The next line cleans it up.
$ROD_Code = htmlspecialchars($ROD_Code, ENT_QUOTES, 'UTF-8');
preg_match('/^([a-zA-Z0-9]{0,5})/', $ROD_Code, $matches);
$ROD_Code = $matches[1];
}
if (isset($_GET['Variant_Code']) || isset($_GET['var'])) {
//$Variant_Code = $_GET['Variant_Code'];
$Variant_Code = isset($_GET['Variant_Code']) ? $_GET['Variant_Code'] : $_GET['var'];
$Variant_Code = trim($Variant_Code);
if ($Variant_Code != NULL) {
// Cross Site Scripting (XSS) attack happens where client side code (usually JavaScript) gets injected into the output of your PHP script. The next line cleans it up.
$Variant_Code = htmlspecialchars($Variant_Code, ENT_QUOTES, 'UTF-8');
if (preg_match('/^([a-z])/', $Variant_Code, $matches)) {
$Variant_Code = $matches[1];
} else {
die('You made a mistake!</body></html>');
}
}
}
// asset
if ($asset == 1) {
if (!isset($ROD_Code) && !isset($Variant_Code)) {
$resultTest = $db->query("SELECT nav_ln.ISO FROM nav_ln, CellPhone WHERE nav_ln.ISO = '$ISO' AND `nav_ln`.`ISO` = `CellPhone`.`ISO` AND `CellPhone`.`Cell_Phone_Title` = 'iOS Asset Package'");
$query = "SELECT DISTINCT nav_ln.*, $SpecificCountry, countries.ISO_Country FROM nav_ln, countries, ISO_countries, CellPhone WHERE countries.ISO_Country = ISO_countries.ISO_countries AND ISO_countries.ISO = nav_ln.ISO AND nav_ln.ISO = '$ISO' AND `nav_ln`.`ISO` = `CellPhone`.`ISO` AND `CellPhone`.`Cell_Phone_Title` = 'iOS Asset Package'";
} elseif (isset($ROD_Code) && !isset($Variant_Code)) {
$resultTest = $db->query("SELECT nav_ln.ISO FROM nav_ln, CellPhone WHERE nav_ln.ISO = '$ISO' AND nav_ln.ROD_Code = '$ROD_Code' AND `nav_ln`.`ISO` = `CellPhone`.`ISO` AND `CellPhone`.`Cell_Phone_Title` = 'iOS Asset Package' AND nav_ln.ROD_Code = `CellPhone`.`ROD_Code`");
$query = "SELECT DISTINCT nav_ln.*, $SpecificCountry, countries.ISO_Country FROM nav_ln, countries, ISO_countries, CellPhone WHERE countries.ISO_Country = ISO_countries.ISO_countries AND ISO_countries.ISO = nav_ln.ISO AND nav_ln.ISO = '$ISO' AND nav_ln.ROD_Code = '$ROD_Code' AND `nav_ln`.`ISO` = `CellPhone`.`ISO` AND `CellPhone`.`Cell_Phone_Title` = 'iOS Asset Package'";
} elseif (!isset($ROD_Code) && isset($Variant_Code)) {
$resultTest = $db->query("SELECT nav_ln.ISO FROM nav_ln, CellPhone WHERE nav_ln.ISO = '$ISO' AND nav_ln.Variant_Code = '$Variant_Code' AND `nav_ln`.`ISO` = `CellPhone`.`ISO` AND `CellPhone`.`Cell_Phone_Title` = 'iOS Asset Package' AND nav_ln.Variant_Code = `CellPhone`.`Variant_Code`");
$query = "SELECT DISTINCT nav_ln.*, $SpecificCountry, countries.ISO_Country FROM nav_ln, countries, ISO_countries, CellPhone WHERE countries.ISO_Country = ISO_countries.ISO_countries AND ISO_countries.ISO = nav_ln.ISO AND nav_ln.ISO = '$ISO' AND (nav_ln.Variant_Code = '$Variant_Code' OR isnull(nav_ln.Variant_Code)) AND `nav_ln`.`ISO` = `CellPhone`.`ISO` AND `CellPhone`.`Cell_Phone_Title` = 'iOS Asset Package'";
} else {
$resultTest = $db->query("SELECT nav_ln.ISO FROM nav_ln, CellPhone WHERE nav_ln.ISO = '$ISO' AND nav_ln.ROD_Code = '$ROD_Code' AND nav_ln.Variant_Code = '$Variant_Code' AND `nav_ln`.`ISO` = `CellPhone`.`ISO` AND `CellPhone`.`Cell_Phone_Title` = 'iOS Asset Package' AND nav_ln.ROD_Code = `CellPhone`.`ROD_Code` AND nav_ln.Variant_Code = `CellPhone`.`Variant_Code`");
$query = "SELECT DISTINCT nav_ln.*, $SpecificCountry, countries.ISO_Country FROM nav_ln, countries, ISO_countries, CellPhone WHERE countries.ISO_Country = ISO_countries.ISO_countries AND ISO_countries.ISO = nav_ln.ISO AND nav_ln.ISO = '$ISO' AND nav_ln.ROD_Code = '$ROD_Code' AND (nav_ln.Variant_Code = '$Variant_Code' OR isnull(nav_ln.Variant_Code)) AND `nav_ln`.`ISO` = `CellPhone`.`ISO` AND `CellPhone`.`Cell_Phone_Title` = 'iOS Asset Package'";
}
}
else {
if (!isset($ROD_Code) && !isset($Variant_Code)) {
$resultTest = $db->query("SELECT ISO FROM nav_ln WHERE ISO = '$ISO'");
$query = "SELECT DISTINCT `nav_ln`.*, $SpecificCountry, `countries`.`ISO_Country` FROM `nav_ln`, `countries`, `ISO_countries` WHERE `countries`.`ISO_Country` = `ISO_countries`.`ISO_countries` AND `ISO_countries`.`ISO` = `nav_ln`.`ISO` AND `nav_ln`.`ISO` = '$ISO'";
} elseif (isset($ROD_Code) && !isset($Variant_Code)) {
$resultTest = $db->query("SELECT ISO FROM nav_ln WHERE ISO = '$ISO' AND ROD_Code = '$ROD_Code'");
$query = "SELECT DISTINCT `nav_ln`.*, $SpecificCountry, `countries`.`ISO_Country` FROM `nav_ln`, `countries`, `ISO_countries` WHERE `countries`.`ISO_Country` = `ISO_countries`.`ISO_countries` AND `ISO_countries`.`ISO` = `nav_ln`.`ISO` AND `nav_ln`.`ISO` = '$ISO' AND `nav_ln`.`ROD_Code` = '$ROD_Code'";
} elseif (!isset($ROD_Code) && isset($Variant_Code)) {
$resultTest = $db->query("SELECT ISO FROM nav_ln WHERE ISO = '$ISO' AND Variant_Code = '$Variant_Code'");
$query = "SELECT DISTINCT `nav_ln`.*, $SpecificCountry, `countries`.`ISO_Country` FROM `nav_ln`, `countries`, `ISO_countries` WHERE `countries`.`ISO_Country` = `ISO_countries`.`ISO_countries` AND `ISO_countries`.`ISO` = `nav_ln`.`ISO` AND `nav_ln`.`ISO` = '$ISO' AND (`nav_ln`.`Variant_Code` = '$Variant_Code' OR isnull(`nav_ln`.`Variant_Code`))";
} else {
$resultTest = $db->query("SELECT ISO FROM nav_ln WHERE ISO = '$ISO' AND ROD_Code = '$ROD_Code' AND Variant_Code = '$Variant_Code'");
$query = "SELECT DISTINCT `nav_ln`.*, $SpecificCountry, `countries`.`ISO_Country` FROM `nav_ln`, `countries`, `ISO_countries` WHERE `countries`.`ISO_Country` = `ISO_countries`.`ISO_countries` AND `ISO_countries`.`ISO` = `nav_ln`.`ISO` AND `nav_ln`.`ISO` = '$ISO' AND `nav_ln`.`ROD_Code` = '$ROD_Code' AND (`nav_ln`.`Variant_Code` = '$Variant_Code' OR isnull(`nav_ln`.`Variant_Code`))";
}
}
if ($resultTest->num_rows > 1) { // in case someone does ?sortby=lang&name=[ZZZ] and there is more than one ROD Code
/*
*************************************************************************************************************
more than 1 ROD Code/Variant code
*************************************************************************************************************
*/
// here: AND `nav_ln`.`ISO` = `CellPhone`.`ISO` AND `CellPhone`.`Cell_Phone_Title` = 'iOS Asset Package'
include './00-moreThanOneRODCode.php';
return;
} elseif ($resultTest->num_rows == 0) {
die('<div style="background-color: white; color: red; font-size: 16pt; padding-top: 20px; padding-bottom: 20px; margin-top: 200px; ">' . translate('The ISO language code is not found.', $st, 'sys') . '</div></body></html>');
} else {
} // ($resultTest->num_rows == 1)
}
?>
<!-- Facebook: Like Button, Send Button -->
<div id="fb-root"></div>
<script>
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s);
js.id = id;
js.src = "https://connect.facebook.net/<?php echo $FacebookCountry; ?>/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
} (document, "script", "facebook-jssdk"));
</script>
<?php
/******************************************************************************************************************
select the default primary language name to be used by displaying the Countries and indigenous langauge names
******************************************************************************************************************/
$result = $db->query($query) or die(translate('Query failed:', $st, 'sys') . ' ' . $db->error . '</body></html>');
if ($result->num_rows <= 0) {
die('<div style="background-color: white; color: red; font-size: 16pt; padding-top: 20px; padding-bottom: 20px; margin-top: 200px; ">' . translate('The ISO language code is not found.', $st, 'sys') . '</div></body></html>');
}
$row = $result->fetch_array();
$ISO_ROD_index = $row['ISO_ROD_index'];
$ISO = trim($row['ISO']);
$ROD_Code = trim($row['ROD_Code']);
$Variant_Code = trim($row['Variant_Code']);
$GetName = trim($row['ISO_Country']); // 2 UPPER CASE letters indicating the coutry the ISO is from
$countryTemp = $SpecificCountry;
if (strpos("$SpecificCountry", '.')) $countryTemp = substr("$SpecificCountry", strpos("$SpecificCountry", '.') + 1); // In case there's a "." in the "country"
$country = trim($row["$countryTemp"]); // name of the country in the language version
//$i=0; // used in 00-DBLanguageCountryName.inc.php include
include('./include/00-DBLanguageCountryName.inc.php'); // Get the variant language name. $row must be set! The 'return' value is $LN.
echo '<div class="countryBlackTopImage"></div>'; // black image at the very top window
/* <div id="background_header" style="background-image: url('../images/00<?php echo $st; ?>-ScriptureEarth_header.jpg'); "><div style="cursor: pointer; " onclick="window.open('<?php echo $Scriptname; ?>', '_self')"><img id="empty" src="./images/empty.png" /></div></div> <!-- ScriptureEarth and the Earth image -->
<div id="background" style="background-image: url('../images/background_earth.jpg'); "></div> <!-- ScriptureEarth and the Earth image --> */
echo '<div id="langBackground" style="margin-top: -12px; ">';
echo "<span style='cursor: pointer; ' onclick='window.open(\"".$Scriptname."\", \"_self\")'><img style='min-width: 400px; max-width: 500px; ' src='images/00" . $st . "-ScriptureEarth_header.jpg' class='langHeader' alt='" . translate('Scripture Resources in Thousands of Languages', $st, 'sys') . "' /></span>"; // just the ScriptureEarth.org icon
echo '</div>';
/* *************************************************************************************
execute the include file which lists all of the indigenous languages
***************************************************************************************/
// Cross Site Scripting (XSS) attack happens where client side code (usually JavaScript) gets injected into the output of your PHP script. The next line cleans it up.
$LN = htmlspecialchars($LN, ENT_QUOTES, 'UTF-8');
?>
<div class="threeMenus">
<?php
/* -----------------------------------------------------------------------------------------
display 'English', 'Spanish', ... drop-down menu AND help button
------------------------------------------------------------------------------------------ */
?>
<form id="myForm" class="formNavAndHelp" action="#">
<?php
// Changed to work with the master array -- Lærke
// Modified to (condition) ? value1 : value2 -- Scott
?>
<select id="sL" onchange="langChange('<?php echo $ISO_ROD_index; ?>', '<?php echo $LN; ?>', '<?php echo $ISO; ?>')">
<?php
foreach ($_SESSION['nav_ln_array'] as $tempArray) {
echo "<option value='$tempArray[2]" . ($asset == 1 ? '?asset=1' : '') . '\'' . ($st == $tempArray[0] ? ' selected=\'selected\'' : '') . ">" . translate($tempArray[1], $tempArray[0], 'sys') . '</option>';
}
?>
</select>
<a href='#' id='helpMenu' class='helpSelection' onclick="helpClick();"><img src='./images/iconHelp.png' alt="<?php echo translate('help', $st, 'sys'); ?>" style='margin-left: 0; margin-right: -8px; margin-bottom: -10px; ' width="32" height="32" /></a>
<?php
/* -----------------------------------------------------------------------------------------
display ☰ hamburger menu
----------------------------------------------------------------------------------------- */
?>
<input type="checkbox" id="togglerID" class="toggler toogleLanguage">
<div class="hamburger">
<div></div>
</div>
<!-- document.querySelectorAll('div.hamburger')[0] => get div.hamburger -->
<div class="menu">
<div>
<ul id="submenu" class="menuDivUlLanguage">
<li><a href='#' onclick="window.open('<?php echo $Scriptname; ?>', '_self')"><?php echo translate('Home', $st, 'sys'); ?></a></li>
<li><a href='#' onclick="aboutSection('H');"><?php echo translate('Help', $st, 'sys'); ?></a></li>
<li><a id='aboutArrow' style="cursor: pointer; margin-left: -16px; " onclick="AboutOO()">▸<?php echo translate('About', $st, 'sys'); ?></a></li>
<div id="AboutOffOn" style="display: none; ">
<li><a href='#' onclick="aboutSection('CR');"><?php echo translate('Copyright', $st, 'sys'); ?></a></li>
<li><a href='#' onclick="aboutSection('CU');"><?php echo translate('Content providers and partners', $st, 'sys'); ?></a></li>
<li><a href='#' onclick="aboutSection('TC');"><?php echo translate('Terms and Conditions', $st, 'sys'); ?></a></li>
<li><a href='#' onclick="aboutSection('P');"><?php echo translate('Privacy Policy', $st, 'sys'); ?></a></li>
</div>
<li><a href='#' onclick="menuSet = 0; window.open('./Feedback/Feedback.php?st=<?php echo $st; ?>')"><?php echo translate('Contact Us', $st, 'sys'); ?></a></li>
<?php if ($st == 'eng') { ?>
<li><a href='#' onclick="menuSet = 0; window.open('https://give.sil.org/give/531194/#!/donation/checkout')"><?php echo translate('Donate', $st, 'sys'); ?></a></li>
<?php }
if ($st == 'eng' || $st == 'spa') { ?>
<li><a href='#' onclick="menuSet = 0; window.open('./promotionMaterials/promotion.php?st=<?php echo $st; ?>')"><?php echo translate('Promotion Materials', $st, 'sys'); ?></a></li>
<?php } ?>
</ul>