本文整理汇总了PHP中select_edit_control函数的典型用法代码示例。如果您正苦于以下问题:PHP select_edit_control函数的具体用法?PHP select_edit_control怎么用?PHP select_edit_control使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了select_edit_control函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: main
function main()
{
// HTML common to all pages
$html = self::getJavascript() . '<form id="batch_update_form" action="module.php" method="get">' . '<input type="hidden" name="mod" value="batch_update">' . '<input type="hidden" name="mod_action" value="admin_batch_update">' . '<input type="hidden" name="xref" value="' . $this->xref . '">' . '<input type="hidden" name="action" value="">' . '<input type="hidden" name="data" value="">' . '<table id="batch_update"><tr>' . '<th>' . WT_I18N::translate('Family tree') . '</th>' . '<td>' . select_edit_control('ged', WT_Tree::getNameList(), '', WT_GEDCOM, 'onchange="reset_reload();"') . '</td></tr><tr><th>' . WT_I18N::translate('Batch update') . '</th><td><select name="plugin" onchange="reset_reload();">';
if (!$this->plugin) {
$html .= '<option value="" selected="selected"></option>';
}
foreach ($this->plugins as $class => $plugin) {
$html .= '<option value="' . $class . '"' . ($this->plugin == $class ? ' selected="selected"' : '') . '>' . $plugin->getName() . '</option>';
}
$html .= '</select>';
if ($this->PLUGIN) {
$html .= '<br><em>' . $this->PLUGIN->getDescription() . '</em>';
}
$html .= '</td></tr>';
if (!Auth::user()->getSetting('auto_accept')) {
$html .= '<tr><td colspan="2" class="warning">' . WT_I18N::translate('Your user account does not have “automatically approve changes” enabled. You will only be able to change one record at a time.') . '</td></tr>';
}
// If a plugin is selected, display the details
if ($this->PLUGIN) {
$html .= $this->PLUGIN->getOptionsForm();
if (substr($this->action, -4) == '_all') {
// Reset - otherwise we might "undo all changes", which refreshes the
// page, which makes them all again!
$html .= '<script>reset_reload();</script>';
} else {
if ($this->curr_xref) {
// Create an object, so we can get the latest version of the name.
$this->record = WT_GedcomRecord::getInstance($this->curr_xref);
$html .= '</table><table id="batch_update2"><tr><td>' . self::createSubmitButton(WT_I18N::translate('previous'), $this->prev_xref) . self::createSubmitButton(WT_I18N::translate('next'), $this->next_xref) . '</td><th><a href="' . $this->record->getHtmlUrl() . '">' . $this->record->getFullName() . '</a>' . '</th>' . '</tr><tr><td valign="top">' . '<br>' . implode('<br>', $this->PLUGIN->getActionButtons($this->curr_xref, $this->record)) . '<br>' . '</td><td dir="ltr" align="left">' . $this->PLUGIN->getActionPreview($this->record) . '</td></tr>';
} else {
$html .= '<tr><td class="accepted" colspan=2>' . WT_I18N::translate('Nothing found.') . '</td></tr>';
}
}
}
$html .= '</table></form>';
return $html;
}
示例2: add_simple_tag
//.........这里部分代码省略.........
echo "<input type=\"hidden\" name=\"text[]\" value=\"\">";
}
echo "<input type=\"hidden\" name=\"glevels[]\" value=\"", $level, "\">";
echo "<input type=\"hidden\" name=\"islink[]\" value=\"", $islink, "\">";
echo "<input type=\"hidden\" name=\"tag[]\" value=\"", $fact, "\">";
}
echo "</td>";
// value
echo "<td class=\"optionbox wrap\">";
if (WT_DEBUG) {
echo $tag, "<br>";
}
// retrieve linked NOTE
if ($fact == "NOTE" && $islink) {
$note1 = WT_Note::getInstance($value);
if ($note1) {
$noterec = $note1->getGedcom();
preg_match("/{$value}/i", $noterec, $notematch);
$value = $notematch[0];
}
}
if (in_array($fact, $emptyfacts) && ($value == '' || $value == 'Y' || $value == 'y')) {
echo "<input type=\"hidden\" id=\"", $element_id, "\" name=\"", $element_name, "\" value=\"", $value, "\">";
if ($level <= 1) {
echo '<input type="checkbox" ';
if ($value) {
echo ' checked="checked"';
}
echo " onclick=\"if (this.checked) ", $element_id, ".value='Y'; else ", $element_id, ".value='';\">";
echo WT_I18N::translate('yes');
}
} else {
if ($fact == "TEMP") {
echo select_edit_control($element_name, WT_Gedcom_Code_Temp::templeNames(), WT_I18N::translate('No temple - living ordinance'), $value);
} else {
if ($fact == "ADOP") {
echo edit_field_adop($element_name, $value, '', $person);
} else {
if ($fact == "PEDI") {
echo edit_field_pedi($element_name, $value, '', $person);
} else {
if ($fact == 'STAT') {
echo select_edit_control($element_name, WT_Gedcom_Code_Stat::statusNames($upperlevel), '', $value);
} else {
if ($fact == 'RELA') {
echo edit_field_rela($element_name, strtolower($value));
} else {
if ($fact == 'QUAY') {
echo select_edit_control($element_name, WT_Gedcom_Code_Quay::getValues(), '', $value);
} else {
if ($fact == '_WT_USER') {
echo edit_field_username($element_name, $value);
} else {
if ($fact == 'RESN') {
echo edit_field_resn($element_name, $value);
} else {
if ($fact == '_PRIM') {
echo '<select id="', $element_id, '" name="', $element_name, '" >';
echo '<option value=""></option>';
echo '<option value="Y"';
if ($value == 'Y') {
echo ' selected="selected"';
}
echo '>', WT_I18N::translate('yes'), '</option>';
echo '<option value="N"';
if ($value == 'N') {
示例3: modalDialog
$in_progress = WT_DB::prepare("SELECT 1 FROM `##gedcom_chunk` WHERE gedcom_id=? AND imported=1 LIMIT 1")->execute(array($tree->tree_id))->fetchOne();
if (!$in_progress) {
echo '<div id="import', $tree->tree_id, '"><div id="progressbar', $tree->tree_id, '"><div style="position:absolute;">', WT_I18N::translate('Deleting old genealogy data…'), '</div></div></div>';
$controller->addInlineJavascript('jQuery("#progressbar' . $tree->tree_id . '").progressbar({value: 0});');
} else {
echo '<div id="import', $tree->tree_id, '"></div>';
}
$controller->addInlineJavascript('jQuery("#import' . $tree->tree_id . '").load("import.php?gedcom_id=' . $tree->tree_id . '&keep_media' . $tree->tree_id . '=' . WT_Filter::get('keep_media' . $tree->tree_id) . '");');
echo '<table border="0" width="100%" id="actions', $tree->tree_id, '" style="display:none">';
} else {
echo '<table border="0" width="100%" id="actions', $tree->tree_id, '">';
}
echo '<tr align="center">', '<td><a href="admin_trees_export.php?ged=', $tree->tree_name_url, '" onclick="return modalDialog(\'admin_trees_export.php?ged=', $tree->tree_name_url, '\', \'', WT_I18N::translate('Export'), '\');">', WT_I18N::translate('Export'), '</a>', help_link('export_gedcom'), '</td>', '<td><a href="', WT_SCRIPT_NAME, '?action=importform&gedcom_id=', $tree->tree_id, '">', WT_I18N::translate('Import'), '</a>', help_link('import_gedcom'), '</td>', '<td><a href="admin_trees_download.php?ged=', $tree->tree_name_url, '">', WT_I18N::translate('Download'), '</a>', help_link('download_gedcom'), '</td>', '<td><a href="', WT_SCRIPT_NAME, '?action=uploadform&gedcom_id=', $tree->tree_id, '">', WT_I18N::translate('Upload'), '</a>', help_link('upload_gedcom'), '</td>', '<td>', '<a href="#" onclick="if (confirm(\'' . WT_Filter::escapeJs(WT_I18N::translate('Are you sure you want to delete “%s”?', $tree->tree_name)), '\')) document.delete_form', $tree->tree_id, '.submit(); return false;">', WT_I18N::translate('Delete'), '</a>', '<form name="delete_form', $tree->tree_id, '" method="post" action="', WT_SCRIPT_NAME, '">', '<input type="hidden" name="action" value="delete">', '<input type="hidden" name="gedcom_id" value="', $tree->tree_id, '">', WT_Filter::getCsrf(), '</form>', '</td></tr></table></td></tr></table><br>';
}
}
// Options for creating new gedcoms and setting defaults
if (Auth::isAdmin()) {
echo '<table class="gedcom_table2"><tr>';
if (count(WT_Tree::GetAll()) > 1) {
echo '<th>', WT_I18N::translate('Default family tree'), help_link('default_gedcom'), '</th>';
}
echo '<th>', WT_I18N::translate('Create a new family tree'), help_link('add_new_gedcom'), '</th></tr><tr>';
if (count(WT_Tree::GetAll()) > 1) {
echo '<td><form name="defaultform" method="post" action="', WT_SCRIPT_NAME, '">', '<input type="hidden" name="action" value="setdefault">', WT_Filter::getCsrf(), select_edit_control('default_ged', WT_Tree::getNameList(), '', WT_Site::preference('DEFAULT_GEDCOM'), 'onchange="document.defaultform.submit();"'), '</form></td>';
}
echo '<td class="button">', '<form name="createform" method="post" action="', WT_SCRIPT_NAME, '">', WT_Filter::getCsrf(), '<input type="hidden" name="action" value="new_tree">', '<input name="ged_name">', ' <input type="submit" value="', WT_I18N::translate('save'), '">', '</form>', '</td>', '</tr></table><br>';
// display link to PGV-WT transfer wizard on first visit to this page, before any GEDCOM is loaded
if (count(WT_Tree::GetAll()) == 0 && count(User::all()) == 1) {
echo '<div class="center">', '<a style="color:green; font-weight:bold;" href="admin_pgv_to_wt.php">', WT_I18N::translate('Click here for PhpGedView to <b>webtrees</b> transfer wizard'), '</a>', help_link('PGV_WIZARD'), '</div>';
}
}
示例4: define
// 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\Auth;
define('WT_SCRIPT_NAME', 'admin_trees_check.php');
require './includes/session.php';
require WT_ROOT . 'includes/functions/functions_edit.php';
$controller = new WT_Controller_Page();
$controller->restrictAccess(Auth::isManager())->setPageTitle(WT_I18N::translate('Check for errors'))->pageHeader();
echo '<form method="get" action="', WT_SCRIPT_NAME, '">';
echo '<input type="hidden" name="go" value="1">';
echo select_edit_control('ged', WT_Tree::getNameList(), null, WT_GEDCOM);
echo '<input type="submit" value="', $controller->getPageTitle(), '">';
echo '</form>';
if (!WT_Filter::get('go')) {
exit;
}
// We need to work with raw GEDCOM data, as we are looking for errors
// which may prevent the WT_GedcomRecord objects from working...
$rows = WT_DB::prepare("SELECT i_id AS xref, 'INDI' AS type, i_gedcom AS gedrec FROM `##individuals` WHERE i_file=?" . " UNION " . "SELECT f_id AS xref, 'FAM' AS type, f_gedcom AS gedrec FROM `##families` WHERE f_file=?" . " UNION " . "SELECT s_id AS xref, 'SOUR' AS type, s_gedcom AS gedrec FROM `##sources` WHERE s_file=?" . " UNION " . "SELECT m_id AS xref, 'OBJE' AS type, m_gedcom AS gedrec FROM `##media` WHERE m_file=?" . " UNION " . "SELECT o_id AS xref, o_type AS type, o_gedcom AS gedrec FROM `##other` WHERE o_file=? AND o_type NOT IN ('HEAD', 'TRLR')")->execute(array(WT_GED_ID, WT_GED_ID, WT_GED_ID, WT_GED_ID, WT_GED_ID))->fetchAll();
$records = array();
foreach ($rows as $row) {
$records[$row->xref] = $row;
}
// Need to merge pending new/changed/deleted records
$rows = WT_DB::prepare(" SELECT xref, SUBSTRING_INDEX(SUBSTRING_INDEX(SUBSTRING_INDEX(CASE WHEN old_gedcom='' THEN new_gedcom ELSE old_gedcom END, '\n', 1), ' ', 3), ' ', -1) AS type, new_gedcom AS gedrec" . " FROM (" . " SELECT MAX(change_id) AS change_id" . " FROM `##change`" . " WHERE gedcom_id=? AND status='pending'" . " GROUP BY xref" . " ) AS t1" . " JOIN `##change` t2 USING (change_id)")->execute(array(WT_GED_ID))->fetchAll();
foreach ($rows as $row) {
示例5: print_findindi_link
?>
">
<?php
echo print_findindi_link('rootid');
?>
</td>
<td class="descriptionbox">
<label for="fan_style">
<?php
echo WT_I18N::translate('Layout');
?>
</label>
</td>
<td class="optionbox">
<?php
echo select_edit_control('fan_style', $controller->getFanStyles(), null, $controller->fan_style);
?>
</td>
<td rowspan="2" class="topbottombar vmiddle">
<input type="submit" value="<?php
echo WT_I18N::translate('View');
?>
">
</td>
</tr>
<tr>
<td class="descriptionbox">
<label for="generations">
<?php
echo WT_I18N::translate('Generations');
?>
示例6: configureBlock
public function configureBlock($block_id)
{
if (WT_Filter::postBool('save') && WT_Filter::checkCsrf()) {
set_block_setting($block_id, 'days', WT_Filter::postInteger('days', 1, self::MAX_DAYS, self::DEFAULT_DAYS));
set_block_setting($block_id, 'infoStyle', WT_Filter::post('infoStyle', 'list|table', 'table'));
set_block_setting($block_id, 'sortStyle', WT_Filter::post('sortStyle', 'name|date_asc|date_desc', 'date_desc'));
set_block_setting($block_id, 'hide_empty', WT_Filter::postBool('hide_empty'));
set_block_setting($block_id, 'block', WT_Filter::postBool('block'));
exit;
}
require_once WT_ROOT . 'includes/functions/functions_edit.php';
$days = get_block_setting($block_id, 'days', self::DEFAULT_DAYS);
echo '<tr><td class="descriptionbox wrap width33">';
echo WT_I18N::translate('Number of days to show');
echo '</td><td class="optionbox">';
echo '<input type="text" name="days" size="2" value="', $days, '">';
echo ' <em>', WT_I18N::plural('maximum %d day', 'maximum %d days', self::MAX_DAYS, self::MAX_DAYS), '</em>';
echo '</td></tr>';
$infoStyle = get_block_setting($block_id, 'infoStyle', 'table');
echo '<tr><td class="descriptionbox wrap width33">';
echo WT_I18N::translate('Presentation style');
echo '</td><td class="optionbox">';
echo select_edit_control('infoStyle', array('list' => WT_I18N::translate('list'), 'table' => WT_I18N::translate('table')), null, $infoStyle, '');
echo '</td></tr>';
$sortStyle = get_block_setting($block_id, 'sortStyle', 'date');
echo '<tr><td class="descriptionbox wrap width33">';
echo WT_I18N::translate('Sort order');
echo '</td><td class="optionbox">';
echo select_edit_control('sortStyle', array('name' => WT_I18N::translate('sort by name'), 'date_asc' => WT_I18N::translate('sort by date, oldest first'), 'date_desc' => WT_I18N::translate('sort by date, newest first')), null, $sortStyle, '');
echo '</td></tr>';
$block = get_block_setting($block_id, 'block', true);
echo '<tr><td class="descriptionbox wrap width33">';
echo WT_I18N::translate('Add a scrollbar when block contents grow');
echo '</td><td class="optionbox">';
echo edit_field_yes_no('block', $block);
echo '</td></tr>';
$hide_empty = get_block_setting($block_id, 'hide_empty', true);
echo '<tr><td class="descriptionbox wrap width33">';
echo WT_I18N::translate('Should this block be hidden when it is empty?');
echo '</td><td class="optionbox">';
echo edit_field_yes_no('hide_empty', $hide_empty);
echo '</td></tr>';
echo '<tr><td colspan="2" class="optionbox wrap">';
echo '<span class="error">', WT_I18N::translate('If you hide an empty block, you will not be able to change its configuration until it becomes visible by no longer being empty.'), '</span>';
echo '</td></tr>';
}
示例7: config
private function config()
{
require_once WT_ROOT . 'includes/functions/functions_edit.php';
if (WT_USER_GEDCOM_ADMIN) {
$controller = new WT_Controller_Page();
$controller->setPageTitle($this->getTitle())->pageHeader()->addExternalJavascript(WT_JQUERY_DATATABLES_URL)->addInlineJavascript('
jQuery("#story_table").dataTable({
dom: \'<"H"pf<"dt-clear">irl>t<"F"pl>\',
' . WT_I18N::datatablesI18N() . ',
autoWidth: false,
paging: true,
pagingType: "full_numbers",
lengthChange: true,
filter: true,
info: true,
jQueryUI: true,
sorting: [[0,"asc"]],
columns: [
/* 0-name */ null,
/* 1-NAME */ null,
/* 2-NAME */ { sortable:false },
/* 3-NAME */ { sortable:false }
]
});
');
$stories = WT_DB::prepare("SELECT block_id, xref" . " FROM `##block` b" . " WHERE module_name=?" . " AND gedcom_id=?" . " ORDER BY xref")->execute(array($this->getName(), WT_GED_ID))->fetchAll();
echo '<form method="get" action="', WT_SCRIPT_NAME, '">', WT_I18N::translate('Family tree'), ' ', '<input type="hidden" name="mod" value="', $this->getName(), '">', '<input type="hidden" name="mod_action" value="admin_config">', select_edit_control('ged', WT_Tree::getNameList(), null, WT_GEDCOM), '<input type="submit" value="', WT_I18N::translate('show'), '">', '</form>';
echo '<h3><a href="module.php?mod=', $this->getName(), '&mod_action=admin_edit">', WT_I18N::translate('Add a story'), '</a></h3>';
if (count($stories) > 0) {
echo '<table id="story_table">';
echo '<thead><tr>
<th>', WT_I18N::translate('Story title'), '</th>
<th>', WT_I18N::translate('Individual'), '</th>
<th> </th>
<th> </th>
</tr></thead>';
}
echo '<tbody>';
foreach ($stories as $story) {
$story_title = get_block_setting($story->block_id, 'title');
$indi = WT_Individual::getInstance($story->xref);
if ($indi) {
echo '<tr><td><a href="', $indi->getHtmlUrl() . '#stories">', $story_title, '</a></td>
<td><a href="', $indi->getHtmlUrl() . '#stories">' . $indi->getFullName(), '</a></td>';
} else {
echo '<tr><td>', $story_title, '</td><td class="error">', $story->xref, '</td>';
}
echo '<td><a href="module.php?mod=', $this->getName(), '&mod_action=admin_edit&block_id=', $story->block_id, '"><div class="icon-edit"> </div></a></td>
<td><a href="module.php?mod=', $this->getName(), '&mod_action=admin_delete&block_id=', $story->block_id, '" onclick="return confirm(\'', WT_I18N::translate('Are you sure you want to delete this story?'), '\');"><div class="icon-delete"> </div></a></td>
</tr>';
}
echo '</tbody></table>';
} else {
header('Location: ' . WT_SERVER_NAME . WT_SCRIPT_PATH);
exit;
}
}
示例8: edit_field_yes_no
</td>
<td>
<?php
echo edit_field_yes_no('NEW_FULL_SOURCES', get_gedcom_setting(WT_GED_ID, 'FULL_SOURCES'));
?>
</td>
</tr>
<tr>
<td>
<?php
echo WT_I18N::translate('Source type'), help_link('PREFER_LEVEL2_SOURCES');
?>
</td>
<td>
<?php
echo select_edit_control('NEW_PREFER_LEVEL2_SOURCES', array(0 => WT_I18N::translate('none'), 1 => WT_I18N::translate('facts'), 2 => WT_I18N::translate('records')), null, get_gedcom_setting(WT_GED_ID, 'PREFER_LEVEL2_SOURCES'));
?>
</td>
</tr>
<tr>
<td>
<?php
echo WT_I18N::translate('Use GeoNames database for autocomplete on places'), help_link('GEONAMES_ACCOUNT');
?>
</td>
<td>
<input type="text" id="NEW_GEONAMES_ACCOUNT" name="NEW_GEONAMES_ACCOUNT" value="<?php
echo WT_Filter::escapeHtml(get_gedcom_setting(WT_GED_ID, 'GEONAMES_ACCOUNT'));
?>
" size="40" maxlength="255" dir="ltr" placeholder="<?php
echo WT_I18N::translate('Username');
示例9: print_findindi_link
<input class="pedigree_form" data-autocomplete-type="INDI" type="text" id="rootid" name="rootid" size="3" value="<?php
echo $controller->rootid;
?>
">
<?php
echo print_findindi_link('rootid');
?>
</td>
<td class="optionbox center">
<?php
echo edit_field_integers('PEDIGREE_GENERATIONS', $controller->PEDIGREE_GENERATIONS, 3, $MAX_PEDIGREE_GENERATIONS);
?>
</td>
<td class="optionbox center">
<?php
echo select_edit_control('talloffset', array(0 => WT_I18N::translate('Portrait'), 1 => WT_I18N::translate('Landscape'), 2 => WT_I18N::translate('Oldest at top'), 3 => WT_I18N::translate('Oldest at bottom')), null, $talloffset);
?>
</td>
<td class="optionbox center">
<input type="checkbox" value="<?php
if ($controller->show_full) {
echo "1\" checked=\"checked\" onclick=\"document.people.show_full.value='0';";
} else {
echo "0\" onclick=\"document.people.show_full.value='1';";
}
?>
">
</td>
</tr>
</table>
</form>
示例10: select_edit_control
$class = $index++ % 2 ? 'odd' : 'even';
echo '<td class="' . $class . '">', $this->indiField('preApproved[new][' . $tree->tree_id . '][rootid]', '', $tree->tree_name_url), '</td>', '<td class="' . $class . '">', $this->indiField('preApproved[new][' . $tree->tree_id . '][gedcomid]', '', $tree->tree_name_url), '</td>', '<td class="' . $class . '">', select_edit_control('preApproved[new][' . $tree->tree_id . '][canedit]', $this->get_edit_options(), NULL, NULL), '</td>';
}
?>
</tr>
<?php
if (!empty($preApproved)) {
ksort($preApproved);
foreach ($preApproved as $fbUsername => $details) {
echo '
<tr>
<td nowrap="nowrap">' . $this->facebookProfileLink($fbUsername) . '</td>';
$index = 0;
foreach (WT_Tree::getAll() as $tree) {
$class = $index++ % 2 ? 'odd' : 'even';
echo '<td class="' . $class . '">', $this->indiField('preApproved[' . $fbUsername . '][' . $tree->tree_id . '][rootid]', @$details[$tree->tree_id]['rootid'], $tree->tree_name_url), '</td>', '<td class="' . $class . '">', $this->indiField('preApproved[' . $fbUsername . '][' . $tree->tree_id . '][gedcomid]', @$details[$tree->tree_id]['gedcomid'], $tree->tree_name_url), '</td>', '<td class="' . $class . '">', select_edit_control('preApproved[' . $fbUsername . '][' . $tree->tree_id . '][canedit]', $this->get_edit_options(), NULL, @$details[$tree->tree_id]['canedit']), '</td>';
}
echo '
<td><button name="deletePreapproved" value="' . $fbUsername . '" class="icon-delete"></button></td>
</tr>';
}
}
?>
</tbody>
</table>
</form>
<script>
function paste_id(value) {
pastefield.value=value;
}
示例11: select_edit_control
</h2>
<p>
<?php
echo WT_I18N::translate('This will update the highest-level part or parts of the place name. For example, “Mexico” will match “Quintana Roo, Mexico”, but not “Santa Fe, New Mexico”.');
?>
</p>
<form method="post">
<dl>
<dt><?php
echo WT_I18N::translate('Family tree');
?>
</dt>
<dd><?php
echo select_edit_control('ged', WT_Tree::getNameList(), null, WT_GEDCOM, 'autofocus');
?>
</dd>
<dt><label for="search"><?php
echo WT_I18N::translate('Search for');
?>
</label></dt>
<dd><input name="search" id="search" type="text" size="30" value="<?php
echo WT_Filter::escapeHtml($search);
?>
" required></dd>
<dt><label for="replace"><?php
echo WT_I18N::translate('Replace with');
?>
</label></dt>
<dd><input name="replace" id="replace" type="text" size="30" value="<?php
示例12: IN
WT_DB::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");
try {
WT_DB::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($ged2_id, WT_GED_ID));
WT_DB::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($ged2_id, WT_GED_ID));
WT_DB::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($ged2_id, WT_GED_ID));
WT_DB::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($ged2_id, WT_GED_ID));
WT_DB::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($ged2_id, WT_GED_ID));
WT_DB::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($ged2_id, WT_GED_ID));
WT_DB::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($ged2_id, WT_GED_ID));
WT_DB::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($ged2_id, WT_GED_ID));
WT_DB::prepare("INSERT INTO `##default_resn` (gedcom_id, xref, tag_type, resn, comment, updated)" . " SELECT ?, xref, tag_type, resn, comment, updated FROM `##default_resn` AS default_resn2 WHERE gedcom_id = ?")->execute(array($ged2_id, WT_GED_ID));
WT_DB::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($ged2_id, WT_GED_ID));
// This table may contain old (deleted) references, which could clash. IGNORE these.
WT_DB::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($ged2_id, WT_GED_ID));
// This table may contain old (deleted) references, which could clash. IGNORE these.
WT_DB::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($ged2_id, WT_GED_ID));
echo '<p>', WT_I18N::translate('The family trees were merged successfully.'), '</p>';
} catch (Exception $ex) {
WT_DB::exec("ROLLBACK");
echo '<p>', WT_I18N::translate('Oops! An unexpected database error occurred.'), '</p>';
echo '<pre>', $ex, '</pre>';
}
WT_DB::exec("UNLOCK TABLES");
WT_DB::exec("COMMIT");
}
}
echo '<form method="POST" action="', WT_SCRIPT_NAME, '">';
echo '<input type="hidden" name="go" value="1">';
echo '<p>', WT_I18N::translate('Copy all the records from %1$s into %2$s.', WT_Filter::escapeHtml($WT_TREE->tree_title), select_edit_control('ged2_id', WT_Tree::getIdList(), null, $ged2_id)), '</p>';
echo '<input type="submit" value="', WT_I18N::translate('continue'), '">';
echo '</form>';
示例13: config
private function config()
{
require_once WT_ROOT . 'includes/functions/functions_edit.php';
$controller = new WT_Controller_Page();
$controller->setPageTitle($this->getTitle())->pageHeader();
$faqs = WT_DB::prepare("SELECT block_id, block_order, gedcom_id, bs1.setting_value AS header, bs2.setting_value AS faqbody" . " FROM `##block` b" . " JOIN `##block_setting` bs1 USING (block_id)" . " JOIN `##block_setting` bs2 USING (block_id)" . " WHERE module_name = ?" . " AND bs1.setting_name = 'header'" . " AND bs2.setting_name = 'faqbody'" . " AND IFNULL(gedcom_id, ?) = ?" . " ORDER BY block_order")->execute(array($this->getName(), WT_GED_ID, WT_GED_ID))->fetchAll();
$min_block_order = WT_DB::prepare("SELECT MIN(block_order) FROM `##block` WHERE module_name=?")->execute(array($this->getName()))->fetchOne();
$max_block_order = WT_DB::prepare("SELECT MAX(block_order) FROM `##block` WHERE module_name=?")->execute(array($this->getName()))->fetchOne();
echo '<p><form method="get" action="', WT_SCRIPT_NAME, '">', WT_I18N::translate('Family tree'), ' ', '<input type="hidden" name="mod", value="', $this->getName(), '">', '<input type="hidden" name="mod_action", value="admin_config">', select_edit_control('ged', WT_Tree::getNameList(), null, WT_GEDCOM), '<input type="submit" value="', WT_I18N::translate('show'), '">', '</form></p>';
echo '<a href="module.php?mod=', $this->getName(), '&mod_action=admin_edit">', WT_I18N::translate('Add an FAQ item'), '</a>';
echo help_link('add_faq_item', $this->getName());
echo '<table id="faq_edit">';
if (empty($faqs)) {
echo '<tr><td class="error center" colspan="5">', WT_I18N::translate('The FAQ list is empty.'), '</td></tr></table>';
} else {
$trees = WT_Tree::getAll();
foreach ($faqs as $faq) {
// NOTE: Print the position of the current item
echo '<tr class="faq_edit_pos"><td>';
echo WT_I18N::translate('Position item'), ': ', $faq->block_order + 1, ', ';
if ($faq->gedcom_id == null) {
echo WT_I18N::translate('All');
} else {
echo $trees[$faq->gedcom_id]->tree_title_html;
}
echo '</td>';
// NOTE: Print the edit options of the current item
echo '<td>';
if ($faq->block_order == $min_block_order) {
echo ' ';
} else {
echo '<a href="module.php?mod=', $this->getName(), '&mod_action=admin_moveup&block_id=', $faq->block_id, '" class="icon-uarrow"></a>';
echo help_link('moveup_faq_item', $this->getName());
}
echo '</td><td>';
if ($faq->block_order == $max_block_order) {
echo ' ';
} else {
echo '<a href="module.php?mod=', $this->getName(), '&mod_action=admin_movedown&block_id=', $faq->block_id, '" class="icon-darrow"></a>';
echo help_link('movedown_faq_item', $this->getName());
}
echo '</td><td>';
echo '<a href="module.php?mod=', $this->getName(), '&mod_action=admin_edit&block_id=', $faq->block_id, '">', WT_I18N::translate('Edit'), '</a>';
echo help_link('edit_faq_item', $this->getName());
echo '</td><td>';
echo '<a href="module.php?mod=', $this->getName(), '&mod_action=admin_delete&block_id=', $faq->block_id, '" onclick="return confirm(\'', WT_I18N::translate('Are you sure you want to delete this FAQ entry?'), '\');">', WT_I18N::translate('Delete'), '</a>';
echo help_link('delete_faq_item', $this->getName());
echo '</td></tr>';
// NOTE: Print the title text of the current item
echo '<tr><td colspan="5">';
echo '<div class="faq_edit_item">';
echo '<div class="faq_edit_title">', $faq->header, '</div>';
// NOTE: Print the body text of the current item
echo '<div class="faq_edit_content">', substr($faq->faqbody, 0, 1) == '<' ? $faq->faqbody : nl2br($faq->faqbody, false), '</div></div></td></tr>';
}
echo '</table>';
}
}
示例14: rawurlencode
jQuery("#log_list").dataTable( {
"dom": \'<"H"pf<"dt-clear">irl>t<"F"pl>\',
"processing": true,
"serverSide": true,
"ajax": "' . WT_SERVER_NAME . WT_SCRIPT_PATH . WT_SCRIPT_NAME . '?action=load_json&from=' . $from . '&to=' . $to . '&type=' . $type . '&oldged=' . rawurlencode($oldged) . '&newged=' . rawurlencode($newged) . '&xref=' . rawurlencode($xref) . '&user=' . rawurlencode($user) . '&gedc=' . rawurlencode($gedc) . '",
' . WT_I18N::datatablesI18N(array(10, 20, 50, 100, 500, 1000, -1)) . ',
jQueryUI: true,
autoWidth: false,
sorting: [[ 0, "desc" ]],
pageLength: ' . Auth::user()->getSetting('admin_site_change_page_size', 10) . ',
pagingType: "full_numbers",
columns: [
/* Timestamp */ { },
/* Status */ { },
/* Record */ { },
/* Old data */ { class: "raw_gedcom", sortable: false },
/* New data */ { class: "raw_gedcom", sortable: false },
/* User */ { },
/* Family tree */ { }
]
});
');
$url = WT_SCRIPT_NAME . '?from=' . rawurlencode($from) . '&to=' . rawurlencode($to) . '&type=' . rawurlencode($type) . '&oldged=' . rawurlencode($oldged) . '&newged=' . rawurlencode($newged) . '&xref=' . rawurlencode($xref) . '&user=' . rawurlencode($user) . '&gedc=' . rawurlencode($gedc);
$users_array = array();
foreach (User::all() as $tmp_user) {
$users_array[$tmp_user->getUserName()] = $tmp_user->getUserName();
}
echo '<form name="changes" method="get" action="' . WT_SCRIPT_NAME . '">', '<input type="hidden" name="action", value="show">', '<table class="site_change">', '<tr>', '<td colspan="6">', WT_I18N::translate('From %s to %s', '<input class="log-date" name="from" value="' . WT_Filter::escapeHtml($from) . '">', '<input class="log-date" name="to" value="' . WT_Filter::escapeHtml($to) . '">'), '</td>', '</tr><tr>', '<td>', WT_I18N::translate('Status'), '<br>', select_edit_control('type', $statuses, null, $type, ''), '</td>', '<td>', WT_I18N::translate('Record'), '<br><input class="log-filter" name="xref" value="', WT_Filter::escapeHtml($xref), '"> ', '</td>', '<td>', WT_I18N::translate('Old data'), '<br><input class="log-filter" name="oldged" value="', WT_Filter::escapeHtml($oldged), '"> ', '</td>', '<td>', WT_I18N::translate('New data'), '<br><input class="log-filter" name="newged" value="', WT_Filter::escapeHtml($newged), '"> ', '</td>', '<td>', WT_I18N::translate('User'), '<br>', select_edit_control('user', $users_array, '', $user, ''), '</td>', '<td>', WT_I18N::translate('Family tree'), '<br>', select_edit_control('gedc', WT_Tree::getNameList(), '', $gedc, Auth::isAdmin() ? '' : 'disabled'), '</td>', '</tr><tr>', '<td colspan="6">', '<input type="submit" value="', WT_I18N::translate('Filter'), '">', '<input type="submit" value="', WT_I18N::translate('Export'), '" onclick="document.changes.action.value=\'export\';return true;" ', $action == 'show' ? '' : 'disabled="disabled"', '>', '<input type="submit" value="', WT_I18N::translate('Delete'), '" onclick="if (confirm(\'', WT_Filter::escapeHtml(WT_I18N::translate('Permanently delete these records?')), '\')) {document.changes.action.value=\'delete\';return true;} else {return false;}" ', $action == 'show' ? '' : 'disabled="disabled"', '>', '</td>', '</tr>', '</table>', '</form>';
if ($action) {
echo '<br>', '<table id="log_list">', '<thead>', '<tr>', '<th>', WT_I18N::translate('Timestamp'), '</th>', '<th>', WT_I18N::translate('Status'), '</th>', '<th>', WT_I18N::translate('Record'), '</th>', '<th>', WT_I18N::translate('Old data'), '</th>', '<th>', WT_I18N::translate('New data'), '</th>', '<th>', WT_I18N::translate('User'), '</th>', '<th>', WT_I18N::translate('Family tree'), '</th>', '</tr>', '</thead>', '<tbody>', '</tbody>', '</table>';
}
示例15: adminPlaces
//.........这里部分代码省略.........
if ($noRows == 0) {
?>
<td><a href="#" onclick="delete_place(<?php
echo $place['place_id'];
?>
);return false;" class="icon-delete" title="<?php
echo WT_I18N::translate('Remove');
?>
"></a></td>
<?php
} else {
?>
<td><i class="icon-delete-grey"></i></td>
<?php
}
?>
</tr>
<?php
}
?>
</table>
</div>
<table id="gm_manage">
<tr>
<td>
<?php
echo WT_I18N::translate('Add a new geographic location');
?>
</td>
<td>
<form action="?" onsubmit="add_place_location(this.parent_id.options[this.parent_id.selectedIndex].value); return false;">
<?php
echo select_edit_control('parent_id', $where_am_i, WT_I18N::translate('Top level'), $parent);
?>
<input type="submit" value="<?php
echo WT_I18N::translate('Add');
?>
">
</form>
</td>
</tr>
<tr>
<td>
<?php
echo WT_I18N::translate('Import all places from a family tree');
?>
</td>
<td>
<form action="module.php" method="get">
<input type="hidden" name="mod" value="googlemap">
<input type="hidden" name="mod_action" value="admin_places">
<input type="hidden" name="action" value="ImportGedcom">
<?php
echo select_edit_control('ged', WT_Tree::getNameList(), null, WT_GEDCOM);
?>
<input type="submit" value="<?php
echo WT_I18N::translate('Import');
?>
">
</form>
</td>
</tr>
<tr>
<td>
<?php