Location: PHPKode > projects > HuMo-gen > address.php
<?php
$kop="adreslink";
include("header.php");
include ("menu.php");

// *** Check user ***
if ($user["adressen"]!='j'){
	echo $language["lng_no_authority"];
	exit();
}

include ("include/language_date.php");
include('include/person_cls.php');
	
print '<table class="humo bron">';
print "<tr><td><h2>".$language["address_address_link"]."</h2>";

@$adres=mysql_query("SELECT * FROM ".veilig($_SESSION['tree_prefix'])."addresses WHERE address_gedcomnr='".veilig($_GET['gedcomnummer'])."'",$db);
$adresDb=mysql_fetch_object($adres);

if (@$adresDb->address_address){ print "<b>".$language["address_address"]."</b> $adresDb->address_address<br>"; }
if (@$adresDb->address_zip){ print "<b>".$language["address_zip"]."</b> $adresDb->address_zip<br>"; }
if (@$adresDb->address_place){ print "<b>".$language["source_place"]."</b> $adresDb->address_place<br>"; }
if (@$adresDb->address_phone){ print "<b>".$language["address_phone"]."</b> $adresDb->address_phone<br>"; }
if (@$adresDb->address_text){ print '</td></tr><tr><td>'.nl2br($adresDb->address_text); }

// *** show pictures here ? ***
$persoon_cls = New persoon_cls;

print "</td></tr><tr><td>";

	// *** Find adress ***
	$vermeldingsql="SELECT * FROM ".veilig($_SESSION['tree_prefix'])."events WHERE event_kind='adres' AND event_source NOT LIKE ''";
	$vermeldingqry=mysql_query($vermeldingsql,$db);
	while (@$vermeldingDb=mysql_fetch_object($vermeldingqry)){
		//$bronid=explode(";",$vermeldingDb->bron);
		$bronid=$vermeldingDb->event_source;
		//for ($i=0; $i<=substr_count($vermeldingDb->bron, ';'); $i++){
			//if ($bronid[$i]==$bronDb->id){
			//if (substr($bronid,1,-1)==$adresDb->id){
			if (substr($bronid,1,-1)==$adresDb->address_gedcomnr){
				// *** Person address ***
				if ($vermeldingDb->event_person_id){
					$persoon=mysql_query("SELECT * FROM ".veilig($_SESSION['tree_prefix'])."person
						WHERE pers_gedcomnumber='$vermeldingDb->event_person_id'",$db);
					$personDb=mysql_fetch_object($persoon);
					//print 'Vermeldingen adres: <a href="gezin.php?id='.$personDb->pers_indexnr.'">';
					print $language["address_person"].' <a href="gezin.php?id='.$personDb->pers_indexnr.'&amp;hoofdpersoon='.$personDb->pers_gedcomnumber.'">';
					echo $persoon_cls->naam($personDb).'</a>';
					if ($vermeldingDb->event_event){ echo ' '.$vermeldingDb->event_event; }
					print '<br>';
				}
				// *** Family adress ***
				if ($vermeldingDb->event_family_id){
					print $language["address_family"].' <a href="gezin.php?id='.$vermeldingDb->event_family_id.'">';
					echo $vermeldingDb->event_family_id.'</a>';
					echo '<br>';
				}
			}
		//}
	}

	//mysql_close($db); // *** Close database ***

print "</td></tr></table>";
include("footer.php");
?>
Return current item: HuMo-gen