SourceForge Logo

 

News


About


Features


Press


Download


Docs
 - Wiki
 - Installation
 - Upgrading
 - Media
 - Readme
 - Privacy
 - Developers


Support


Edit Online


Contributing


 
  PhpGedView Global Arrays

This page lists all of the global arrays used in the program and describes how they are defined.

$gedcoms Array
Scope: global
The $GEDCOMS array stores all of the basic information about the GEDCOMS that have been added to the PhpGedView site. Information includes the title, location of the config and privacy files, full path to the gedcom, and a cache of the most common surnames. The $GEDCOMS array is stored in the $INDEX_DIRECTORY/gedcoms.php file.

Following is a sample $GEDCOMS array:

	$GEDCOMS = array();
	$gedarray = array();
	$gedarray["gedcom"] = "test.ged";
	$gedarray["config"] = "${INDEX_DIRECTORY}test.ged_conf.php";
	$gedarray["privacy"] = "${INDEX_DIRECTORY}test.ged_priv.php";
	$gedarray["title"] = "Finlay Family Test";
	$gedarray["path"] = "C:/Documents and Settings/jrf35/My Documents/test.ged";
	$gedarray["commonsurnames"] = "BOYD, Bushnell, CHRISTENSEN, COATES, Corn, CUTLER, Davis, ";
	$GEDCOMS["test.ged"] = $gedarray;
^TOC

$user Array
Scope: local
Returned by the getUser() function.

Following is a sample $user array:

	$user["username"] = "Username";
	$user["fullname"] = "Fullname");
	$user["gedcomid"][gedcomfile1] = "I1";
	$user["gedcomid"][gedcomfile2] = "I2";
	$user["gedcomid"][gedcomfile3] = "I1";
	$user["rootid"][gedcomfile1] = "I1";
	$user["rootid"][gedcomfile2] = "I2";
	$user["password"] = crypt("password");
	$user["canadmin"] = true|false;
	$user["canedit"][gedcomfile1] = none|accept|edit|access;
	$user["canedit"][gedcomfile2] = none|accept|edit|access;
	$user["canedit"][gedcomfile3] = none|accept|edit|access;
	$user["email"] = "mail@email.com";
	$user["verified"] = yes|no;
	$user["verified_by_admin"] = yes|no;
	$user["language"] = ""|english|spanish|german|...;
	$user["pwrequested"] = yes|no;
	$user["reg_timestamp"] = timestamp of regsitration date;
	$user["reg_hashcode"] = crypt(random string);
	$user["theme"] = ""|standard|ocean|...;
	$user["loggedin"] = Y|N;
	$user["sessiontime"] = timestamp when session should expire;
	$user["contactmethod"] = messaging|messaging2|messaging3|mailto|none;
^TOC

$users Array
Scope: Global
Returned by the getUsers() function.

In Index mode this array operates as the data store for all of the users and is read in by the $INDEX_DIRECTORY/authenticate.php file. In SQL mode this array operates as a user cache of the database.

Following is a sample $users array:

	$users["username"] = $userarray;
$userarray is an array of the form $user.

^TOC

$indi Array
Scope: local

The $indi array holds all of the indexed information about an individual from the gedcom. The $indi array is an essential part of the $indilist array and cache. During import an $indi array for each individual is created. In SQL mode it is imported into the database and then recreated whenever and individual is retrieved from the database. In index mode it is serialized to the index file and read back into the $indilist array with every page request.

Following is a sample $indi array:

	$indi["name"]	= "Surname, Given Names";
	$indi["gedcom"]	= "0 @I1@ INDI...";  //-- raw gedcom record from file
	$indi["isdead"]	= 1;
	$indi["file"]	= "test.ged";
^TOC

$indilist Array
Scope: Global
Returned by the get_indi_list() function.

In Index mode this array operates as the data store for all of the individuals and is read in by the $INDEX_DIRECTORY/$GEDCOM_index.php file. In SQL mode this array operates as a cache of the database.

Following is a sample $indilist array:

	$indilist["I1"] = $indi;
$indi is an array of the form $indi.

^TOC

$family Array
Scope: local

The $family array holds all of the indexed information about a family record from the gedcom. The $family array is an essential part of the $famlist array and cache. During import an $family array for each family is created. In SQL mode it is imported into the database and then recreated whenever and family record is retrieved from the database. In index mode it is serialized to the index file and read back into the $famlist array with every page request.

Following is a sample $family array:

	$family["name"] = "Surname, Given Names";
	$family["gedcom"] = "0 @I1@ INDI...";  //-- raw gedcom record from file
	$family["HUSB"] = "I1";
	$family["WIFE"] = "I2";
	$family["file"] = "test.ged";
^TOC

$famlist Array
Scope: Global
Returned by the get_fam_list() function.

In Index mode this array operates as the data store for all of the families and is read in by the $INDEX_DIRECTORY/$GEDCOM_index.php file. In SQL mode this array operates as a cache of the database.

Following is a sample $famlist array:

	$famlist["F1"] = $family;
$family is an array of the form $family.

^TOC



Copyright © 2009 PhpGedView Team Members
ADVERTISEMENT