-
Notifications
You must be signed in to change notification settings - Fork 1
/
read.php
19041 lines (13609 loc) · 561 KB
/
read.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 $mainscpage;
// Получить значение из GET параметра
if (isset($_GET['ml']) && $_GET['ml'] === 'on') {
// Чекбокс активен
$readerlang = "/sc/ml.html";
$mainscpage = "/sc/ml.html";
}
?>
<html lang="<?php echo $htmllang;?>" data-bs-theme="dark">
<head>
<meta charset="UTF-8">
<title><?php echo $maintitle;?></title>
<meta http-equiv="Cache-control" content="public">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="keywords" content="<?php echo $metakeywords;?>">
<meta name="description" content="<?php echo $metadesc;?>" />
<meta name="author" content="" />
<meta property="og:locale" content="<?php echo $oglocale;?>" />
<meta property="og:type" content="article" />
<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" itemprop="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/dhammafindlogo.webp" style="width:100px;"></a>
<a class="navbar-brand mobile-none" href="<?php echo $mainpage; ?>">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 showkeep 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 $mainpage;?>"><?php echo $menumain;?></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="/read.php">En</a>
<a class="link-light text-decoration-none py-1 px-0 px-lg-1 rounded" href="/ru/read.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="bg-primary text-white text-center">
<div class="container d-flex align-items-center flex-column pt-3 pb-3">
<form method="GET" action="" class="justify-content-center">
<div class="mb-0 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="text" style="width:230px;" 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 class="text-white input-group-append 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>
</div>
</div>
<script>
$(document).ready(function() {
// Обработчик для нажатия клавиши Enter
$(document).on('keydown', function(event) {
if (event.key === 'Enter') {
if (!$('#navbarResponsive').hasClass('showkeep')) {
$('#navbarResponsive').collapse('hide');
}
}
});
// Обработчик для отправки формы
$('#searchbtn').on('click', function() {
if (!$('#navbarResponsive').hasClass('showkeep')) {
$('#navbarResponsive').collapse('hide');
}
});
});
</script>
<div class="collapse" id="collapseSettings">
<div class="float-start">
<div class="align-items-center form-check-inline mt-2 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) && $p == "") echo "selected";?> ><?php echo "$liststd";?></option>
<option value="wordRep" <?php if (isset($extra) && $extra == "wordRep") echo "selected";?> ><?php echo "$listwords";?></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 style="max-width: 300px;" class="my-2">
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" id="onlCheckbox" name="extra" <?php if (isset($extra) && $extra=="-anyd ") echo "checked";?> value="-anyd">
<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 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;?>
<?php echo $defaults;?>
</p>
<script>
$(document).ready(function () {
function saveCollapseState(collapseId, isCollapsed) {
localStorage.setItem("coll_" + collapseId, isCollapsed);
}
function loadCollapseState(collapseId) {
var isCollapsed = localStorage.getItem("coll_" + collapseId) === "true";
return isCollapsed;
}
function handleCollapse(collapseId, isCollapsed) {
if (collapseId !== "navbarResponsive" && collapseId !== "collapseSettings") {
if (isCollapsed) {
$("#" + collapseId).collapse("show");
} else {
$("#" + collapseId).collapse("hide");
}
}
}
$(".collapse").on("shown.bs.collapse", function () {
saveCollapseState(this.id, true);
});
$(".collapse").on("hidden.bs.collapse", function () {
saveCollapseState(this.id, false);
});
$(".collapse").each(function () {
var isCollapsed = loadCollapseState(this.id);
handleCollapse(this.id, isCollapsed);
});
// Save and restore scroll position
var scrollPos = localStorage.getItem("scrollPos");
if (scrollPos) {
window.scrollTo(0, scrollPos);
}
$(window).on("beforeunload", function () {
localStorage.setItem("scrollPos", window.scrollY);
});
// Smooth scroll
$("a[href^='#']").on("click", function (e) {
e.preventDefault();
var target = $(this).attr("href");
$("html, body").animate({
scrollTop: $(target).offset().top
}, 1000, "easeInOutExpo");
});
});
</script>
<script src="/assets/js/smoothScroll.js" defer></script>
<script>
// autocomplete part
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();
});
// 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();
}
});
// Получаем кнопки для вставки букв
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>
<div style="max-width: 450px; display: none;" class='alert alert-warning alert-dismissible fade show container-lg mt-3 mb-1 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>
<div id="spinner" class="justify-content-center">
<div class="spinner-border mb-3" role="status">
<span class="visually-hidden">Loading...</span>
</div>
</div>
<script defer>
window.addEventListener('pageshow', function(event) {
if (event.persisted) {
// Событие pageshow возникает при возврате назад с помощью кнопки "назад" браузера
// Скрываем спиннер
document.getElementById('spinner').style.display = 'none';
}
});
</script>
<!-- extra options end -->
</form>
</header>
<!-- Portfolio Section-->
<section class="mt-3 portfolio">
<div class="container text-center">
<?php
if ( $lang == "ru" ) {
include 'assets/common/horizontalMenuRu.php';
} else {
include 'assets/common/horizontalMenuEn.php';
}
?>
<script>
window.onload = function() {
var queryString = window.location.search;
var urlParams = new URLSearchParams(queryString);
};
</script>
<script defer>
document.addEventListener('DOMContentLoaded', function() {
var hash = window.location.hash;
if (hash) {
var hashForInput = hash.replace(/#/, '');
var hashForInput = hashForInput.replace(/Collapse.*/, '');
if (/.*CollapseBi/.test(hash)) {
hashForInput = "bi-" + hashForInput;
}
document.getElementById('paliauto').value = hashForInput;
var clearBtn = document.getElementById('clearbtn');
clearBtn.style.display = 'block';
var element = document.getElementById(hash.substring(1));
if (element) {
var collapseTargets = [];
var currentCollapse = element.closest('.collapse');
while (currentCollapse) {
collapseTargets.push(currentCollapse);
currentCollapse = currentCollapse.parentElement.closest('.collapse');
}
collapseTargets.forEach(function(collapseTarget) {
var bsCollapse = new bootstrap.Collapse(collapseTarget, { toggle: false });
bsCollapse.show();
});
setTimeout(function() {
element.scrollIntoView({ behavior: 'smooth' });
}, 1000);
}
}
});
</script>
<div style="max-width: 450px;" class="container-lg my-4">
<div class="container text-start input-group-append " >
<div class="level1 d-flex align-items-center">
<span class="toggle-button btn btn-primary btn-sm form-check-inline btn-fixed-width btn-rotate"
data-bs-toggle="collapse" id="collapseAll">+</span>
<h2 style="level1">Dhamma</h2>
</div>
<div class="my-2">
<div class="level1">
<h2><a href=# data-bs-toggle="collapse"
data-bs-target="#dnCollapse">Dīgha Nikāya</a></h2>
</div>
<div class="collapse right-text reverse-order" id="dnCollapse">
<div class="my-3">
<div class="level4 my-3">
<h5>Sīlakkhandhavagga</h5>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=dn1">dn1</a> Brahmajālasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=dn2">dn2</a> Sāmaññaphalasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=dn3">dn3</a> Ambaṭṭhasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=dn4">dn4</a> Soṇadaṇḍasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=dn5">dn5</a> Kūṭadantasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=dn6">dn6</a> Mahālisutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=dn7">dn7</a> Jāliyasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=dn8">dn8</a> Mahāsīhanādasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=dn9">dn9</a> Poṭṭhapādasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=dn10">dn10</a> Subhasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=dn11">dn11</a> Kevaṭṭasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=dn12">dn12</a> Lohiccasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=dn13">dn13</a> Tevijjasutta</span>
</div>
</div> <!-- close prev vagga div -->
<div class="my-3">
<div class="level4 my-3">
<h5>Mahāvagga</h5>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=dn14">dn14</a> Mahāpadānasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=dn15">dn15</a> Mahānidānasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=dn16">dn16</a> Mahāparinibbānasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=dn17">dn17</a> Mahāsudassanasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=dn18">dn18</a> Janavasabhasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=dn19">dn19</a> Mahāgovindasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=dn20">dn20</a> Mahāsamayasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=dn21">dn21</a> Sakkapañhasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=dn22">dn22</a> Mahāsatipaṭṭhānasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=dn23">dn23</a> Pāyāsisutta</span>
</div>
</div> <!-- close prev vagga div -->
<div class="my-3">
<div class="level4 my-3">
<h5>Pāthikavagga</h5>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=dn24">dn24</a> Pāthikasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=dn25">dn25</a> Udumbarikasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=dn26">dn26</a> Cakkavattisutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=dn27">dn27</a> Aggaññasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=dn28">dn28</a> Sampasādanīyasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=dn29">dn29</a> Pāsādikasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=dn30">dn30</a> Lakkhaṇasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=dn31">dn31</a> Siṅgālasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=dn32">dn32</a> Āṭānāṭiyasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=dn33">dn33</a> Saṅgītisutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=dn34">dn34</a> Dasuttarasutta</span>
</div>
</div> <!-- Nikaya collapse -->
</div> <!-- Nikaya title + Nikaya collapse inside -->
</div> <!-- Container -->
<div class="my-2">
<div class="level1">
<h2><a href=# data-bs-toggle="collapse"
data-bs-target="#mnCollapse">Majjhima Nikāya</a></h2>
</div>
<div class="collapse right-text reverse-order" id="mnCollapse">
<div class="level2">
<h3><a href=# data-bs-toggle="collapse" data-bs-target="#mn1Collapse">Mūlapaṇṇāsaka</a></h3>
</div>
<div class="collapse" id="mn1Collapse">
<div class="my-3">
<div class="my-3">
<div class="level4 my-3">
<h5>Mūlapariyāyavagga</h5>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn1">mn1</a> Mūlapariyāyasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn2">mn2</a> Sabbāsavasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn3">mn3</a> Dhammadāyādasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn4">mn4</a> Bhayabheravasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn5">mn5</a> Anaṅgaṇasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn6">mn6</a> Ākaṅkheyyasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn7">mn7</a> Vatthasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn8">mn8</a> Sallekhasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn9">mn9</a> Sammādiṭṭhisutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn10">mn10</a> Satipaṭṭhānasutta</span>
</div>
</div> <!-- close prev vagga div -->
<div class="my-3">
<div class="level4 my-3">
<h5>Sīhanādavagga</h5>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn11">mn11</a> Cūḷasīhanādasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn12">mn12</a> Mahāsīhanādasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn13">mn13</a> Mahādukkhakkhandhasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn14">mn14</a> Cūḷadukkhakkhandhasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn15">mn15</a> Anumānasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn16">mn16</a> Cetokhilasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn17">mn17</a> Vanapatthasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn18">mn18</a> Madhupiṇḍikasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn19">mn19</a> Dvedhāvitakkasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn20">mn20</a> Vitakkasaṇṭhānasutta</span>
</div>
</div> <!-- close prev vagga div -->
<div class="my-3">
<div class="level4 my-3">
<h5>Opammavagga</h5>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn21">mn21</a> Kakacūpamasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn22">mn22</a> Alagaddūpamasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn23">mn23</a> Vammikasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn24">mn24</a> Rathavinītasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn25">mn25</a> Nivāpasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn26">mn26</a> Pāsarāsisutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn27">mn27</a> Cūḷahatthipadopamasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn28">mn28</a> Mahāhatthipadopamasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn29">mn29</a> Mahāsāropamasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn30">mn30</a> Cūḷasāropamasutta</span>
</div>
</div> <!-- close prev vagga div -->
<div class="my-3">
<div class="level4 my-3">
<h5>Mahāyamakavagga</h5>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn31">mn31</a> Cūḷagosiṅgasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn32">mn32</a> Mahāgosiṅgasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn33">mn33</a> Mahāgopālakasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn34">mn34</a> Cūḷagopālakasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn35">mn35</a> Cūḷasaccakasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn36">mn36</a> Mahāsaccakasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn37">mn37</a> Cūḷataṇhāsaṅkhayasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn38">mn38</a> Mahātaṇhāsaṅkhayasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn39">mn39</a> Mahāassapurasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn40">mn40</a> Cūḷaassapurasutta</span>
</div>
</div> <!-- close prev vagga div -->
<div class="my-3">
<div class="level4 my-3">
<h5>Cūḷayamakavagga</h5>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn41">mn41</a> Sāleyyakasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn42">mn42</a> Verañjakasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn43">mn43</a> Mahāvedallasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn44">mn44</a> Cūḷavedallasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn45">mn45</a> Cūḷadhammasamādānasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn46">mn46</a> Mahādhammasamādānasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn47">mn47</a> Vīmaṁsakasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn48">mn48</a> Kosambiyasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn49">mn49</a> Brahmanimantanikasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn50">mn50</a> Māratajjanīyasutta</span>
</div>
</div> <!-- my-3 inside nipata collapse close prev my div -->
</div> <!-- nipata collapse close prev nipata div -->
</div> <!-- nipata collapse close prev nipata div -->
<div class="level2">
<h3><a href=# data-bs-toggle="collapse" data-bs-target="#mn2Collapse">Majjhimapaṇṇāsaka</a></h3>
</div>
<div class="collapse" id="mn2Collapse">
<div class="my-3">
</div> <!-- close prev vagga div -->
<div class="my-3">
<div class="level4 my-3">
<h5>Gahapativagga</h5>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn51">mn51</a> Kandarakasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn52">mn52</a> Aṭṭhakanāgarasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn53">mn53</a> Sekhasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn54">mn54</a> Potaliyasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn55">mn55</a> Jīvakasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn56">mn56</a> Upālisutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn57">mn57</a> Kukkuravatikasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn58">mn58</a> Abhayarājakumārasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn59">mn59</a> Bahuvedanīyasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn60">mn60</a> Apaṇṇakasutta</span>
</div>
</div> <!-- close prev vagga div -->
<div class="my-3">
<div class="level4 my-3">
<h5>Bhikkhuvagga</h5>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn61">mn61</a> Ambalaṭṭhikarāhulovādasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn62">mn62</a> Mahārāhulovādasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn63">mn63</a> Cūḷamālukyasutta</span>
</div>
<div class="mt-3">
<span class="level5"><a href="<?php echo $mainscpage;?>?q=mn64">mn64</a> Mahāmālukyasutta</span>