• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Webtrees\Theme类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中Fisharebest\Webtrees\Theme的典型用法代码示例。如果您正苦于以下问题:PHP Theme类的具体用法?PHP Theme怎么用?PHP Theme使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



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

示例1: __construct

 /**
  * Create the chart controller
  *
  * @param int $show_full needed for use by charts module
  */
 public function __construct($show_full = 1)
 {
     global $WT_TREE;
     parent::__construct();
     $rootid = Filter::get('rootid', WT_REGEX_XREF);
     $this->root = Individual::getInstance($rootid, $WT_TREE);
     if (!$this->root) {
         // Missing root individual? Show the chart for someone.
         $this->root = $this->getSignificantIndividual();
     }
     if (!$this->root || !$this->root->canShowName()) {
         http_response_code(404);
         $this->error_message = I18N::translate('This individual does not exist or you do not have permission to view it.');
     }
     // Extract parameter from form
     if ($show_full) {
         $this->show_full = Filter::getInteger('show_full', 0, 1, $WT_TREE->getPreference('PEDIGREE_FULL_DETAILS'));
     } else {
         $this->show_full = 0;
     }
     $this->box = new \stdClass();
     if ($this->showFull()) {
         $this->box->width = Theme::theme()->parameter('chart-box-x');
         $this->box->height = Theme::theme()->parameter('chart-box-y');
     } else {
         $this->box->width = Theme::theme()->parameter('compact-chart-box-x');
         $this->box->height = Theme::theme()->parameter('compact-chart-box-y');
     }
 }
开发者ID:pal-saugstad,项目名称:webtrees,代码行数:34,代码来源:ChartController.php


示例2: index

 /**
  * AdminConfig@index
  */
 public function index()
 {
     global $WT_TREE;
     $action = Filter::post('action');
     if ($action == 'update' && Filter::checkCsrf()) {
         $this->update();
     }
     Theme::theme(new AdministrationTheme())->init($WT_TREE);
     $ctrl = new PageController();
     $ctrl->restrictAccess(Auth::isAdmin())->setPageTitle($this->module->getTitle());
     $view_bag = new ViewBag();
     $view_bag->set('title', $ctrl->getPageTitle());
     $view_bag->set('module', $this->module);
     ViewFactory::make('AdminConfig', $this, $ctrl, $view_bag)->render();
 }
开发者ID:jon48,项目名称:webtrees-lib,代码行数:18,代码来源:AdminConfigController.php


示例3: status

    /**
     * Translation@status
     */
    public function status()
    {
        global $WT_TREE;
        $table_id = \Rhumsaa\Uuid\Uuid::uuid4();
        Theme::theme(new AdministrationTheme())->init($WT_TREE);
        $ctrl = new PageController();
        $ctrl->restrictAccess(Auth::isAdmin())->setPageTitle(I18N::translate('Translations status'))->addExternalJavascript(WT_JQUERY_DATATABLES_JS_URL)->addExternalJavascript(WT_DATATABLES_BOOTSTRAP_JS_URL)->addInlineJavascript('
                //Datatable initialisation
				jQuery.fn.dataTableExt.oSort["unicode-asc"  ]=function(a,b) {return a.replace(/<[^<]*>/, "").localeCompare(b.replace(/<[^<]*>/, ""))};
				jQuery.fn.dataTableExt.oSort["unicode-desc" ]=function(a,b) {return b.replace(/<[^<]*>/, "").localeCompare(a.replace(/<[^<]*>/, ""))};
				jQuery.fn.dataTableExt.oSort["num-html-asc" ]=function(a,b) {a=parseFloat(a.replace(/<[^<]*>/, "")); b=parseFloat(b.replace(/<[^<]*>/, "")); return (a<b) ? -1 : (a>b ? 1 : 0);};
				jQuery.fn.dataTableExt.oSort["num-html-desc"]=function(a,b) {a=parseFloat(a.replace(/<[^<]*>/, "")); b=parseFloat(b.replace(/<[^<]*>/, "")); return (a>b) ? -1 : (a<b ? 1 : 0);};
	
				jQuery("#table_missing_' . $table_id . '").DataTable({
					' . I18N::datatablesI18N() . ',			
					sorting: [[0, "asc"]],                    
					pageLength: 15,
                    columns: [
						/* 0 Message	 	*/ null,
                        /* 1 Reference      */ null
					],
				});
                
                jQuery("#table_nonused_' . $table_id . '").DataTable({
					' . I18N::datatablesI18N() . ',			
					sorting: [[0, "asc"]],                    
					pageLength: 15,
                    columns: [
						/* 0 Message	 	*/ null,
                        /* 1 Reference      */ null
					],
				});
            ');
        $source_code_paths = array(WT_ROOT . 'vendor/jon48/webtrees-lib/src', WT_ROOT . 'vendor/jon48/webtrees-tools/src/app');
        $analyzer = new TranslationsAnalyzer($source_code_paths);
        $analyzer->load();
        $locale = $analyzer->getLocale();
        $view_bag = new ViewBag();
        $view_bag->set('table_id', $table_id);
        $view_bag->set('module', $this->module);
        $view_bag->set('source_code_paths', $source_code_paths);
        $view_bag->set('title', $ctrl->getPageTitle() . ' - ' . I18N::languageName($locale->languageTag()));
        $view_bag->set('missing_translations', $analyzer->getMissingTranslations());
        $view_bag->set('non_used_translations', $analyzer->getMajNonUsedTranslations());
        $view_bag->set('loading_stats', $analyzer->getLoadingStatistics());
        ViewFactory::make('TranslationStatus', $this, $ctrl, $view_bag)->render();
    }
开发者ID:jon48,项目名称:webtrees-tools,代码行数:50,代码来源:TranslationController.php


示例4: getBlock

 /**
  * Generate the HTML content of this block.
  *
  * @param int      $block_id
  * @param bool     $template
  * @param string[] $cfg
  *
  * @return string
  */
 public function getBlock($block_id, $template = true, $cfg = array())
 {
     $id = $this->getName() . $block_id;
     $class = $this->getName() . '_block';
     $title = $this->getTitle();
     $menu = Theme::theme()->menuThemes();
     if ($menu) {
         $content = '<div class="center theme_form">' . $menu . '</div><br>';
         if ($template) {
             return Theme::theme()->formatBlock($id, $title, $class, $content);
         } else {
             return $content;
         }
     } else {
         return '';
     }
 }
开发者ID:tronsmit,项目名称:webtrees,代码行数:26,代码来源:ThemeSelectModule.php


示例5: printChildAscendancy

 /**
  * print a child ascendancy
  *
  * @param Individual $individual
  * @param int        $sosa  child sosa number
  * @param int        $depth the ascendancy depth to show
  */
 public function printChildAscendancy(Individual $individual, $sosa, $depth)
 {
     echo '<li>';
     echo '<table><tbody><tr><td>';
     if ($sosa === 1) {
         echo '<img src="', Theme::theme()->parameter('image-spacer'), '" height="3" width="', Theme::theme()->parameter('chart-descendancy-indent'), '"></td><td>';
     } else {
         echo '<img src="', Theme::theme()->parameter('image-spacer'), '" height="3" width="2" alt="">';
         echo '<img src="', Theme::theme()->parameter('image-hline'), '" height="3" width="', Theme::theme()->parameter('chart-descendancy-indent') - 2, '"></td><td>';
     }
     FunctionsPrint::printPedigreePerson($individual, $this->showFull());
     echo '</td><td>';
     if ($sosa > 1) {
         FunctionsCharts::printUrlArrow('?rootid=' . $individual->getXref() . '&amp;PEDIGREE_GENERATIONS=' . $this->generations . '&amp;show_full=' . $this->showFull() . '&amp;chart_style=' . $this->chart_style . '&amp;ged=' . $individual->getTree()->getNameUrl(), I18N::translate('Ancestors of %s', $individual->getFullName()), 3);
     }
     echo '</td><td class="details1">&nbsp;<span class="person_box' . ($sosa === 1 ? 'NN' : ($sosa % 2 ? 'F' : '')) . '">', I18N::number($sosa), '</span> ';
     echo '</td><td class="details1">&nbsp;', FunctionsCharts::getSosaName($sosa), '</td>';
     echo '</tr></tbody></table>';
     // Parents
     $family = $individual->getPrimaryChildFamily();
     if ($family && $depth > 0) {
         // Marriage details
         echo '<span class="details1">';
         echo '<img src="', Theme::theme()->parameter('image-spacer'), '" height="2" width="', Theme::theme()->parameter('chart-descendancy-indent'), '" alt=""><a href="#" onclick="return expand_layer(\'sosa_', $sosa, '\');" class="top"><i id="sosa_', $sosa, '_img" class="icon-minus" title="', I18N::translate('View family'), '"></i></a>';
         echo ' <span class="person_box">', I18N::number($sosa * 2), '</span> ', I18N::translate('and');
         echo ' <span class="person_boxF">', I18N::number($sosa * 2 + 1), '</span>';
         if ($family->canShow()) {
             foreach ($family->getFacts(WT_EVENTS_MARR) as $fact) {
                 echo ' <a href="', $family->getHtmlUrl(), '" class="details1">', $fact->summary(), '</a>';
             }
         }
         echo '</span>';
         // display parents recursively - or show empty boxes
         echo '<ul id="sosa_', $sosa, '" class="generation">';
         if ($family->getHusband()) {
             $this->printChildAscendancy($family->getHusband(), $sosa * 2, $depth - 1);
         }
         if ($family->getWife()) {
             $this->printChildAscendancy($family->getWife(), $sosa * 2 + 1, $depth - 1);
         }
         echo '</ul>';
     }
     echo '</li>';
 }
开发者ID:pal-saugstad,项目名称:webtrees,代码行数:51,代码来源:AncestryController.php


示例6: printPedigreePerson

 /**
  * print the information for an individual chart box
  *
  * find and print a given individuals information for a pedigree chart
  *
  * @param Individual $person The person to print
  * @param int $show_full The style to print the box in, 0 for smaller boxes, 1 for larger boxes
  */
 public static function printPedigreePerson(Individual $person = null, $show_full = 1)
 {
     switch ($show_full) {
         case 0:
             if ($person) {
                 echo Theme::theme()->individualBoxSmall($person);
             } else {
                 echo Theme::theme()->individualBoxSmallEmpty();
             }
             break;
         case 1:
             if ($person) {
                 echo Theme::theme()->individualBox($person);
             } else {
                 echo Theme::theme()->individualBoxEmpty();
             }
             break;
     }
 }
开发者ID:jflash,项目名称:webtrees,代码行数:27,代码来源:FunctionsPrint.php


示例7: getBlock

 /**
  * Generate the HTML content of this block.
  *
  * @param int      $block_id
  * @param bool     $template
  * @param string[] $cfg
  *
  * @return string
  */
 public function getBlock($block_id, $template = true, $cfg = array())
 {
     global $WT_TREE;
     $id = $this->getName() . $block_id;
     $class = $this->getName() . '_block';
     $title = '<span dir="auto">' . I18N::translate('Welcome %s', Auth::user()->getRealNameHtml()) . '</span>';
     $content = '<table><tr>';
     $content .= '<td><a href="edituser.php"><i class="icon-mypage"></i><br>' . I18N::translate('My account') . '</a></td>';
     $gedcomid = $WT_TREE->getUserPreference(Auth::user(), 'gedcomid');
     if ($gedcomid) {
         $content .= '<td><a href="pedigree.php?rootid=' . $gedcomid . '&amp;ged=' . $WT_TREE->getNameUrl() . '"><i class="icon-pedigree"></i><br>' . I18N::translate('My pedigree') . '</a></td>';
         $content .= '<td><a href="individual.php?pid=' . $gedcomid . '&amp;ged=' . $WT_TREE->getNameUrl() . '"><i class="icon-indis"></i><br>' . I18N::translate('My individual record') . '</a></td>';
     }
     $content .= '</tr></table>';
     if ($template) {
         return Theme::theme()->formatBlock($id, $title, $class, $content);
     } else {
         return $content;
     }
 }
开发者ID:pal-saugstad,项目名称:webtrees,代码行数:29,代码来源:UserWelcomeModule.php


示例8: getBlock

 /**
  * Generate the HTML content of this block.
  *
  * @param int      $block_id
  * @param bool     $template
  * @param string[] $cfg
  *
  * @return string
  */
 public function getBlock($block_id, $template = true, $cfg = array())
 {
     global $controller, $WT_TREE;
     $indi_xref = $controller->getSignificantIndividual()->getXref();
     $id = $this->getName() . $block_id;
     $class = $this->getName() . '_block';
     $title = $WT_TREE->getTitleHtml();
     $content = '<table><tr>';
     $content .= '<td><a href="pedigree.php?rootid=' . $indi_xref . '&amp;ged=' . $WT_TREE->getNameUrl() . '"><i class="icon-pedigree"></i><br>' . I18N::translate('Default chart') . '</a></td>';
     $content .= '<td><a href="individual.php?pid=' . $indi_xref . '&amp;ged=' . $WT_TREE->getNameUrl() . '"><i class="icon-indis"></i><br>' . I18N::translate('Default individual') . '</a></td>';
     if (Site::getPreference('USE_REGISTRATION_MODULE') && !Auth::check()) {
         $content .= '<td><a href="' . WT_LOGIN_URL . '?action=register"><i class="icon-user_add"></i><br>' . I18N::translate('Request new user account') . '</a></td>';
     }
     $content .= "</tr>";
     $content .= "</table>";
     if ($template) {
         return Theme::theme()->formatBlock($id, $title, $class, $content);
     } else {
         return $content;
     }
 }
开发者ID:pal-saugstad,项目名称:webtrees,代码行数:30,代码来源:WelcomeBlockModule.php


示例9: index

 /**
  * WelcomeBlock@index
  * 
  * @param PageController $parent_controller
  * @param Tree $tree
  * @param string $block_id
  * @param string $template
  * @return $string
  */
 public function index(PageController $parent_controller, Tree $tree, $block_id, $template)
 {
     $view_bag = new ViewBag();
     if ($parent_controller && $tree) {
         $view_bag->set('tree', $tree);
         $view_bag->set('indi', $parent_controller->getSignificantIndividual());
         $id = $this->module->getName() . $block_id;
         $class = $this->module->getName() . '_block';
         $parent_controller->addInlineJavascript('
             jQuery("#maj-new_passwd").hide();
             jQuery("#maj-passwd_click").click(function()
             {
                 jQuery("#maj-new_passwd").slideToggle(100, function() {
                     jQuery("#maj-new_passwd_username").focus();
 			});
 					return false;
 				  });
 			');
         if (Auth::isAdmin()) {
             $title = '<a class="icon-admin" title="' . I18N::translate('Configure') . '" href="block_edit.php?block_id=' . $block_id . '&amp;ged=' . $tree->getNameHtml() . '&amp;ctype=gedcom"></a>';
         } else {
             $title = '';
         }
         $title .= '<span dir="auto">' . $tree->getTitleHtml() . '</span>';
         $piwik_enabled = $this->module->getBlockSetting($block_id, 'piwik_enabled', false);
         $view_bag->set('piwik_enabled', $piwik_enabled);
         if ($piwik_enabled) {
             $parent_controller->addInlineJavascript('$("#piwik_stats")
                     .load("module.php?mod=' . $this->module->getName() . '&mod_action=Piwik&block_id=' . $block_id . '");');
         }
         $content = ViewFactory::make('WelcomeBlock', $this, new BaseController(), $view_bag)->getHtmlPartial();
         if ($template) {
             return Theme::theme()->formatBlock($id, $title, $class, $content);
         } else {
             return $content;
         }
     }
 }
开发者ID:jon48,项目名称:webtrees-lib,代码行数:47,代码来源:WelcomeBlockController.php


示例10: generateFanChart

 /**
  * Generate both the HTML and PNG components of the fan chart
  *
  * The HTML and PNG components both require the same co-ordinate calculations,
  * so we generate them using the same code, but we send them in separate
  * HTTP requests.
  *
  * @param string $what "png" or "html"
  *
  * @return string
  */
 public function generateFanChart($what)
 {
     $treeid = $this->sosaAncestors($this->generations);
     $fanw = 640 * $this->fan_width / 100;
     $fandeg = 90 * $this->fan_style;
     $html = '';
     $treesize = count($treeid) + 1;
     // generations count
     $gen = log($treesize) / log(2) - 1;
     $sosa = $treesize - 1;
     // fan size
     if ($fandeg == 0) {
         $fandeg = 360;
     }
     $fandeg = min($fandeg, 360);
     $fandeg = max($fandeg, 90);
     $cx = $fanw / 2 - 1;
     // center x
     $cy = $cx;
     // center y
     $rx = $fanw - 1;
     $rw = $fanw / ($gen + 1);
     $fanh = $fanw;
     // fan height
     if ($fandeg == 180) {
         $fanh = round($fanh * ($gen + 1) / ($gen * 2));
     }
     if ($fandeg == 270) {
         $fanh = round($fanh * 0.86);
     }
     $scale = $fanw / 640;
     // image init
     $image = ImageCreate($fanw, $fanh);
     $white = ImageColorAllocate($image, 0xff, 0xff, 0xff);
     ImageFilledRectangle($image, 0, 0, $fanw, $fanh, $white);
     ImageColorTransparent($image, $white);
     $color = ImageColorAllocate($image, hexdec(substr(Theme::theme()->parameter('chart-font-color'), 0, 2)), hexdec(substr(Theme::theme()->parameter('chart-font-color'), 2, 2)), hexdec(substr(Theme::theme()->parameter('chart-font-color'), 4, 2)));
     $bgcolor = ImageColorAllocate($image, hexdec(substr(Theme::theme()->parameter('chart-background-u'), 0, 2)), hexdec(substr(Theme::theme()->parameter('chart-background-u'), 2, 2)), hexdec(substr(Theme::theme()->parameter('chart-background-u'), 4, 2)));
     $bgcolorM = ImageColorAllocate($image, hexdec(substr(Theme::theme()->parameter('chart-background-m'), 0, 2)), hexdec(substr(Theme::theme()->parameter('chart-background-m'), 2, 2)), hexdec(substr(Theme::theme()->parameter('chart-background-m'), 4, 2)));
     $bgcolorF = ImageColorAllocate($image, hexdec(substr(Theme::theme()->parameter('chart-background-f'), 0, 2)), hexdec(substr(Theme::theme()->parameter('chart-background-f'), 2, 2)), hexdec(substr(Theme::theme()->parameter('chart-background-f'), 4, 2)));
     // imagemap
     $imagemap = '<map id="fanmap" name="fanmap">';
     // loop to create fan cells
     while ($gen >= 0) {
         // clean current generation area
         $deg2 = 360 + ($fandeg - 180) / 2;
         $deg1 = $deg2 - $fandeg;
         ImageFilledArc($image, $cx, $cy, $rx, $rx, $deg1, $deg2, $bgcolor, IMG_ARC_PIE);
         $rx -= 3;
         // calculate new angle
         $p2 = pow(2, $gen);
         $angle = $fandeg / $p2;
         $deg2 = 360 + ($fandeg - 180) / 2;
         $deg1 = $deg2 - $angle;
         // special case for rootid cell
         if ($gen == 0) {
             $deg1 = 90;
             $deg2 = 360 + $deg1;
         }
         // draw each cell
         while ($sosa >= $p2) {
             $person = $treeid[$sosa];
             if ($person) {
                 $name = $person->getFullName();
                 $addname = $person->getAddName();
                 $text = I18N::reverseText($name);
                 if ($addname) {
                     $text .= "\n" . I18N::reverseText($addname);
                 }
                 $text .= "\n" . I18N::reverseText($person->getLifeSpan());
                 switch ($person->getSex()) {
                     case 'M':
                         $bg = $bgcolorM;
                         break;
                     case 'F':
                         $bg = $bgcolorF;
                         break;
                     default:
                         $bg = $bgcolor;
                         break;
                 }
                 ImageFilledArc($image, $cx, $cy, $rx, $rx, $deg1, $deg2, $bg, IMG_ARC_PIE);
                 // split and center text by lines
                 $wmax = (int) ($angle * 7 / Theme::theme()->parameter('chart-font-size') * $scale);
                 $wmax = min($wmax, 35 * $scale);
                 if ($gen == 0) {
                     $wmax = min($wmax, 17 * $scale);
                 }
                 $text = $this->splitAlignText($text, $wmax);
//.........这里部分代码省略.........
开发者ID:pal-saugstad,项目名称:webtrees,代码行数:101,代码来源:FanchartController.php


示例11: getSidebarContent

    /**
     * Load this sidebar synchronously.
     *
     * @return string
     */
    public function getSidebarContent()
    {
        global $controller, $WT_TREE;
        // Fetch a list of the initial letters of all surnames in the database
        $initials = QueryName::surnameAlpha($WT_TREE, true, false, false);
        $controller->addInlineJavascript('
			var loadedNames = new Array();

			function isearchQ() {
				var query = jQuery("#sb_indi_name").val();
				if (query.length>1) {
					jQuery("#sb_indi_content").load("module.php?mod=' . $this->getName() . '&mod_action=ajax&sb_action=individuals&search="+query);
				}
			}

			var timerid = null;
			jQuery("#sb_indi_name").keyup(function(e) {
				if (timerid) window.clearTimeout(timerid);
				timerid = window.setTimeout("isearchQ()", 500);
			});
			jQuery("#sb_content_individuals").on("click", ".sb_indi_letter", function() {
				jQuery("#sb_indi_content").load(this.href);
				return false;
			});
			jQuery("#sb_content_individuals").on("click", ".sb_indi_surname", function() {
				var element = jQuery(this);
				var surname = element.data("surname");
				var alpha   = element.data("alpha");

				if (!loadedNames[surname]) {
					jQuery.ajax({
					  url: "module.php?mod=' . $this->getName() . '&mod_action=ajax&sb_action=individuals&alpha=" + encodeURIComponent(alpha) + "&surname=" + encodeURIComponent(surname),
					  cache: false,
					  success: function(html) {
					    jQuery("div.name_tree_div", element.closest("li"))
					    .html(html)
					    .show("fast")
					    .css("list-style-image", "url(' . Theme::theme()->parameter('image-minus') . ')");
					    loadedNames[surname]=2;
					  }
					});
				} else if (loadedNames[surname]==1) {
					loadedNames[surname]=2;
					jQuery("div.name_tree_div", jQuery(this).closest("li"))
					.show()
					.css("list-style-image", "url(' . Theme::theme()->parameter('image-minus') . ')");
				} else {
					loadedNames[surname]=1;
					jQuery("div.name_tree_div", jQuery(this).closest("li"))
					.hide("fast")
					.css("list-style-image", "url(' . Theme::theme()->parameter('image-plus') . ')");
				}
				return false;
			});
		');
        $out = '<form method="post" action="module.php?mod=' . $this->getName() . '&amp;mod_action=ajax" onsubmit="return false;"><input type="search" name="sb_indi_name" id="sb_indi_name" placeholder="' . I18N::translate('Search') . '"><p>';
        foreach ($initials as $letter => $count) {
            switch ($letter) {
                case '@':
                    $html = I18N::translateContext('Unknown surname', '…');
                    break;
                case ',':
                    $html = I18N::translate('None');
                    break;
                case ' ':
                    $html = '&nbsp;';
                    break;
                default:
                    $html = $letter;
                    break;
            }
            $html = '<a href="module.php?mod=' . $this->getName() . '&amp;mod_action=ajax&amp;sb_action=individuals&amp;alpha=' . urlencode($letter) . '" class="sb_indi_letter">' . $html . '</a>';
            $out .= $html . " ";
        }
        $out .= '</p>';
        $out .= '<div id="sb_indi_content">';
        $out .= '</div></form>';
        return $out;
    }
开发者ID:pal-saugstad,项目名称:webtrees,代码行数:84,代码来源:IndividualSidebarModule.php


示例12: asort

                $sortkey = 100000000.0;
                // birth date missing => sort last
            }
            $children[$child->getXref()] = $sortkey;
        }
        if ($option === 'bybirth') {
            asort($children);
        }
        $i = 0;
        foreach ($children as $id => $child) {
            echo '<li style="cursor:move; margin-bottom:2px; position:relative;"';
            if (!in_array($id, $ids)) {
                echo ' class="facts_value new"';
            }
            echo ' id="li_', $id, '">';
            echo Theme::theme()->individualBoxLarge(Individual::getInstance($id, $WT_TREE));
            echo '<input type="hidden" name="order[', $id, ']" value="', $i, '">';
            echo '</li>';
            $i++;
        }
        echo '</ul>';
        ?>
			<table>
				<?php 
        echo keep_chan($family);
        ?>
			</table>
			<p id="save-cancel">
				<input type="submit" class="save" value="<?php 
        echo I18N::translate('save');
        ?>
开发者ID:jflash,项目名称:webtrees,代码行数:31,代码来源:edit_interface.php


示例13:

        echo I18N::translate('Site members can send each other messages. You can choose to how these messages are sent to you, or choose not receive them at all.');
        ?>
				</p>
			</div>
		</div>

		<!-- THEME -->
		<div class="form-group">
			<label class="control-label col-sm-3" for="theme">
				<?php 
        echo I18N::translate('Theme');
        ?>
			</label>
			<div class="col-sm-9">
				<?php 
        echo FunctionsEdit::selectEditControl('theme', Theme::themeNames(), I18N::translate('<default theme>'), $user->getPreference('theme'), 'class="form-control"');
        ?>
			</div>
		</div>

		<!-- COMMENTS -->
		<div class="form-group">
			<label class="control-label col-sm-3" for="comment">
				<?php 
        echo I18N::translate('Administrator comments on user');
        ?>
			</label>
			<div class="col-sm-9">
				<textarea class="form-control" id="comment" name="comment" rows="5" maxlength="255"><?php 
        echo Filter::escapeHtml($user->getPreference('comment'));
        ?>
开发者ID:tronsmit,项目名称:webtrees,代码行数:31,代码来源:admin_users.php


示例14: elseif

    echo Filter::escapeHtml(Site::getPreference('SMTP_HELO'));
    ?>
" placeholder="localhost" maxlength="255" pattern="[a-z0-9-]+(\.[a-z0-9-]+)*">
			<p class="small text-muted">
				<?php 
    echo I18N::translate('Many mail servers require that the sending server identifies itself correctly, using a valid domain name.');
    ?>
			</p>
		</div>
	</div>

	<div class="form-group">
		<div class="col-sm-offset-3 col-sm-9">
			<p class="small text-muted">
				<?php 
    echo Theme::theme()->htmlAlert(I18N::translate('To use a Google mail account, use the following settings: server=smtp.gmail.com, port=587, security=tls, [email protected], password=[your gmail password]'), 'info', false);
    ?>
			</p>
		</div>
	</div>

	<?php 
} elseif (Filter::get('action') === 'login') {
    ?>
	<input type="hidden" name="action" value="login">

	<!-- LOGIN_URL -->
	<div class="form-group">
		<label for="LOGIN_URL" class="col-sm-3 control-label">
			<?php 
    echo I18N::translate('Login URL');
开发者ID:AlexSnet,项目名称:webtrees,代码行数:31,代码来源:admin_site_config.php


示例15: printEmptyBox

 /**
  * Print empty box
  */
 private function printEmptyBox()
 {
     echo $this->showFull() ? Theme::theme()->individualBoxEmpty() : Theme::theme()->individualBoxSmallEmpty();
 }
开发者ID:pal-saugstad,项目名称:webtrees,代码行数:7,代码来源:FamilyBookController.php


示例16: printFact


//.........这里部分代码省略.........
                    // Some users (just Meliza?) use "1 EVEN/2 TYPE BIRT".  Translate the TYPE.
                    $label = GedcomTag::getLabel($type, $label_person);
                    $type = '';
                    // Do not print this again
                } elseif ($type) {
                    // We don't have a translation for $type - but a custom translation might exist.
                    $label = I18N::translate(Filter::escapeHtml($type));
                    $type = '';
                    // Do not print this again
                } else {
                    // An unspecified fact/event
                    $label = $fact->getLabel();
                }
                break;
            case 'MARR':
                // This is a hack for a proprietory extension.  Is it still used/needed?
                $utype = strtoupper($type);
                if ($utype == 'CIVIL' || $utype == 'PARTNERS' || $utype == 'RELIGIOUS') {
                    $label = GedcomTag::getLabel('MARR_' . $utype, $label_person);
                    $type = '';
                    // Do not print this again
                } else {
                    $label = $fact->getLabel();
                }
                break;
            default:
                // Normal fact/event
                $label = $fact->getLabel();
                break;
        }
        echo '<tr class="', $styleadd, '">';
        echo '<td class="descriptionbox width20">';
        if ($fact->getParent()->getTree()->getPreference('SHOW_FACT_ICONS')) {
            echo Theme::theme()->icon($fact), ' ';
        }
        if ($fact->getFactId() != 'histo' && $fact->canEdit()) {
            ?>
			<a
				href="#"
				title="<?php 
            echo I18N::translate('Edit');
            ?>
"
				onclick="return edit_record('<?php 
            echo $parent->getXref();
            ?>
', '<?php 
            echo $fact->getFactId();
            ?>
');"
				><?php 
            echo $label;
            ?>
</a>
			<div class="editfacts">
				<div class="editlink">
					<a
						href="#"
						title="<?php 
            echo I18N::translate('Edit');
            ?>
"
						class="editicon"
						onclick="return edit_record('<?php 
            echo $parent->getXref();
            ?>
开发者ID:jflash,项目名称:webtrees,代码行数:67,代码来源:FunctionsPrintFacts.php


示例17: getBlock

    /**
     * Generate the HTML content of this block.
     *
     * @param int      $block_id
     * @param bool     $template
     * @param string[] $cfg
     *
     * @return string
     */
    public function getBlock($block_id, $template = true, $cfg = array())
    {
        global $controller;
        $id = $this->getName() . $block_id;
        $class = $this->getName() . '_block';
        $controller->addInlineJavascript('
			jQuery("#new_passwd").hide();
			jQuery("#passwd_click").click(function() {
				jQuery("#new_passwd").slideToggle(100, function() {
					jQuery("#new_passwd_username").focus();
				});
				return false;
			});
		');
        if (Auth::check()) {
            $title = I18N::translate('Logout');
            $content = '<div class="center"><form method="post" action="logout.php" name="logoutform" onsubmit="return true;">';
            $content .= '<br><a href="../../edituser.php" class="name2">' . I18N::translate('Logged in as ') . ' ' . Auth::user()->getRealNameHtml() . '</a><br><br>';
            $content .= '<input type="submit" value="' . I18N::translate('Logout') . '">';
            $content .= '<br><br></form></div>';
        } else {
            $title = I18N::translate('Login');
            $content = '<div id="login-box">
				<form id="login-form" name="login-form" method="post" action="' . WT_LOGIN_URL . '">
				<input type="hidden" name="action" value="login">';
            $content .= '<div>
				<label for="username">' . I18N::translate('Username') . '<input type="text" id="username" name="username" class="formField">
				</label>
				</div>
				<div>
					<label for="password">' . I18N::translate('Password') . '<input type="password" id="password" name="password" class="formField">
					</label>
				</div>
				<div>
					<input type="submit" value="' . I18N::translate('Login') . '">
				</div>
				<div>
					<a href="#" id="passwd_click">' . I18N::translate('Request new password') . '</a>
				</div>';
            if (Site::getPreference('USE_REGISTRATION_MODULE')) {
                $content .= '<div><a href="' . WT_LOGIN_URL . '?action=register">' . I18N::translate('Request new user account') . '</a></div>';
            }
            $content .= '</form>';
            // close "login-form"
            // hidden New Password block
            $content .= '<div id="new_passwd">
			<form id="new_passwd_form" name="new_passwd_form" action="' . WT_LOGIN_URL . '" method="post">
			<input type="hidden" name="time" value="">
			<input type="hidden" name="action" value="requestpw">
			<h4>' . I18N::translate('Lost password request') . '</h4>
			<div>
				<label for="new_passwd_username">' . I18N::translate('Username or email address') . '<input type="text" id="new_passwd_username" name="new_passwd_username" value="">
				</label>
			</div>
			<div><input type="submit" value="' . I18N::translate('continue') . '"></div>
			</form>
		</div>';
            //"new_passwd"
            $content .= '</div>';
            //"login-box"
        }
        if ($template) {
            return Theme::theme()->formatBlock($id, $title, $class, $content);
        } else {
            return $content;
        }
    }
开发者ID:pal-saugstad,项目名称:webtrees,代码行数:76,代码来源:LoginBlockModule.php


示例18: foreach

			<div class="label">
				<label for="form_theme">
					<?php 
    echo I18N::translate('Theme');
    ?>
				</label>
			</div>
			<div class="value">
				<select id="form_theme" name="form_theme">
					<option value="">
						<?php 
    echo Filter::escapeHtml(I18N::translate('<default theme>'));
    ?>
					</option>
					<?php 
    foreach (Theme::themeNames() as $theme_id => $theme_name) {
        ?>
					<option value="<?php 
        echo $theme_id;
        ?>
" <?php 
        echo $theme_id === Auth::user()->getPreference('theme') ? 'selected' : '';
        ?>
>
						<?php 
        echo $theme_name;
        ?>
					</option>
					<?php 
    }
    ?>
开发者ID:pal-saugstad,项目名称:webtrees,代码行数:31,代码来源:edituser.php


示例19: getBlock

 /**
  * Generate the HTML content of this block.
  *
  * @param int      $block_id
  * @param bool     $template
  * @param string[] $cfg
  *
  * @return string
  */
 public function getBlock($block_id, $template = true, $cfg = array())
 {
     global $ctype, $WT_TREE;
     switch (Filter::get('action')) {
         case 'deletenews':
             $news_id = Filter::getInteger('news_id');
             if ($news_id) {
                 Database::prepare("DELETE FROM `##news` WHERE news_id = ?")->execute(array($news_id));
             }
             break;
     }
     $articles = Database::prepare("SELECT SQL_CACHE news_id, user_id, gedcom_id, UNIX_TIMESTAMP(updated) + :offset AS updated, subject, body FROM `##news` WHERE user_id = :user_id ORDER BY updated DESC")->execute(array('offset' => WT_TIMESTAMP_OFFSET, 'user_id' => Auth::id()))->fetchAll();
     $id = $this->getName() . $block_id;
     $class = $this->getName() . '_block';
     $title = $this->getTitle();
     $content = '';
     if (empty($articles)) {
         $content .= '<p>' . I18N::translate('You have not created any journal items.') . '</p>';
     }
     foreach ($articles as $article) {
         $content .= '<div class="journal_box">';
         $content .= '<div class="news_title">' . Filter::escapeHtml($article->subject) . '</div>';
         $content .= '<div class="news_date">' . FunctionsDate::formatTimestamp($article->updated) . '</div>';
         if ($article->body == strip_tags($article->body)) {
             $article->body = nl2br($article->body, false);
         }
         $content .= $article->body;
         $content .= '<a href="#" onclick="window.open(\'editnews.php?news_id=\'+' . $article->news_id . ', \'_blank\', indx_window_specs); return false;">' . I18N::translate('Edit') . '</a>';
         $content .= ' | ';
         $content .= '<a href="index.php?action=deletenews&amp;news_id=' . $article->news_id . '&amp;ctype=' . $ctype . '&amp;ged=' . $WT_TREE->getNameHtml() . '" onclick="return confirm(\'' . I18N::translate('Are you sure you want to delete “%s”?', Filter::escapeHtml($article->subject)) . "');\">" . I18N::translate('Delete') . '</a><br>';
         $content .= '</div><br>';
     }
     $content .= '<p><a href="#" onclick="window.open(\'editnews.php?user_id=' . Auth::id() . '\', \'_blank\', indx_window_specs); return false;">' . I18N::translate('Add a journal entry') . '</a></p>';
     if ($template) {
         return Theme: 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Webtrees\Tree类代码示例发布时间:2022-05-23
下一篇:
PHP Webtrees\Site类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap