/** * print information for a sex record * * Called from the individual information page * @see individual.php * @param Event $event the Event object */ function print_sex_record(&$event) { global $pgv_lang, $sex; if (!$event->canShowDetails()) { return false; } $sex = $event->getDetail(); if (empty($sex)) { $sex = "U"; } print "<td valign=\"top\"><span class=\"label\">" . $pgv_lang["sex"] . ": </span><span class=\"field\">" . $this->sexarray[$sex]; if ($sex == 'M') { echo Person::sexImage('M', 'small', '', $pgv_lang['male']); } elseif ($sex == 'F') { echo Person::sexImage('F', 'small', '', $pgv_lang['female']); } else { echo Person::sexImage('U', 'small', '', $pgv_lang['unknown']); } if ($this->SEX_COUNT > 1) { if (!$this->isPrintPreview() && $this->userCanEdit() && preg_match("/PGV_OLD/", $event->getGedComRecord()) == 0) { if ($event->getLineNumber() == "new") { print "<br /><a class=\"font9\" href=\"javascript:;\" onclick=\"add_new_record('" . $this->pid . "', 'SEX'); return false;\">" . $pgv_lang["edit"] . "</a>"; } else { print "<br /><a class=\"font9\" href=\"javascript:;\" onclick=\"edit_record('" . $this->pid . "', " . $event->getLineNumber() . "); return false;\">" . $pgv_lang["edit"] . "</a> | "; print "<a class=\"font9\" href=\"javascript:;\" onclick=\"delete_record('" . $this->pid . "', " . $event->getLineNumber() . "); return false;\">" . $pgv_lang["delete"] . "</a>\n"; } } } print "<br /></span>"; // -- find sources print " "; print_fact_sources($event->getGedComRecord(), 2); //-- find the notes print " "; print_fact_notes($event->getGedComRecord(), 2); print "</td>"; }