Global PhpGedView Arrays

From PGVWiki
(Redirected from Global Arrays)
Jump to navigation Jump to search

Arrays

$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, ";
$gedarray["id"] = 1;
$GEDCOMS["test.ged"] = $gedarray;

$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;


$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.


$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";


$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.


$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";


$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.

$list Array

Scope: Global
Returned by add_descendancy() and add_ancestry() functions. This array is used to maintain a list of all individuals to be returned by the PGVRList and PGVRRelatives report tags.

Following is a sample $list array:

$list["I1"] = $indi;
$list["generation"] = 1;

$indi is an array of the form $indi.

$_COOKIE Array

$_SESSION Array