12 September 2005
*
* @author PGV Development Team
* @package PhpGedView
* @subpackage Privacy
* @version $Id: edit_privacy.php 2091 2007-10-30 16:19:34Z yalnifj $
*/
require "config.php";
require_once("includes/gedcomrecord.php");
loadLangFile("pgv_confighelp, pgv_help");
if (empty($ged)) $ged = $GEDCOM;
if ((!userGedcomAdmin(getUserName(), $ged))||(empty($ged))) {
header("Location: editgedcoms.php");
exit;
}
$PRIVACY_CONSTANTS = array();
$PRIVACY_CONSTANTS[$PRIV_HIDE] = "\$PRIV_HIDE";
$PRIVACY_CONSTANTS[$PRIV_PUBLIC] = "\$PRIV_PUBLIC";
$PRIVACY_CONSTANTS[$PRIV_USER] = "\$PRIV_USER";
$PRIVACY_CONSTANTS[$PRIV_NONE] = "\$PRIV_NONE";
if (!isset($PRIVACY_BY_YEAR)) $PRIVACY_BY_YEAR = false;
if (!isset($MAX_ALIVE_AGE)) $MAX_ALIVE_AGE = 120;
/**
* print write_access option
*
* @param string $checkVar
*/
function write_access_option($checkVar) {
global $PRIV_HIDE, $PRIV_PUBLIC, $PRIV_USER, $PRIV_NONE;
global $pgv_lang;
print "\n";
print "\n";
print "\n";
print "\n";
}
/**
* print yes/no select option
*
* @param string $checkVar
*/
function write_yes_no($checkVar) {
global $pgv_lang;
print "\n";
print "";
}
/**
* print find and print gedcom record ID
*
* @param string $checkVar gedcom key
* @param string $outputVar error message style
*/
function search_ID_details($checkVar, $outputVar) {
global $GEDCOMS, $GEDCOM;
global $pgv_lang;
$indirec = find_gedcom_record($checkVar);
if (empty($indirec)) $indirec = find_updated_record($checkVar);
if (!empty($indirec)) {
$ct = preg_match("/0 @(.*)@ (.*)/", $indirec, $match);
if ($ct>0) {
$pid = $match[1];
$type = trim($match[2]);
}
if ($type=="INDI") {
$name = get_person_name($pid);
print "\n".PrintReady($name);
print_first_major_fact($pid);
print "\n";
}
else if ($type=="SOUR") {
$name = get_source_descriptor($pid);
print "\n".PrintReady($name);
print "\n";
}
else if ($type=="FAM") {
$name = get_family_descriptor($pid);
print "\n".PrintReady($name);
print "\n";
}
else if ($type=="REPO") {
$name = get_repo_descriptor($pid);
print "\n".PrintReady($name);
print "\n";
}
else print "$type $pid";
}
else {
print "";
if ($outputVar == 1) {
print $pgv_lang["unable_to_find_privacy_indi"];
print "
[" . $checkVar . "]";
}
if ($outputVar == 2) {
print $pgv_lang["unable_to_find_privacy_indi"];
}
print "
";
}
}
if (empty($action)) $action="";
$PRIVACY_MODULE = get_privacy_file();
print_header($pgv_lang["privacy_header"]);
?>
| ".$pgv_lang["edit_privacy_title"]." - ".$GEDCOMS[$ged]["title"]. "";
print "(" . getLRM() . $PRIVACY_MODULE.")";
print " "; print $pgv_lang["lang_back_manage_gedcoms"]; print " ";?> |