forked from HuubMons/HuMo-genealogy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaddress.php
48 lines (38 loc) · 1.8 KB
/
address.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
<?php
include_once("header.php");
include_once (CMS_ROOTPATH."menu.php");
// *** Check user ***
if ($user['group_addresses']!='j'){
echo __('You are not authorised to see this page.');
exit();
}
include_once(CMS_ROOTPATH."include/language_date.php");
include_once(CMS_ROOTPATH."include/person_cls.php");
print '<table class="humo standard">';
print "<tr><td><h2>".__('Address')."</h2>";
$addressDb = $db_functions->get_address($_GET['gedcomnumber']);
if (@$addressDb->address_address){ print "<b>".__('Address').":</b> $addressDb->address_address<br>"; }
if (@$addressDb->address_zip){ print "<b>".__('Zip code').":</b> $addressDb->address_zip<br>"; }
if (@$addressDb->address_place){ print "<b>".__('Place').":</b> $addressDb->address_place<br>"; }
if (@$addressDb->address_phone){ print "<b>".__('Phone').":</b>$addressDb->address_phone<br>"; }
if (@$addressDb->address_text){ print '</td></tr><tr><td>'.nl2br($addressDb->address_text); }
// *** show pictures here ? ***
$person_cls = New person_cls;
print "</td></tr><tr><td>";
// *** Search address in connections table ***
$event_qry = $db_functions->get_connections('person_address',$_GET['gedcomnumber']);
foreach($event_qry as $eventDb){
// *** Person address ***
if ($eventDb->connect_connect_id){
$personDb=$db_functions->get_person($eventDb->connect_connect_id);
$name=$person_cls->person_name($personDb);
print __('Address by person').': <a href="family.php?id='.$personDb->pers_indexnr.'&main_person='.$personDb->pers_gedcomnumber.'">';
echo $name["standard_name"].'</a>';
if ($eventDb->connect_role){ echo ' '.$eventDb->connect_role; }
print '<br>';
}
}
unset($event_qry); // *** If finished, remove data from memory ***
print "</td></tr></table>";
include_once(CMS_ROOTPATH."footer.php");
?>