Example #1
0
//
// 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;
if (!defined('WT_WEBTREES')) {
    header('HTTP/1.0 403 Forbidden');
    exit;
}
global $WT_IMAGES;
// This theme uses the jQuery “colorbox” plugin to display images
$this->addExternalJavascript(WT_JQUERY_COLORBOX_URL)->addExternalJavascript(WT_JQUERY_WHEELZOOM_URL)->addInlineJavascript('activate_colorbox();')->addInlineJavascript('jQuery.extend(jQuery.colorbox.settings, { width:"85%", height:"85%", transition:"none", slideshowStart:"' . WT_I18N::translate('Play') . '", slideshowStop:"' . WT_I18N::translate('Stop') . '", title: function() { var img_title = jQuery(this).data("title"); return img_title; } } );');
?>
<!DOCTYPE html>
<html <?php 
echo WT_I18N::html_markup();
?>
>
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<?php 
echo header_links($META_DESCRIPTION, $META_ROBOTS, $META_GENERATOR, $LINK_CANONICAL);
?>
	<title><?php 
echo WT_Filter::escapeHtml($title);
?>
</title>
	<link rel="icon" href="<?php 
echo WT_CSS_URL;
?>
Example #2
0
define('WT_USER_ID', 0);
define('WT_DATA_DIR', realpath('data') . DIRECTORY_SEPARATOR);
$WT_SESSION = new stdClass();
$WT_SESSION->locale = '';
require 'includes/functions/functions.php';
define('WT_LOCALE', WT_I18N::init());
if (file_exists(WT_DATA_DIR . 'offline.txt')) {
    $offline_txt = file_get_contents(WT_DATA_DIR . 'offline.txt');
} else {
    // offline.txt has gone - we're back online!
    header('Location: index.php');
    exit;
}
header('Content-Type: text/html; charset=UTF-8');
header($_SERVER['SERVER_PROTOCOL'] . ' 503 Service Temporarily Unavailable');
echo '<!DOCTYPE html>', '<html ', WT_I18N::html_markup(), '>', '<head>', '<meta charset="UTF-8">', '<title>', WT_WEBTREES, '</title>', '<meta name="robots" content="noindex,follow">', '<style type="text/css">
		body {color: gray; background-color: white; font: 14px tahoma, arial, helvetica, sans-serif; padding:10px; }
		a {color: #81A9CB; font-weight: bold; text-decoration: none;}
		a:hover {text-decoration: underline;}
		h1 {color: #81A9CB; font-weight:normal; text-align:center;}
		li {line-height:2;}
		blockquote {color:red;}
		.content { /*margin:auto; width:800px;*/ border:1px solid gray; padding:15px; border-radius:15px;}
		.good {color: green;}
	</style>', '</head><body>', '<h1>', WT_I18N::translate('This website is temporarily unavailable'), '</h1>', '<div class="content"><p>';
if ($offline_txt) {
    echo $offline_txt;
} else {
    echo WT_I18N::translate('The site is down for maintenance.  You should <a href="index.php">try again</a> in a few minutes.');
}
echo '</p>';
Example #3
0
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
use WT\Auth;
if (!defined('WT_WEBTREES')) {
    header('HTTP/1.0 403 Forbidden');
    exit;
}
// This theme uses the jQuery “colorbox” plugin to display images
$this->addExternalJavascript(WT_JQUERY_COLORBOX_URL)->addExternalJavascript(WT_JQUERY_WHEELZOOM_URL)->addInlineJavascript('activate_colorbox();')->addInlineJavascript('jQuery.extend(jQuery.colorbox.settings, {width:"85%", height:"85%", transition:"none", slideshowStart:"' . WT_I18N::translate('Play') . '", slideshowStop:"' . WT_I18N::translate('Stop') . '"})')->addInlineJavascript('
		jQuery.extend(jQuery.colorbox.settings, {
			title: function() {
				var img_title = jQuery(this).data("title");
				return img_title;
			}
		});
	');
echo '<!DOCTYPE html>', '<html ', WT_I18N::html_markup(), '>', '<head>', '<meta charset="UTF-8">', '<meta http-equiv="X-UA-Compatible" content="IE=edge">', header_links($META_DESCRIPTION, $META_ROBOTS, $META_GENERATOR, $LINK_CANONICAL), '<title>', WT_Filter::escapeHtml($title), '</title>', '<link rel="icon" href="', WT_CSS_URL, 'favicon.png" type="image/png">', '<link rel="stylesheet" type="text/css" href="', WT_THEME_URL, 'jquery-ui-1.10.3/jquery-ui-1.10.3.custom.css">', '<link rel="stylesheet" type="text/css" href="', WT_CSS_URL, 'style.css">', '<!--[if IE]>', '<link type="text/css" rel="stylesheet" href="', WT_CSS_URL, 'msie.css">', '<![endif]-->';
echo '</head>', '<body id="body">';
if ($view != 'simple') {
    // Use "simple" headers for popup windows
    global $WT_IMAGES;
    echo '<div id="clouds-container">', '<div id="header">', '<div class="header" >', '<span class="title" dir="auto">', WT_TREE_TITLE, '</span>', '<div class="hsearch">', '<form style="display:inline;" action="search.php" method="post">', '<input type="hidden" name="action" value="general">', '<input type="hidden" name="ged" value="', WT_GEDCOM, '">', '<input type="hidden" name="topsearch" value="yes">', '<input type="search" name="query" size="15" placeholder="', WT_I18N::translate('Search'), '">', '<input class="search-icon" type="image" src="', $WT_IMAGES['search'], '" alt="', WT_I18N::translate('Search'), '" title="', WT_I18N::translate('Search'), '">', '</form>', '</div>', '</div>', '</div>';
    ?>
<!-- end header section -->
<!-- begin menu section -->
<?php 
    $menu_items = array(WT_MenuBar::getGedcomMenu(), WT_MenuBar::getMyPageMenu(), WT_MenuBar::getChartsMenu(), WT_MenuBar::getListsMenu(), WT_MenuBar::getCalendarMenu(), WT_MenuBar::getReportsMenu(), WT_MenuBar::getSearchMenu());
    foreach (WT_MenuBar::getModuleMenus() as $menu) {
        $menu_items[] = $menu;
    }
    // Print the menu bar
    echo '<div id="topMenu">', '<ul id="main-menu">';
Example #4
0
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
use WT\Auth;
if (!defined('WT_WEBTREES')) {
    header('HTTP/1.0 403 Forbidden');
    exit;
}
// This theme uses the jQuery “colorbox” plugin to display images
$this->addExternalJavascript(WT_JQUERY_COLORBOX_URL)->addExternalJavascript(WT_JQUERY_WHEELZOOM_URL)->addInlineJavascript('activate_colorbox();')->addInlineJavascript('jQuery.extend(jQuery.colorbox.settings, {width:"75%", height:"75%", transition:"none", slideshowStart:"' . WT_I18N::translate('Play') . '", slideshowStop:"' . WT_I18N::translate('Stop') . '"})')->addInlineJavascript('
		jQuery.extend(jQuery.colorbox.settings, {
			title: function() {
				var img_title = jQuery(this).data("title");
				return img_title;
			}
		});
	');
echo '<!DOCTYPE html>', '<html ', WT_I18N::html_markup(), '>', '<head>', '<meta charset="UTF-8">', '<meta http-equiv="X-UA-Compatible" content="IE=edge">', '<meta name="robots" content="noindex,nofollow">', '<title>', htmlspecialchars($title), '</title>', '<link rel="icon" href="', WT_CSS_URL, 'favicon.png" type="image/png">', '<link rel="stylesheet" href="', WT_THEME_URL, 'jquery-ui-1.10.3/jquery-ui-1.10.3.custom.css" type="text/css">', '<link rel="stylesheet" href="', WT_CSS_URL, 'style.css" type="text/css">', '<!--[if IE]>', '<link type="text/css" rel="stylesheet" href="', WT_CSS_URL, 'msie.css">', '<![endif]-->';
echo $javascript, '</head>', '<body id="body">', '<div id="admin_head" class="ui-widget-content">', '<i class="icon-webtrees"></i>', '<div id="title"><a href="admin.php">', WT_I18N::translate('Administration'), '</a></div>', '<div id="links">', '<a href="index.php">', WT_I18N::translate('My page'), '</a> | ', logout_link(), '<span> | </span>', '<ul class="langmenu">';
$language_menu = WT_MenuBar::getLanguageMenu();
if ($language_menu) {
    echo $language_menu->getMenuAsList();
}
echo '</ul>';
if (WT_USER_CAN_ACCEPT && exists_pending_change()) {
    echo ' | <li><a href="#" onclick="window.open(\'edit_changes.php\',\'_blank\', chan_window_specs); return false;" style="color:red;">', WT_I18N::translate('Pending changes'), '</a></li>';
}
echo '</div>', '<div id="info">', WT_WEBTREES, ' ', WT_VERSION, '<br>', WT_I18N::translate('Server time'), ' —  ', format_timestamp(WT_SERVER_TIMESTAMP), '<br>', WT_I18N::translate('Client time'), ' — ', format_timestamp(WT_CLIENT_TIMESTAMP), '<br>', WT_I18N::translate('UTC'), ' — ', format_timestamp(WT_TIMESTAMP), '</div>', '</div>', '<div id="admin_menu" class="ui-widget-content">', '<ul>', '<li><a ', WT_SCRIPT_NAME == 'admin.php' ? 'class="current" ' : '', 'href="admin.php">', WT_I18N::translate('Administration'), '</a></li>';
if (Auth::isAdmin()) {
    echo '<li><ul>', '<li><a ', WT_SCRIPT_NAME == 'admin_site_config.php' ? 'class="current" ' : '', 'href="admin_site_config.php">', WT_I18N::translate('Site configuration'), '</a></li>', '<li><a ', WT_SCRIPT_NAME == 'admin_site_logs.php' ? 'class="current" ' : '', 'href="admin_site_logs.php">', WT_I18N::translate('Logs'), '</a></li>', '<li><a ', WT_SCRIPT_NAME == 'admin_site_readme.php' ? 'class="current" ' : '', 'href="admin_site_readme.php">', WT_I18N::translate('README documentation'), '</a></li>', '<li><a ', WT_SCRIPT_NAME == 'admin_site_info.php' ? 'class="current" ' : '', 'href="admin_site_info.php">', WT_I18N::translate('PHP information'), '</a></li>', '<li><a ', WT_SCRIPT_NAME == 'admin_site_access.php' ? 'class="current" ' : '', 'href="admin_site_access.php">', WT_I18N::translate('Site access rules'), '</a></li>', '<li><a ', WT_SCRIPT_NAME == 'admin_site_clean.php' ? 'class="current" ' : '', 'href="admin_site_clean.php">', WT_I18N::translate('Clean up data folder'), '</a></li>', '</ul></li>', '<li><a ', WT_SCRIPT_NAME == 'admin_trees_manage.php' ? 'class="current" ' : '', 'href="admin_trees_manage.php">', WT_I18N::translate('Family trees'), '</a></li>';
} else {
    echo '<li>', WT_I18N::translate('Family trees'), '</li>';
}