-
Notifications
You must be signed in to change notification settings - Fork 1
/
old.php
1289 lines (1081 loc) · 53.7 KB
/
old.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>
<?php
error_reporting(E_ERROR | E_PARSE);
include_once('config/config.php');
include_once('config/translate.php');
include 'scripts/opentexts.php';
//echo basename($_SERVER['REQUEST_URI']);
?>
<html lang="<?php echo $htmllang;?>" data-bs-theme="dark">
<head>
<meta charset="UTF-8">
<title><?php echo $maintitle;?></title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="description" content="<?php echo $metadesc;?>" />
<meta name="author" content="" />
<meta name="keywords" content="<?php echo $metakeywords;?>">
<meta property="og:locale" content="<?php echo $oglocale;?>" />
<meta property="og:type" content="website" />
<meta property="og:title" content="find.Dhamma.gift" />
<meta property="og:description" content="<?php echo $ogdesc;?>" />
<meta property="og:url" content="/" />
<meta property="og:site_name" content="find.Dhamma.gift" />
<meta property="og:image" content="<?php echo $ogshare;?>" />
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="<?php echo $titletwit;?>">
<meta name="twitter:description" content="<?php echo $ogdesc;?>">
<!-- Favicon favico-noglass
<link href="/assets/img/gray.png" rel="icon" media="(prefers-color-scheme: light)">
<link href="/assets/img/gray-white.png" rel="icon" media="(prefers-color-scheme: dark)"> -->
<link href="/assets/img/favico-noglass.png" rel="icon">
<!-- Загрузка иконки для iOS -->
<link rel="apple-touch-icon" sizes="152x152" href="/assets/img/favico-noglass.png">
<!-- Google fonts
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css" />
<link href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic" rel="stylesheet" type="text/css" />
-->
<!-- Core theme CSS (includes Bootstrap)-->
<link href="/assets/css/jquery-ui.min.css" rel="stylesheet"/>
<link href="/assets/css/styles.css" rel="stylesheet" />
<link href="/assets/css/extrastyles.css" rel="stylesheet" />
<script src="/assets/js/jquery-3.7.0.min.js"></script>
<script src="/assets/js/jquery-ui.min.js"></script>
<style>
</style>
<?php echo $fontawesomejs;?>
</head>
<!-- <script>window.location.href="https://f.dhamma.gift";</script> -->
<body id="page-top">
<!-- Navigation-->
<nav class="navbar navbar-expand-lg bg-secondary text-uppercase" id="mainNav">
<a class="navbar-brand mobile-center" href="<?php echo $mainpage;?>"> <div class="container">
<!-- <img loading="lazy" alt="Precise search in Pali Suttas and Vinaya" src="/assets/img/gray-white.png" style="width:50px;"></a>
-->
<img loading="lazy" alt="Precise search in Pali Suttas and Vinaya" src="/assets/img/dhammafindlogo.webp" style="width:100px;"></a>
<a class="navbar-brand mobile-none" href="/">find.dhamma.gift</a>
<button class="navbar-toggler text-uppercase font-weight-bold bg-primary text-white rounded" type="button" data-bs-toggle="collapse" data-bs-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
<?php echo $menu;?>
<i class="fas fa-bars"></i>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ms-auto">
<!-- <li class="nav-item mx-0 mx-lg-1"><a class="nav-link py-3 px-0 px-lg-3 rounded" href="/">Main</a></li> -->
<li class="nav-item mb-3 mx-lg-2"><a class="nav-link py-3 px-0 px-lg-0 rounded" href="<?php echo $mainreadlink;?>"><?php echo $menuread;?></a></li>
<li class="nav-item mb-3 mx-lg-2"><a class="nav-link py-3 px-0 px-lg-0 rounded" href="/history.php"><?php echo $menuhist;?></a></li>
<li class="nav-item mb-3 mx-lg-2"><a class="nav-link py-3 px-0 px-lg-0 rounded" href="#help"><?php echo $menuhowto;?></a></li>
<li class="nav-item mb-3 mx-lg-2"><a class="nav-link py-3 px-0 px-lg-0 rounded" href="#project"><?php echo $menuabout;?></a></li>
<li class="nav-item mb-3 mx-lg-2"><a class="nav-link py-3 px-0 px-lg-0 rounded" href="#links"><?php echo $menulinks;?></a></li>
<li class="nav-item mb-3 mx-lg-2"><a class="nav-link py-3 px-0 px-lg-0 rounded" href="#contacts"><?php echo $menucontact;?></a></li>
<li class="nav-item mb-0 mx-lg-2"><p><a class="py-1 text-decoration-none px-0 px-lg-1 rounded link-light" href="/old.php">En</a>
<a class="link-light text-decoration-none py-1 px-0 px-lg-1 rounded" href="/ru/old.php">Ru</a>
</p></li>
<li>
<div class="align-items-center form-check-inline mx-0">
<a id="theme-button" class=" mb-1 text-white ">
<i onclick="switchIcon(this)" class="fa-solid fa-circle-half-stroke"></i>
</a>
</div>
</li>
</ul>
</div>
</div>
</nav>
<!-- Masthead-->
<header class="masthead bg-primary text-white text-center">
<div class="container d-flex align-items-center flex-column mb-2">
<!-- Masthead Heading-->
<div class="hideOnMobile">
<h1 class="masthead-heading">
<div data-bs-toggle="tooltip" data-bs-placement="top" title="Good Old <?php echo $tooltiptitle;?>">
<?php echo $title;?>
</div>
</h1>
<!--Icon Divider -->
<div class="divider-custom divider-light">
<div class="divider-custom-line"></div>
<div class="lock example divider-custom-icon">
<i class="fa-solid fa-circle example icon-unlock" ></i>
<i class="fa-solid fa-circle icon-lock bigger"></i>
</div>
<div class="divider-custom-line"></div>
</div>
</div>
<form method="GET" action="" class="justify-content-center">
<div class="mb-3 form-group input-group ui-widget dropup rounded-pill">
<label class="sr-only dropup rounded-pill" for="paliauto"></label>
<?php
if (isset($_GET['q'])) {
$q = htmlspecialchars($_GET['q']);
} else {
$q = '';
}
?>
<div class="searchinputdiv">
<input name="q" type="search" class="form-control rounded-pill searchinput" id="paliauto" placeholder="e.g. Kāyagat or sn56.11" value="<?php echo $q; ?>" multiple>
<button type="button" id="clearbtn" class="btn btn-sm ms-1 me-1 rounded-pill">
<i class="fas fa-times" aria-hidden="true"></i>
<span class="visually-hidden"><?php echo $clearaption;?></span>
</button>
</div>
<div class="input-group-append">
<button onclick="document.getElementById( 'spinner' ).style.display = 'block'" type="submit" id="searchbtn" class="btn btn-primary mainbutton ms-1 me-1 rounded-pill ">
<i class="fas fa-search fa-flip-horizontal" aria-hidden="true"></i>
<span class="visually-hidden"><?php echo $searchcaption;?></span>
</button>
</div>
</div>
<div class="align-items-center form-check-inline mx-0">
<select class="dropdown droponmain rounded-pill text-muted border-2 border-primary text-center input-group-append" id="pOptions" name="p">
<option value="" <?php if (isset($extra) && $p == "Pāḷi") echo "selected";?> ><?php echo $radiopli;?></option>
<option value="-vin" <?php if (isset($extra) && $p == "-vin") echo "selected";?> ><?php echo "$radiovin";?></option>
<option value="-kn" <?php if (isset($extra) && $p == "-kn") echo "selected";?> ><?php echo "$radiokn";?></option>
<option value="-all" <?php if (isset($extra) && $p == "-all") echo "selected";?> ><?php echo "$radioltr";?></option>
<option value="-all -vin" <?php if (isset($extra) && $p == "-all -vin") echo "selected";?> ><?php echo "$radiovinall";?></option>
<option value="-b" <?php if (isset($p) && $p == "-b") echo "selected";?> ><?php echo $radiotbw;?></option>
<option value="-en" <?php if (isset($p) && $p == "-en") echo "selected";?> ><?php echo $radioen;?></option>
</select>
<div class="text-start text-muted form-check-inline me-0" data-bs-html="true" data-bs-toggle="tooltip" data-bs-placement="top" title="<?php echo $tooltiptextype;?>">*</div>
<select class="dropdown droponmain rounded-pill text-muted border-2 border-primary text-center input-group-append" id="extraOptions" name="extra">
<option value="" <?php if (isset($extra)) echo "selected";?> ><?php echo "$liststd";?></option>
<option value="-def" <?php if (isset($extra) && $extra == "-def") echo "selected";?> ><?php echo "$listdef";?></option>
<option value="-sml" <?php if (isset($extra) && $extra == "-sml") echo "selected";?> ><?php echo "$listsml";?></option>
<option value="-defall" <?php if (isset($extra) && $extra == "-defall") echo "selected";?> ><?php echo "$listdefall";?></option>
<option value="-nm10" <?php if (isset($extra) && $extra == "-nm10") echo "selected";?> ><?php echo "$listnm10";?></option>
<option value="-nm5" <?php if (isset($extra) && $extra == "-nm5") echo "selected";?> ><?php echo "$listnm";?></option>
</select>
<div class="text-muted text-decoration-none me-1 form-check-inline" data-bs-html="true" data-bs-toggle="tooltip" data-bs-placement="top" title="<?php echo $tooltipsearchtype;?>">*</div>
</div>
<!-- <label for="pOptions"></label> -->
<!-- extra options -->
<div class="text-white form-check-inline" data-bs-toggle="collapse" href="#collapseSettings" role="button" aria-expanded="false" aria-controls="collapseSettings">
<i class="fa-solid fa-gear fa-lg" aria-hidden="true"></i>
<span class="visually-hidden"><?php echo $searchcaption;?></span>
</div>
<script>
$(document).ready(function() {
// Обработчик для нажатия клавиши Enter
$(document).on('keydown', function(event) {
if (event.key === 'Enter') {
$('#collapseSettings').collapse('hide'); // Здесь меняем 'toggle' на 'hide'
$('#navbarResponsive').collapse('hide');
}
});
// Обработчик для отправки формы
$('#searchbtn').on('click', function() {
$('#collapseSettings').collapse('hide'); // Здесь меняем 'toggle' на 'hide'
$('#navbarResponsive').collapse('hide');
});
});
</script>
<div class="collapse" id="collapseSettings">
<div class="float-start mt-2">
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" id="onlCheckbox" name="extra" <?php if (isset($extra) && $extra=="-onl ") echo "checked";?> value="-onl">
<div data-bs-toggle="tooltip" data-bs-placement="top" title='<?php echo $tooltiponl;?>'><?php echo $checkboxonl;?></div>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" id="laCheckbox" name="la" <?php if (isset($extra) && $extra=="-la$defaultla ") echo "checked";?> value='<?php echo "-la$defaultla"?>'>
<div data-bs-toggle="tooltip" data-bs-placement="top" title='<?php echo $tooltipla;?>'><?php echo $checkboxla;?></div>
</div>
<div style="max-width: 300px;" class="my-2">
<div class="align-items-center form-check-inline mt-3">
<div class="mb-2"><button class="btn btn-secondary rounded-pill insert-letter" data-letter="ā" autocomplete="off">ā</button>
<button class="btn btn-secondary rounded-pill insert-letter" data-letter="ṁ" autocomplete="off">ṁ</button>
<button class="btn btn-secondary rounded-pill insert-letter" data-letter="ñ" autocomplete="off">ñ</button>
<button class="btn btn-secondary rounded-pill insert-letter" data-letter="ṭ" autocomplete="off">ṭ</button>
<button class="btn btn-secondary rounded-pill insert-letter" data-letter="ī" autocomplete="off">ī</button> </div>
<button class="btn btn-secondary rounded-pill insert-letter" data-letter="ṇ" autocomplete="off">ṇ</button>
<button class="btn btn-secondary rounded-pill insert-letter" data-letter="ū" autocomplete="off">ū</button>
<button class="btn btn-secondary rounded-pill insert-letter" data-letter="ṅ" autocomplete="off">ṅ</button>
<button class="btn btn-secondary rounded-pill insert-letter" data-letter="ḍ" autocomplete="off">ḍ</button>
<button class="btn btn-secondary rounded-pill insert-letter" data-letter="ḷ" autocomplete="off">ḷ</button>
<!-- <button class="btn btn-secondary rounded-pill insert-letter" data-letter="ṃ" autocomplete="off">ṃ</button> -->
</div>
<div class="mt-3">
<script src="/assets/js/setDefaultMode.js"></script>
<button type="button" class="btn btn-sm btn-primary rounded-pill" onclick="savePreferences()"><?php echo $btnsave;?></button>
<button type="button" class="btn btn-sm btn-secondary rounded-pill" onclick="resetPreferences()"><?php echo $btnreset;?></button>
<div class="modal fade" id="copyPopup" tabindex="-1" role="dialog" aria-labelledby="copyPopupLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-body text-muted">
Done
</div>
</div>
</div>
</div>
</div>
<h5 class="mt-4"><?php echo $regexMemoh5;?></h5>
<div class="mt-4" style="text-align: left;">
<button class="btn btn-primary btn-sm rounded-pill insert-letter" data-letter=" -exc "><strong>X -exc Y Z</strong></button> - <?php echo $exc;?> <br>
<button class="btn rounded-pill btn-primary btn-sm rounded-pill insert-letter" data-letter=" -la<?php echo $defaultla;?> "><strong>-la<?php echo $defaultla;?> X</strong></button> - <?php echo $lax;?> <br>
<button class="btn btn-primary btn-sm rounded-pill insert-letter" data-letter=" -lb<?php echo $defaultla;?> "><strong>-lb<?php echo $defaultla;?> X</strong></button> - <?php echo $lbx;?> <br>
<button class="btn btn-primary btn-sm rounded-pill insert-letter" data-letter=' -exc "Y(ti|nti)"'><strong>X -exc Y(ti|nti)</strong></button> - <?php echo $excfew;?> <br>
<button class="btn btn-primary btn-sm rounded-pill insert-letter" data-letter='\\b'><strong>\\bX</strong></button> - <?php echo $begin;?>
<button class="btn btn-primary btn-sm rounded-pill insert-letter" data-letter='\\b'><strong>Y\\b</strong></button> <?php echo $end;?><br>
<button class="btn btn-primary btn-sm rounded-pill insert-letter" data-letter='.*'><strong>X.*Y</strong></button> - <?php echo $anynumber;?> <br>
<button class="btn btn-primary btn-sm rounded-pill insert-letter" data-letter='.{0,10}'><strong>X.{0,10}Y</strong></button> - <?php echo $fewsymbols;?> <br>
<button class="btn btn-primary btn-sm rounded-pill insert-letter" data-letter='\\S*\\s'><strong>X\\S*\\sY</strong></button> - <?php echo $nextwords;?> <br>
<button class="btn btn-primary btn-sm rounded-pill insert-letter" data-letter='(\\S*\\s){0,3}'><strong>X(\\S*\\s){0,3}Y</strong></button> - <?php echo $fewwords;?> <br>
<button class="btn btn-primary btn-sm rounded-pill insert-letter" data-letter='[aā]'><strong>a[ṁ]?</strong></button> - <?php echo $optionalletter;?> <br>
<button class="btn btn-primary btn-sm rounded-pill insert-letter" data-letter='[aā]'><strong>[aā]</strong></button> - <?php echo $variants;?> <br>
<button class="btn btn-primary btn-sm rounded-pill insert-letter" data-letter='tatt($|[^h])'><strong>tatt($|[^h])</strong></button> - <?php echo $variantsexc;?> <br>
<button class="btn btn-primary btn-sm rounded-pill insert-letter" data-letter='(a|b|c)'><strong>(a|b|c)</strong></button> - <?php echo $searchfewwords;?> <br>
<button class="btn btn-primary btn-sm rounded-pill insert-letter" data-letter="mn[0-9].*X"><strong>mn[0-9].*X</strong></button> - <?php echo $inallnikaya;?> <br>
<button class="btn btn-primary btn-sm rounded-pill insert-letter" data-letter="dn22.*"><strong>dn22.*Y</strong></button> - <?php echo $inonesutta;?> <br>
<button class="btn btn-primary btn-sm rounded-pill insert-letter" data-letter='sn56.*(seyyathāpi|adhivacan|ūpama|opama)'><strong>sn56.*(seyyathāpi|adhivacan|ūpama|opama)</strong></button> - <?php echo $metaphorssmlletter;?> <br><br>
</div>
<?php echo $regexlink;?>
</p>
<script>
// Event listener to submit the form when Enter key is pressed
var input = document.getElementById("paliauto");
input.addEventListener("keypress", function(event) {
if (event.key === "Enter") {
event.preventDefault();
document.getElementById("searchbtn").click();
}
});
// Function to reset all form elements
function resetForm() {
document.getElementById("paliauto").value = "";
document.getElementById("pOptions").selectedIndex = 0;
document.getElementById("extraOptions").selectedIndex = 0;
document.getElementById("onlCheckbox").checked = false;
document.getElementById("laCheckbox").checked = false;
// Reset other checkboxes and dropdowns as needed
checkInput(); // Check input after resetting form
}
// Event listener for the clear button
document.getElementById("clearbtn").addEventListener("click", function() {
resetForm();
});
// Получаем кнопки для вставки букв
var buttons = document.querySelectorAll('.insert-letter');
// Добавляем обработчики событий для каждой кнопки
buttons.forEach(function(button) {
button.addEventListener('click', function(event) {
event.preventDefault();
var letterValue = this.getAttribute('data-letter');
var currentValue = input.value;
var selectionStart = input.selectionStart;
var selectionEnd = input.selectionEnd;
var newValue = currentValue.substring(0, selectionStart) + letterValue + currentValue.substring(selectionEnd);
input.value = newValue;
// Перемещаем курсор после вставленных символов
var newCursorPosition = selectionStart + letterValue.length;
input.setSelectionRange(newCursorPosition, newCursorPosition);
// Имитируем событие ввода, чтобы обновить состояние автозаполнения
var inputEvent = new Event('input', { bubbles: true });
input.dispatchEvent(inputEvent);
// Перемещаем фокус на поле ввода
input.focus();
});
});
// Получаем чекбоксы и выпадающие списки
var checkboxes = document.querySelectorAll('input[type="checkbox"]');
var selects = document.querySelectorAll('select');
// Добавляем обработчики событий для чекбоксов
checkboxes.forEach(function(checkbox) {
checkbox.addEventListener('change', checkInput);
});
// Добавляем обработчики событий для выпадающих списков
selects.forEach(function(select) {
select.addEventListener('change', checkInput);
});
var clearButton = document.getElementById('clearbtn');
// Проверяем поле при загрузке страницы
checkInput();
// Добавляем обработчик события input
input.addEventListener('input', checkInput);
// Очистка поля и скрытие кнопки при клике на кнопку очистки
clearButton.addEventListener('click', function() {
input.value = '';
checkInput();
});
function checkInput() {
if (
input.value.trim().length > 0 ||
Array.from(checkboxes).some(function(checkbox) {
return checkbox.checked;
}) ||
Array.from(selects).some(function(select) {
return select.value !== "";
})
) {
clearButton.style.display = 'block'; // Показываем кнопку, если есть текст или выбраны чекбоксы/списки
} else {
clearButton.style.display = 'none'; // Скрываем кнопку, если нет текста и не выбраны чекбоксы/списки
}
}
// Поместить курсор в конец строки в поле ввода
input.focus();
input.setSelectionRange(input.value.length, input.value.length);
</script>
</div>
</div>
</div>
<script>
document.addEventListener("DOMContentLoaded", function() {
var infoUpdate = document.getElementById("infoUpdate");
// Проверяем, есть ли запись в localStorage
if (!localStorage.getItem("infoUpdateClosed")) {
infoUpdate.style.display = "block"; // Если нет, показываем его
}
// Добавляем обработчик события для кнопки закрытия
infoUpdate.querySelector(".btn-close").addEventListener("click", function() {
// Сохраняем в localStorage информацию о закрытии окна
localStorage.setItem("infoUpdateClosed", "true");
// Скрываем окно при нажатии на кнопку закрытия
infoUpdate.style.display = "none";
});
});
</script>
<div style="max-width: 450px; display: none;" class='alert alert-warning alert-dismissible fade show container-lg mt-3 text-start' role='alert' id='successAlert'>
<div id="response"></div>
<button type='button' class='btn-close' data-bs-dismiss='alert' aria-label='Close'></button>
</div>
</div>
<div style="max-width: 300px;" class=' fade show container-lg mt-3 text-start' role='alert' id='successAlert'>
<?php
if (strpos($_SERVER['REQUEST_URI'], "/ru") !== false){
echo '<div style="max-width: 450px; display: none;" class="alert alert-primary alert-dismissible fade show mt-3" role="alert" id="infoUpdate">
<strong>Это старая версия fdg!</strong> </br>
Новая версия <a class="alert-link" href="/ru">здесь </a></br>
Обратная связь через <a class="alert-link" href="#contacts">контакты <i class="fa-regular fa-comment"></i></a>
</div>';
} else {
echo '<div style="max-width: 450px; display: none;" class="alert alert-primary alert fade show mt-3" role="alert" id="infoUpdate">
<strong>This is the old version of fdg!</strong> </br>
New version is <a class="alert-link" href="/">here </a></br>
You may use <a class="alert-link" href="#contacts">contacts <i class="fa-regular fa-comment"></i></a> for suggestions
</div>';
}
?>
</div>
</div>
<div id="spinner" class="justify-content-center">
<div class="spinner-border mt-3" role="status">
<span class="visually-hidden">Loading...</span>
</div>
</div>
<script src="/assets/js/smoothScroll.js" defer></script>
<script defer>
window.addEventListener('pageshow', function(event) {
if (event.persisted) {
// Событие pageshow возникает при возврате назад с помощью кнопки "назад" браузера
// Скрываем спиннер
document.getElementById('spinner').style.display = 'none';
}
});
</script>
<!-- extra options end -->
</form>
<div class="hideOnMobile">
<p><br>
<br>
</p>
</div>
<script>
</script>
</header>
<!-- Portfolio Section-->
<section class="page-section portfolio">
<div class="container text-center">
<?php
if ( $lang == "ru" ) {
include 'assets/common/horizontalMenuRu.php';
} else {
include 'assets/common/horizontalMenuEn.php';
}
?>
<!--Slideshow section-->
<div style="max-width: 450px;" class="container-lg my-5">
<!-- <h4><?php echo $carouseltitle;?>:</h4><br> -->
<div id="carouselWithCaptions" class="carousel slide " data-bs-ride="carousel">
<!-- <div class="carousel-indicators">
<button type="button" data-bs-target="#carouselWithCaptions" data-bs-slide-to="0" class="active" aria-current="true" aria-label="Slide 1"></button>
<button type="button" data-bs-target="#carouselWithCaptions" data-bs-slide-to="1" aria-label="Slide 2"></button>
<button type="button" data-bs-target="#carouselWithCaptions" data-bs-slide-to="2" aria-label="Slide 3"></button>
</div> -->
<div class="carousel-inner">
<?php
shuffle($slides);
foreach ($slides as $index => $slide) {
$title = $slide['title'];
$desc = $slide['desc'];
$link = $slide['link'];
$isActive = ($index === 0) ? 'active' : '';
?>
<div class="carousel-item <?php echo $isActive; ?>">
<h5><?php echo $title; ?></h5>
<span><?php echo $desc; ?></span>
<br>
<a href="<?php echo $link; ?>" style="text-align: left;"><?php echo $read; ?></a>
</div>
<?php
}
?>
</div>
<button class="carousel-control-prev" type="button" data-bs-target="#carouselWithCaptions" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#carouselWithCaptions" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
</button>
</div>
</div>
<!-- Dukkha section Item 3-->
<div class="portfolio-item mx-auto mt-4" data-bs-toggle="modal" data-bs-target="#portfolioModal3">
<div class="font-italic">
<p class="font-italic text-center ">
<?php echo $fntmessage;?>
</p>
</div>
<div class="col-md-6 col-lg-4 mb-3">
<div class="portfolio-item-caption d-flex align-items-center justify-content-center h-100 w-100">
<div class="portfolio-item-caption-content text-center text-white">
<i class="fas fa-search fa-flip-horizontal fa-3x"></i></div>
</div>
</div>
</div>
<h4 id="help" class="page-section-heading text-center mb-4"><?php echo $howtovideo;?></h4>
<div class="embed-container mt-4 mb-5 text-center">
<a href="<?php echo $linkhowtovideo;?>" target="_blank" ><img width="350" class="imgonmain" src="<?php echo $demovideoimg2;?>" title="<?php echo $titledeschowtovideo;?>" loading="lazy"></a>
</div>
<!--<div class="embed-container mt-4 mb-5">
<iframe src="<?php echo $linkhowtovideo;?>" title="<?php echo $titledeschowtovideo;?>" frameborder="0" allowfullscreen></iframe>
</div>-->
<div style="max-width: 600px;" class="container-lg">
<div class="alert alert-warning float-start text-left mb-3" role="alert">
<?php echo $transwarning;?>
</div>
</div>
<div style="max-width: 992px;" class="container-lg">
<h2 class="page-section-heading text-center text-uppercase text-secondary mb-3"><?php echo $headerexamples; ?></h2>
<div class="container mb-5">
<ol class="col-lg-8 col-md-10 ms-auto text-start">
<?php echo $examplelist; ?>
</ol>
</div>
</div>
<!-- Portfolio Section Heading-->
<h2 class="page-section-heading text-center text-uppercase text-secondary mb-0"><?php echo $howtoheader; ?></h2>
<!-- Icon Divider-->
<div class="divider-custom">
<div class="divider-custom-line"></div>
<div class="lock example divider-custom-icon">
<i class="fa-solid fa-circle example icon-unlock" ></i>
<i class="fa-solid fa-circle icon-lock bigger"></i>
</div>
<div class="divider-custom-line"></div>
</div>
<!-- Portfolio Grid Items-->
<div class="row justify-content-center">
<div style="max-width: 600px;" class="container-lg">
<div data-bs-toggle="tooltip" data-bs-placement="top" title="<?php echo $howtosearchquotetooltip;?>"></div>
<?php echo $howtosearchquote;?>
</div>
<div class="clearfix"></div>
<div class="col-md-6 col-lg-4 mb-0">
<div class="portfolio-item mx-auto" data-bs-toggle="modal" data-bs-target="#portfolioModal6">
<div class="portfolio-item-caption d-flex align-items-center justify-content-center h-100 w-100">
<div class="portfolio-item-caption-content text-center text-white"><i class="fas fa-plus fa-3x"></i></div>
</div>
<div class="imgcontainer">
<div class="centered">
<h4 class="page-section-heading text-center text-white"><?php echo $demovideo;?> </h4>
</div>
<img class="img-fluid" src="assets/img/portfolio/awakening.webp" alt="Search in Pali Suttas and Vinaya" loading="lazy" />
</div>
</div>
<!-- text here --> <p class="mb-4">
</p>
</div>
<div class="col-md-6 col-lg-4 mb-0">
<div class="portfolio-item mx-auto" data-bs-toggle="modal" data-bs-target="#portfolioModal5">
<div class="portfolio-item-caption d-flex align-items-center justify-content-center h-100 w-100">
<div class="portfolio-item-caption-content text-center text-white"><i class="fas fa-plus fa-3x"></i></div>
</div>
<div class="imgcontainer">
<div class="centered">
<h4 class="page-section-heading text-center text-white"><?php echo $basics;?></h4>
</div>
<img class="img-fluid" src="assets/img/portfolio/dhammawheelgreen.webp" alt="Search in Pali Suttas and Vinaya" loading="lazy" />
</div>
</div>
<!-- text here --> <p class="mb-4">
</p>
</div>
<div class="col-md-6 col-lg-4 mb-0">
<div class="portfolio-item mx-auto" data-bs-toggle="modal" data-bs-target="#portfolioModal4">
<div class="portfolio-item-caption d-flex align-items-center justify-content-center h-100 w-100">
<div class="portfolio-item-caption-content text-center text-white"><i class="fas fa-plus fa-3x"></i></div>
</div>
<div class="imgcontainer">
<div class="centered">
<h4 class="page-section-heading text-center text-white"><?php echo $advanced;?></h4>
</div>
<img class="img-fluid" src="assets/img/portfolio/sangha.webp" alt="Search in Pali Suttas and Vinaya" loading="lazy"/>
</div>
</div>
<!-- text here --> <p class="mb-4"></p>
</div>
</div>
</div>
</section>
<!-- About Section-->
<section class="page-section bg-primary text-white mb-0" id="project">
<div class="container">
<!-- About Section Heading-->
<h2 class="page-section-heading text-center text-uppercase text-white"><?php echo $aboutheader; ?></h2>
<!-- Icon Divider-->
<div class="divider-custom divider-light">
<div class="divider-custom-line"></div>
<div class="lock example divider-custom-icon">
<i class="fa-solid fa-circle example icon-unlock" ></i>
<i class="fa-solid fa-circle icon-lock bigger"></i>
</div>
<div class="divider-custom-line"></div>
</div>
<!-- About Section Content-->
<div class="row">
<?php echo $aboutprp; ?>
</div>
<!-- About Section Button-->
<!-- <div class="text-center mt-4">
<a class="btn btn-xl btn-outline-light" target="_blank" href="https://github.com/o28o/fdg">
<i class="fa-brands fa-github"></i><?php echo $prongh; ?>
</a>
</div> -->
<div class="text-center mt-4">
<a class="btn btn-xl btn-outline-light" target="_blank" href="mailto:[email protected]">
<i class="fa-solid fa-at"></i><?php echo $premail; ?>
</a>
</div>
</div>
</section>
<!-- Footer-->
<footer id="links" class="footer text-center ">
<h2 class="page-section-heading text-center text-uppercase text-white mb-5"><?php echo $head2recomlinks;?></h2>
<div class="container">
<div class="row">
<!-- Footer Location-->
<div class="col-lg-4 mb-5 mb-lg-0">
<h4 id="research" class="text-uppercase mb-4"><?php echo $anameresearch;?> </h4>
<div class="list-group">
<?php
if ( $mode == "offline" ) {
echo ' <a href="https://find.dhamma.gift/" style="z-index:1" class="list-group-item list-group-item-action active">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1">find.dhamma.gift</h5>
<small class="text-muted">' . $detailonline . '</small>
</div>
<p class="mb-1">' . $pfdg . '</p>
<small class="text-muted"></small>
</a>';
} else {
echo '
<a href="https://github.com/o28o/fdg" target=_blank style="z-index:1" class="list-group-item list-group-item-action active">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1">' . $header5fdgoffline . '</h5>
<small class="text-muted">' . $detailoffline . '</small>
</div>
<p class="mb-1">' . $pfdgoffline . '</p>
<small class="text-muted"></small>
</a>';
}
?>
<a href="/cse.php" target="_blank" class="list-group-item list-group-item-action">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1"><?php echo $head5cse;?></h5>
<small class="text-muted"><?php echo $detailonline;?> </small>
</div>
<p class="mb-1">
<?php echo $psce;?>
</p>
<small class="text-muted"><?php echo $smcse;?></small>
</a>
<a target="_blank" href="https://digitalpalidictionary.github.io/" class="list-group-item list-group-item-action">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1">Digital Pali Dictionary</h5>
<small class="text-muted"><?php echo $detailapp;?></small>
</div>
<p class="mb-1"><?php echo $pdpd;?></p>
<small class="text-muted"><?php echo $smdpd;?></small>
</a>
<a target="_blank" href="https://devamitta.github.io/pali/" class="list-group-item list-group-item-action">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1"><?php echo $head5dpdru;?></h5>
<small class="text-muted"><?php echo $detailapp;?></small>
</div>
<p class="mb-1"><?php echo $pdpdru;?></p>
<small class="text-muted"><?php echo $smdpdru;?></small>
</a>
<!-- <a target="_blank" href="https://play.google.com/store/apps/details?id=klye.plugin.pi1" class="list-group-item list-group-item-action">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1"><?php echo $head5plikeyboard;?></h5>
<small class="text-muted"><?php echo $detailapp;?></small>
</div>
<p class="mb-1"><?php echo $pplikeyboard;?></p>
<small class="text-muted"><?php echo $smplikeyboard;?></small>
</a>
<a target="_blank" href="https://dsal.uchicago.edu/dictionaries/pali/" class="list-group-item list-group-item-action">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1"><?php echo $head5pts;?></h5>
<small class="text-muted"><?php echo $detailonline;?></small>
</div>
<p class="mb-1"><?php echo $ppts;?></p>
<small class="text-muted"></small>
</a>
<a target="_blank" href="https://www.wisdomlib.org/" class="list-group-item list-group-item-action">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1">Wisdomlib.org</h5>
<small class="text-muted"><?php echo $detailonline;?></small>
</div>
<p class="mb-1"><?php echo $pwids;?></p>
<small class="text-muted"><?php echo $smwisd;?></small>
</a>
<a target="_blank" href="http://dictionary.tamilcube.com/pali-dictionary.aspx" class="list-group-item list-group-item-action">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1">TamilCube.com</h5>
<small class="text-muted"><?php echo $detailonline;?></small>
</div>
<p class="mb-1"><?php echo $ptamilcube;?></p>
<small class="text-muted"></small>
</a> -->
<a target="_blank" href="
https://drive.google.com/drive/folders/1bdkm-g_ReZi5QEior_gNTok8r4flAfa3?usp=sharing" class="list-group-item list-group-item-action">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1"><?php echo $head5words;?></h5>
<small class="text-muted"><?php echo $detailoffline;?></small>
</div>
<p class="mb-1"><?php echo $pwords;?></p>
<small class="text-muted"></small>
</a>
</div>
<p class="lead mb-0"> </p>
</div>
<!-- Footer Social Icons-->
<div class="col-lg-4 mb-5 mb-lg-0">
<h4 id="read" class="text-uppercase mb-4"><?php echo $anameread;?> </h4>
<div class="list-group">
<a target="" href="<?php echo $mainscpage; ?>" class="list-group-item list-group-item-action active" aria-current="true">
<div class="d-flex w-100 justify-content-between text-left">
<h5 class="mb-1">sc.dhamma.gift</h5>
<small><?php echo $detailonandoffline;?></small>
</div>
<p class="mb-1 text-left"><?php echo $psclight; ?></p>
<small><?php echo $smsclight; ?></small>
</a>
<a target="_blank" href="https://Suttacentral.net" class="list-group-item list-group-item-action" aria-current="true">
<div class="d-flex w-100 justify-content-between text-left">
<h5 class="mb-1">Suttacentral.net</h5>
<small><?php echo $detailonandoffline;?></small>
</div>
<p class="mb-1 text-left"><?php echo $psc; ?></p>
<small><?php echo $smsc; ?></small>
</a>
<a target="_blank" href="https://thebuddhaswords.net/home/index.html" class="list-group-item list-group-item-action" aria-current="true">
<div class="d-flex w-100 justify-content-between text-left">
<h5 class="mb-1">TheBuddhasWords.net</h5>
<small><?php echo $detailonline;?></small>
</div>
<p class="mb-1 text-left"><?php echo $ptbw; ?></p>
<small><?php echo $smtbw; ?></small>
</a>
<a target="_blank" href="https://www.digitalpalireader.online/" class="list-group-item list-group-item-action">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1">Digital Pali Reader</h5>
<small class="text-muted"><?php echo $detailonandoffline;?></small>
</div>
<p class="mb-1"><?php echo $pdpr; ?></p>
<small class="text-muted"><?php echo $smdpr; ?></small>
</a>
<a target="_blank" href="<?php echo $mainpagethsulink; ?>" class="list-group-item list-group-item-action">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1">Tipitaka.Theravada.su</h5>
<small class="text-muted"><?php echo $detailonline;?></small>
</div>
<p class="mb-1"><?php echo $pthsu;?></p>
<small class="text-muted"><?php echo $smthsu;?></small>
</a>
<a href="<?php echo $mainpagethrulink; ?>" target="_blank" class="list-group-item list-group-item-action">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1">Theravada.ru</h5>
<small class="text-muted"><?php echo $detailonline;?></small>
</div>
<p class="mb-1"><?php echo $pthru;?></p>
<small class="text-muted"></small>
</a>
<!-- <a href="https://play.google.com/store/apps/details?id=hesoft.T2S" target="_blank" class="list-group-item list-group-item-action">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1">T2S Android</h5>
<small class="text-muted"><?php echo $detailapp;?></small>
</div>
<p class="mb-1"><?php echo $pt2s;?></p>
<small class="text-muted"><?php echo $smt2s;?></small>
</a>
<a href="https://voice.suttacentral.net" target="_blank" class="list-group-item list-group-item-action">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1">Voice.suttacentral.net</h5>
<small class="text-muted"><?php echo $detailonline;?></small>
</div>
<p class="mb-1"><?php echo $pscvoice;?></p>
<small class="text-muted"><?php echo $smscvoice;?></small>
</a> -->
</div>
</div>
<div class="col-lg-4 mb-5 mb-lg-0">
<h4 id="study" class="text-uppercase mb-4"><?php echo $anamestudy;?></h4>
<div class="list-group">
<a target="_blank" href="<?php echo $linktextbook;?>" class="list-group-item list-group-item-action active" aria-current="true">
<div class="d-flex w-100 justify-content-between text-left ">
<h5 class="mb-1"><?php echo $anametextbook;?></h5>
<small><?php echo $detailtextbook;?></small>
</div>
<p class="mb-1 text-left"><?php echo $ptextbook;?></p>
<small></small>
</a>
<a target="_blank" href="<?php echo $linkcases;?>" class="list-group-item list-group-item-action">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1"><?php echo $anamecases;?></h5>
<small class="text-muted"><?php echo $detailtable;?></small>
</div>
<p class="mb-1"><?php echo $pcases;?></p>
<small class="text-muted"><?php echo $smcheckpali;?></small>
</a>
<a target="_blank" href="<?php echo $linkconj; ?>" class="list-group-item list-group-item-action" aria-current="true">
<div class="d-flex w-100 justify-content-between text-left">
<h5 class="mb-1"><?php echo $anameconj; ?> </h5>
<small><?php echo $detailtable;?></small>
</div>
<p class="mb-1 text-left"><?php echo $pconj;?></p>
<small><?php echo $smcheckpali;?></small>
</a>
<a target="_blank" href="<?php echo $linksothermat; ?>" class="list-group-item list-group-item-action">
<div class="d-flex w-100 justify-content-between text-left">
<h5 class="mb-1"><?php echo $head5othermat;?></h5>
<small class="text-muted"><?php echo $detailoffline;?></small>
</div>
<p class="mb-1"><?php echo $pothermat;?></p>
<small class="text-muted"></small>
</a>
<!-- <a target="_blank" href="/assets/diff/" class="list-group-item list-group-item-action">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1"><?php echo $head5suttadiff;?></h5>
<small class="text-muted"><?php echo $detailonline;?></small>
</div>
<p class="mb-1"><?php echo $psuttadiff;?></p>
<small class="text-muted"></small>
</a>
<a target="_blank" href="/assets/listdiff.html" class="list-group-item list-group-item-action">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1"><?php echo $head5listdiff;?></h5>
<small class="text-muted"><?php echo $detailoffline;?></small>
</div>
<p class="mb-1"><?php echo $plistdiff;?></p>
<small class="text-muted"></small>
</a>
<a target="_blank" href="/assets/makelist.html" class="list-group-item list-group-item-action">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1"><?php echo $head5makelist;?></h5>
<small class="text-muted"><?php echo $detailoffline;?></small>
</div>
<p class="mb-1"><?php echo $pmakelist;?></p>
<small class="text-muted"></small>
</a> -->
</div>
</div>
<!-- Footer About Text-->
<div id="contacts" class="col-lg-0 text-center">
<h4 class="text-uppercase mt-5 mb-4">
<?php echo "$contactheader"; ?></h4>
<p class="lead mb-4">
<?php echo $contaccalltoaction; ?>
</p>
<a target="_blank" class="btn btn-outline-light btn-social mx-1" href="https://github.com/o28o/fdg#readme"><i class="fa-brands fa-github"></i></a>
<a target="_blank" class="btn btn-outline-light btn-social mx-1" href="mailto:[email protected]"><i class="fa-solid fa-at"></i></a>
<a href="https://m.youtube.com/channel/UCoyL5T0wMubqrj4OnKVOlMw" class="btn btn-outline-light btn-social mx-1" title="YouTube" target="_blank" rel="nofollow"><i class="fa-brands fa-youtube"></i></a>
<a href="https://t.me/dhamma_gift" class="btn btn-outline-light btn-social mx-1" title="Telegram" target="_blank" rel="nofollow"><i class="fa-brands fa-telegram"></i></a>
<p class="lead mt-4">
<?php echo $poweredby; ?>
<a class="text-white text-decoration-none me-0" data-bs-html="true" data-bs-toggle="tooltip" data-bs-placement="top" title="<?php echo $tooltippoweredby;?>"> *</a></p>
</div>
</div>
</div>
</footer>
<!-- Copyright Section-->
<div class="copyright py-4 text-center text-white">
<div class="container"><a target="_blank" rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="Лицензия Creative Commons" style="border-width:0" src="/assets/img/88x31.png" loading="lazy" /></a> <small>Copyright <a class="text-white text-decoration-none" href="/sc/latest-rus.php">©</a> Dhamma.gift <?php echo $mode; ?>
<a class="text-white text-decoration-none" href="/assets/countdowntable.php">2022</a>-<?php echo date("Y"); ?></small></div>
</div>
<!-- Portfolio Modals-->
<!-- Portfolio Modal 3-->
<div class="portfolio-modal modal fade" id="portfolioModal3" tabindex="-1" aria-labelledby="portfolioModal3" aria-hidden="true">
<div class="modal-dialog modal-xl">
<div class="modal-content">
<div class="modal-header border-0"><button class="btn-close" type="button" data-bs-dismiss="modal" aria-label="Close"></button></div>
<div class="modal-body text-center pb-5">
<div class="container">
<div class="row justify-content-center">