-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathgedrecord.php
More file actions
77 lines (66 loc) · 2.35 KB
/
gedrecord.php
File metadata and controls
77 lines (66 loc) · 2.35 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?php
/**
* Parses gedcom file and displays record for given id in raw text
*
* phpGedView: Genealogy Viewer
* Copyright (C) 2002 to 2008 PGV Development Team. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* @version $Id$
* @package PhpGedView
* @subpackage Charts
*/
/**
* Initialization
*/
require_once( '../kernel/setup_inc.php' );
// Is package installed and enabled
$gBitSystem->verifyPackage( 'phpgedview' );
include_once( PHPGEDVIEW_PKG_PATH.'BitGEDCOM.php' );
$gGedcom = new BitGEDCOM();
// leave manual config until we can move it to bitweaver table
require("config.php");
require_once("includes/classes/class_gedcomrecord.php");
header("Content-Type: text/html; charset=$CHARACTER_SET");
$pid=safe_GET_xref('pid');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php print $CHARACTER_SET; ?>" />
<title><?php print "$pid Record"; ?></title>
</head>
<body><?php
if (!$SHOW_GEDCOM_RECORD && !PGV_USER_CAN_ACCEPT) {
print "<span class=\"error\">".$pgv_lang["ged_noshow"]."</span>\n";
print "</body></html>";
exit;
}
$obj = GedcomRecord::getInstance($pid);
if (is_null($obj) || !$obj->canDisplayDetails()) {
print_privacy_error($CONTACT_EMAIL);
print "</body></html>";
exit;
}
if (!isset($fromfile)) $indirec = $obj->getGedcomRecord();
else {
$indirec = find_updated_record($pid);
$indirec = privatize_gedcom($indirec);
}
$indirec = preg_replace("/@(\w+)@/", "@<a href=\"gedrecord.php?pid=$1\">$1</a>@", $indirec);
print "<pre>$indirec</pre>";
print "</body></html>";
?>