Utility ~ The Next Generation (TNG)

Description

The Next Generation of Genealogy Sitebuilding© (TNG) is a powerful way to manage and display your genealogy data on your own web site, all without generating a single page of static HTML. Instead, your information is stored in MySQL database tables and dynamically displayed in attractive fashion with PHP. If your web server supports MySQL and PHP, you can set up and run TNG with very little effort.

See http://lythgoes.net/genealogy/software.php for more details.

In many ways TNG is very similar to the free Utility ~ PhpGedView and Utility ~ WordPress.

TNG is supported by the Export Gedcom File Plugin.

Installation Instructions

Click on the link below and follow the Purchase link to obtain the download and installation instructions.

Download

Setting the Living Flag

When importing the Gedcom TNG will try to set the living flags from the dates in the file. To set the Living flags to match those in your fh file. There are a couple of utilities available.

Download and install this query Living Record IDs For TNG

Download the php script below and add to your TNG program folder.

Once installed call it. It will prompt for the name of the Gedcom and a list of IDs.

To get the list of IDs run the Query installed earlier and select all the cells and copy to the clipboard and paste into the IDs field.

When not in use it's recommended to change the scripts file extension so it won't run or delete it. You don't want someone else setting your living IDs.

fh_set_living.php
<?php
include("tng_begin.php");
function setLiving($gedcom,$ids) {
global $people_table;
// Clear all Living Fields
$query = "UPDATE $people_table SET living = 0 WHERE living = 1";
$result = tng_query($query);
// Set all the ones from the list
$query = "UPDATE $people_table SET living = 1 WHERE personID in ($ids)";
$result = tng_query($query);
}
function validGedcom($gedcom) {
global $people_table;
$query = "SELECT * FROM $people_table WHERE gedcom = '$gedcom' limit 1";
$result = tng_query($query);
 
 
if(!tng_num_rows($result)) {
  $res = false;
} else {$res=true;}
 
    tng_free_result($result);
return($res);
}
 
 
$gedcom =  htmlentities ( trim ( $_POST[ 'gedcom' ] ) , ENT_NOQUOTES );
$ids =  htmlentities ( trim ( $_POST[ 'ids' ] ) , ENT_NOQUOTES );
$ids = str_replace('"','',$ids) ;
$ids = rtrim($ids, ',');
 
if (isset($_POST[ 'gedcom' ])) {
if (validGedcom($gedcom)) {
setLiving($gedcom,$ids);
$error =  "Flags reset";
} else {
$error = "No people found for gedcom named: '$gedcom'";
}
 
}
?>
<html>
<head>
<title>Set Living Field from list of IDs</title>
</head>
<body>
     <form action="" method='POST'>
     <label for="gedcom">
       Please enter the name of the Gedcom you want to set the Living Flag for
     </label>
     <br /><input type="text" name="gedcom" value="<?php echo $gedcom; ?>" />
     <br /><label for "ids">List of IDs to mark as Living</label>
     <br /><textarea name="ids" rows="30" cols="60"><?php echo $ids;?></textarea>
     <br /><button type="submit">Process Living Field</button>
     </form>
     <?php echo $error;?>
</body>
</html>