本文整理汇总了PHP中help_link函数的典型用法代码示例。如果您正苦于以下问题:PHP help_link函数的具体用法?PHP help_link怎么用?PHP help_link使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了help_link函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: help_set_template_vars
function help_set_template_vars(&$template, $prefix = "%")
{
// NOOOTIENOOOT: You see this is a REFERENCE to the object, not the object itself, since we still use PHP4.0 :(
assert(is_object($template));
$result = sql_query("SELECT * FROM perihelion.help WHERE id like '" . $prefix . "_%'");
while ($row = sql_fetchrow($result)) {
$template->assign("help_" . strtolower($row['id']), help_link($row['id']));
}
}
示例2: user_drop_down
echo "</td></tr>";*/
echo "<tr><th>{$strValue}</th>";
echo "<td><input type='text' name='value' size='6' maxlength='12'";
if ($_SESSION['formdata']['add_task']['value'] != '') {
echo "value='{$_SESSION['formdata']['add_task']['value']}'";
}
echo "/></td></tr>";
echo "<tr><th>{$strUser}</th>";
echo "<td>";
if ($_SESSION['formdata']['add_task']['taskuser'] != '') {
echo user_drop_down('taskuser', $_SESSION['formdata']['add_task']['taskuser'], FALSE);
} else {
echo user_drop_down('taskuser', $sit[2], FALSE);
}
echo help_link('TaskUser') . "</td></tr>";
echo "<tr><th>{$strPrivacy}" . help_link('TaskPrivacy') . "</th>";
echo "<td>";
if ($_SESSION['formdata']['add_task']['distribution'] == 'public') {
echo "<label><input type='radio' name='distribution' checked='checked'";
echo " value='public' /> {$strPublic}</label><br />";
echo "<label><input type='radio' name='distribution' value='private' />";
echo " {$strPrivate} ";
echo icon('private', 16, $strPrivate, "{$strPublic}/{$strPrivate}");
echo "</label></td></tr>";
} else {
echo "<label><input type='radio' name='distribution' value='public' /> {$strPublic}</label><br />";
echo "<label><input type='radio' name='distribution' checked='checked' value='private' /> {$strPrivate} ";
echo icon('private', 16, $strPrivate, "{$strPublic}/{$strPrivate}");
echo "</label></td></tr>";
}
echo "</table>";
示例3: checknames
}
// Show media and hide the rest
if ($type == 'media') {
echo '<div id="find-header">
<form name="filtermedia" method="get" onsubmit="return checknames(this);" action="find.php">
<input type="hidden" name="choose" value="', $choose, '">
<input type="hidden" name="action" value="filter">
<input type="hidden" name="type" value="media">
<input type="hidden" name="callback" value="', $callback, '">
<input type="hidden" name="subclick">
<span>', WT_I18N::translate('Media contains:'), '</span>
<input type="text" name="filter" value="';
if ($filter) {
echo $filter;
}
echo '" autofocus>', help_link('simple_filter'), '<p><input type="submit" name="search" value="', WT_I18N::translate('Filter'), '" onclick="this.form.subclick.value=this.name">
<input type="submit" name="all" value="', WT_I18N::translate('Display all'), '" onclick="this.form.subclick.value=this.name">
</p></form></div>';
}
// Show place and hide the rest
if ($type == "place") {
echo '<div id="find-header">
<form name="filterplace" method="get" onsubmit="return checknames(this);" action="find.php">
<input type="hidden" name="action" value="filter">
<input type="hidden" name="type" value="place">
<input type="hidden" name="callback" value="', $callback, '">
<input type="hidden" name="subclick">
<span>', WT_I18N::translate('Place contains:'), '</span>
<input type="text" name="filter" value="';
if ($filter) {
echo $filter;
示例4: userstatus_bardrop_down
echo $_SESSION['userid'];
?>
+"&val="+escape(toPass), true);
xmlhttp.onreadystatechange=function() {
//remove this in the future after testing
if (xmlhttp.readyState==4) {
if (xmlhttp.responseText != ''){
//alert(xmlhttp.responseText);
}
}
}
xmlhttp.send(null);
$('savelayout').style.display='none';
}
/* ]]> */
</script>
<?php
echo "<div id='footerbar'>";
echo "<form action='{$_SERVER['PHP_SELF']}'>";
echo "{$strSetYourStatus}: ";
if (isset($sit[2])) {
echo userstatus_bardrop_down("status", user_status($sit[2])) . help_link("SetYourStatus");
}
echo "</form>\n";
echo "</div>\n";
if ($CONFIG['debug']) {
$dbg .= "\nLang: {$_SESSION['lang']}\n";
}
include APPLICATION_INCPATH . 'htmlfooter.inc.php';
示例5: downloadForm
public function downloadForm($clip_ctrl)
{
global $GEDCOM_MEDIA_PATH;
$pid = WT_Filter::get('pid', WT_REGEX_XREF);
$out = '<script>';
$out .= 'function cancelDownload() {
var link = "module.php?mod=' . $this->getName() . '&mod_action=ajax&sb_action=clippings&pid=' . $pid . '";
jQuery("#sb_clippings_content").load(link);
}';
$out .= '</script>';
$out .= '<form method="get" action="module.php">
<input type="hidden" name="mod" value="clippings">
<input type="hidden" name="mod_action" value="index">
<input type="hidden" name="pid" value="' . $pid . '">
<input type="hidden" name="action" value="download">
<table>
<tr><td colspan="2" class="topbottombar"><h2>' . WT_I18N::translate('Download') . '</h2></td></tr>
<tr><td class="descriptionbox width50 wrap">' . WT_I18N::translate('Zip file(s)') . help_link('zip') . '</td>
<td class="optionbox"><input type="checkbox" name="Zip" value="yes" checked="checked"></td></tr>
<tr><td class="descriptionbox width50 wrap">' . WT_I18N::translate('Include media (automatically zips files)') . help_link('include_media') . '</td>
<td class="optionbox"><input type="checkbox" name="IncludeMedia" value="yes" checked="checked"></td></tr>
';
if (WT_USER_GEDCOM_ADMIN) {
$out .= '<tr><td class="descriptionbox width50 wrap">' . WT_I18N::translate('Apply privacy settings?') . help_link('apply_privacy') . '</td>' . '<td class="optionbox">' . ' <input type="radio" name="privatize_export" value="none" checked="checked"> ' . WT_I18N::translate('None') . '<br>' . ' <input type="radio" name="privatize_export" value="gedadmin"> ' . WT_I18N::translate('Manager') . '<br>' . ' <input type="radio" name="privatize_export" value="user"> ' . WT_I18N::translate('Member') . '<br>' . ' <input type="radio" name="privatize_export" value="visitor"> ' . WT_I18N::translate('Visitor') . '</td></tr>';
} elseif (WT_USER_CAN_ACCESS) {
$out .= '<tr><td class="descriptionbox width50 wrap">' . WT_I18N::translate('Apply privacy settings?') . help_link('apply_privacy') . '</td>' . '<td class="list_value">' . ' <input type="radio" name="privatize_export" value="user" checked="checked"> ' . WT_I18N::translate('Member') . '<br>' . ' <input type="radio" name="privatize_export" value="visitor"> ' . WT_I18N::translate('Visitor') . '</td></tr>';
}
$out .= '
<tr><td class="descriptionbox width50 wrap">' . WT_I18N::translate('Convert from UTF-8 to ANSI (ISO-8859-1)') . help_link('utf8_ansi') . '</td>
<td class="optionbox"><input type="checkbox" name="convert" value="yes"></td></tr>
<tr>
<td class="descriptionbox width50 wrap">' . WT_I18N::translate('Add the GEDCOM media path to filenames') . help_link('GEDCOM_MEDIA_PATH') . '</td>
<td class="optionbox">
<input type="checkbox" name="conv_path" value="' . WT_Filter::escapeHtml($GEDCOM_MEDIA_PATH) . '">
<span dir="auto">' . WT_Filter::escapeHtml($GEDCOM_MEDIA_PATH) . '</span></td>
</tr>
<input type="hidden" name="conv_path" value="' . $clip_ctrl->conv_path . '">
</td></tr>
<tr><td class="topbottombar" colspan="2">
<input type="button" value="' . WT_I18N::translate('Cancel') . '" onclick="cancelDownload();">
<input type="submit" value="' . WT_I18N::translate('Download') . '">
</form>';
return $out;
}
示例6: elseif
}
}
include APPLICATION_INCPATH . 'htmlfooter.inc.php';
} elseif ($action == 'reassign') {
// External variables
$incidentid = cleanvar($_REQUEST['incidentid']);
$uid = cleanvar($_REQUEST['userid']);
$nextaction = cleanvar($_REQUST['nextaction']);
include APPLICATION_INCPATH . 'htmlheader.inc.php';
echo "<h2>{$strIncidentAdded} - {$strSummary}</h2>";
echo "<p align='center'>";
$incidentnum = "<a href=\"javascript:incident_details_window('{$incidentid}','incident{$incidentid}');\">{$strIncident} {$incidentid}</a>";
$queuename = "<strong style='color: red'>{$strActionNeeded}</strong>";
$name = user_realname($uid);
printf($strHasBeenAutoMovedToX, $incidentnum, $name, $queuename);
echo help_link('AutoAssignIncidents') . "</p><br /><br />";
$userphone = user_phone($userid);
if ($userphone != '') {
echo "<p align='center'>{$strTelephone}: {$userphone}</p>";
}
$sql = "UPDATE `{$dbIncidents}` SET owner='{$uid}', lastupdated='{$now}' WHERE id='{$incidentid}'";
mysql_query($sql);
if (mysql_error()) {
trigger_error("MySQL Query Error " . mysql_error(), E_USER_ERROR);
}
trigger('TRIGGER_INCIDENT_ASSIGNED', array('userid' => $uid, 'incidentid' => $incidentid));
// add update
$sql = "INSERT INTO `{$dbUpdates}` (incidentid, userid, type, timestamp, currentowner, currentstatus, nextaction) ";
$sql .= "VALUES ('{$incidentid}', '{$sit[2]}', 'reassigning', '{$now}', '{$uid}', '1', '{$nextaction}')";
$result = mysql_query($sql);
if (mysql_error()) {
示例7: getTabContent
public function getTabContent()
{
global $controller;
ob_start();
echo '<table class="facts_table">';
foreach ($this->get_facts() as $fact) {
if ($fact->getTag() == 'OBJE') {
print_main_media($fact, 1);
} else {
for ($i = 2; $i < 4; ++$i) {
print_main_media($fact, $i);
}
}
}
if (!$this->get_facts()) {
echo '<tr><td id="no_tab4" colspan="2" class="facts_value">', WT_I18N::translate('There are no media objects for this individual.'), '</td></tr>';
}
// New media link
if ($controller->record->canEdit() && get_gedcom_setting(WT_GED_ID, 'MEDIA_UPLOAD') >= WT_USER_ACCESS_LEVEL) {
?>
<tr>
<td class="facts_label">
<?php
echo WT_Gedcom_Tag::getLabel('OBJE');
?>
</td>
<td class="facts_value">
<a href="#" onclick="window.open('addmedia.php?action=showmediaform&linktoid=<?php
echo $controller->record->getXref();
?>
&ged=<?php
echo WT_GEDURL;
?>
', '_blank', edit_window_specs); return false;">
<?php
echo WT_I18N::translate('Add a new media object');
?>
</a>
<?php
echo help_link('OBJE');
?>
<br>
<a href="#" onclick="window.open('inverselink.php?linktoid=<?php
echo $controller->record->getXref();
?>
&ged=<?php
echo WT_GEDURL;
?>
&linkto=person', '_blank', find_window_specs); return false;">
<?php
echo WT_I18N::translate('Link to an existing media object');
?>
</a>
</td>
</tr>
<?php
}
?>
</table>
<?php
return '<div id="' . $this->getName() . '_content">' . ob_get_clean() . '</div>';
}
示例8: getBlock
public function getBlock($block_id, $template = true, $cfg = null)
{
global $ctype, $controller;
$show_unassigned = get_block_setting($block_id, 'show_unassigned', true);
$show_other = get_block_setting($block_id, 'show_other', true);
$show_future = get_block_setting($block_id, 'show_future', true);
$block = get_block_setting($block_id, 'block', true);
if ($cfg) {
foreach (array('show_unassigned', 'show_other', 'show_future', 'block') as $name) {
if (array_key_exists($name, $cfg)) {
${$name} = $cfg[$name];
}
}
}
$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() . help_link('todo', $this->getName());
$table_id = Uuid::uuid4();
// create a unique ID
$controller->addExternalJavascript(WT_JQUERY_DATATABLES_URL)->addInlineJavascript('
jQuery("#' . $table_id . '").dataTable({
dom: \'t\',
' . WT_I18N::datatablesI18N() . ',
autoWidth: false,
paginate: false,
lengthChange: false,
filter: false,
info: true,
jQueryUI: true,
columns: [
/* 0-DATE */ { visible: false },
/* 1-Date */ { dataSort: 0 },
/* 1-Record */ null,
/* 2-Username */ null,
/* 3-Text */ null
]
});
jQuery("#' . $table_id . '").css("visibility", "visible");
jQuery(".loading-image").css("display", "none");
');
$content = '';
$content .= '<div class="loading-image"> </div>';
$content .= '<table id="' . $table_id . '" style="visibility:hidden;">';
$content .= '<thead><tr>';
$content .= '<th>DATE</th>';
//hidden by datables code
$content .= '<th>' . WT_Gedcom_Tag::getLabel('DATE') . '</th>';
$content .= '<th>' . WT_I18N::translate('Record') . '</th>';
if ($show_unassigned || $show_other) {
$content .= '<th>' . WT_I18N::translate('Username') . '</th>';
}
$content .= '<th>' . WT_Gedcom_Tag::getLabel('TEXT') . '</th>';
$content .= '</tr></thead><tbody>';
$found = false;
$end_jd = $show_future ? 99999999 : WT_CLIENT_JD;
foreach (get_calendar_events(0, $end_jd, '_TODO', WT_GED_ID) as $fact) {
$record = $fact->getParent();
$user_name = $fact->getAttribute('_WT_USER');
if ($user_name == WT_USER_NAME || !$user_name && $show_unassigned || $user_name && $show_other) {
$content .= '<tr>';
//-- Event date (sortable)
$content .= '<td>';
//hidden by datables code
$content .= $fact->getDate()->JD();
$content .= '</td>';
$content .= '<td class="wrap">' . $fact->getDate()->Display(empty($SEARCH_SPIDER)) . '</td>';
$content .= '<td class="wrap"><a href="' . $record->getHtmlUrl() . '">' . $record->getFullName() . '</a></td>';
if ($show_unassigned || $show_other) {
$content .= '<td class="wrap">' . $user_name . '</td>';
}
$text = $fact->getValue();
$content .= '<td class="wrap">' . $text . '</td>';
$content .= '</tr>';
$found = true;
}
}
$content .= '</tbody></table>';
if (!$found) {
$content .= '<p>' . WT_I18N::translate('There are no research tasks in this family tree.') . '</p>';
}
if ($template) {
if ($block) {
require WT_THEME_DIR . 'templates/block_small_temp.php';
} else {
require WT_THEME_DIR . 'templates/block_main_temp.php';
}
} else {
return $content;
}
}
示例9: contact_site_drop_down
echo contact_site_drop_down('owner', '');
echo "</td></tr>";
echo "<tr><th>{$strID} " . help_link('InventoryID') . "</th>";
echo "<td><input name='identifier' value='{$row->identifier}' /></td></tr>";
echo "<tr><th>{$strAddress}</th>";
echo "<td><input name='address' value='{$row->address}' /></td></tr>";
if (!is_numeric($id) or ($row->privacy == 'adminonly' and user_permission($sit[2], 22) or $row->privacy == 'private' and $row->createdby == $sit[2] or $row->privacy == 'none')) {
echo "<tr><th>{$strUsername}</th>";
echo "<td><input name='username' value='{$row->username}' /></td></tr>";
echo "<tr><th>{$strPassword}</th>";
echo "<td><input name='password' value='{$row->password}' /></td></tr>";
}
echo "<tr><th>{$strNotes}</th>";
echo "<td><textarea name='notes'>{$row->notes}</textarea></td></tr>";
if ($row->privacy == 'adminonly' and user_permission($sit[2], 22) or $row->privacy == 'private' and $row->createdby == $sit[2] or $row->privacy == 'none') {
echo "<tr><th>{$strPrivacy} " . help_link('InventoryPrivacy') . "</th>";
echo "<td><input type='radio' name='privacy' value='private' ";
if ($row->privacy == 'private') {
echo " checked='checked' ";
$selected = TRUE;
}
echo "/>{$strPrivate}<br />";
echo "<input type='radio' name='privacy' value='adminonly'";
if ($row->privacy == 'adminonly') {
echo " checked='checked' ";
$selected = TRUE;
}
echo "/>";
echo "{$strAdminOnly}<br />";
echo "<input type='radio' name='privacy' value='none'";
if (!$selected) {
示例10: adminPlaces
//.........这里部分代码省略.........
$highestIndex++;
WT_DB::prepare("INSERT INTO `##placelocation` (pl_id, pl_parent_id, pl_level, pl_place, pl_long, pl_lati, pl_zoom) VALUES (?, ?, ?, ?, ?, ?, ?)")->execute(array($highestIndex, $parent_id, $i, $escparent, $place['long'], $place['lati'], $default_zoom_level[$i]));
echo WT_Filter::escapeHtml($escparent), '<br>';
} else {
if (empty($row->pl_long) && empty($row->pl_lati) && $place['lati'] != '0' && $place['long'] != '0') {
WT_DB::prepare("UPDATE `##placelocation` SET pl_lati=?, pl_long=? WHERE pl_id=?")->execute(array($place['lati'], $place['long'], $row->pl_id));
echo WT_Filter::escapeHtml($escparent), '<br>';
}
}
}
}
}
$parent = 0;
}
if ($action == 'ImportFile') {
$placefiles = array();
$this->findFiles(WT_MODULES_DIR . 'googlemap/extra');
sort($placefiles);
?>
<form method="post" enctype="multipart/form-data" id="importfile" name="importfile" action="module.php?mod=googlemap&mod_action=admin_places&action=ImportFile2">
<table class="gm_plac_edit">
<tr>
<th><?php
echo WT_I18N::translate('File containing places (CSV)');
?>
</th>
<td><input type="file" name="placesfile" size="50"></td>
</tr>
<?php
if (count($placefiles) > 0) {
?>
<tr>
<th><?php
echo WT_I18N::translate('Server file containing places (CSV)'), help_link('PLIF_LOCALFILE', 'googlemap');
?>
</th>
<td>
<select name="localfile">
<option></option>
<?php
foreach ($placefiles as $p => $placefile) {
?>
<option value="<?php
echo WT_Filter::escapeHtml($placefile);
?>
"><?php
if (substr($placefile, 0, 1) == "/") {
echo substr($placefile, 1);
} else {
echo $placefile;
}
?>
</option>
<?php
}
?>
</select>
</td>
</tr>
<?php
}
?>
<tr>
<th><?php
echo WT_I18N::translate('Delete all existing geographic data before importing the file.');
?>
示例11: WT_Controller_Note
require './includes/session.php';
require_once WT_ROOT . 'includes/functions/functions_print_lists.php';
$controller = new WT_Controller_Note();
if ($controller->record && $controller->record->canShow()) {
$controller->pageHeader();
if ($controller->record->isOld()) {
if (WT_USER_CAN_ACCEPT) {
echo '<p class="ui-state-highlight">', WT_I18N::translate('This note has been deleted. You should review the deletion and then %1$s or %2$s it.', '<a href="#" onclick="accept_changes(\'' . $controller->record->getXref() . '\');">' . WT_I18N::translate_c('You should review the deletion and then accept or reject it.', 'accept') . '</a>', '<a href="#" onclick="reject_changes(\'' . $controller->record->getXref() . '\');">' . WT_I18N::translate_c('You should review the deletion and then accept or reject it.', 'reject') . '</a>'), ' ', help_link('pending_changes'), '</p>';
} elseif (WT_USER_CAN_EDIT) {
echo '<p class="ui-state-highlight">', WT_I18N::translate('This note has been deleted. The deletion will need to be reviewed by a moderator.'), ' ', help_link('pending_changes'), '</p>';
}
} elseif ($controller->record->isNew()) {
if (WT_USER_CAN_ACCEPT) {
echo '<p class="ui-state-highlight">', WT_I18N::translate('This note has been edited. You should review the changes and then %1$s or %2$s them.', '<a href="#" onclick="accept_changes(\'' . $controller->record->getXref() . '\');">' . WT_I18N::translate_c('You should review the changes and then accept or reject them.', 'accept') . '</a>', '<a href="#" onclick="reject_changes(\'' . $controller->record->getXref() . '\');">' . WT_I18N::translate_c('You should review the changes and then accept or reject them.', 'reject') . '</a>'), ' ', help_link('pending_changes'), '</p>';
} elseif (WT_USER_CAN_EDIT) {
echo '<p class="ui-state-highlight">', WT_I18N::translate('This note has been edited. The changes need to be reviewed by a moderator.'), ' ', help_link('pending_changes'), '</p>';
}
}
} else {
header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found');
$controller->pageHeader();
echo '<p class="ui-state-error">', WT_I18N::translate('This note does not exist or you do not have permission to view it.'), '</p>';
exit;
}
$controller->addInlineJavascript('
jQuery("#note-tabs")
.tabs({
create: function(e, ui){
jQuery(e.target).css("visibility", "visible"); // prevent FOUC
}
});
示例12: configureBlock
//.........这里部分代码省略.........
<td class="facts_value" align="right">#lastBirthYear#</td>
<td class="facts_value">#lastBirth#</td>
</tr>
<tr>
<td class="facts_label">' . WT_I18N::translate('Earliest death year') . '</td>
<td class="facts_value" align="right">#firstDeathYear#</td>
<td class="facts_value">#firstDeath#</td>
</tr>
<tr>
<td class="facts_label">' . WT_I18N::translate('Latest death year') . '</td>
<td class="facts_value" align="right">#lastDeathYear#</td>
<td class="facts_value">#lastDeath#</td>
</tr>
<tr>
<td class="facts_label">' . WT_I18N::translate('Individual who lived the longest') . '</td>
<td class="facts_value" align="right">#longestLifeAge#</td>
<td class="facts_value">#longestLife#</td>
</tr>
<tr>
<td class="facts_label">' . WT_I18N::translate('Average age at death') . '</td>
<td class="facts_value" align="right">#averageLifespan#</td>
<td class="facts_value"></td>
</tr>
<tr>
<td class="facts_label">' . WT_I18N::translate('Family with the most children') . '</td>
<td class="facts_value" align="right">#largestFamilySize#</td>
<td class="facts_value">#largestFamily#</td>
</tr>
<tr>
<td class="facts_label">' . WT_I18N::translate('Average number of children per family') . '</td>
<td class="facts_value" align="right">#averageChildren#</td>
<td class="facts_value"></td>
</tr>
</table>
</td>
</tr>
</table><br>
<span style="font-weight: bold">' . WT_I18N::translate('Most common surnames') . '</span><br>
#commonSurnames#
</div>');
$title = get_block_setting($block_id, 'title');
$html = get_block_setting($block_id, 'html');
// title
echo '<tr><td class="descriptionbox wrap">', WT_Gedcom_Tag::getLabel('TITL'), '</td><td class="optionbox"><input type="text" name="title" size="30" value="', WT_Filter::escapeHtml($title), '"></td></tr>';
// templates
echo '<tr><td class="descriptionbox wrap">', WT_I18N::translate('Templates'), help_link('block_html_template', $this->getName()), '</td><td class="optionbox">';
// The CK editor needs lots of help to load/save data :-(
if (array_key_exists('ckeditor', WT_Module::getActiveModules())) {
$ckeditor_onchange = 'CKEDITOR.instances.html.setData(document.block.html.value);';
} else {
$ckeditor_onchange = '';
}
echo '<select name="template" onchange="document.block.html.value=document.block.template.options[document.block.template.selectedIndex].value;', $ckeditor_onchange, '">';
echo '<option value="', WT_Filter::escapeHtml($html), '">', WT_I18N::translate('Custom'), '</option>';
foreach ($templates as $title => $template) {
echo '<option value="', WT_Filter::escapeHtml($template), '">', $title, '</option>';
}
echo '</select></td></tr>';
// gedcom
$gedcom = get_block_setting($block_id, 'gedcom');
if (count(WT_Tree::getAll()) > 1) {
if ($gedcom == '__current__') {
$sel_current = ' selected="selected"';
} else {
$sel_current = '';
}
if ($gedcom == '__default__') {
$sel_default = ' selected="selected"';
} else {
$sel_default = '';
}
echo '<tr><td class="descriptionbox wrap">', WT_I18N::translate('Family tree'), '</td><td class="optionbox">', '<select name="gedcom">', '<option value="__current__"', $sel_current, '>', WT_I18N::translate('Current'), '</option>', '<option value="__default__"', $sel_default, '>', WT_I18N::translate('Default'), '</option>';
foreach (WT_Tree::getAll() as $tree) {
if ($tree->tree_name == $gedcom) {
$sel = ' selected="selected"';
} else {
$sel = '';
}
echo '<option value="', $tree->tree_name, '"', $sel, ' dir="auto">', $tree->tree_title_html, '</option>';
}
echo '</select></td></tr>';
}
// html
echo '<tr><td colspan="2" class="descriptionbox">', WT_I18N::translate('Content'), help_link('block_html_content', $this->getName()), '</td></tr><tr>', '<td colspan="2" class="optionbox">';
echo '<textarea name="html" class="html-edit" rows="10" style="width:98%;">', WT_Filter::escapeHtml($html), '</textarea>';
echo '</td></tr>';
$show_timestamp = get_block_setting($block_id, 'show_timestamp', false);
echo '<tr><td class="descriptionbox wrap">';
echo WT_I18N::translate('Show the date and time of update');
echo '</td><td class="optionbox">';
echo edit_field_yes_no('show_timestamp', $show_timestamp);
echo '<input type="hidden" name="timestamp" value="', WT_TIMESTAMP, '">';
echo '</td></tr>';
$languages = get_block_setting($block_id, 'languages');
echo '<tr><td class="descriptionbox wrap">';
echo WT_I18N::translate('Show this block for which languages?');
echo '</td><td class="optionbox">';
echo edit_language_checkboxes('lang_', $languages);
echo '</td></tr>';
}
示例13: help_link
}
echo "/></td></tr>\n";
echo "<tr><th>{$strFax}</th><td><input maxlength='50' name='fax' size='30'";
if ($_SESSION['formdata']['add_user']['fax'] != '') {
echo "value='{$_SESSION['formdata']['add_user']['fax']}'";
}
echo "/></td></tr>\n";
if ($CONFIG['holidays_enabled']) {
echo "<tr><th>{$strHolidayEntitlement}</th><td><input maxlength='3' name='holiday_entitlement' size='3' ";
if ($_SESSION['formdata']['add_user']['holiday_entitlement'] != '') {
echo "value='{$_SESSION['formdata']['add_user']['holiday_entitlement']}'";
} else {
echo "value='{$CONFIG['default_entitlement']}'";
}
echo " /> {$strDays}</td></tr>\n";
echo "<tr><th>{$strStartDate} " . help_link('UserStartdate') . "</th>";
echo "<td><input type='text' name='startdate' id='startdate' size='10'";
if ($_SESSION['formdata']['add_user']['startdate'] != '') {
echo "value='{$_SESSION['formdata']['add_user']['startdate']}'";
}
echo "/> ";
echo date_picker('adduser.startdate');
echo "</td></tr>\n";
}
plugin_do('add_user_form');
echo "</table>\n";
echo "<p><input name='submit' type='submit' value='{$strAddUser}' /></p>";
echo "</form>\n";
include APPLICATION_INCPATH . 'htmlfooter.inc.php';
clear_form_data('add_user');
} else {
示例14: help_link
echo '<style type="text/css">
#container {width: 70%; margin:15px auto; border: 1px solid gray; padding: 10px;}
#container dl {margin:0 0 40px 25px;}
#container dt {display:inline; width: 320px; font-weight:normal; margin: 0 0 15px 0;}
#container dd {color: #81A9CB; margin-bottom:20px;font-weight:bold;}
#container p {color: #81A9CB; font-size: 14px; font-style: italic; font-weight:bold; padding: 0 5px 5px;}
h2 {color: #81A9CB;}
.good {color: green;}
.bad {color: red !important;}
.indifferent {color: blue;}
#container p.pgv {color: black; font-size: 12px; font-style: normal; font-weight:normal; padding:0; margin:10px 0 0 320px;}
</style>';
if ($error || !$PGV_PATH) {
// Prompt for location of PhpGedView installation
echo '<div id="container">';
echo '<h2>', WT_I18N::translate('PhpGedView to <b>webtrees</b> transfer wizard'), help_link('PGV_WIZARD'), '</h2>';
if ($error) {
echo '<p class="bad">', $error, '</p>';
}
// Look for PGV in some nearby directories
$pgv_dirs = array();
$dir = opendir(realpath('..'));
while (($subdir = readdir($dir)) !== false) {
if (is_dir('../' . $subdir) && file_exists('../' . $subdir . '/config.php')) {
$pgv_dirs[] = '../' . $subdir;
}
}
closedir($dir);
echo '<form action="', WT_SCRIPT_NAME, '" method="post">', '<p>', WT_I18N::translate('Where is your PhpGedView installation?'), '</p>', '<dl>', '<dt>', WT_I18N::translate('Installation directory'), '</dt>';
switch (count($pgv_dirs)) {
case '0':
示例15: getBlock
public function getBlock($block_id, $template = true, $cfg = null)
{
global $ctype, $PEDIGREE_FULL_DETAILS, $show_full, $bwidth, $bheight;
$PEDIGREE_ROOT_ID = get_gedcom_setting(WT_GED_ID, 'PEDIGREE_ROOT_ID');
$details = get_block_setting($block_id, 'details', false);
$type = get_block_setting($block_id, 'type', 'pedigree');
$pid = get_block_setting($block_id, 'pid', WT_USER_ID ? WT_USER_GEDCOM_ID ? WT_USER_GEDCOM_ID : $PEDIGREE_ROOT_ID : $PEDIGREE_ROOT_ID);
$block = get_block_setting($block_id, 'block');
if ($cfg) {
foreach (array('details', 'type', 'pid', 'block') as $name) {
if (array_key_exists($name, $cfg)) {
${$name} = $cfg[$name];
}
}
}
// Override GEDCOM configuration temporarily
if (isset($show_full)) {
$saveShowFull = $show_full;
}
$savePedigreeFullDetails = $PEDIGREE_FULL_DETAILS;
if (!$details) {
$show_full = 0;
// Here we could adjust the block width & height to accommodate larger displays
} else {
$show_full = 1;
// Here we could adjust the block width & height to accommodate larger displays
}
$PEDIGREE_FULL_DETAILS = $show_full;
$person = WT_Individual::getInstance($pid);
if (!$person) {
$pid = $PEDIGREE_ROOT_ID;
set_block_setting($block_id, 'pid', $pid);
$person = WT_Individual::getInstance($pid);
}
if ($type != 'treenav' && $person) {
$controller = new WT_Controller_Hourglass($person->getXref(), 0);
$controller->setupJavascript();
}
$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 = '';
}
if ($person) {
switch ($type) {
case 'pedigree':
$title .= WT_I18N::translate('Pedigree of %s', $person->getFullName());
break;
case 'descendants':
$title .= WT_I18N::translate('Descendants of %s', $person->getFullName());
break;
case 'hourglass':
$title .= WT_I18N::translate('Hourglass chart of %s', $person->getFullName());
break;
case 'treenav':
$title .= WT_I18N::translate('Interactive tree of %s', $person->getFullName());
break;
}
$title .= help_link('index_charts', $this->getName());
$content = '<table cellspacing="0" cellpadding="0" border="0"><tr>';
if ($type == 'descendants' || $type == 'hourglass') {
$content .= "<td valign=\"middle\">";
ob_start();
$controller->print_descendency($person, 1, false);
$content .= ob_get_clean();
$content .= "</td>";
}
if ($type == 'pedigree' || $type == 'hourglass') {
//-- print out the root person
if ($type != 'hourglass') {
$content .= "<td valign=\"middle\">";
ob_start();
print_pedigree_person($person);
$content .= ob_get_clean();
$content .= "</td>";
}
$content .= "<td valign=\"middle\">";
ob_start();
$controller->print_person_pedigree($person, 1);
$content .= ob_get_clean();
$content .= "</td>";
}
if ($type == 'treenav') {
require_once WT_MODULES_DIR . 'tree/module.php';
require_once WT_MODULES_DIR . 'tree/class_treeview.php';
$mod = new tree_WT_Module();
$tv = new TreeView();
$content .= '<td>';
$content .= '<script>jQuery("head").append(\'<link rel="stylesheet" href="' . $mod->css() . '" type="text/css" />\');</script>';
$content .= '<script src="' . $mod->js() . '"></script>';
list($html, $js) = $tv->drawViewport($person, 2);
$content .= $html . '<script>' . $js . '</script>';
$content .= '</td>';
}
$content .= "</tr></table>";
} else {
$content = WT_I18N::translate('You must select an individual and chart type in the block configuration settings.');
}
//.........这里部分代码省略.........