PHP Classes

File: ged.php

Recommend this page to a friend!
  Classes of Pierre FAUQUE   Genealogy Classes   ged.php   Download  
File: ged.php
Role: Application script
Content type: text/plain
Description: Send a GEDCOM file
Class: Genealogy Classes
Manage genealogy trees for a family
Author: By
Last change:
Date: 12 years ago
Size: 1,103 bytes
 

Contents

Class file image Download
<?php
/*
    --------------------------------------------------------------------------------
    Project: Genealogy
    From: 11-sept-2010
    To:
    Version: 0.6 du 06/03/2011
    Author: Pierre FAUQUE, pierre@fauque.net
    Filename: ged.php (v0.2 27-oct-2010)
    --------------------------------------------------------------------------------
*/

require("init.php");
require(
"class.gedcom.php");

header("Content-disposition: filename=".GEDFILE);
header("Content-Type: application/force-download");
header("Content-type: application/octet-stream");
header("Pragma: no-cache");
header("Expires: 0");
$gedcom = new gedcom($connexion);
$gedcom->export_ged55(GEDFILE);

// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Log the view or the storage of the GEDFILE
// If you don't want to log these files, set $LogExport to 0 in the init.php file
if($LogExport) {
   
$request = "INSERT INTO ".TB_VISITORS." values('".date("Y-m-d H:i:s")."','".GEDFILE."','".$_SERVER["REMOTE_ADDR"]."');";
   
$result = ExecRequest($request,$connexion);
}
?>