Пример #1
0
 function link()
 {
     global $_BASEURL;
     $url = $_BASEURL . "/family.php/" . $this->family->getId() . "/";
     $url .= linkPath($this->familyName());
     return linky(htmlentities($url));
 }
Пример #2
0
 function link()
 {
     global $_BASEURL;
     $url = $_BASEURL . "/source.php/" . $this->source->getSour() . "/";
     $url .= linkPath($this->source->getTitl());
     return linky(htmlentities($url));
 }
Пример #3
0
function _404($requested)
{
    $page = model('page');
    $page->title("Page Not Found!");
    $page->h1("You asked for <em>{$requested}</em>, but it isn't here!");
    $page->body .= "<p>You're searching for your ancestors, and we're searching for this lost page!</p>";
    $page->body .= "<p>Sorry the page you requested wasn't found. You can try a link above. The <a href='" . linky("{$_BASEURL}/people.php") . "'>People</a>";
    $page->body .= " page has a list of everyone, so that might be a good place to start.";
    $page->body .= "You could also try contacting the site owner.</p>";
    $page->body .= "<p>If you ARE the site owner you can contact <a href='http://treetrumpet.com/'>TreeTrumpet</a> for support.</p>";
    view('page', array('page' => $page));
}
Пример #4
0
function printSingleUrl($loc, $lastmod, $priority)
{
    $url = '';
    $url .= "<url>";
    $url .= "<loc>" . linky($loc) . "</loc>";
    if ($lastmod) {
        $url .= "<lastmod>";
        $url .= date('Y-m-d\\TH:i:s+00:00', $lastmod);
        $url .= "</lastmod>";
    }
    $url .= "<priority>{$priority}</priority>";
    $url .= "</url>";
    return $url;
}
Пример #5
0
 function webPath($file = NULL)
 {
     global $_BASEURL;
     $file = obje::relPath($file);
     $file = linky($_BASEURL . "/multimedia.php/{$file}");
     return $file;
 }
Пример #6
0
<?php

$page = model('page');
$gedcom = model('ttgedcom', array(__DIR__ . '/../family.ged'));
global $_BASEURL;
$page->canonical(linky($_BASEURL . '/map.php'));
controller('standard_meta_tags', array(&$gedcom, &$page));
$focusId = $gedcom->getFocusId();
$focus = $gedcom->getIndividual($focusId);
$geocoder = model('geocoder');
$eventTypes = array();
$allPlaces = array();
$pretty_gedcom = model('pretty_gedcom', $gedcom->gedcom);
foreach ($gedcom->gedcom->getIndi() as $individual) {
    $indi = model('individual', array($individual, $gedcom->gedcom, $pretty_gedcom));
    foreach ($indi->eventsList() as $event) {
        if ($plac = $event->getPlac()) {
            $eventTypes[$event->getType()][] = $plac->getPlac();
            $allPlaces[$plac->getPlac()][$indi->sortName()] = "<a href='" . $indi->link() . "' title='" . $indi->firstName() . "'>" . $indi->firstBold() . "</a>";
        }
    }
}
// Find top 5 used places for description
$mostUsedPlaces = array();
foreach ($allPlaces as $k => $people) {
    $mostUsedPlaces[$k] = count($people);
}
ksort($mostUsedPlaces);
if (count($mostUsedPlaces) > 10) {
    $mostUsedPlaces = array_slice($mostUsedPlaces, -10);
}
Пример #7
0
<?php

// Disable caching since we have variable output based on posted values
ob_end_clean();
global $_BASEURL;
$gedcom = model('ttgedcom', array(__DIR__ . '/../family.ged'));
$page = model('page');
controller('standard_meta_tags', array(&$gedcom, &$page));
$page->keywords[] = 'contact';
$page->canonical(linky($_BASEURL . '/contact.php'));
$page->title("Contact Me");
$page->css("css/contact.css");
$page->h1("Contact Me");
$page->body .= "<h2>Contact Information</h2>";
$page->body .= "<p>\n    I am interested in collaborating on my genealogy! If we're related, or you think \n    we may be, please contact me so we can collaborate.\n    </p>";
$contacts = array();
if ($submitter = $gedcom->getSubmitter()) {
    if ($form = $submitter->emailForm()) {
        if (count($_POST) > 0) {
            if ($sentMail = $form->sendMail()) {
                $page->bodyright .= "<p class='sentstatus success'>Your message has been sent.</p>";
            } else {
                $page->bodyright .= "<p class='sentstatus failure'>There was an error sending your email message!</p>";
            }
        }
        if ($formhtml = $form->form()) {
            $page->bodyright .= "<h3>Email Form</h3>";
            $page->bodyright .= $formhtml;
        }
    }
    if ($email = $submitter->emailAddress()) {
Пример #8
0
    $page->keywords[] = $one->surname();
}
$page->body .= "<h2>Explore the family of " . $focus->firstBold() . "</h2>";
$page->body .= "<p>";
$page->body .= "This website was created to share the genealogy of ancestors I";
$page->body .= " care about, including " . $focus->firstName() . ". It was generated automatically from a GEDCOM file";
$page->body .= " so if you don't see something you're looking for please contact me, it may just not have made it into the GEDCOM!";
$page->body .= "</p>";
$page->body .= "<p>";
$page->body .= "If we have a shared research interest, I'd be happy to cross-reference our notes.";
$page->body .= "</p>";
$page->body .= "<p>";
$page->body .= "If you have suggestions on how to improve this site, please let";
$page->body .= "  the folks over at <a href='http://treetrumpet.com/'>TreeTrumpet</a> know and I'll get the new features the next time I upgrade.";
$page->body .= "</p>";
$page->body .= "<p>";
$page->body .= "Thanks for stopping by!";
$page->body .= "</p>";
$page->bodyright .= view('feature_preview', array('id' => 'overview', 'title' => 'Features', 'text' => '<p>You can explore this pedigree with these tools. Each ancestor and family have their own personal pages to explore as well.</p>
    <p>If you have other tools you\'d like to see here, please let <a href="http://treetrumpet.com">TreeTrumpet</a> know.</p>', 'link' => linky($_BASEURL . '/tree.php'), 'img' => 'img/treetrumpet.png'), true);
$page->bodyright .= view('feature_preview', array('id' => 'pedigreetree', 'title' => 'Pedigree Tree', 'text' => '<p>Pan, zoom and click around this interactive tree view of the family tree.</p>
    <p>This page view will help you visualize your family tree.</p>', 'link' => linky($_BASEURL . '/tree.php'), 'img' => 'img/tree.png'), true);
$page->bodyright .= view('feature_preview', array('id' => 'eventsmap', 'title' => 'Events Map', 'text' => '<p>See where ancestors important events occurred on this interactive map.</p>
    <p>Currently the map defaults to one event per person.</p>
    ', 'link' => linky($_BASEURL . '/map.php'), 'img' => 'img/map.png'), true);
$page->bodyright .= view('feature_preview', array('id' => 'people', 'title' => 'People', 'text' => '<p>Drill down to the ancestor you\'re looking for with the filter and sorting tools on this interactive table.</p>', 'link' => linky($_BASEURL . '/table.php'), 'img' => 'img/people.png'), true);
$csses = array("http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css", "css/index.css");
foreach ($csses as $css) {
    $page->css($css);
}
view('page_v_split', array('page' => $page, 'menu' => 'index'));
Пример #9
0
foreach ($closePeople as $close) {
    $one = $gedcom->getIndividual($close);
    $fourNames[] = $one->firstName();
    $page->keywords[] = $one->surname();
}
$page->description .= "Pedigree Tree view of relatives of " . $focus->firstName() . ", including " . implode(',', $fourNames);
$treeNav = "<p>Back to <a href='" . $focus->link() . "' class='refocusTree' data-id='{$focusId}'>" . $focus->firstBold() . "</a></p>";
$treeNav .= "<p style='display:none;'>Filter: <input type='text' id='autocomplete'/> (<span class='ttfakelink' id='searchhelp'>Help!</span>)</p>";
$treeNav .= "<ul class='ancestorlist'>";
foreach ($ancestors as $id => $firstname) {
    $ancestor = $gedcom->getIndividual($id);
    $treeNav .= "<li><a href='" . $ancestor->link() . "' class='refocusTree' data-id='{$id}'>" . $ancestor->firstBold() . "</a></li>";
}
$treeNav .= "</ul>";
$hidden = "\n<div id='details' style='display:none'>\n    <h3>All about <span class='name'></span></h3>\n    <p>\n        <a id='refocuslink' onclick='pt.refocus(this.className);return false;' class='' href='#'>Focus Tree on Me</a><br>\n        <a id='gotopage' href='#' class=''>See all details</a>\n    </p>\n    <h4>Gender</h4>\n    <div class='gender'></div>\n    <h4>Events</h4>\n    <div class='events'></div>\n</div>\n<div id='help' style='display:none'>\n    <h3>Filtering Help</h3>\n        <p>Filtering is case-insensitive</p>\n        <dl>\n            <dt>^</dt>\n                <dd>The start of the name</dd>\n                <dd><em>^mar</em> will match <em>MariAnne</em>, but not <em>AnnaMarie</em></dd>\n            <dt>\$</dt>\n                <dd>The end of the name</dd>\n                <dd><em>ello\$</em> will match <em>Ozzello</em>, but not <em>Ellos</em></dd>\n            <dt>*</dt>\n                <dd>Match 0 or more of the previous character</dd>\n                <dd><em>mic*</em> will match both <em>Emil</em> and <em>Michael</em></dd>\n            <dt>.</dt>\n                <dd>Match any single character</dd>\n                <dd><em>a.a</em> will match both <em>ana</em> and <em>ada</em></dd>\n            <dt>.*</dt>\n                <dd>Match any number of any character</dd>\n                <dd><em>mc.*nn.*s</em> will match <em>McGinnis</em>, <em>McGuinness</em> and <em>McGennis</em></dd>\n        </dl>\n    <h4>Advanced Filtering</h4>\n    <p>The filter uses case insensitive <a href='http://www.diveintojavascript.com/articles/javascript-regular-expressions'>JavaScript Regular Expressions</a>, have fun!</p>\n</div>\n";
$page->canonical(linky($_BASEURL . '/tree.php'));
$csses = array('http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css', 'css/3rdparty/ui/ui.slider.css', 'css/3rdparty/tree.css', 'css/tree.css');
foreach ($csses as $css) {
    $page->css($css);
}
$scripts = array("js/3rdparty/excanvas.js", "http://code.jquery.com/jquery-1.9.1.js", "http://code.jquery.com/ui/1.10.3/jquery-ui.js", "js/3rdparty/jquery.mousewheel.js", "js/3rdparty/sharing-time.js", "js/3rdparty/sharing-time-ui.js", "js/3rdparty/sharing-time-chart.js", "js/3rdparty/jsZoom.js", "js/3rdparty/make_chart.js", "js/3rdparty/tree.js", "js/tree.js");
$page->js("focus_person_id = '" . $focus->getId() . "';", TRUE);
foreach ($scripts as $script) {
    $page->js($script);
}
$page->title($focus->firstName() . " Family Tree");
$page->h1("The " . $focus->firstBold() . " Family Tree");
$page->body .= $treeNav;
$page->bodyright .= "<div id='tt-tree'>";
$page->bodyright .= "<p>Hold tight, the tree is loading!</p>";
$page->bodyright .= "<p>This is an interactive pedigree tree.</p>";
Пример #10
0
<?php

global $_BASEURL;
$shareUrl = urlencode(linky($_BASEURL . $_SERVER['REQUEST_URI']));
print "<div class='socialButtons'>";
print "<a href='https://www.facebook.com/sharer/sharer.php?u={$shareUrl}' target='_blank'><img title='Share on Facebook' alt='Share on Facebook' src='{$_BASEURL}/img/elegantthemes_icons/facebook.png'/></a>";
print "<a href='https://plus.google.com/share?url={$shareUrl}' target='_blank'><img title='Share on Google' alt='Share on Google' src='{$_BASEURL}/img/elegantthemes_icons/googleplus.png'/></a>";
print "<a href='https://twitter.com/share?url={$shareUrl}' target='_blank'><img title='Share on Twitter' alt='Share on Twitter' src='{$_BASEURL}/img/elegantthemes_icons/twitter.png'/></a>";
print "</div>";
Пример #11
0
<?php

$noscript = "";
$noscript .= "<div class='tttablectrl'></div><div class='tttablediv'><table class='tttable'>\n    <thead><tr><th>ID</th><th>Name</th><th>Gender</th><th>Parents</th><th>Children</th><th>Events</th></tr></thead><tbody>";
foreach ($ancestors as $id => $ancestor) {
    $id = htmlentities($id);
    $noscript .= "<tr id='{$id}'>";
    // ID
    $noscript .= "<td>{$id}</td>";
    // names
    $noscript .= "<td><a class='ttindipage' href='" . linky("individual.php/{$id}/" . htmlentities(trim(preg_replace("/-+/", '-', preg_replace("/[^a-zA-Z0-9\\.]/", '-', $ancestor['name'])), '-'))) . "'>";
    foreach ($ancestor['names'] as $name) {
        $noscript .= preg_replace('|/(.*)/|', "<span class='ttln'>\$1</span>", htmlentities($name));
    }
    $noscript .= "</a></td>";
    // Gender
    $noscript .= "<td>" . $ancestor['gender'] . "</td>";
    // Parents
    $noscript .= "<td>";
    if (array_key_exists('fathers', $ancestor)) {
        $noscript .= "<ul>";
        foreach ($ancestor['fathers'] as $father) {
            $noscript .= "<li class='ttnowrap'><a class='ttpersonlink' href='#" . htmlentities($father) . "'>" . preg_replace('|/(.*)/|', "<span class='ttln'>\$1</span>", htmlentities($ancestors[$father]['name'])) . "</a></li>";
        }
        $noscript .= "</ul>";
    }
    if (array_key_exists('mothers', $ancestor)) {
        $noscript .= "<ul>";
        foreach ($ancestor['mothers'] as $mother) {
            $noscript .= "<li class='ttnowrap'><a class='ttpersonlink' href='#{$mother}'>" . preg_replace('|/(.*)/|', "<span class='ttln'>\$1</span>", htmlentities($ancestors[$mother]['name'])) . "</a></li>";
        }
Пример #12
0
<?php

global $_BASEURL;
print "<div id='tt-header'>";
print "<nav><ul>";
foreach ($menus as $ctrl => $label) {
    $curClass = '';
    if ($ctrl == $current) {
        $curClass = 'current_page';
    }
    print "<li class='{$curClass}'><a href='" . linky("{$_BASEURL}/{$ctrl}.php") . "' title='" . htmlentities($label) . "'>" . htmlentities($label) . "</a></li>";
}
print "</ul></nav>";
view('socialbuttons');
print "</div>";