/
list_places_families.php
614 lines (516 loc) · 21.8 KB
/
list_places_families.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
<?php
/*
* This index list for places by families was a copy of index list by persons.
* Maybe it's possible to combine these two lists later, but processing is different.
* At this moment it's easier to just make a second index list...
*
* sep. 2014 Huub: added this script to HuMo-gen.
*/
include_once("header.php"); //returns CMS_ROOTPATH constant
include_once(CMS_ROOTPATH."include/language_date.php");
include_once(CMS_ROOTPATH."include/date_place.php");
include_once(CMS_ROOTPATH."include/person_cls.php");
include_once(CMS_ROOTPATH."include/marriage_cls.php");
error_reporting(E_ALL);
@set_time_limit(300);
// *** show person ***
function show_person($familyDb){
global $dbh, $db_functions, $tree_id, $selected_place, $language, $user;
global $bot_visit, $humo_option, $uri_path, $search_database, $list_expanded;
global $selected_language, $privacy, $dirmark1, $dirmark2, $rtlmarker;
global $select_marriage_notice, $select_marriage, $select_marriage_notice_religious, $select_marriage_religious;
if ($familyDb->fam_man)
$selected_person1=$familyDb->fam_man;
else
$selected_person1=$familyDb->fam_woman;
$personDb = $db_functions->get_person($selected_person1);
$pers_tree_prefix=$personDb->pers_tree_prefix;
//if (CMS_SPECIFIC=='Joomla'){
// $start_url='index.php?option=com_humo-gen&task=family&database='.$pers_tree_prefix.
// '&id='.$personDb->pers_indexnr.'&main_person='.$personDb->pers_gedcomnumber;
//}
//else
if ($humo_option["url_rewrite"]=="j"){ // *** url_rewrite ***
// *** $uri_path made in header.php ***
$start_url= $uri_path.'family/'.$pers_tree_prefix.'/'.$personDb->pers_indexnr.'/'.$personDb->pers_gedcomnumber.'/';
}
else{
$start_url=CMS_ROOTPATH.'family.php?database='.$pers_tree_prefix.'&id='.$personDb->pers_indexnr.'&main_person='.$personDb->pers_gedcomnumber;
}
// *** Person class used for name and person pop-up data ***
$person_cls = New person_cls;
$person_cls->construct($personDb);
$privacy=$person_cls->privacy;
$name=$person_cls->person_name($personDb);
// *** Show name ***
$index_name='';
if ($name["show_name"]==false){
$index_name=__('Name filtered');
}
else{
// *** If there is no lastname, show a - character. ***
if ($personDb->pers_lastname==""){
// Don't show a "-" by pers_patronymes
if (!isset($_GET['pers_patronym'])){ $index_name="- "; }
}
$index_name.=$name["index_name_extended"].$name["colour_mark"];
}
// *** Show extra colums before a person in index places ***
if ($selected_place!=$familyDb->place_order)
echo '<td colspan="7"><b>'.$dirmark2."$familyDb->place_order</b></td></tr><tr>";
$selected_place=$familyDb->place_order;
echo '<td valign="top" style="white-space:nowrap;width:90px">';
if ($select_marriage_notice=='1'){
if ($selected_place==$familyDb->fam_marr_notice_place)
echo '<span class="place_index place_index_selected">'.__('∞').'</span>';
else
echo '<span class="place_index"> </span>';
}
if ($select_marriage_notice_religious=='1'){
if ($selected_place==$familyDb->fam_marr_church_notice_place)
echo '<span class="place_index place_index_selected">'.__('o').'</span>';
else
echo '<span class="place_index"> </span>';
}
if ($select_marriage=='1'){
if ($selected_place==$familyDb->fam_marr_place)
echo '<span class="place_index place_index_selected">'.__('X').'</span>';
else
echo '<span class="place_index"> </span>';
}
if ($select_marriage_religious=='1'){
if ($selected_place==$familyDb->fam_marr_church_place)
echo '<span class="place_index place_index_selected">'.__('x').'</span>';
else
echo '<span class="place_index"> </span>';
}
echo '</td>';
echo '<td valign="top" style="border-right:0px; white-space:nowrap;">';
// *** Show person popup menu ***
echo $person_cls->person_popup_menu($personDb);
// *** Show picture man or wife ***
if ($personDb->pers_sexe=="M")
echo $dirmark1.' <img src="'.CMS_ROOTPATH.'images/man.gif" alt="man" style="vertical-align:top">';
elseif ($personDb->pers_sexe=="F")
echo $dirmark1.' <img src="'.CMS_ROOTPATH.'images/woman.gif" alt="woman" style="vertical-align:top">';
else
echo $dirmark1.' <img src="'.CMS_ROOTPATH.'images/unknown.gif" alt="unknown" style="vertical-align:top">';
echo '</td><td style="border-left:0px;">';
// *** Show name of person ***
echo ' <a href="'.$start_url.'">'.rtrim($index_name).'</a>';
//*** Show spouse/ partner ***
if ($list_expanded==true AND $personDb->pers_fams){
$marriage_array=explode(";",$personDb->pers_fams);
// *** Code to show only last marriage ***
$nr_marriages=count($marriage_array);
for ($x=0; $x<=$nr_marriages-1; $x++){
$fam_partnerDb = $db_functions->get_family($marriage_array[$x]);
// *** This check is better then a check like: $personDb->pers_sexe=='F', because of unknown sexe or homosexual relations. ***
if ($personDb->pers_gedcomnumber==$fam_partnerDb->fam_man)
$partner_id=$fam_partnerDb->fam_woman;
else
$partner_id=$fam_partnerDb->fam_man;
$relation_short=__('&');
if ($fam_partnerDb->fam_marr_date OR $fam_partnerDb->fam_marr_place OR $fam_partnerDb->fam_marr_church_date OR $fam_partnerDb->fam_marr_church_place)
$relation_short=__('X');
if($fam_partnerDb->fam_div_date OR $fam_partnerDb->fam_div_place)
$relation_short=__(') (');
if ($partner_id!='0' AND $partner_id!=''){
$partnerDb = $db_functions->get_person($partner_id);
$partner_cls = New person_cls;
$privacy2=$person_cls->privacy;
$name=$partner_cls->person_name($partnerDb);
}
else{
$name["standard_name"]=__('N.N.');
}
if ($nr_marriages>1) echo ',';
if (@$partnerDb->pers_gedcomnumber!=$familyDb->fam_woman){
// *** Show actual relation/ marriage in special font ***
echo ' <span class="index_partner" style="font-size:10px;">';
}
else echo ' ';
if ($nr_marriages>1){
if ($x==0) echo __('1st');
elseif ($x==1) echo ' '.__('2nd');
elseif ($x==2) echo ' '.__('3rd');
elseif ($x>2) echo ' '.($x+1).__('th');
}
echo ' '.$relation_short.' '.rtrim($name["standard_name"]);
if (@$partnerDb->pers_gedcomnumber!=$familyDb->fam_woman)
echo '</span>';
}
}
// *** End spouse/ partner ***
echo '</td><td style="white-space:nowrap;">';
$info="";
if ($familyDb->fam_marr_church_notice_date)
$info=__('o').' '.date_place($familyDb->fam_marr_church_notice_date, '');
if ($familyDb->fam_marr_notice_date)
$info=__('∞').' '.date_place($familyDb->fam_marr_notice_date, '');
//echo "<span style='font-size:90%'>".$info.$dirmark1."</span>";
if ($privacy==1 and $info) echo ' '.__('PRIVACY FILTER');
else echo $info;
echo '</td><td>';
$info="";
if ($familyDb->fam_marr_church_notice_place)
$info=__('o').' '.$familyDb->fam_marr_church_notice_place;
if ($familyDb->fam_marr_notice_place)
$info=__('∞').' '.$familyDb->fam_marr_notice_place;
if ($privacy==1 and $info) echo ' '.__('PRIVACY FILTER');
else echo $info;
echo '</td><td style="white-space:nowrap;">';
$info="";
if ($familyDb->fam_marr_church_date)
$info=__('x').' '.date_place($familyDb->fam_marr_church_date, '');
if ($familyDb->fam_marr_date)
$info=__('X').' '.date_place($familyDb->fam_marr_date, '');
if ($privacy==1 and $info) echo ' '.__('PRIVACY FILTER');
else echo $info;
echo '</td><td>';
$info="";
if ($familyDb->fam_marr_church_place)
$info=__('x').' '.$familyDb->fam_marr_church_place;
if ($familyDb->fam_marr_place)
$info=__('X').' '.$familyDb->fam_marr_place;
if ($privacy==1 and $info) echo ' '.__('PRIVACY FILTER');
else echo $info;
echo '</td></tr>';
} // *** end function show person ***
//************* SORT CHOICES *********************
$make_date=''; // we only need this when sorting by date
$desc_asc=" ASC "; $sort_desc=0;
if(isset($_SESSION['sort_desc'])) {
if($_SESSION['sort_desc'] == 1){ $desc_asc=" DESC "; $sort_desc=1; }
else{ $desc_asc=" ASC "; $sort_desc=0; }
}
if(isset($_GET['sort_desc'])) {
if($_GET['sort_desc'] == 1) { $desc_asc=" DESC "; $sort_desc=1; $_SESSION['sort_desc']=1; }
else { $desc_asc=" ASC "; $sort_desc=0; $_SESSION['sort_desc']=0; }
}
// *** For index places ***
$place_name='';
$select_marriage_notice='0'; $select_marriage='0'; $select_place='0'; $select_marriage_notice_religious='0'; $select_marriage_religious='0';
if (isset($_POST['place_name'])){
$place_name=$_POST['place_name'];
//$place_name=htmlentities($_POST['place_name'],ENT_QUOTES,'UTF-8');
$_SESSION["save_place_name"]=$place_name;
if (isset($_POST['select_marriage_notice'])){ $select_marriage_notice='1'; $_SESSION["save_select_marriage_notice"]='1'; }
else{ $_SESSION["save_select_marriage_notice"]='0'; }
if (isset($_POST['select_marriage'])){ $select_marriage='1'; $_SESSION["save_select_marriage"]='1'; }
else{ $_SESSION["save_select_marriage"]='0'; }
if (isset($_POST['select_place'])){ $select_place='1'; $_SESSION["save_select_place"]='1'; }
else{ $_SESSION["save_select_place"]='0'; }
if (isset($_POST['select_marriage_notice_religious'])){ $select_marriage_notice_religious='1'; $_SESSION["save_select_marriage_notice_religious"]='1'; }
else{ $_SESSION["save_select_marriage_notice_religious"]='0'; }
if (isset($_POST['select_marriage_religious'])){ $select_marriage_religious='1'; $_SESSION["save_select_marriage_religious"]='1'; }
else{ $_SESSION["save_select_marriage_religious"]='0'; }
}
$part_place_name='';
if (isset($_POST['part_place_name'])){
$part_place_name=$_POST['part_place_name'];
$_SESSION["save_part_place_name"]=$part_place_name;
}
// *** Search for places in birth-baptise-died places etc. ***
if (isset($_SESSION["save_place_name"])) $place_name=$_SESSION["save_place_name"];
if (isset($_SESSION["save_part_place_name"])) $part_place_name=$_SESSION["save_part_place_name"];
// *** Enable select boxes ***
if (isset($_GET['reset'])){
$select_marriage_notice='1'; $_SESSION["save_select_marriage_notice"]='1';
$select_marriage='1'; $_SESSION["save_select_marriage"]='1';
$select_marriage_notice_religious='1'; $_SESSION["save_select_marriage_notice_religious"]='1';
$select_marriage_religious='1'; $_SESSION["save_select_marriage_religious"]='1';
}
else{
// *** Read and set select boxes for multiple pages ***
if (isset($_SESSION["save_select_marriage_notice"])){ $select_marriage_notice=$_SESSION["save_select_marriage_notice"]; }
if (isset($_SESSION["save_select_marriage"])){ $select_marriage=$_SESSION["save_select_marriage"]; }
if (isset($_SESSION["save_select_marriage_notice_religious"])){ $select_marriage_notice_religious=$_SESSION["save_select_marriage_notice_religious"]; }
if (isset($_SESSION["save_select_marriage_religious"])){ $select_marriage_religious=$_SESSION["save_select_marriage_religious"]; }
}
// *** Search for (part of) first or lastname ***
function name_qry($search_name, $search_part){
$text="LIKE '%".safe_text($search_name)."%'"; // *** Default value: "contains" ***
if ($search_part=='equals'){ $text="='".safe_text($search_name)."'"; }
if ($search_part=='starts_with'){ $text="LIKE '".safe_text($search_name)."%'"; }
return $text;
}
// *******************
// *** BUILD QUERY ***
// *******************
$query='';
$count_qry='';
//*** Places index ***
// *** EXAMPLE of a UNION querie ***
//$qry = "(SELECT * FROM humo1_person ".$query.') ';
//$qry.= " UNION (SELECT * FROM humo2_person ".$query.')';
//$qry.= " ORDER BY pers_lastname, pers_firstname";
$query='';
$start=false;
// *** Search marriage place ***
if ($select_marriage=='1'){
$query = "(SELECT SQL_CALC_FOUND_ROWS *, fam_marr_place as place_order
FROM humo_families";
if($place_name)
$query.= " WHERE fam_tree_id='".$tree_id."' AND fam_marr_place ".name_qry($place_name,$part_place_name);
else
$query.= " WHERE fam_tree_id='".$tree_id."' AND fam_marr_place LIKE '_%'";
$query.=')';
$start=true;
}
// *** Search marriage church place ***
if ($select_marriage_religious=='1'){
if ($start==true){
$query.=' UNION '; $calc='';
}
else{
$calc='SQL_CALC_FOUND_ROWS ';
}
$query.= "(SELECT ".$calc."*, fam_marr_church_place as place_order
FROM humo_families";
if($place_name)
$query.= " WHERE fam_tree_id='".$tree_id."' AND fam_marr_church_place ".name_qry($place_name,$part_place_name);
else
$query.= " WHERE fam_tree_id='".$tree_id."' AND fam_marr_church_place LIKE '_%'";
$query.=')';
$start=true;
}
// *** Search marriage notice place ***
if ($select_marriage_notice=='1'){
if ($start==true){
$query.=' UNION '; $calc='';
}
else{
$calc='SQL_CALC_FOUND_ROWS ';
}
$query.= "(SELECT ".$calc."*, fam_marr_notice_place as place_order
FROM humo_families";
if($place_name)
$query.= " WHERE fam_tree_id='".$tree_id."' AND fam_marr_notice_place ".name_qry($place_name,$part_place_name);
else
$query.= " WHERE fam_tree_id='".$tree_id."' AND fam_marr_notice_place LIKE '_%'";
$query.=')';
$start=true;
}
// *** Search marriage notice place ***
if ($select_marriage_notice_religious=='1'){
if ($start==true){
$query.=' UNION '; $calc='';
}
else{
$calc='SQL_CALC_FOUND_ROWS ';
}
$query.= "(SELECT ".$calc."*, fam_marr_church_notice_place as place_order
FROM humo_families";
if($place_name)
$query.= " WHERE fam_tree_id='".$tree_id."' AND fam_marr_church_notice_place ".name_qry($place_name,$part_place_name);
else
$query.= " WHERE fam_tree_id='".$tree_id."' AND fam_marr_church_notice_place LIKE '_%'";
$query.=')';
$start=true;
}
// *** Order by place and marriage date ***
$query.=' ORDER BY place_order, substring(fam_marr_date,-4)';
// **************************
// *** Generate indexlist ***
// **************************
include_once(CMS_ROOTPATH."menu.php");
//*** Show number of persons and pages *****************************************
$item=0; if (isset($_GET['item'])){ $item=$_GET['item']; }
$start=0; if (isset($_GET["start"])){ $start=$_GET["start"]; }
$nr_persons=$humo_option['show_persons'];
$person_result = $dbh->query($query." LIMIT ".$item.",".$nr_persons);
if ($count_qry){
// *** Use COUNT command to calculate nr. of persons in simple queries (faster than php num_rows and in simple queries faster than SQL_CAL_FOUND_ROWS) ***
$result= $dbh->query($count_qry);
@$resultDb = $result->fetch(PDO::FETCH_OBJ);
$count_persons=@$resultDb->teller;
}
else{
// *** USE SQL_CALC_FOUND_ROWS for complex queries (faster than mysql count) ***
$result = $dbh->query("SELECT FOUND_ROWS() AS 'found_rows'");
$rows = $result->fetch();
$count_persons = $rows['found_rows'];
}
//if (CMS_SPECIFIC=='Joomla'){
// $list_var = 'index.php?option=com_humo-gen&task=list'; // for use without query string
// $list_var2 = 'index.php?option=com_humo-gen&task=list&'; // for use with query string
//}
//else {
$list_var = CMS_ROOTPATH.'list_places_families.php';
$list_var2 = CMS_ROOTPATH.'list_places_families.php?';
//}
//if ($index_list=='places'){
//echo '<div class="index_list1">';
if($language['dir']=="ltr") {
echo '<div class="left_box" style="width:150px;">';
}
else {
echo '<div class="right_box" style="width:150px;">';
}
//************** search places **************************************
//echo ' <form method="post" action="'.$list_var.'" style="display : inline;">';
echo ' <form method="post" action="'.$list_var.'">';
echo __('Find place').':';
$checked=''; if ($select_marriage_notice=='1'){$checked='checked';}
echo '<p><input type="Checkbox" name="select_marriage_notice" value="1" '.$checked.'> '.__('∞').' '.lcfirst(__('Marriage notice')).'<br>';
$checked=''; if ($select_marriage_notice_religious=='1'){$checked='checked';}
echo '<input type="Checkbox" name="select_marriage_notice_religious" value="1" '.$checked.'> '.__('o').' '.lcfirst(__('Married notice (religious)')).'<br>';
$checked=''; if ($select_marriage=='1'){$checked='checked';}
echo '<br><input type="Checkbox" name="select_marriage" value="1" '.$checked.'> '.__('X').' '.__('marriage').'<br>';
$checked=''; if ($select_marriage_religious=='1'){$checked='checked';}
echo '<input type="Checkbox" name="select_marriage_religious" value="1" '.$checked.'> '.__('x').' '.lcfirst(__('Married (religious)'));
echo '<p><select name="part_place_name">';
echo '<option value="contains">'.__('Contains').'</option>';
$select_item=''; if ($part_place_name=='equals'){ $select_item=' selected'; }
echo '<option value="equals"'.$select_item.'>'.__('Equals').'</option>';
$select_item=''; if ($part_place_name=='starts_with'){ $select_item=' selected'; }
echo '<option value="starts_with"'.$select_item.'>'.__('Starts with').'</option>';
echo '</select>';
echo '<p><input type="text" name="place_name" value="'.$place_name.'" size="15"><br>';
echo '<p><input type="submit" value="'.__('Search').'" name="B1">';
echo '</form>';
//***************** end search of places **********************************
echo '</div>';
//}
if (CMS_SPECIFIC=='Joomla'){ $uri_path_string = "index.php?option=com_humo-gen&task=list&"; }
else { $uri_path_string = $uri_path."list_places_families.php?"; }
// *** Check for search results ***
if (@$person_result->rowCount()==0) {
$line_pages='';
//echo '<br><div class="center">'.__('No names found.').'</div>';
}
else{
$line_pages=__('Page');
// "<="
if ($start>1){
$start2=$start-20;
$calculated=($start-2)*$nr_persons;
$line_pages.= ' <a href="'.$uri_path_string.
"&start=".$start2.
"&item=".$calculated.
'"><= </a>';
}
if ($start<=0){$start=1;}
// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
for ($i=$start; $i<=$start+19; $i++) {
$calculated=($i-1)*$nr_persons;
if ($calculated<$count_persons){
if ($item==$calculated){
$line_pages.= " <b>$i</b>";
}
else {
$line_pages.= ' <a href="'.$uri_path_string.
"&start=".$start.
"&item=".$calculated.
'"> '.$i.'</a>';
}
}
}
// "=>"
$calculated=($i-1)*$nr_persons;
if ($calculated<$count_persons){
$line_pages.= ' <a href="'.$uri_path_string.
"&start=".$i.
"&item=".$calculated.
'"> =></a>';
}
}
echo '<div class="index_list1">';
// *** Don't use this code if search is done with partner ***
//if(!$selection['spouse_firstname'] AND !$selection['spouse_lastname']) {
echo $count_persons.' '.__('families found.');
//}
// *** Normal or expanded list ***
if (isset($_POST['list_expanded'])){
if ($_POST['list_expanded']=='0'){
$_SESSION['save_list_expanded']='0';
}
else{
$_SESSION['save_list_expanded']='1';
}
}
global $list_expanded; // for joomla
$list_expanded=true; // *** Default value ***
if (isset($_SESSION['save_list_expanded'])){
if ($_SESSION['save_list_expanded']=='1')
$list_expanded=true;
else $list_expanded=false;
}
// *** Button: normal or expanded list ***
$button_line= "item=".$item; // the ? or & is already included in the $uri_path_string created above
if (isset($_GET['start'])){
$button_line.= "&start=".$_GET['start'];
}
else{
$button_line.= "&start=1";
}
//$button_line.= "&index_list=".$index_list;
echo ' <form method="POST" action="'.$uri_path_string.$button_line.'" style="display : inline;">';
if ($list_expanded==true){
echo '<input type="hidden" name="list_expanded" value="0">';
echo '<input type="Submit" name="submit" value="'.__('Concise view').'">';
}
else{
echo '<input type="hidden" name="list_expanded" value="1">';
echo '<input type="Submit" name="submit" value="'.__('Expanded view').'">';
}
echo '</form>';
echo ' '.$line_pages.'<br><br>';
// *** No results ***
if ($person_result->rowCount()==0) {
echo '<br><div class="center">'.__('No names found.').'</div>';
}
echo '</div>';
$dir="";
if($language["dir"]=="rtl") {
$dir="rtl"; // loads the proper CSS for rtl display (rtlindex_list2):
}
// with extra sort date column, set smaller left margin
$listnr="2"; // default 20% margin
//if($index_list != "places" AND ($selectsort=='sort_birthdate' OR $selectsort=='sort_deathdate' OR $selectsort=='sort_baptdate' OR $selectsort=='sort_burieddate')) {
// $listnr="3"; // 5% margin
//}
//echo '<div class="'.$dir.'index_list'.$listnr.'">';
//*** Show persons ******************************************************************
$privcount=0; // *** Count privacy persons ***
$selected_place="";
// *** Table to hold left sort date column (when necessary) and right person list column ***
echo '<table class="humo index_table" align="center">';
echo '<tr class=table_headline>';
echo '<th>'.__('Places').'</th>';
echo '<th colspan="2">'.__('Family').'</th>';
echo '<th colspan="2" width="280px">'.ucfirst(__('Married notice (religious)')).'</th>';
echo '<th colspan="2" width="280px">'.ucfirst(__('Married (religious)')).'</th>';
echo '</tr>';
while (@$familyDb = $person_result->fetch(PDO::FETCH_OBJ)) {
// *** Man privacy filter ***
$personDb=$db_functions->get_person($familyDb->fam_man);
// *** Person class used for name and person pop-up data ***
$man_cls = New person_cls;
$man_cls->construct($personDb);
// *** Woman privacy filter ***
$personDb=$db_functions->get_person($familyDb->fam_woman);
// *** Person class used for name and person pop-up data ***
$woman_cls = New person_cls;
$woman_cls->construct($personDb);
// *** Proces marriage using a class ***
$marriage_cls = New marriage_cls;
$marriage_cls->construct($familyDb, $man_cls->privacy, $woman_cls->privacy);
$family_privacy=$marriage_cls->privacy;
// *** $family_privacy='1' = filter ***
if ($family_privacy)
$privcount++;
else
show_person($familyDb);
}
echo '</table>';
if($privcount) { echo "<br>".$privcount.__(' persons are not shown due to privacy settings').".<br>";}
echo '<br><div class="index_list1">'.$line_pages.'</div>';
//for testing only:
//echo 'Query: '.$query." LIMIT ".safe_text($item).",".$nr_persons.'<br>';
//echo 'Count qry: '.$count_qry.'<br>';
//echo '<p>index_list: '.$index_list;
//echo '<br>nr. of persons: '.$count_persons;
include_once(CMS_ROOTPATH."footer.php");
?>