本文整理汇总了PHP中Fisharebest\Webtrees\Tree::getIdList方法的典型用法代码示例。如果您正苦于以下问题:PHP Tree::getIdList方法的具体用法?PHP Tree::getIdList怎么用?PHP Tree::getIdList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fisharebest\Webtrees\Tree
的用法示例。
在下文中一共展示了Tree::getIdList方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: edit
//.........这里部分代码省略.........
">
<input type="checkbox" name="lang_<?php
echo $locale->languageTag();
?>
" <?php
echo in_array($locale->languageTag(), $accepted_languages) ? 'checked' : '';
?>
><?php
echo $locale->endonym();
?>
</label>
</div>
<?php
}
?>
</div>
</div>
<h3><?php
echo webtrees\I18N::translate('Visibility and Access');
?>
</h3>
<div class="form-group">
<label class="control-label col-sm-3" for="block_order">
<?php
echo webtrees\I18N::translate('Menu position');
?>
</label>
<div class="col-sm-9">
<input
class="form-control"
id="position"
name="block_order"
size="3"
required
type="number"
value="<?php
echo webtrees\Filter::escapeHtml($block_order);
?>
"
>
</div>
<span class="help-block col-sm-9 col-sm-offset-3 small text-muted">
<?php
echo webtrees\I18N::translate('This field controls the order in which the menu items are displayed.'), '<br><br>', webtrees\I18N::translate('You do not have to enter the numbers sequentially. If you leave holes in the numbering scheme, you can insert other menu items later. For example, if you use the numbers 1, 6, 11, 16, you can later insert menu items with the missing sequence numbers. Negative numbers and zero are allowed, and can be used to insert menu items in front of the first one.'), '<br><br>', webtrees\I18N::translate('When more than one menu item has the same position number, only one of these menu items will be visible.');
?>
</span>
</div>
<div class="form-group">
<label class="control-label col-sm-3" for="block_order">
<?php
echo webtrees\I18N::translate('Menu visibility');
?>
</label>
<div class="col-sm-9">
<?php
echo webtrees\Functions\FunctionsEdit::selectEditControl('gedcom_id', webtrees\Tree::getIdList(), webtrees\I18N::translate('All'), $WT_TREE->getTreeId(), 'class="form-control"');
?>
</div>
<span class="help-block col-sm-9 col-sm-offset-3 small text-muted">
<?php
echo webtrees\I18N::translate('You can determine whether this menu item will be visible regardless of family tree, or whether it will be visible only to the current family tree.');
?>
</span>
</div>
<div class="form-group">
<label class="control-label col-sm-3" for="menu_access">
<?php
echo webtrees\I18N::translate('Access level');
?>
</label>
<div class="col-sm-9">
<?php
echo webtrees\Functions\FunctionsEdit::editFieldAccessLevel('menu_access', $menu_access, 'class="form-control"');
?>
</div>
</div>
<div class="row col-sm-9 col-sm-offset-3">
<button class="btn btn-primary" type="submit">
<i class="fa fa-check"></i>
<?php
echo webtrees\I18N::translate('save');
?>
</button>
<button class="btn" type="button" onclick="window.location='<?php
echo $this->getConfigLink();
?>
';">
<i class="fa fa-close"></i>
<?php
echo webtrees\I18N::translate('cancel');
?>
</button>
</div>
</form>
<?php
}
}
示例2: number
echo '<p>', I18N::translate('In a family tree, each record has an internal reference number (called an “XREF”) such as “F123” or “R14”.'), '</p>', '<p>', I18N::plural('The two family trees have %1$s record which uses the same “XREF”.', 'The two family trees have %1$s records which use the same “XREF”.', count($xrefs), count($xrefs)), '</p>', '<p>', I18N::translate('You must renumber the records in one of the trees before you can merge them.'), '</p>', '<p>', '<a class="current" href="admin_trees_renumber.php?ged=', $tree1->getNameUrl(), '">', I18N::translate('Renumber family tree'), ' — ', $tree1->getTitleHtml(), '</a>', '</p>', '<p>', '<a class="current" href="admin_trees_renumber.php?ged=', $tree2->getNameUrl(), '">', I18N::translate('Renumber family tree'), ' — ', $tree2->getTitleHtml(), '</a>', '</p>';
} else {
Database::beginTransaction();
Database::exec("LOCK TABLE" . " `##individuals` WRITE," . " `##individuals` AS individuals2 READ," . " `##families` WRITE," . " `##families` AS families2 READ," . " `##sources` WRITE," . " `##sources` AS sources2 READ," . " `##media` WRITE," . " `##media` AS media2 READ," . " `##other` WRITE," . " `##other` AS other2 READ," . " `##name` WRITE," . " `##name` AS name2 READ," . " `##placelinks` WRITE," . " `##placelinks` AS placelinks2 READ," . " `##change` WRITE," . " `##change` AS change2 READ," . " `##dates` WRITE," . " `##dates` AS dates2 READ," . " `##default_resn` WRITE," . " `##default_resn` AS default_resn2 READ," . " `##hit_counter` WRITE," . " `##hit_counter` AS hit_counter2 READ," . " `##link` WRITE," . " `##link` AS link2 READ");
Database::prepare("INSERT INTO `##individuals` (i_id, i_file, i_rin, i_sex, i_gedcom)" . " SELECT i_id, ?, i_rin, i_sex, i_gedcom FROM `##individuals` AS individuals2 WHERE i_file = ?")->execute(array($tree2_id, $tree1_id));
Database::prepare("INSERT INTO `##families` (f_id, f_file, f_husb, f_wife, f_gedcom, f_numchil)" . " SELECT f_id, ?, f_husb, f_wife, f_gedcom, f_numchil FROM `##families` AS families2 WHERE f_file = ?")->execute(array($tree2_id, $tree1_id));
Database::prepare("INSERT INTO `##sources` (s_id, s_file, s_name, s_gedcom)" . " SELECT s_id, ?, s_name, s_gedcom FROM `##sources` AS sources2 WHERE s_file = ?")->execute(array($tree2_id, $tree1_id));
Database::prepare("INSERT INTO `##media` (m_id, m_ext, m_type, m_titl, m_filename, m_file, m_gedcom)" . " SELECT m_id, m_ext, m_type, m_titl, m_filename, ?, m_gedcom FROM `##media` AS media2 WHERE m_file = ?")->execute(array($tree2_id, $tree1_id));
Database::prepare("INSERT INTO `##other` (o_id, o_file, o_type, o_gedcom)" . " SELECT o_id, ?, o_type, o_gedcom FROM `##other` AS other2 WHERE o_file = ? AND o_type NOT IN ('HEAD', 'TRLR')")->execute(array($tree2_id, $tree1_id));
Database::prepare("INSERT INTO `##name` (n_file, n_id, n_num, n_type, n_sort, n_full, n_surname, n_surn, n_givn, n_soundex_givn_std, n_soundex_surn_std, n_soundex_givn_dm, n_soundex_surn_dm)" . " SELECT ?, n_id, n_num, n_type, n_sort, n_full, n_surname, n_surn, n_givn, n_soundex_givn_std, n_soundex_surn_std, n_soundex_givn_dm, n_soundex_surn_dm FROM `##name` AS name2 WHERE n_file = ?")->execute(array($tree2_id, $tree1_id));
Database::prepare("INSERT INTO `##placelinks` (pl_p_id, pl_gid, pl_file)" . " SELECT pl_p_id, pl_gid, ? FROM `##placelinks` AS placelinks2 WHERE pl_file = ?")->execute(array($tree2_id, $tree1_id));
Database::prepare("INSERT INTO `##dates` (d_day, d_month, d_mon, d_year, d_julianday1, d_julianday2, d_fact, d_gid, d_file, d_type)" . " SELECT d_day, d_month, d_mon, d_year, d_julianday1, d_julianday2, d_fact, d_gid, ?, d_type FROM `##dates` AS dates2 WHERE d_file = ?")->execute(array($tree2_id, $tree1_id));
Database::prepare("INSERT INTO `##default_resn` (gedcom_id, xref, tag_type, resn)" . " SELECT ?, xref, tag_type, resn FROM `##default_resn` AS default_resn2 WHERE gedcom_id = ?")->execute(array($tree2_id, $tree1_id));
Database::prepare("INSERT INTO `##link` (l_file, l_from, l_type, l_to)" . " SELECT ?, l_from, l_type, l_to FROM `##link` AS link2 WHERE l_file = ?")->execute(array($tree2_id, $tree1_id));
// This table may contain old (deleted) references, which could clash. IGNORE these.
Database::prepare("INSERT IGNORE INTO `##change` (change_time, status, gedcom_id, xref, old_gedcom, new_gedcom, user_id)" . " SELECT change_time, status, ?, xref, old_gedcom, new_gedcom, user_id FROM `##change` AS change2 WHERE gedcom_id = ?")->execute(array($tree2_id, $tree1_id));
// This table may contain old (deleted) references, which could clash. IGNORE these.
Database::prepare("INSERT IGNORE INTO `##hit_counter` (gedcom_id, page_name, page_parameter, page_count)" . " SELECT ?, page_name, page_parameter, page_count FROM `##hit_counter` AS hit_counter2 WHERE gedcom_id = ? AND page_name <> 'index.php'")->execute(array($tree2_id, $tree1_id));
Database::exec("UNLOCK TABLES");
Database::commit();
echo '<p>', I18N::translate('The family trees have been merged successfully.'), '</p>';
}
} else {
echo '<form method="post">';
echo '<input type="hidden" name="go" value="1">';
echo '<p>', I18N::translate('Copy all the records from %1$s into %2$s.', FunctionsEdit::selectEditControl('tree1_id', Tree::getIdList(), '', null), FunctionsEdit::selectEditControl('tree2_id', Tree::getIdList(), '', null)), '</p>';
echo '<button type="submit" class="btn btn-primary">';
echo '<i class="fa fa-check"></i> ', I18N::translate('continue');
echo '</button>';
echo '</form>';
}
示例3: adminPlaceCheck
/**
* Check places for missing data, etc.
*/
private function adminPlaceCheck()
{
global $WT_TREE;
$gedcom_id = Filter::get('gedcom_id', null, $WT_TREE->getTreeId());
$country = Filter::get('country', '.+', 'XYZ');
$state = Filter::get('state', '.+', 'XYZ');
$matching = Filter::getBool('matching');
$controller = new PageController();
$controller->restrictAccess(Auth::isAdmin())->setPageTitle(I18N::translate('Google Maps™'))->pageHeader();
?>
<ol class="breadcrumb small">
<li><a href="admin.php"><?php
echo I18N::translate('Control panel');
?>
</a></li>
<li><a href="admin_modules.php"><?php
echo I18N::translate('Module administration');
?>
</a></li>
<li class="active"><?php
echo $controller->getPageTitle();
?>
</li>
</ol>
<ul class="nav nav-tabs nav-justified" role="tablist">
<li role="presentation">
<a href="?mod=googlemap&mod_action=admin_config" role="tab">
<?php
echo I18N::translate('Google Maps™ preferences');
?>
</a>
</li>
<li role="presentation">
<a href="?mod=googlemap&mod_action=admin_places">
<?php
echo I18N::translate('Geographic data');
?>
</a>
</li>
<li role="presentation" class="active">
<a href="#">
<?php
echo I18N::translate('Place check');
?>
</a>
</li>
</ul>
<?php
echo '<h2>', I18N::translate('Place check'), '</h2>';
// User options
$rows = Database::prepare("SELECT pl_id, pl_place FROM `##placelocation` WHERE pl_level=0 ORDER BY pl_place")->fetchAssoc();
echo '<form name="placecheck" class="form form-inline">';
echo '<input type="hidden" name="mod" value="', $this->getName(), '">';
echo '<input type="hidden" name="mod_action" value="admin_placecheck">';
echo '<div class="form-group">';
echo '<label for="gedcom_id">', I18N::translate('Family tree'), '</label> ';
echo FunctionsEdit::selectEditControl('gedcom_id', Tree::getIdList(), null, $gedcom_id, ' onchange="this.form.submit();" class="form-control"'), ' ';
echo '<label for="country">', I18N::translate('Country'), '</label> ';
echo '<select name="country" onchange="this.form.submit();" class="form-control"> ';
echo '<option value="XYZ">', I18N::translate('All'), '</option>';
foreach ($rows as $id => $place) {
echo '<option value="', Filter::escapeHtml($place), '" ';
if ($place == $country) {
echo 'selected';
$par_id = $id;
}
echo '>', Filter::escapeHtml($place), '</option>';
}
echo '</select> ';
if ($country != 'XYZ') {
echo '<label for="state">', I18N::translate('Subdivision'), '</label> ';
echo '<select name="state" onchange="this.form.submit();" class="form-control">';
echo '<option value="XYZ">', I18N::translate('All'), '</option>';
$places = Database::prepare("SELECT pl_place FROM `##placelocation` WHERE pl_parent_id=? ORDER BY pl_place")->execute(array($par_id))->fetchOneColumn();
foreach ($places as $place) {
echo '<option value="', Filter::escapeHtml($place), '" ', $place == $state ? 'selected' : '', '>', Filter::escapeHtml($place), '</option>';
}
echo '</select> ';
}
echo '<div class="checkbox-inline">';
echo '<label for="matching">';
echo '<input type="checkbox" name="matching" value="1" onchange="this.form.submit();" ', $matching ? 'checked' : '', '>';
echo I18N::translate('Include fully matched places');
echo '</label>';
echo '</div></div>';
echo '</form>';
echo '<hr>';
//Select all '2 PLAC ' tags in the file and create array
$place_list = array();
$ged_data = Database::prepare("SELECT i_gedcom FROM `##individuals` WHERE i_gedcom LIKE ? AND i_file=?")->execute(array("%\n2 PLAC %", $gedcom_id))->fetchOneColumn();
foreach ($ged_data as $ged_datum) {
preg_match_all('/\\n2 PLAC (.+)/', $ged_datum, $matches);
foreach ($matches[1] as $match) {
$place_list[$match] = true;
}
}
//.........这里部分代码省略.........
示例4: edit
//.........这里部分代码省略.........
<input type="hidden" name="block_id" value="<?php
echo $block_id;
?>
">
<div class="form-group">
<label for="header" class="col-sm-3 control-label">
<?php
echo I18N::translate('Question');
?>
</label>
<div class="col-sm-9">
<input type="text" class="form-control" name="header" id="header"
value="<?php
echo Filter::escapeHtml($header);
?>
">
</div>
</div>
<div class="form-group">
<label for="faqbody" class="col-sm-3 control-label">
<?php
echo I18N::translate('Answer');
?>
</label>
<div class="col-sm-9">
<textarea name="faqbody" id="faqbody" class="form-control html-edit"
rows="10"><?php
echo Filter::escapeHtml($faqbody);
?>
</textarea>
</div>
</div>
<div class="form-group">
<label for="xref" class="col-sm-3 control-label">
<?php
echo I18N::translate('Show this block for which languages?');
?>
</label>
<div class="col-sm-9">
<?php
echo FunctionsEdit::editLanguageCheckboxes('lang', explode(',', $this->getBlockSetting($block_id, 'languages')));
?>
</div>
</div>
<div class="form-group">
<label for="block_order" class="col-sm-3 control-label">
<?php
echo I18N::translate('FAQ position');
?>
</label>
<div class="col-sm-9">
<input type="text" name="block_order" id="block_order" class="form-control" value="<?php
echo $block_order;
?>
">
</div>
</div>
<div class="form-group">
<label for="gedcom_id" class="col-sm-3 control-label">
<?php
echo I18N::translate('FAQ visibility');
?>
</label>
<div class="col-sm-9">
<?php
echo FunctionsEdit::selectEditControl('gedcom_id', Tree::getIdList(), I18N::translate('All'), $gedcom_id, 'class="form-control"');
?>
<p class="small text-muted">
<?php
echo I18N::translate('A FAQ item can be displayed on just one of the family trees, or on all the family trees.');
?>
</p>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-3 col-sm-9">
<button type="submit" class="btn btn-primary">
<i class="fa fa-check"></i>
<?php
echo I18N::translate('save');
?>
</button>
</div>
</div>
</form>
<?php
}
}