当前位置: 首页>>代码示例>>PHP>>正文


PHP Person::getInstance方法代码示例

本文整理汇总了PHP中Person::getInstance方法的典型用法代码示例。如果您正苦于以下问题:PHP Person::getInstance方法的具体用法?PHP Person::getInstance怎么用?PHP Person::getInstance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Person的用法示例。


在下文中一共展示了Person::getInstance方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: init

 function init()
 {
     // Cannot edit with a "remember me" login.
     if ($_SESSION["cookie_login"]) {
         header('Location: ' . encode_url("login.php?type=simple&url=" . urlencode("edit_interface.php?" . decode_url($QUERY_STRING)), false));
         exit;
     }
     // Coming soon ???
     $this->has_familysearch = file_exists('modules/FamilySearch/familySearchWrapper.php');
     if ($this->has_familysearch) {
         require_once 'modules/FamilySearch/familySearchWrapper.php';
     }
     // The PID can come from a URL or a form
     $this->pid = safe_REQUEST($_REQUEST, 'pid', PGV_REGEX_XREF);
     $this->person = Person::getInstance($this->pid);
     $this->server_list = get_server_list();
     $this->gedcom_list = get_all_gedcoms();
     unset($this->gedcom_list[PGV_GED_ID]);
     // Other input values come from the form
     $this->form_txtPID = safe_POST('txtPID', PGV_REGEX_XREF);
     $this->form_cbRelationship = safe_POST('cbRelationship');
     $this->form_location = safe_POST('location');
     $this->form_txtURL = safe_POST('txtURL', PGV_REGEX_URL);
     $this->form_txtTitle = safe_POST('txtTitle', '[^<>"%{};]+');
     $this->form_txtGID = safe_POST('txtGID', $this->gedcom_list);
     $this->form_txtUsername = safe_POST('txtUsername', PGV_REGEX_USERNAME);
     $this->form_txtPassword = safe_POST('txtPassword', PGV_REGEX_PASSWORD);
     $this->form_cbExistingServers = safe_POST('cbExistingServers', array_keys($this->server_list));
     $this->form_txtCB_Title = safe_POST('txtCB_Title', '[^<>"%{};]+');
     $this->form_txtCB_GID = safe_POST('txtCB_GID', $this->gedcom_list);
     $this->form_txtFS_URL = safe_POST('txtFS_URL', PGV_REGEX_URL);
     $this->form_txtFS_Title = safe_POST('txtFS_Title', '[^<>"%{};]+');
     $this->form_txtFS_GID = safe_POST('txtFS_GID', $this->gedcom_list);
     $this->form_txtFS_Username = safe_POST('txtFS_Username', PGV_REGEX_USERNAME);
     $this->form_txtFS_Password = safe_POST('txtFS_Password', PGV_REGEX_PASSWORD);
     if (is_null($this->form_location)) {
         if ($this->server_list) {
             $this->form_location = 'existing';
         } else {
             $this->form_location = 'remote';
         }
     }
 }
开发者ID:bitweaver,项目名称:phpgedview,代码行数:43,代码来源:remotelink_ctrl.php

示例2: print_asso_rela_record

            print_asso_rela_record($pid, $event->getGedComRecord(), false);
            continue;
        }
        $fact = $event->getTag();
        $details = $event->getDetail();
        print "<span class=\"details_label\">";
        print $event->getLabel();
        print "</span> ";
        $details = $event->getDetail();
        if ($details != "Y" && $details != "N") {
            print PrintReady($details);
        }
        echo format_fact_date($event, false, false, $fact, $pid, $person->getGedcomRecord());
        //-- print spouse name for marriage events
        $famid = $event->getFamilyId();
        $spouseid = $event->getSpouseId();
        if (!empty($spouseid)) {
            $spouse = Person::getInstance($spouseid);
            if (!is_null($spouse)) {
                print " <a href=\"" . encode_url("individual.php?pid={$spouseid}&ged={$GEDCOM}") . "\">";
                print PrintReady($spouse->getFullName());
                print "</a>";
                print " - ";
            }
        }
        if (!empty($famid)) {
            print "<a href=\"family.php?famid={$famid}\">[" . $pgv_lang["view_family"] . "]</a>\n";
        }
        echo format_fact_place($event, true, true);
    }
}
开发者ID:bitweaver,项目名称:phpgedview,代码行数:31,代码来源:expand_view.php

示例3: print_fan_chart


//.........这里部分代码省略.........
        $angle = $fandeg / $p2;
        $deg2 = 360 + ($fandeg - 180) / 2;
        $deg1 = $deg2 - $angle;
        // special case for rootid cell
        if ($gen == 0) {
            $deg1 = 90;
            $deg2 = 360 + $deg1;
        }
        // draw each cell
        while ($sosa >= $p2) {
            $pid = $treeid[$sosa];
            if (!empty($pid)) {
                $indirec = find_person_record($pid);
                if (!$indirec) {
                    $indirec = find_updated_record($pid);
                }
                if ($sosa % 2) {
                    $bg = $bgcolorF;
                } else {
                    $bg = $bgcolorM;
                }
                if ($sosa == 1) {
                    $bg = $bgcolor;
                    // sex unknown
                    if (preg_match("/1 SEX F/", $indirec) > 0) {
                        $bg = $bgcolorF;
                    } else {
                        if (preg_match("/1 SEX M/", $indirec) > 0) {
                            $bg = $bgcolorM;
                        }
                    }
                }
                ImageFilledArc($image, $cx, $cy, $rx, $rx, $deg1, $deg2, $bg, IMG_ARC_PIE);
                $person = Person::getInstance($pid);
                $name = $person->getFullName();
                $addname = $person->getAddName();
                //$name = str_replace(array('<span class="starredname">', '</span>'), '', $name);
                //$addname = str_replace(array('<span class="starredname">', '</span>'), '', $addname);
                //$name = str_replace(array('<span class="starredname">', '</span>'), array('<u>', '</u>'), $name); //@@
                //$addname = str_replace(array('<span class="starredname">', '</span>'), array('<u>', '</u>'), $addname); //@@
                // ToDo - print starred names underlined - 1985154
                // Todo - print Arabic letters combined - 1360209
                $text = reverseText($name) . "\n";
                if (!empty($addname)) {
                    $text .= reverseText($addname) . "\n";
                }
                if (displayDetailsById($pid)) {
                    $birthrec = get_sub_record(1, "1 BIRT", $indirec);
                    $ct = preg_match("/2 DATE.*(\\d\\d\\d\\d)/", $birthrec, $match);
                    if ($ct > 0) {
                        $text .= trim($match[1]);
                    }
                    $deathrec = get_sub_record(1, "1 DEAT", $indirec);
                    $ct = preg_match("/2 DATE.*(\\d\\d\\d\\d)/", $deathrec, $match);
                    if ($ct > 0) {
                        $text .= "-" . trim($match[1]);
                    }
                }
                $text = unhtmlentitiesrtl($text);
                $text = strip_tags($text);
                //Do we still need?
                // split and center text by lines
                $wmax = floor($angle * 7 / $fontsize * $scale);
                $wmax = min($wmax, 35 * $scale);
                if ($gen == 0) {
                    $wmax = min($wmax, 17 * $scale);
开发者ID:bitweaver,项目名称:phpgedview,代码行数:67,代码来源:fanchart.php

示例4: print_td_person

function print_td_person($n)
{
    global $treeid, $PGV_IMAGE_DIR, $PGV_IMAGES, $pgv_lang;
    global $TEXT_DIRECTION, $MULTI_MEDIA, $SHOW_HIGHLIGHT_IMAGES, $USE_SILHOUETTE, $PGV_IMAGES;
    global $showids, $showthumbs;
    $text = "";
    $pid = $treeid[$n];
    if ($TEXT_DIRECTION == "ltr") {
        $title = $pgv_lang["indi_info"] . ": " . $pid;
    } else {
        $title = $pid . " :" . $pgv_lang["indi_info"];
    }
    if ($pid) {
        $indi = Person::getInstance($pid);
        $name = $indi->getFullName();
        $addname = $indi->getAddName();
        if ($showthumbs && $MULTI_MEDIA && $SHOW_HIGHLIGHT_IMAGES) {
            if (showFact("OBJE", $pid)) {
                $object = find_highlighted_object($pid, PGV_GED_ID, $indi->gedrec);
                if (!empty($object)) {
                    $whichFile = thumb_or_main($object);
                    // Do we send the main image or a thumbnail?
                    $size = findImageSize($whichFile);
                    $class = "pedigree_image_portrait";
                    if ($size[0] > $size[1]) {
                        $class = "pedigree_image_landscape";
                    }
                    if ($TEXT_DIRECTION == "rtl") {
                        $class .= "_rtl";
                    }
                    // NOTE: IMG ID
                    $imgsize = findImageSize($object["file"]);
                    $imgwidth = $imgsize[0] + 50;
                    $imgheight = $imgsize[1] + 150;
                    if (PGV_USE_LIGHTBOX) {
                        $text .= "<a href=\"" . $object["file"] . "\" rel=\"clearbox[general]\" rev=\"" . $object['mid'] . "::" . PGV_GEDCOM . "::" . PrintReady(htmlspecialchars($name, ENT_QUOTES, 'UTF-8')) . "\">" . "\n";
                    } else {
                        $text .= "<a href=\"javascript:;\" onclick=\"return openImage('" . rawurlencode($object["file"]) . "',{$imgwidth}, {$imgheight});\">";
                    }
                    $birth_date = $indi->getBirthDate();
                    $death_date = $indi->getDeathDate();
                    $text .= "<img id=\"box-{$pid}\" src=\"" . $whichFile . "\"vspace=\"0\" hspace=\"0\" class=\"{$class}\" alt =\"\" title=\"" . PrintReady(htmlspecialchars(strip_tags($name), ENT_QUOTES, 'UTF-8')) . " - " . strip_tags(html_entity_decode($birth_date->Display(false) . " - " . $death_date->Display(false), ENT_QUOTES, 'UTF-8')) . "\"";
                    if ($imgsize) {
                        $text .= " /></a>\n";
                    } else {
                        $text .= " />\n";
                    }
                } else {
                    if ($USE_SILHOUETTE && isset($PGV_IMAGES["default_image_U"]["other"])) {
                        $class = "pedigree_image_portrait";
                        if ($TEXT_DIRECTION == "rtl") {
                            $class .= "_rtl";
                        }
                        $sex = $indi->getSex();
                        $text = "<img src=\"";
                        if ($sex == 'F') {
                            $text .= $PGV_IMAGE_DIR . "/" . $PGV_IMAGES["default_image_F"]["other"];
                        } else {
                            if ($sex == 'M') {
                                $text .= $PGV_IMAGE_DIR . "/" . $PGV_IMAGES["default_image_M"]["other"];
                            } else {
                                $text .= $PGV_IMAGE_DIR . "/" . $PGV_IMAGES["default_image_U"]["other"];
                            }
                        }
                        $text .= "\" class=\"" . $class . "\" border=\"none\" alt=\"\" />";
                    }
                }
            } else {
                if ($USE_SILHOUETTE && isset($PGV_IMAGES["default_image_U"]["other"])) {
                    $class = "pedigree_image_portrait";
                    if ($TEXT_DIRECTION == "rtl") {
                        $class .= "_rtl";
                    }
                    $sex = $indi->getSex();
                    $text = "<img src=\"";
                    if ($sex == 'F') {
                        $text .= $PGV_IMAGE_DIR . "/" . $PGV_IMAGES["default_image_F"]["other"];
                    } else {
                        if ($sex == 'M') {
                            $text .= $PGV_IMAGE_DIR . "/" . $PGV_IMAGES["default_image_M"]["other"];
                        } else {
                            $text .= $PGV_IMAGE_DIR . "/" . $PGV_IMAGES["default_image_U"]["other"];
                        }
                    }
                    $text .= "\" class=\"" . $class . "\" border=\"none\" alt=\"\" />";
                }
            }
        }
        $text .= "<a class=\"name1\" href=\"individual.php?pid={$pid}\" title=\"{$title}\"> ";
        $text .= PrintReady(htmlspecialchars(strip_tags($name), ENT_QUOTES, 'UTF-8'));
        if ($addname) {
            $text .= "<br />" . PrintReady($addname);
        }
        $text .= "</a>";
        if ($showids) {
            $text .= " <span class='details1' ";
            if ($TEXT_DIRECTION == "ltr") {
                $text .= "dir=\"ltr\">";
            } else {
                $text .= "dir=\"rtl\">";
//.........这里部分代码省略.........
开发者ID:rathervague,项目名称:phpgedview,代码行数:101,代码来源:compact.php

示例5: print_time_fact


//.........这里部分代码省略.........
                 }
             } else {
                 if ($this->pids[$p] == $wifeid) {
                     $wife = $family->getWife();
                     if (is_null($wife)) {
                         $wife = new Person('');
                     }
                     $wdate = $wife->getBirthDate();
                     if ($wdate->isOK()) {
                         $agew = get_age_at_event(GedcomDate::GetAgeGedcom($wdate, $gdate), false);
                     }
                 }
             }
         }
         if (!empty($ageh) && $ageh > 0) {
             if (empty($agew)) {
                 print '<span class="age"> ' . PrintReady("({$pgv_lang["age"]} {$ageh})") . '</span>';
             } else {
                 print '<span class="age"> ' . PrintReady("({$pgv_lang["husb_age"]} {$ageh},") . ' ';
             }
         }
         if (!empty($agew) && $agew > 0) {
             if (empty($ageh)) {
                 print '<span class="age"> ' . PrintReady("({$pgv_lang["age"]} {$agew})") . '</span>';
             } else {
                 print PrintReady("{$pgv_lang["wife_age"]} {$agew})") . '</span>';
             }
         }
     }
     print " " . PrintReady($desc);
     if ($SHOW_PEDIGREE_PLACES > 0) {
         $place = $event->getPlace();
         if ($place != null) {
             if ($desc != null) {
                 print " - ";
             }
             $plevels = explode(',', $place);
             for ($plevel = 0; $plevel < $SHOW_PEDIGREE_PLACES; $plevel++) {
                 if (!empty($plevels[$plevel])) {
                     if ($plevel > 0) {
                         print ", ";
                     }
                     print PrintReady($plevels[$plevel]);
                 }
             }
         }
     }
     //-- print spouse name for marriage events
     $spouse = Person::getInstance($event->getSpouseId());
     if ($spouse) {
         for ($p = 0; $p < count($this->pids); $p++) {
             if ($this->pids[$p] == $spouse->getXref()) {
                 break;
             }
         }
         if ($p == count($this->pids)) {
             $p = $event->temp;
         }
         $col = $p % 6;
         if ($spouse->getXref() != $this->pids[$p]) {
             echo ' <a href="', $spouse->getLinkUrl(), '">', $spouse->getFullName(), '</a>';
         } else {
             $ct = preg_match("/2 _PGVFS @(.*)@/", $factrec, $match);
             if ($ct > 0) {
                 print " <a href=\"" . encode_url("family.php?famid={$match[1]}&ged={$GEDCOM}") . "\">";
                 if (displayDetailsById($match[1]) || showLivingNameById($match[1])) {
                     print $event->getParentObject()->getFullName();
                 } else {
                     print $pgv_lang["private"];
                 }
                 print "</a>";
             }
         }
     }
     print "</td></tr></table>\n";
     print "</div>";
     if ($TEXT_DIRECTION == 'ltr') {
         $img = "dline2";
         $ypos = "0%";
     } else {
         $img = "dline";
         $ypos = "100%";
     }
     $dyoffset = $yoffset - $tyoffset + $this->bheight / 3;
     if ($tyoffset < 0) {
         $dyoffset = $yoffset + $this->bheight / 3;
         if ($TEXT_DIRECTION == 'ltr') {
             $img = "dline";
             $ypos = "100%";
         } else {
             $img = "dline2";
             $ypos = "0%";
         }
     }
     //-- print the diagnal line
     print "\n\t\t<div id=\"dbox{$factcount}\" style=\"position:absolute; " . ($TEXT_DIRECTION == "ltr" ? "left: " . ($basexoffset + 25) : "right: " . ($basexoffset + 25)) . "px; top:" . $dyoffset . "px; font-size: 8pt; height: " . abs($tyoffset) . "px; width: " . abs($tyoffset) . "px;";
     print " background-image: url('" . $PGV_IMAGE_DIR . "/" . $PGV_IMAGES[$img]["other"] . "');";
     print " background-position: 0% {$ypos}; \" >\n";
     print "</div>\n";
 }
开发者ID:bitweaver,项目名称:phpgedview,代码行数:101,代码来源:timeline_ctrl.php

示例6: indis_array

function indis_array($surn, $soundex_std, $soundex_dm)
{
    global $TBLPREFIX;
    $sql = "SELECT DISTINCT n_id" . " FROM {$TBLPREFIX}name" . " WHERE n_file=?" . " AND n_type!=?" . " AND (n_surn=? OR n_surname=?";
    $args = array(PGV_GED_ID, '_MARNM', $surn, $surn);
    if ($soundex_std) {
        $sql .= " OR n_soundex_surn_std=?";
        $args[] = soundex_std($surn);
    }
    if ($soundex_dm) {
        $sql .= " OR n_soundex_surn_dm=?";
        $args[] = soundex_dm($surn);
    }
    $sql .= ") ORDER BY n_sort";
    $rows = PGV_DB::prepare($sql)->execute($args)->fetchAll();
    //	var_dump($sql); var_dump($rows);
    $data = array();
    foreach ($rows as $row) {
        $data[$row->n_id] = Person::getInstance($row->n_id);
    }
    return $data;
}
开发者ID:rathervague,项目名称:phpgedview,代码行数:22,代码来源:branches.php

示例7: print_family_book

function print_family_book($pid, $descent)
{
    global $generations, $dgenerations, $pgv_lang, $firstrun;
    if ($descent == 0) {
        return;
    }
    $famids = find_sfamily_ids($pid);
    if (count($famids) > 0 || empty($firstrun)) {
        $firstrun = true;
        $pid = check_rootid($pid);
        $person = Person::getInstance($pid);
        $name = $person->getFullName();
        print "\n\t<h2 style=\"text-align: center\">" . $pgv_lang["family_of"] . PrintReady($name) . "</h2>";
        print "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\"><tr>\n";
        //-- descendancy
        print "<td valign=\"middle\">\n";
        $dgenerations = $generations;
        // $dgenerations = max_descendency_generations($pid, 0);
        print_descendency($pid, 1);
        print "</td>\n";
        //-- pedigree
        print "<td valign=\"middle\">\n";
        print_person_pedigree($pid, 1);
        print "</td>\n";
        print "</tr></table>\n";
        print "<br /><br />\n";
        print "<hr style=\"page-break-after:always;\"/>\n";
        print "<br /><br />\n";
        foreach ($famids as $indexval => $famid) {
            $famrec = find_family_record($famid, PGV_GED_ID);
            $ct = preg_match_all("/1 CHIL @(.*)@/", $famrec, $match, PREG_SET_ORDER);
            for ($i = 0; $i < $ct; $i++) {
                $chil = trim($match[$i][1]);
                if (showLivingNameById($chil) || displayDetailsById($chil)) {
                    print_family_book($chil, $descent - 1);
                }
            }
        }
    }
}
开发者ID:rathervague,项目名称:phpgedview,代码行数:40,代码来源:familybook.php

示例8: init

 /**
  * Initialization function
  */
 function init()
 {
     global $PEDIGREE_FULL_DETAILS, $PEDIGREE_LAYOUT, $MAX_PEDIGREE_GENERATIONS;
     global $DEFAULT_PEDIGREE_GENERATIONS, $SHOW_EMPTY_BOXES;
     global $bwidth, $bheight, $baseyoffset, $basexoffset, $byspacing, $bxspacing;
     global $TEXT_DIRECTION, $BROWSER_TYPE, $show_full, $talloffset;
     $this->log2 = log(2);
     if ($this->isPrintPreview()) {
         $this->show_famlink = false;
     }
     $this->rootid = safe_GET_xref('rootid');
     $this->show_full = safe_GET('show_full', array('0', '1'), $PEDIGREE_FULL_DETAILS);
     $this->talloffset = safe_GET('talloffset', array('0', '1', '2', '3'), $PEDIGREE_LAYOUT);
     $this->PEDIGREE_GENERATIONS = safe_GET_integer('PEDIGREE_GENERATIONS', 2, $MAX_PEDIGREE_GENERATIONS, $DEFAULT_PEDIGREE_GENERATIONS);
     if ($this->talloffset == 1) {
         $this->talloffset = 1;
     }
     // Make SURE this is an integer
     if ($this->talloffset > 1 && $this->PEDIGREE_GENERATIONS > 8) {
         $this->PEDIGREE_GENERATIONS = 8;
     }
     // TODO: some library functions expect this as a global.
     // Passing a function parameter would be much better.
     global $PEDIGREE_GENERATIONS;
     $PEDIGREE_GENERATIONS = $this->PEDIGREE_GENERATIONS;
     // This is passed as a global.  A parameter would be better...
     $this->show_full = $this->show_full ? 1 : 0;
     // Make SURE this is an integer
     if ($this->talloffset > 3) {
         $this->talloffset = 3;
     } else {
         if ($this->talloffset < 0) {
             $this->talloffset = 0;
         }
     }
     $show_full = $this->show_full;
     $talloffset = $this->talloffset;
     // Validate parameters
     $this->rootid = check_rootid($this->rootid);
     $this->rootPerson = Person::getInstance($this->rootid);
     if (is_null($this->rootPerson)) {
         $this->rootPerson = new Person('');
     }
     $this->name = $this->rootPerson->getFullName();
     $this->addname = $this->rootPerson->getAddName();
     //-- adjustments for hide details
     if ($this->show_full == false) {
         $bheight = 30;
         if ($this->talloffset < 2) {
             $bwidth -= 30;
         } else {
             $bwidth -= 50;
         }
     }
     //-- adjustments for portrait mode
     if ($this->talloffset == 0) {
         $bxspacing += 12;
         $bwidth += 20;
         $baseyoffset -= 20 * ($this->PEDIGREE_GENERATIONS - 1);
     }
     $this->pbwidth = $bwidth + 6;
     $this->pbheight = $bheight + 5;
     $this->treeid = ancestry_array($this->rootid);
     $this->treesize = pow(2, (int) $this->PEDIGREE_GENERATIONS) - 1;
     //-- ancestry_array puts everyone at $i+1
     for ($i = 0; $i < $this->treesize; $i++) {
         $this->treeid[$i] = $this->treeid[$i + 1];
     }
     if (!$this->show_full) {
         if ($this->talloffset == 0) {
             $baseyoffset = 160 + $bheight * 2;
         } else {
             if ($this->talloffset == 1) {
                 $baseyoffset = 180 + $bheight * 2;
             } else {
                 if ($this->talloffset > 1) {
                     if ($this->PEDIGREE_GENERATIONS == 3) {
                         $baseyoffset = 30;
                     } else {
                         $baseyoffset = -85;
                     }
                 }
             }
         }
     } else {
         if ($this->talloffset == 0) {
             $baseyoffset = 100 + $bheight / 2;
         } else {
             if ($this->talloffset == 1) {
                 $baseyoffset = 160 + $bheight / 2;
             } else {
                 if ($this->talloffset > 1) {
                     if ($this->PEDIGREE_GENERATIONS == 3) {
                         $baseyoffset = 30;
                     } else {
                         $baseyoffset = -85;
                     }
//.........这里部分代码省略.........
开发者ID:bitweaver,项目名称:phpgedview,代码行数:101,代码来源:pedigree_ctrl.php

示例9: advancedSearch


//.........这里部分代码省略.........
                             if (preg_match("/^" . $parts[0] . ":/", $this->fields[$j]) > 0) {
                                 $this->fields[$j] = '';
                             }
                         }
                     } else {
                         if ($parts[0] == 'FAMC') {
                             if (!$famcTable) {
                                 $sqltables .= ", " . $TBLPREFIX . "families as FAMC";
                                 $sqlwhere .= " AND i_file=FAMC.f_file";
                                 $famcTable = true;
                             }
                             //-- alter the fields and recurse to generate a subquery for spouse/parent fields
                             $oldfields = $this->fields;
                             for ($j = 0; $j < $fct; $j++) {
                                 //-- if it doesn't start with FAMS or FAMC then remove that field
                                 if (preg_match("/^" . $parts[0] . ":/", $this->fields[$j]) == 0) {
                                     $this->fields[$j] = '';
                                 } else {
                                     $this->fields[$j] = preg_replace("/^" . $parts[0] . ":/", "", $this->fields[$j]);
                                 }
                             }
                             $sqlwhere .= " AND (FAMC.f_chil " . PGV_DB::$LIKE . " CONCAT('%',i_id,';%'))";
                             $subsql = $this->advancedSearch(true, "families", "f");
                             $sqlwhere .= " AND ROW(FAMC.f_id, FAMC.f_file) IN (" . $subsql . ")";
                             $this->fields = $oldfields;
                             //-- remove all of the fam fields so they don't show up again
                             for ($j = 0; $j < $fct; $j++) {
                                 //-- if it does start with FAMS or FAMC then remove that field
                                 if (preg_match("/^" . $parts[0] . ":/", $this->fields[$j]) > 0) {
                                     $this->fields[$j] = '';
                                 }
                             }
                         } else {
                             if ($parts[0] == 'HUSB' || $parts[0] == 'WIFE') {
                                 if (!$famsTable) {
                                     $sqltables .= ", " . $TBLPREFIX . "individuals";
                                     $sqlwhere .= " AND i_file=f_file";
                                     $famsTable = true;
                                 }
                                 //-- alter the fields and recurse to generate a subquery for spouse/parent fields
                                 $oldfields = $this->fields;
                                 for ($j = 0; $j < $fct; $j++) {
                                     //-- if it doesn't start with FAMS or FAMC then remove that field
                                     if (preg_match("/^" . $parts[0] . ":/", $this->fields[$j]) == 0) {
                                         $this->fields[$j] = '';
                                     } else {
                                         $this->fields[$j] = preg_replace("/^" . $parts[0] . ":/", "", $this->fields[$j]);
                                     }
                                 }
                                 $subsql = $this->advancedSearch(true, "individuals", "i");
                                 if ($parts[0] == 'HUSB') {
                                     $sqlwhere .= " AND ROW(f_husb, f_file) IN (" . $subsql . ")";
                                 }
                                 if ($parts[0] == 'WIFE') {
                                     $sqlwhere .= " AND ROW(f_wife, f_file) IN (" . $subsql . ")";
                                 }
                                 $this->fields = $oldfields;
                                 //-- remove all of the fam fields so they don't show up again
                                 for ($j = 0; $j < $fct; $j++) {
                                     //-- if it does start with HUSB or WIFE then remove that field
                                     if (preg_match("/^" . $parts[0] . ":/", $this->fields[$j]) > 0) {
                                         $this->fields[$j] = '';
                                     }
                                 }
                             } else {
                                 $sqlwhere .= " AND i_gedcom " . PGV_DB::$LIKE . " ";
                                 $ct = count($parts);
                                 $liketmp = '';
                                 for ($j = 0; $j < $ct; $j++) {
                                     $liketmp .= "%" . ($j + 1) . " " . $parts[$j] . " %";
                                     //					 if ($j<$ct-1) {
                                     //					 	$sqlwhere .= "%";
                                     //					 } else {
                                     $liketmp .= "%{$value}%";
                                     //					 }
                                 }
                                 $sqlwhere .= PGV_DB::quote($liketmp);
                             }
                         }
                     }
                 }
             }
         }
     }
     $sql = $sqlfields . $sqltables . $sqlwhere;
     //		print $sql;
     if ($justSql) {
         return $sql;
     }
     $rows = PGV_DB::prepare($sql)->fetchAll(PDO::FETCH_ASSOC);
     foreach ($rows as $row) {
         $row['xref'] = $row['i_id'];
         $row['ged_id'] = $row['i_file'];
         $row['type'] = 'INDI';
         $row['gedrec'] = $row['i_gedcom'];
         $object = Person::getInstance($row);
         $this->myindilist[$row['i_id']] = $object;
     }
     $this->fields = $keepfields;
 }
开发者ID:bitweaver,项目名称:phpgedview,代码行数:101,代码来源:advancedsearch_ctrl.php

示例10: print_child_ascendancy

 /**
  * print a child ascendancy
  *
  * @param string $pid individual Gedcom Id
  * @param int $sosa child sosa number
  * @param int $depth the ascendancy depth to show
  */
 function print_child_ascendancy($pid, $sosa, $depth)
 {
     global $pgv_lang, $TEXT_DIRECTION, $OLD_PGENS;
     global $PGV_IMAGE_DIR, $PGV_IMAGES, $Dindent;
     global $SHOW_EMPTY_BOXES, $pidarr, $box_width;
     $person = Person::getInstance($pid);
     // child
     print "\r\n<li>";
     print "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr><td><a name=\"sosa" . $sosa . "\"></a>";
     $new = ($pid == "" or !isset($pidarr["{$pid}"]));
     if ($sosa == 1) {
         print "<img src=\"" . $PGV_IMAGE_DIR . "/" . $PGV_IMAGES["spacer"]["other"] . "\" height=\"3\" width=\"{$Dindent}\" border=\"0\" alt=\"\" /></td><td>\n";
     } else {
         print "<img src=\"" . $PGV_IMAGE_DIR . "/" . $PGV_IMAGES["spacer"]["other"] . "\" height=\"3\" width=\"2\" border=\"0\" alt=\"\" />";
         print "<img src=\"" . $PGV_IMAGE_DIR . "/" . $PGV_IMAGES["hline"]["other"] . "\" height=\"3\" width=\"" . ($Dindent - 2) . "\" border=\"0\" alt=\"\" /></td><td>\n";
     }
     print_pedigree_person($pid, 1, $this->view != "preview");
     print "</td>";
     print "<td>";
     if ($TEXT_DIRECTION == "ltr") {
         $label = $pgv_lang["ancestry_chart"] . ": " . $pid;
     } else {
         $label = $pid . " :" . $pgv_lang["ancestry_chart"];
     }
     if ($sosa > 1) {
         print_url_arrow($pid, encode_url("?rootid={$pid}&PEDIGREE_GENERATIONS={$OLD_PGENS}&show_full={$this->show_full}&box_width={$box_width}&chart_style={$this->chart_style}"), $label, 3);
     }
     print "</td>";
     print "<td class=\"details1\">&nbsp;<span dir=\"ltr\" class=\"person_box" . ($sosa == 1 ? "NN" : ($sosa % 2 ? "F" : "")) . "\">&nbsp;{$sosa}&nbsp;</span>&nbsp;";
     print "</td><td class=\"details1\">";
     $relation = "";
     if (!$new) {
         $relation = "<br />[=<a href=\"#sosa" . $pidarr["{$pid}"] . "\">" . $pidarr["{$pid}"] . "</a> - " . get_sosa_name($pidarr["{$pid}"]) . "]";
     } else {
         $pidarr["{$pid}"] = $sosa;
     }
     print get_sosa_name($sosa) . $relation;
     print "</td>";
     print "</tr></table>";
     if (is_null($person)) {
         print "</li>";
         return;
     }
     // parents
     $famids = $person->getChildFamilies();
     $parents = false;
     $famrec = "";
     $famid = "";
     foreach ($famids as $famid => $family) {
         if (!is_null($family)) {
             $famrec = $family->getGedcomRecord();
             $parents = find_parents_in_record($famrec);
             if ($parents) {
                 break;
             }
         }
     }
     if (($parents || $SHOW_EMPTY_BOXES) && $new && $depth > 0) {
         // print marriage info
         print "<span class=\"details1\" style=\"white-space: nowrap;\" >";
         print "<img src=\"" . $PGV_IMAGE_DIR . "/" . $PGV_IMAGES["spacer"]["other"] . "\" height=\"2\" width=\"{$Dindent}\" border=\"0\" align=\"middle\" alt=\"\" /><a href=\"javascript: " . $pgv_lang["view_family"] . "\" onclick=\"expand_layer('sosa_" . $sosa . "'); return false;\" class=\"top\"><img id=\"sosa_" . $sosa . "_img\" src=\"" . $PGV_IMAGE_DIR . "/" . $PGV_IMAGES["minus"]["other"] . "\" align=\"middle\" hspace=\"0\" vspace=\"3\" border=\"0\" alt=\"" . $pgv_lang["view_family"] . "\" /></a> ";
         print "&nbsp;<span class=\"person_box\">&nbsp;" . $sosa * 2 . "&nbsp;</span>&nbsp;" . $pgv_lang["and"];
         print "&nbsp;<span class=\"person_boxF\">&nbsp;" . ($sosa * 2 + 1) . " </span>&nbsp;";
         if (!empty($family)) {
             $marriage = $family->getMarriage();
             if ($marriage->canShow()) {
                 $marriage->print_simple_fact();
             } else {
                 print $pgv_lang["private"];
             }
         }
         print "</span>";
         // display parents recursively
         print "\r\n<ul style=\"list-style: none; display: block;\" id=\"sosa_{$sosa}\">";
         $this->print_child_ascendancy($parents["HUSB"], $sosa * 2, $depth - 1);
         $this->print_child_ascendancy($parents["WIFE"], $sosa * 2 + 1, $depth - 1);
         print "</ul>\r\n";
     }
     print "</li>\r\n";
 }
开发者ID:bitweaver,项目名称:phpgedview,代码行数:87,代码来源:ancestry_ctrl.php

示例11: Menu


//.........这里部分代码省略.........
                 //-- familybook
                 $link = "familybook.php?ged=" . $GEDCOM;
                 if ($rootid) {
                     $link .= "&pid={$rootid}&show_full={$showFull}";
                 }
                 $submenu = new Menu($pgv_lang["familybook_chart"], encode_url($link));
                 if (!empty($PGV_IMAGES["fambook"]["small"])) {
                     $submenu->addIcon($PGV_IMAGE_DIR . "/" . $PGV_IMAGES["fambook"]["small"]);
                 }
                 $submenu->addClass("submenuitem{$ff}", "submenuitem_hover{$ff}", "", "icon_small_fambook");
                 $menu->addSubmenu($submenu);
                 break;
             case "timeline":
                 //-- timeline
                 $link = "timeline.php?ged=" . $GEDCOM;
                 if ($rootid) {
                     $link .= "&amp;pids[]=" . $rootid;
                 }
                 $submenu = new Menu($pgv_lang["timeline_chart"], $link);
                 if (!empty($PGV_IMAGES["timeline"]["small"])) {
                     $submenu->addIcon($PGV_IMAGE_DIR . "/" . $PGV_IMAGES["timeline"]["small"]);
                 }
                 $submenu->addClass("submenuitem{$ff}", "submenuitem_hover{$ff}", "", "icon_small_timeline");
                 $menu->addSubmenu($submenu);
                 break;
             case "lifespan":
                 //-- lifespan
                 $link = "lifespan.php?ged=" . $GEDCOM;
                 if ($rootid) {
                     $link .= "&pids[]={$rootid}&addFamily=1";
                 }
                 $submenu = new Menu($pgv_lang["lifespan_chart"], encode_url($link));
                 if (!empty($PGV_IMAGES["timeline"]["small"])) {
                     $submenu->addIcon($PGV_IMAGE_DIR . "/" . $PGV_IMAGES["timeline"]["small"]);
                 }
                 $submenu->addClass("submenuitem{$ff}", "submenuitem_hover{$ff}", "", "icon_small_timeline");
                 $menu->addSubmenu($submenu);
                 break;
             case "relationship":
                 //-- relationship
                 $pids[] = $myid;
                 if ($rootid && empty($myid)) {
                     if (PGV_USER_ID) {
                         $pids[] = PGV_USER_GEDCOM_ID;
                         $pids[] = PGV_USER_ROOT_ID;
                     }
                 }
                 if ($rootid) {
                     foreach (getUserFavorites(PGV_USER_NAME) as $key => $favorite) {
                         $pid = $favorite["gid"];
                         if (displayDetailsById($pid, $favorite["type"])) {
                             if ($favorite["type"] == "INDI" && $favorite["file"] == $GEDCOM) {
                                 $pids[] = $pid;
                             }
                         }
                     }
                 }
                 $pids = array_unique($pids);
                 foreach ($pids as $key => $pid) {
                     $person = Person::getInstance($pid);
                     if ($person && $pid != $rootid || empty($rootid)) {
                         $link = "relationship.php?ged=" . $GEDCOM;
                         if ($rootid) {
                             $link .= "&pid1={$pid}&pid2={$rootid}&pretty=2&followspouse=1";
                             $label = $pgv_lang["relationship_chart"] . ": " . PrintReady(strip_tags($person->getFullName()));
                             $submenu = new Menu($label, encode_url($link));
                         } else {
                             $submenu = new Menu($pgv_lang["relationship_chart"], encode_url($link));
                         }
                         if (!empty($PGV_IMAGES["relationship"]["small"])) {
                             $submenu->addIcon($PGV_IMAGE_DIR . "/" . $PGV_IMAGES["relationship"]["small"]);
                         }
                         $submenu->addClass("submenuitem{$ff}", "submenuitem_hover{$ff}", "", "icon_small_relationship");
                         $menu->addSubmenu($submenu);
                     }
                 }
                 break;
             case "statistics":
                 //-- statistics plot
                 $submenu = new Menu($pgv_lang["statistics"], "statistics.php");
                 if (!empty($PGV_IMAGES["statistic"]["small"])) {
                     $submenu->addIcon($PGV_IMAGE_DIR . "/" . $PGV_IMAGES["statistic"]["small"]);
                 }
                 $submenu->addClass("submenuitem{$ff}", "submenuitem_hover{$ff}", "", "icon_small_statistic");
                 $menu->addSubmenu($submenu);
                 break;
             case "treenav":
                 //-- interactive tree
                 $link = "treenav.php?ged={$GEDCOM}&rootid={$rootid}";
                 $submenu = new Menu($pgv_lang["interactive_tree"], encode_url($link));
                 if (!empty($PGV_IMAGES["gedcom"]["small"])) {
                     $submenu->addIcon($PGV_IMAGE_DIR . "/" . $PGV_IMAGES["gedcom"]["small"]);
                 }
                 $submenu->addClass("submenuitem{$ff}", "submenuitem_hover{$ff}", "", "icon_small_gedcom");
                 $menu->addSubmenu($submenu);
                 break;
         }
     }
     return $menu;
 }
开发者ID:bitweaver,项目名称:phpgedview,代码行数:101,代码来源:class_menubar.php

示例12: print_pedigree_person_nav

/**
* print the information for an individual chart box
*
* find and print a given individuals information for a pedigree chart
* @param string $pid the Gedcom Xref ID of the   to print
* @param int $style the style to print the box in, 1 for smaller boxes, 2 for larger boxes
* @param boolean $show_famlink set to true to show the icons for the popup links and the zoomboxes
* @param int $count on some charts it is important to keep a count of how many boxes were printed
*/
function print_pedigree_person_nav($pid, $style = 1, $show_famlink = true, $count = 0, $personcount = "1")
{
    global $HIDE_LIVE_PEOPLE, $SHOW_LIVING_NAMES, $PRIV_PUBLIC, $factarray, $ZOOM_BOXES, $LINK_ICONS, $view, $SCRIPT_NAME, $GEDCOM;
    global $pgv_lang, $MULTI_MEDIA, $SHOW_HIGHLIGHT_IMAGES, $bwidth, $bheight, $PEDIGREE_FULL_DETAILS, $SHOW_ID_NUMBERS, $SHOW_PEDIGREE_PLACES;
    global $CONTACT_EMAIL, $CONTACT_METHOD, $TEXT_DIRECTION, $DEFAULT_PEDIGREE_GENERATIONS, $OLD_PGENS, $talloffset, $PEDIGREE_LAYOUT, $MEDIA_DIRECTORY;
    global $PGV_IMAGE_DIR, $PGV_IMAGES, $ABBREVIATE_CHART_LABELS, $USE_MEDIA_VIEWER;
    global $chart_style, $box_width, $generations, $show_spouse, $show_full;
    global $CHART_BOX_TAGS, $SHOW_LDS_AT_GLANCE, $PEDIGREE_SHOW_GENDER;
    global $SEARCH_SPIDER;
    global $spouselinks, $parentlinks, $step_parentlinks, $persons, $person_step, $person_parent, $tabno, $theme_name, $spousetag;
    global $natdad, $natmom;
    if ($style != 2) {
        $style = 1;
    }
    if (empty($show_full)) {
        $show_full = 0;
    }
    if (empty($PEDIGREE_FULL_DETAILS)) {
        $PEDIGREE_FULL_DETAILS = 0;
    }
    if (!isset($OLD_PGENS)) {
        $OLD_PGENS = $DEFAULT_PEDIGREE_GENERATIONS;
    }
    if (!isset($talloffset)) {
        $talloffset = $PEDIGREE_LAYOUT;
    }
    $person = Person::getInstance($pid);
    if ($pid == false || empty($person)) {
        $spouselinks = false;
        $parentlinks = false;
        $step_parentlinks = false;
    }
    $tmp = array('M' => '', 'F' => 'F', 'U' => 'NN');
    $isF = $tmp[$person->getSex()];
    $spouselinks = "";
    $parentlinks = "";
    $step_parentlinks = "";
    $disp = $person->canDisplayDetails();
    if ($person->canDisplayName()) {
        if ($show_famlink && empty($SEARCH_SPIDER)) {
            if ($LINK_ICONS != "disabled") {
                //-- draw a box for the family popup
                $spouselinks .= "<span class=\"flyout\"><b>" . $pgv_lang['family'] . "</b></span><br />";
                $parentlinks .= "<span class=\"flyout\"><b>" . $pgv_lang['parents'] . "</b></span><br />";
                $step_parentlinks .= "<span class=\"flyout\"><b>" . $pgv_lang['parents'] . "</b></span><br />";
                $persons = "";
                $person_parent = "";
                $person_step = "";
                //-- parent families --------------------------------------
                $fams = $person->getChildFamilies();
                foreach ($fams as $famid => $family) {
                    if (!is_null($family)) {
                        $husb = $family->getHusband($person);
                        $wife = $family->getWife($person);
                        // $spouse = $family->getSpouse($person);
                        $children = $family->getChildren();
                        $num = count($children);
                        // Husband ------------------------------
                        if ($husb || $num > 0) {
                            if ($TEXT_DIRECTION == "ltr") {
                                $title = $pgv_lang["familybook_chart"] . ": " . $famid;
                            } else {
                                $title = $famid . " :" . $pgv_lang["familybook_chart"];
                            }
                            if ($husb) {
                                $person_parent = "Yes";
                                if ($TEXT_DIRECTION == "ltr") {
                                    $title = $pgv_lang["indi_info"] . ": " . $husb->getXref();
                                } else {
                                    $title = $husb->getXref() . " :" . $pgv_lang["indi_info"];
                                }
                                $parentlinks .= "<a href=\"" . encode_url($husb->getLinkUrl() . "&amp;tab={$tabno}") . "\">";
                                $parentlinks .= "&nbsp;" . PrintReady($husb->getFullName());
                                $parentlinks .= "</a>";
                                $parentlinks .= "<br />";
                                $natdad = "yes";
                            }
                        }
                        // Wife ------------------------------
                        if ($wife || $num > 0) {
                            if ($TEXT_DIRECTION == "ltr") {
                                $title = $pgv_lang["familybook_chart"] . ": " . $famid;
                            } else {
                                $title = $famid . " :" . $pgv_lang["familybook_chart"];
                            }
                            if ($wife) {
                                $person_parent = "Yes";
                                if ($TEXT_DIRECTION == "ltr") {
                                    $title = $pgv_lang["indi_info"] . ": " . $wife->getXref();
                                } else {
                                    $title = $wife->getXref() . " :" . $pgv_lang["indi_info"];
//.........这里部分代码省略.........
开发者ID:bitweaver,项目名称:phpgedview,代码行数:101,代码来源:family_nav.php

示例13: autocomplete_INDI_SOUR_PAGE

/**
* returns INDI:SOUR:PAGE matching filter
* @return Array of string
*/
function autocomplete_INDI_SOUR_PAGE($FILTER, $OPTION)
{
    $rows = get_autocomplete_INDI_SOUR_PAGE($FILTER, $OPTION);
    $data = array();
    foreach ($rows as $row) {
        $person = Person::getInstance($row);
        if ($person->canDisplayDetails()) {
            // a single INDI may have multiple level 1 and level 2 sources
            for ($level = 1; $level <= 2; $level++) {
                $i = 1;
                do {
                    $srec = get_sub_record("SOUR @{$OPTION}@", $level, $person->gedrec, $i++);
                    $page = get_gedcom_value("PAGE", $level + 1, $srec);
                    if (stripos($page, $FILTER) !== false || empty($FILTER)) {
                        $data[] = $page;
                    }
                } while ($srec);
            }
        }
    }
    return $data;
}
开发者ID:rathervague,项目名称:phpgedview,代码行数:26,代码来源:autocomplete.php

示例14: init

 /**
  * Initialization function
  */
 function init()
 {
     global $USE_RIN, $MAX_ALIVE_AGE, $bwidth, $bheight, $pbwidth, $pbheight, $GEDCOM, $GEDCOM_DEFAULT_TAB, $pgv_lang, $PEDIGREE_FULL_DETAILS, $MAX_DESCENDANCY_GENERATIONS, $DEFAULT_PEDIGREE_GENERATIONS, $show_full;
     $this->sexarray["M"] = $pgv_lang["male"];
     $this->sexarray["F"] = $pgv_lang["female"];
     $this->sexarray["U"] = $pgv_lang["unknown"];
     // Extract parameters from form
     $this->pid = safe_GET_xref('pid');
     $this->show_full = safe_GET('show_full', array('0', '1'), $PEDIGREE_FULL_DETAILS);
     $this->chart_style = safe_GET_integer('chart_style', 0, 3, 0);
     $this->generations = safe_GET_integer('generations', 2, $MAX_DESCENDANCY_GENERATIONS, $DEFAULT_PEDIGREE_GENERATIONS);
     $this->box_width = safe_GET_integer('box_width', 50, 300, 100);
     // This is passed as a global.  A parameter would be better...
     $show_full = $this->show_full;
     if (!isset($this->view)) {
         $this->view = "";
     }
     if (!isset($this->personcount)) {
         $this->personcount = 1;
     }
     $this->Dbwidth *= $this->box_width / 100;
     if (!$this->show_full) {
         $bwidth *= $this->box_width / 150;
     } else {
         $bwidth *= $this->box_width / 100;
     }
     if (!$this->show_full) {
         $bheight = $bheight / 1.5;
     }
     $pbwidth = $bwidth + 12;
     $pbheight = $bheight + 14;
     $this->show_changes = safe_GET('show_changes');
     $this->action = safe_GET('action');
     // Validate form variables
     $this->pid = check_rootid($this->pid);
     if (strlen($this->name) < 30) {
         $this->cellwidth = "420";
     } else {
         $this->cellwidth = strlen($this->name) * 14;
     }
     $this->descPerson = Person::getInstance($this->pid);
     $this->name = $this->descPerson->getFullName();
     //-- if the person is from another gedcom then forward to the correct site
     /*
     if ($this->indi->isRemote()) {
     	header('Location: '.encode_url(decode_url($this->indi->getLinkUrl(), false)));
     	exit;
     }
     */
     if (!$this->isPrintPreview()) {
         $this->visibility = "hidden";
         $this->position = "absolute";
         $this->display = "none";
     }
     //-- perform the desired action
     switch ($this->action) {
         case "addfav":
             $this->addFavorite();
             break;
         case "accept":
             $this->acceptChanges();
             break;
         case "undo":
             $this->desc->undoChange();
             break;
     }
 }
开发者ID:bitweaver,项目名称:phpgedview,代码行数:70,代码来源:descendancy_ctrl.php

示例15: print_charts_block_config


//.........这里部分代码省略.........
        print " selected=\"selected\"";
    }
    ?>
><?php 
    print $pgv_lang["index_header"];
    ?>
</option>
			<option value="descendants"<?php 
    if ($config["type"] == "descendants") {
        print " selected=\"selected\"";
    }
    ?>
><?php 
    print $pgv_lang["descend_chart"];
    ?>
</option>
			<option value="hourglass"<?php 
    if ($config["type"] == "hourglass") {
        print " selected=\"selected\"";
    }
    ?>
><?php 
    print $pgv_lang["hourglass_chart"];
    ?>
</option>
			<?php 
    if (file_exists(PGV_ROOT . 'includes/classes/class_treenav.php')) {
        ?>
			<option value="treenav"<?php 
        if ($config["type"] == "treenav") {
            print " selected=\"selected\"";
        }
        ?>
><?php 
        print $pgv_lang["interactive_tree"];
        ?>
</option>
			<?php 
    }
    ?>
		</select>
	</td></tr>
	<tr>
		<td class="descriptionbox wrap width33"><?php 
    print $pgv_lang["show_details"];
    ?>
</td>
	<td class="optionbox">
		<select name="details">
				<option value="no" <?php 
    if ($config["details"] == "no") {
        print " selected=\"selected\"";
    }
    ?>
><?php 
    print $pgv_lang['no'];
    ?>
</option>
				<option value="yes" <?php 
    if ($config["details"] == "yes") {
        print " selected=\"selected\"";
    }
    ?>
><?php 
    print $pgv_lang['yes'];
    ?>
</option>
		</select>
		</td>
	</tr>
	<tr>
		<td class="descriptionbox wrap width33"><?php 
    print $pgv_lang["root_person"];
    ?>
</td>
		<td class="optionbox">
			<input type="text" name="pid" id="pid" value="<?php 
    print $config['pid'];
    ?>
" size="5" />
			<?php 
    print_findindi_link('pid', '');
    $root = Person::getInstance($config['pid']);
    if ($root) {
        echo ' <span class="list_item">', $root->getFullName(), $root->format_first_major_fact(PGV_EVENTS_BIRT, 1), '</span>';
    }
    ?>
		</td>
	</tr>
  	<?php 
    // Cache file life
    if ($ctype == "gedcom") {
        print "<tr><td class=\"descriptionbox wrap width33\">";
        print_help_link("cache_life_help", "qm");
        print $pgv_lang["cache_life"];
        print "</td><td class=\"optionbox\">";
        print "<input type=\"text\" name=\"cache\" size=\"2\" value=\"" . $config["cache"] . "\" />";
        print "</td></tr>";
    }
}
开发者ID:rathervague,项目名称:phpgedview,代码行数:101,代码来源:charts.php


注:本文中的Person::getInstance方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。