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


PHP WT_Filter::getBool方法代码示例

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


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

示例1: __construct

 public function __construct()
 {
     parent::__construct();
     // Extract the request parameters
     $this->show_thumbs = WT_Filter::getBool('show_thumbs');
     if ($this->root && $this->root->canShowName()) {
         $this->setPageTitle(WT_I18N::translate('Compact tree of %s', $this->root->getFullName()));
     } else {
         $this->setPageTitle(WT_I18N::translate('Compact tree'));
     }
     $this->treeid = ancestry_array($this->rootid, 5);
 }
开发者ID:brambravo,项目名称:webtrees,代码行数:12,代码来源:Compact.php

示例2: __construct

 public function __construct()
 {
     parent::__construct();
     $this->surname = WT_Filter::get('surname');
     $this->soundex_std = WT_Filter::getBool('soundex_std');
     $this->soundex_dm = WT_Filter::getBool('soundex_dm');
     if ($this->surname) {
         $this->setPageTitle(WT_I18N::translate('Branches of the %s family', WT_Filter::escapeHtml($this->surname)));
         $this->loadIndividuals();
         $self = WT_Individual::getInstance(WT_USER_GEDCOM_ID);
         if ($self) {
             $this->loadAncestors(WT_Individual::getInstance(WT_USER_GEDCOM_ID), 1);
         }
     } else {
         $this->setPageTitle(WT_I18N::translate('Branches'));
     }
 }
开发者ID:brambravo,项目名称:webtrees,代码行数:17,代码来源:Branches.php

示例3: define

// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
use WT\Auth;
define('WT_SCRIPT_NAME', 'find.php');
require './includes/session.php';
require_once WT_ROOT . 'includes/functions/functions_print_lists.php';
$controller = new WT_Controller_Simple();
$type = WT_Filter::get('type');
$filter = WT_Filter::get('filter');
$action = WT_Filter::get('action');
$callback = WT_Filter::get('callback', '[a-zA-Z0-9_]+', 'paste_id');
$media = WT_Filter::get('media');
$all = WT_Filter::getBool('all');
$subclick = WT_Filter::get('subclick');
$choose = WT_Filter::get('choose', '[a-zA-Z0-9_]+', '0all');
$qs = WT_Filter::get('tags');
// Retrives the currently selected tags in the opener window (reading curTags value of the query string)
// $preselDefault will be set to the array of DEFAULT preselected tags
// $preselCustom will be set to the array of CUSTOM preselected tags
function getPreselectedTags(&$preselDefault, &$preselCustom)
{
    global $qs;
    $all = strlen($qs) ? explode(',', strtoupper($qs)) : array();
    $preselDefault = array();
    $preselCustom = array();
    foreach ($all as $one) {
        if (WT_Gedcom_Tag::isTag($one)) {
            $preselDefault[] = $one;
开发者ID:sadr110,项目名称:webtrees,代码行数:31,代码来源:find.php

示例4: define

// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
define('WT_SCRIPT_NAME', 'fanchart.php');
require './includes/session.php';
require WT_ROOT . 'includes/functions/functions_edit.php';
$controller = new WT_Controller_Fanchart();
if (WT_Filter::getBool('img')) {
    Zend_Session::writeClose();
    $controller->generate_fan_chart('png', $fanChart);
    // $fanChart comes from the theme
    exit;
}
$controller->pageHeader()->addExternalJavascript(WT_STATIC_URL . 'js/autocomplete.js')->addInlineJavascript('
		autocomplete();
		var WT_FANCHART = (function() {
			jQuery("area")
				.click(function (e) {
					e.stopPropagation();
					e.preventDefault();
					var target = jQuery(this.hash);
					target
						// position the menu centered immediately above the mouse click position and
开发者ID:jacoline,项目名称:webtrees,代码行数:31,代码来源:fanchart.php

示例5: getBlock

    public function getBlock($block_id, $template = true, $cfg = null)
    {
        global $ctype, $foundlist;
        $filter = get_block_setting($block_id, 'filter', 'all');
        $controls = get_block_setting($block_id, 'controls', true);
        $start = get_block_setting($block_id, 'start', false) || WT_Filter::getBool('start');
        $block = get_block_setting($block_id, 'block', true);
        // We can apply the filters using SQL
        // Do not use "ORDER BY RAND()" - it is very slow on large tables.  Use PHP::array_rand() instead.
        $all_media = WT_DB::prepare("SELECT m_id FROM `##media`" . " WHERE m_file = ?" . " AND m_ext  IN (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, '')" . " AND m_type IN (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, '')")->execute(array(WT_GED_ID, get_block_setting($block_id, 'filter_avi', false) ? 'avi' : NULL, get_block_setting($block_id, 'filter_bmp', true) ? 'bmp' : NULL, get_block_setting($block_id, 'filter_gif', true) ? 'gif' : NULL, get_block_setting($block_id, 'filter_jpeg', true) ? 'jpg' : NULL, get_block_setting($block_id, 'filter_jpeg', true) ? 'jpeg' : NULL, get_block_setting($block_id, 'filter_mp3', false) ? 'mp3' : NULL, get_block_setting($block_id, 'filter_ole', true) ? 'ole' : NULL, get_block_setting($block_id, 'filter_pcx', true) ? 'pcx' : NULL, get_block_setting($block_id, 'filter_pdf', false) ? 'pdf' : NULL, get_block_setting($block_id, 'filter_png', true) ? 'png' : NULL, get_block_setting($block_id, 'filter_tiff', true) ? 'tiff' : NULL, get_block_setting($block_id, 'filter_wav', false) ? 'wav' : NULL, get_block_setting($block_id, 'filter_audio', false) ? 'audio' : NULL, get_block_setting($block_id, 'filter_book', true) ? 'book' : NULL, get_block_setting($block_id, 'filter_card', true) ? 'card' : NULL, get_block_setting($block_id, 'filter_certificate', true) ? 'certificate' : NULL, get_block_setting($block_id, 'filter_coat', true) ? 'coat' : NULL, get_block_setting($block_id, 'filter_document', true) ? 'document' : NULL, get_block_setting($block_id, 'filter_electronic', true) ? 'electronic' : NULL, get_block_setting($block_id, 'filter_fiche', true) ? 'fiche' : NULL, get_block_setting($block_id, 'filter_film', true) ? 'film' : NULL, get_block_setting($block_id, 'filter_magazine', true) ? 'magazine' : NULL, get_block_setting($block_id, 'filter_manuscript', true) ? 'manuscript' : NULL, get_block_setting($block_id, 'filter_map', true) ? 'map' : NULL, get_block_setting($block_id, 'filter_newspaper', true) ? 'newspaper' : NULL, get_block_setting($block_id, 'filter_other', true) ? 'other' : NULL, get_block_setting($block_id, 'filter_painting', true) ? 'painting' : NULL, get_block_setting($block_id, 'filter_photo', true) ? 'photo' : NULL, get_block_setting($block_id, 'filter_tombstone', true) ? 'tombstone' : NULL, get_block_setting($block_id, 'filter_video', false) ? 'video' : NULL))->fetchOneColumn();
        // Keep looking through the media until a suitable one is found.
        $random_media = null;
        while ($all_media) {
            $n = array_rand($all_media);
            $media = WT_Media::getInstance($all_media[$n]);
            if ($media->canShow() && !$media->isExternal()) {
                // Check if it is linked to a suitable individual
                foreach ($media->linkedIndividuals('OBJE') as $indi) {
                    if ($filter == 'all' || $filter == 'indi' && strpos($indi->getGedcom(), "\n1 OBJE @" . $media->getXref() . '@') !== false || $filter == 'event' && strpos($indi->getGedcom(), "\n2 OBJE @" . $media->getXref() . '@') !== false) {
                        // Found one :-)
                        $random_media = $media;
                        break 2;
                    }
                }
            }
            unset($all_media[$n]);
        }
        $id = $this->getName() . $block_id;
        $class = $this->getName() . '_block';
        if ($ctype == 'gedcom' && WT_USER_GEDCOM_ADMIN || $ctype == 'user' && WT_USER_ID) {
            $title = '<i class="icon-admin" title="' . WT_I18N::translate('Configure') . '" onclick="modalDialog(\'block_edit.php?block_id=' . $block_id . '\', \'' . $this->getTitle() . '\');"></i>';
        } else {
            $title = '';
        }
        $title .= $this->getTitle();
        if ($random_media) {
            $content = "<div id=\"random_picture_container{$block_id}\">";
            if ($controls) {
                if ($start) {
                    $icon_class = 'icon-media-stop';
                } else {
                    $icon_class = 'icon-media-play';
                }
                $content .= '<div dir="ltr" class="center" id="random_picture_controls' . $block_id . '"><br>';
                $content .= "<a href=\"#\" onclick=\"togglePlay(); return false;\" id=\"play_stop\" class=\"" . $icon_class . "\" title=\"" . WT_I18N::translate('Play') . "/" . WT_I18N::translate('Stop') . '"></a>';
                $content .= '<a href="#" onclick="jQuery(\'#block_' . $block_id . '\').load(\'index.php?ctype=' . $ctype . '&amp;action=ajax&amp;block_id=' . $block_id . '\');return false;" title="' . WT_I18N::translate('Next image') . '" class="icon-media-next"></a>';
                $content .= '</div><script>
					var play = false;
						function togglePlay() {
							if (play) {
								play = false;
								jQuery("#play_stop").removeClass("icon-media-stop").addClass("icon-media-play");
							}
							else {
								play = true;
								playSlideShow();
								jQuery("#play_stop").removeClass("icon-media-play").addClass("icon-media-stop");
							}
						}

						function playSlideShow() {
							if (play) {
								window.setTimeout("reload_image()", 6000);
							}
						}
						function reload_image() {
							if (play) {
								jQuery("#block_' . $block_id . '").load("index.php?ctype=' . $ctype . '&action=ajax&block_id=' . $block_id . '&start=1");
							}
						}
					</script>';
            }
            if ($start) {
                $content .= '<script>togglePlay();</script>';
            }
            $content .= '<div class="center" id="random_picture_content' . $block_id . '">';
            $content .= '<table id="random_picture_box"><tr><td';
            if ($block) {
                $content .= ' class="details1"';
            } else {
                $content .= ' class="details2"';
            }
            $content .= ' >';
            $content .= $random_media->displayImage();
            if ($block) {
                $content .= '<br>';
            } else {
                $content .= '</td><td class="details2">';
            }
            $content .= '<a href="' . $random_media->getHtmlUrl() . '"><b>' . $random_media->getFullName() . '</b></a><br>';
            foreach ($random_media->linkedIndividuals('OBJE') as $individual) {
                $content .= '<a href="' . $individual->getHtmlUrl() . '">' . WT_I18N::translate('View person') . ' — ' . $individual->getFullname() . '</a><br>';
            }
            foreach ($random_media->linkedFamilies('OBJE') as $family) {
                $content .= '<a href="' . $family->getHtmlUrl() . '">' . WT_I18N::translate('View family') . ' — ' . $family->getFullname() . '</a><br>';
            }
            foreach ($random_media->linkedSources('OBJE') as $source) {
                $content .= '<a href="' . $source->getHtmlUrl() . '">' . WT_I18N::translate('View source') . ' — ' . $source->getFullname() . '</a><br>';
            }
            $content .= '<br><div class="indent">';
//.........这里部分代码省略.........
开发者ID:brambravo,项目名称:webtrees,代码行数:101,代码来源:module.php

示例6: round

    WT_DB::exec("COMMIT");
    $controller->addInlineJavascript('jQuery("#import' . $gedcom_id . '").toggle();' . 'jQuery("#actions' . $gedcom_id . '").toggle();');
    exit;
}
// Calculate progress so far
$percent = 100 * ($row->import_offset / $row->import_total);
$status = WT_I18N::translate('Loading data from GEDCOM: %.1f%%', $percent);
echo '<div id="progressbar', $gedcom_id, '"><div style="position:absolute;">', $status, '</div></div>';
$controller->addInlineJavascript('jQuery("#progressbar' . $gedcom_id . '").progressbar({value: ' . round($percent, 1) . '});');
$first_time = $row->import_offset == 0;
// Run for one second.  This keeps the resource requirements low.
for ($end_time = microtime(true) + 1.0; microtime(true) < $end_time;) {
    $data = WT_DB::prepare("SELECT gedcom_chunk_id, REPLACE(chunk_data, '\r', '\n') AS chunk_data" . " FROM `##gedcom_chunk`" . " WHERE gedcom_id=? AND NOT imported" . " ORDER BY gedcom_chunk_id" . " LIMIT 1")->execute(array($gedcom_id))->fetchOneRow();
    // If we are at the start position, do some tidying up
    if ($first_time) {
        $keep_media = WT_Filter::getBool('keep_media' . $gedcom_id);
        // Delete any existing genealogical data
        empty_database($gedcom_id, $keep_media);
        set_gedcom_setting($gedcom_id, 'imported', false);
        // Remove any byte-order-mark
        WT_DB::prepare("UPDATE `##gedcom_chunk`" . " SET chunk_data=TRIM(LEADING ? FROM chunk_data)" . " WHERE gedcom_chunk_id=?")->execute(array(WT_UTF8_BOM, $data->gedcom_chunk_id));
        // Re-fetch the data, now that we have removed the BOM
        $data = WT_DB::prepare("SELECT gedcom_chunk_id, REPLACE(chunk_data, '\r', '\n') AS chunk_data" . " FROM `##gedcom_chunk`" . " WHERE gedcom_chunk_id=?")->execute(array($data->gedcom_chunk_id))->fetchOneRow();
        if (substr($data->chunk_data, 0, 6) != '0 HEAD') {
            WT_DB::exec("ROLLBACK");
            echo WT_I18N::translate('Invalid GEDCOM file - no header record found.');
            $controller->addInlineJavascript('jQuery("#actions' . $gedcom_id . '").toggle();');
            exit;
        }
        // What character set is this?  Need to convert it to UTF8
        if (preg_match('/\\n[ \\t]*1 CHAR(?:ACTER)? (.+)/', $data->chunk_data, $match)) {
开发者ID:brambravo,项目名称:webtrees,代码行数:31,代码来源:import.php

示例7: define

// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
use WT\Log;
define('WT_SCRIPT_NAME', 'mediafirewall.php');
require './includes/session.php';
Zend_Session::writeClose();
$mid = WT_Filter::get('mid', WT_REGEX_XREF);
$thumb = WT_Filter::getBool('thumb');
$media = WT_Media::getInstance($mid);
// Send a “Not found” error as an image
function send404AndExit()
{
    $error = WT_I18N::translate('The media file was not found in this family tree');
    $width = mb_strlen($error) * 6.5 + 50;
    $height = 60;
    $im = imagecreatetruecolor($width, $height);
    /* Create a black image */
    $bgc = imagecolorallocate($im, 255, 255, 255);
    /* set background color */
    imagefilledrectangle($im, 2, 2, $width - 4, $height - 4, $bgc);
    /* create a rectangle, leaving 2 px border */
    embedText($im, $error, 100, "255, 0, 0", "", "top", "left");
    header('HTTP/1.0 404 Not Found');
开发者ID:brambravo,项目名称:webtrees,代码行数:31,代码来源:mediafirewall.php

示例8: adminPlaces

    private function adminPlaces()
    {
        require WT_ROOT . 'includes/functions/functions_edit.php';
        $action = WT_Filter::get('action');
        $parent = WT_Filter::get('parent');
        $inactive = WT_Filter::getBool('inactive');
        $deleteRecord = WT_Filter::get('deleteRecord');
        if (!isset($parent)) {
            $parent = 0;
        }
        $controller = new WT_Controller_Page();
        $controller->restrictAccess(Auth::isAdmin());
        if ($action == 'ExportFile' && Auth::isAdmin()) {
            Zend_Session::writeClose();
            $tmp = $this->placeIdToHierarchy($parent);
            $maxLevel = $this->getHighestLevel();
            if ($maxLevel > 8) {
                $maxLevel = 8;
            }
            $tmp[0] = 'places';
            $outputFileName = preg_replace('/[:;\\/\\\\(\\)\\{\\}\\[\\] $]/', '_', implode('-', $tmp)) . '.csv';
            header('Content-Type: application/octet-stream');
            header('Content-Disposition: attachment; filename="' . $outputFileName . '"');
            echo '"', WT_I18N::translate('Level'), '";"', WT_I18N::translate('Country'), '";';
            if ($maxLevel > 0) {
                echo '"', WT_I18N::translate('State'), '";';
            }
            if ($maxLevel > 1) {
                echo '"', WT_I18N::translate('County'), '";';
            }
            if ($maxLevel > 2) {
                echo '"', WT_I18N::translate('City'), '";';
            }
            if ($maxLevel > 3) {
                echo '"', WT_I18N::translate('Place'), '";';
            }
            if ($maxLevel > 4) {
                echo '"', WT_I18N::translate('Place'), '";';
            }
            if ($maxLevel > 5) {
                echo '"', WT_I18N::translate('Place'), '";';
            }
            if ($maxLevel > 6) {
                echo '"', WT_I18N::translate('Place'), '";';
            }
            if ($maxLevel > 7) {
                echo '"', WT_I18N::translate('Place'), '";';
            }
            echo '"', WT_I18N::translate('Longitude'), '";"', WT_I18N::translate('Latitude'), '";';
            echo '"', WT_I18N::translate('Zoom level'), '";"', WT_I18N::translate('Icon'), '";', WT_EOL;
            $this->outputLevel($parent);
            exit;
        }
        $controller->setPageTitle(WT_I18N::translate('Google Maps™'))->pageHeader();
        ?>
		<table id="gm_config">
			<tr>
				<th>
					<a href="module.php?mod=googlemap&amp;mod_action=admin_config">
						<?php 
        echo WT_I18N::translate('Google Maps™ preferences');
        ?>
					</a>
				</th>
				<th>
					<a class="current" href="module.php?mod=googlemap&amp;mod_action=admin_places">
						<?php 
        echo WT_I18N::translate('Geographic data');
        ?>
					</a>
				</th>
				<th>
					<a href="module.php?mod=googlemap&amp;mod_action=admin_placecheck">
						<?php 
        echo WT_I18N::translate('Place check');
        ?>
					</a>
				</th>
			</tr>
		</table>
		<?php 
        if ($action == 'ImportGedcom') {
            $placelist = array();
            $j = 0;
            $gedcom_records = WT_DB::prepare("SELECT i_gedcom FROM `##individuals` WHERE i_file=? UNION ALL SELECT f_gedcom FROM `##families` WHERE f_file=?")->execute(array(WT_GED_ID, WT_GED_ID))->fetchOneColumn();
            foreach ($gedcom_records as $gedrec) {
                $i = 1;
                $placerec = get_sub_record(2, '2 PLAC', $gedrec, $i);
                while (!empty($placerec)) {
                    if (preg_match("/2 PLAC (.+)/", $placerec, $match)) {
                        $placelist[$j] = array();
                        $placelist[$j]['place'] = trim($match[1]);
                        if (preg_match("/4 LATI (.*)/", $placerec, $match)) {
                            $placelist[$j]['lati'] = trim($match[1]);
                            if ($placelist[$j]['lati'][0] != 'N' && $placelist[$j]['lati'][0] != 'S') {
                                if ($placelist[$j]['lati'] < 0) {
                                    $placelist[$j]['lati'][0] = 'S';
                                } else {
                                    $placelist[$j]['lati'] = 'N' . $placelist[$j]['lati'];
                                }
//.........这里部分代码省略.........
开发者ID:jacoline,项目名称:webtrees,代码行数:101,代码来源:module.php

示例9: __construct

 function __construct()
 {
     global $WT_SESSION;
     parent::__construct();
     $this->setPageTitle(WT_I18N::translate('Lifespans'));
     $this->colorindex = 0;
     $this->Fcolorindex = 0;
     $this->Mcolorindex = 0;
     $this->zoomfactor = 10;
     $this->color = "#0000FF";
     $this->currentYear = date("Y");
     $this->deathMod = 0;
     $this->endDate = $this->currentYear;
     // Request parameters
     $newpid = WT_Filter::get('newpid', WT_REGEX_XREF);
     $remove = WT_Filter::get('remove', WT_REGEX_XREF);
     $pids = WT_Filter::getArray('pids', WT_REGEX_XREF);
     $clear = WT_Filter::getBool('clear');
     $addfam = WT_Filter::getBool('addFamily');
     $place = WT_Filter::get('place');
     $beginYear = WT_Filter::getInteger('beginYear', 0, date('Y') + 100, 0);
     $endYear = WT_Filter::getInteger('endYear', 0, date('Y') + 100, 0);
     if ($clear) {
         // Empty list
         $this->pids = array();
     } elseif ($pids) {
         // List of specified records
         $this->pids = $pids;
     } elseif ($place) {
         // All records found in a place
         $wt_place = new WT_Place($place, WT_GED_ID);
         $this->pids = WT_DB::prepare("SELECT DISTINCT pl_gid FROM `##placelinks` WHERE pl_p_id=? AND pl_file=?")->execute(array($wt_place->getPlaceId(), WT_GED_ID))->fetchOneColumn();
         $this->place = $place;
     } else {
         // Modify an existing list of records
         if (is_array($WT_SESSION->timeline_pids)) {
             $this->pids = $WT_SESSION->timeline_pids;
         } else {
             $this->pids = array();
         }
         if ($remove) {
             foreach ($this->pids as $key => $value) {
                 if ($value == $remove) {
                     unset($this->pids[$key]);
                 }
             }
         } elseif ($newpid) {
             $person = WT_Individual::getInstance($newpid);
             $this->addFamily($person, $addfam);
         } elseif (!$this->pids) {
             $this->addFamily($this->getSignificantIndividual(), false);
         }
     }
     $WT_SESSION->timeline_pids = $this->pids;
     $this->beginYear = $beginYear;
     $this->endYear = $endYear;
     if ($beginYear == 0 || $endYear == 0) {
         //-- cleanup user input
         $this->pids = array_unique($this->pids);
         //removes duplicates
         foreach ($this->pids as $key => $value) {
             if ($value != $remove) {
                 $this->pids[$key] = $value;
                 $person = WT_Individual::getInstance($value);
                 // list of linked records includes families as well as individuals.
                 if ($person) {
                     $bdate = $person->getEstimatedBirthDate();
                     if ($bdate->isOK() && $person->canShow()) {
                         $this->people[] = $person;
                     }
                 }
             }
         }
     } else {
         //--Finds if the begin year and end year textboxes are not empty
         //-- reset the people array when doing a year range search
         $this->people = array();
         //Takes the begining year and end year passed by the postback and modifies them and uses them to populate
         //the time line
         //Variables to restrict the person boxes to the year searched.
         //--Searches for individuals who had an even between the year begin and end years
         $indis = self::search_indis_year_range($beginYear, $endYear);
         //--Populates an array of people that had an event within those years
         foreach ($indis as $person) {
             if (empty($searchplace) || in_array($person->getXref(), $this->pids)) {
                 $bdate = $person->getEstimatedBirthDate();
                 if ($bdate->isOK() && $person->canShow()) {
                     $this->people[] = $person;
                 }
             }
         }
         $WT_SESSION->timeline_pids = null;
     }
     // Sort the array in order of birth year
     uasort($this->people, function (WT_Individual $a, WT_Individual $b) {
         return WT_Date::Compare($a->getEstimatedBirthDate(), $b->getEstimatedBirthDate());
     });
     //If there is people in the array posted back this if occurs
     if (isset($this->people[0])) {
         //Find the maximum Death year and mimimum Birth year for each individual returned in the array.
//.........这里部分代码省略.........
开发者ID:jacoline,项目名称:webtrees,代码行数:101,代码来源:Lifespan.php

示例10: media_3_find

    private static function media_3_find()
    {
        $controller = new WT_Controller_Simple();
        $filter = WT_Filter::get('filter');
        $multiple = WT_Filter::getBool('multiple');
        $controller->setPageTitle(WT_I18N::translate('Find an individual'))->pageHeader();
        echo '<script>';
        ?>

			function pasterow(id, name, gend, yob, age, bpl) {
				window.opener.opener.insertRowToTable(id, name, '', gend, '', yob, age, 'Y', '', bpl);
			}

			function pasteid(id, name, thumb) {
				if (thumb) {
					window.opener.paste_id(id, name, thumb);
					<?php 
        if (!$multiple) {
            echo "window.close();";
        }
        ?>
				} else {
					// GEDFact_assistant ========================
					if (window.opener.document.getElementById('addlinkQueue')) {
						window.opener.insertRowToTable(id, name);
						// Check if Indi, Fam or source ===================
						/*
						if (id.match("I")=="I") {
							var win01 = window.opener.window.open('edit_interface.php?action=addmedia_links&noteid=newnote&pid='+id, 'win01', edit_window_specs);
							if (window.focus) {win01.focus();}
						} else if (id.match("F")=="F") {
							// TODO --- alert('Opening Navigator with family id entered will come later');
						}
						*/
					}
					window.opener.paste_id(id);
					if (window.opener.pastename) {
						window.opener.pastename(name);
					}
					<?php 
        if (!$multiple) {
            echo "window.close();";
        }
        ?>
				}
			}
			function checknames(frm) {
				if (document.forms[0].subclick) {
					button = document.forms[0].subclick.value;
				} else {
					button = "";
				}
				if (frm.filter.value.length<2&button!="all") {
					alert("<?php 
        echo WT_I18N::translate('Please enter more than one character');
        ?>
");
					frm.filter.focus();
					return false;
				}
				if (button=="all") {
					frm.filter.value = "";
				}
				return true;
			}
		<?php 
        echo '</script>';
        echo "<div align=\"center\">";
        echo "<table class=\"list_table width90\" border=\"0\">";
        echo "<tr><td style=\"padding: 10px;\" valign=\"top\" class=\"facts_label03 width90\">";
        // start column for find text header
        echo $controller->getPageTitle();
        echo "</td>";
        echo "</tr>";
        echo "</table>";
        echo "<br>";
        echo '<button onclick="window.close();">', WT_I18N::translate('close'), '</button>';
        echo "<br>";
        $filter = trim($filter);
        $filter_array = explode(' ', preg_replace('/ {2,}/', ' ', $filter));
        echo "<table class=\"tabs_table width90\"><tr>";
        $myindilist = search_indis_names($filter_array, array(WT_GED_ID), 'AND');
        if ($myindilist) {
            echo "<td class=\"list_value_wrap\"><ul>";
            usort($myindilist, array('WT_GedcomRecord', 'compare'));
            foreach ($myindilist as $indi) {
                $nam = WT_Filter::escapeHtml($indi->getFullName());
                echo "<li><a href=\"#\" onclick=\"pasterow(\n\t\t\t\t\t'" . $indi->getXref() . "' ,\n\t\t\t\t\t'" . $nam . "' ,\n\t\t\t\t\t'" . $indi->getSex() . "' ,\n\t\t\t\t\t'" . $indi->getbirthyear() . "' ,\n\t\t\t\t\t'" . (1901 - $indi->getbirthyear()) . "' ,\n\t\t\t\t\t'" . $indi->getbirthplace() . "'); return false;\">\n\t\t\t\t\t<b>" . $indi->getFullName() . "</b>&nbsp;&nbsp;&nbsp;";
                $born = WT_Gedcom_Tag::getLabel('BIRT');
                echo "</span><br><span class=\"list_item\">", $born, " ", $indi->getbirthyear(), "&nbsp;&nbsp;&nbsp;", $indi->getbirthplace(), "</span></a></li>";
                echo "<hr>";
            }
            echo '</ul></td></tr><tr><td class="list_label">', WT_I18N::translate('Total individuals: %s', count($myindilist)), '</tr></td>';
        } else {
            echo "<td class=\"list_value_wrap\">";
            echo WT_I18N::translate('No results found.');
            echo "</td></tr>";
        }
        echo "</table>";
        echo '</div>';
//.........这里部分代码省略.........
开发者ID:brambravo,项目名称:webtrees,代码行数:101,代码来源:module.php

示例11: WT_Controller_Simple

// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
$controller = new WT_Controller_Simple();
$filter = WT_Filter::get('filter');
$action = WT_Filter::get('action');
$callback = WT_Filter::get('callback');
$multiple = WT_Filter::getBool('multiple');
$controller->setPageTitle(WT_I18N::translate('Find an individual'))->pageHeader();
?>
<script>
	function pasterow(id, nam, mnam, label, gend, cond, dom, dob, dod, occu, age, birthpl, fbirthpl, mbirthpl, chilBLD) {
		window.opener.insertRowToTable(id, nam, mnam, label, gend, cond, dom, dob, dod, occu, age, birthpl, fbirthpl, mbirthpl, chilBLD);
		<?php 
if (!$multiple) {
    echo "window.close();";
}
?>
	}

	function pasteid(id, name, thumb) {
		if (thumb) {
			window.opener.<?php 
开发者ID:sadr110,项目名称:webtrees,代码行数:31,代码来源:census_3_find.php

示例12: getOptions

 function getOptions()
 {
     $this->chan = WT_Filter::getBool('chan');
 }
开发者ID:jacoline,项目名称:webtrees,代码行数:4,代码来源:admin_batch_update.php

示例13: define

// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
define('WT_SCRIPT_NAME', 'statistics.php');
require './includes/session.php';
// check for on demand content loading
$tab = WT_Filter::getInteger('tab', 0, 3);
$ajax = WT_Filter::getBool('ajax');
if (!$ajax) {
    $controller = new WT_Controller_Page();
    $controller->setPageTitle(WT_I18N::translate('Statistics'))->addExternalJavascript(WT_STATIC_URL . 'js/autocomplete.js')->addInlineJavascript('
			jQuery("#statistics_chart").css("visibility", "visible");
			jQuery("#statistics_chart").tabs({
				load: function() {
					jQuery("#loading-indicator").removeClass("loading-image");
				},
				beforeLoad: function(event, ui) {
					jQuery("#loading-indicator").addClass("loading-image");
					// Only load each tab once
					if (ui.tab.data("loaded")) {
						event.preventDefault();
						return;
					}
开发者ID:brambravo,项目名称:webtrees,代码行数:31,代码来源:statistics.php

示例14: define

// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
define('WT_SCRIPT_NAME', 'relationship.php');
require './includes/session.php';
require WT_ROOT . 'includes/functions/functions_edit.php';
$controller = new WT_Controller_Page();
$pid1 = WT_Filter::get('pid1', WT_REGEX_XREF);
$pid2 = WT_Filter::get('pid2', WT_REGEX_XREF);
$show_full = WT_Filter::getInteger('show_full', 0, 1, $PEDIGREE_FULL_DETAILS);
$path_to_find = WT_Filter::getInteger('path_to_find');
$followspouse = WT_Filter::getBool('followspouse');
$asc = WT_Filter::getBool('asc');
$asc = $asc ? -1 : 1;
$Dbwidth = $bwidth;
if (!$show_full) {
    $bwidth = $cbwidth;
    $bheight = $cbheight;
    $Dbwidth = $cbwidth;
}
$Dbheight = $bheight;
$Dbxspacing = 0;
$Dbyspacing = 0;
$Dbasexoffset = 0;
$Dbaseyoffset = 0;
$person1 = WT_Individual::getInstance($pid1);
$person2 = WT_Individual::getInstance($pid2);
$controller->addExternalJavascript(WT_STATIC_URL . 'js/autocomplete.js')->addInlineJavascript('autocomplete();');
开发者ID:brambravo,项目名称:webtrees,代码行数:31,代码来源:relationship.php


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