Location: PHPKode > projects > HuMo-gen > gendex.php
<?php
header ('Content-type: text/plain; charset=iso-8859-1');
//session_start();
	
// ***************************************************
// *** Privacy persoon                             ***
// ***************************************************
function privacypersoon($persoon){
	$privacypersoon="";
	$privacypersoon=$persoon->pers_alive;
	if (substr($persoon->pers_birth_date,-4) > '1920'){ $privacypersoon="1"; }
	if (substr($persoon->pers_bapt_date,-4) > '1920'){ $privacypersoon="1"; }
	if ($persoon->pers_death_date or $persoon->pers_death_place){ $privacypersoon=""; }
	if ($persoon->pers_buried_date or $persoon->pers_buried_place){ $privacypersoon=""; }
	return $privacypersoon;
}

include("include/db_login.php"); //Inloggen database.
include("include/safe.php"); //Variabelen

// *** Database ***
$datasql = mysql_query("SELECT * FROM humo_trees ORDER BY tree_order",$db);
$num_rows = mysql_num_rows($datasql);
while (@$dataDb=mysql_fetch_object($datasql)){
	$persoon=mysql_query("SELECT * FROM ".veilig($dataDb->tree_prefix)."person
		ORDER BY pers_lastname",$db);

	//GENDEX:
	//persoons-URL|FAMILIENAAM|Voornaam /FAMILIENAAM/|
	//Geboortedatum|Geboortplaats|Overlijdenstatum|Overlijdensplaats|
	while (@$personDb=mysql_fetch_object($persoon)){

		$person_url=$personDb->pers_indexnr;
		if ($person_url==''){
			if($personDb->pers_famc){
				// *** Person without own family ***
				$person_url=$personDb->pers_famc;
			}
			else{
				// *** Person without parents or own family ***	
				$person_url='&hoofdpersoon='.$personDb->pers_gedcomnumber;
			}
		}

		$tekst=$person_url.'&database='.$dataDb->tree_prefix.'|';
		//$pers_lastname=strtoupper(html_entity_decode($personDb->pers_lastname));
		$pers_lastname=strtoupper($personDb->pers_lastname);
		$tekst.=$pers_lastname.'|';
		$tekst.=$personDb->pers_firstname.' /'.$pers_lastname.'/|';
		$privacy=privacypersoon($personDb);
		if (!$privacy){

			$gebgeddatum="";
			if ($personDb->pers_bapt_date){ $gebgeddatum=$personDb->pers_bapt_date; }
			if ($personDb->pers_birth_date){ $gebgeddatum=$personDb->pers_birth_date; }
			$tekst.=$gebgeddatum.'|';

			$gebgedplaats="";
			if ($personDb->pers_bapt_place){ $gebgedplaats=$personDb->pers_bapt_place; }
			if ($personDb->pers_birth_place){ $gebgedplaats=$personDb->pers_birth_place; }
			$tekst.=$gebgedplaats.'|';

			$ovlbegrdatum="";
			if ($personDb->pers_death_date){ $ovlbegrdatum=$personDb->pers_death_date; }
			if ($personDb->pers_buried_date){ $ovlbegrdatum=$personDb->pers_buried_date; }
			$tekst.=$ovlbegrdatum.'|';

			$ovlbegrplaats="";
			if ($personDb->pers_death_place){ $ovlbegrplaats=$personDb->pers_death_place; }
			if ($personDb->pers_buried_place){ $ovlbegrplaats=$personDb->pers_buried_place; }
			$tekst.=$ovlbegrplaats.'|';

		}
		else{
			$tekst.='||||';
		}
		//echo html_entity_decode($tekst)."\r\n";
		echo $tekst."\r\n";
	}
}
?>
Return current item: HuMo-gen