Example #1
0
 /**
  * Function getCalendarOptionList
  *
  * @return string
  */
 public function getCalendarOptionList()
 {
     $html = '';
     foreach (Date::calendarNames() as $calendar => $name) {
         $selected = $this->calendar === $calendar ? 'selected' : '';
         $html .= sprintf('<option dir="auto" value="%s" %s>%s</option>', $calendar, $selected, $name);
     }
     return $html;
 }
Example #2
0
&amp;filterof=<?php 
echo $filterof;
?>
&amp;filtersx=<?php 
echo $filtersx;
?>
&amp;view=year">
						<?php 
echo I18N::translate('View year');
?>
					</a>
				</td>
				<td class="topbottombar width50">
					<?php 
$n = 0;
foreach (Date::calendarNames() as $newcal => $cal_name) {
    $tmp = $cal_date->convertToCalendar($newcal);
    if ($tmp->inValidRange()) {
        if ($n++) {
            echo ' | ';
        }
        if (get_class($tmp) === get_class($cal_date)) {
            echo '<span class="error">', $cal_name, '</span>';
        } else {
            $newcalesc = urlencode($tmp->format('%@'));
            $tmpmonth = $tmp->format('%O');
            echo '<a href="?cal=', $newcalesc, '&amp;day=', $tmp->d, '&amp;month=', $tmpmonth, '&amp;year=', $tmp->y, '&amp;filterev=', $filterev, '&amp;filterof=', $filterof, '&amp;filtersx=', $filtersx, '&amp;view=', $view, '">', $cal_name, '</a>';
        }
    }
}
?>
Example #3
0
 */
namespace Fisharebest\Webtrees;

/**
 * Defined in session.php
 *
 * @global Tree $WT_TREE
 */
global $WT_TREE;
use Fisharebest\Webtrees\Controller\PageController;
use Fisharebest\Webtrees\Functions\FunctionsEdit;
define('WT_SCRIPT_NAME', 'admin_trees_config.php');
require './includes/session.php';
$controller = new PageController();
$controller->restrictAccess(Auth::isManager($WT_TREE));
$calendars = array('none' => I18N::translate('No calendar conversion')) + Date::calendarNames();
$french_calendar_start = new Date('22 SEP 1792');
$french_calendar_end = new Date('31 DEC 1805');
$gregorian_calendar_start = new Date('15 OCT 1582');
$hide_show = array(0 => I18N::translate('hide'), 1 => I18N::translate('show'));
$surname_list_styles = array('style1' => I18N::translate('list'), 'style2' => I18N::translate('table'), 'style3' => I18N::translate('tag cloud'));
$layouts = array(0 => I18N::translate('Portrait'), 1 => I18N::translate('Landscape'));
$one_to_nine = array();
for ($n = 1; $n <= 9; ++$n) {
    $one_to_nine[$n] = I18N::number($n);
}
$formats = array('' => I18N::translate('none'), 'markdown' => I18N::translate('markdown'));
$source_types = array(0 => I18N::translate('none'), 1 => I18N::translate('facts'), 2 => I18N::translate('records'));
$no_yes = array(0 => I18N::translate('no'), 1 => I18N::translate('yes'));
$PRIVACY_CONSTANTS = array('none' => I18N::translate('Show to visitors'), 'privacy' => I18N::translate('Show to members'), 'confidential' => I18N::translate('Show to managers'), 'hidden' => I18N::translate('Hide from everyone'));
$privacy = array(Auth::PRIV_PRIVATE => I18N::translate('Show to visitors'), Auth::PRIV_USER => I18N::translate('Show to members'), Auth::PRIV_NONE => I18N::translate('Show to managers'), Auth::PRIV_HIDE => I18N::translate('Hide from everyone'));