-
Notifications
You must be signed in to change notification settings - Fork 3
/
offline.php
130 lines (119 loc) · 4.93 KB
/
offline.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<?php
/**
* @version $Id: offline.php 8636 2013-03-20 23:23:02Z kevin $
* @author RocketTheme http://www.rockettheme.com
* @copyright Copyright (C) 2007 - 2013 RocketTheme, LLC
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
*
* Gantry uses the Joomla Framework (http://www.joomla.org), a GNU/GPLv2 content management system
*
*/
defined( '_JEXEC' ) or die( 'Restricted access' );
// load and inititialize gantry class
require_once(dirname(__FILE__) . '/lib/gantry/gantry.php');
$gantry->init();
$doc = JFactory::getDocument();
$app = JFactory::getApplication();
$gantry->addStyle('grid-responsive.css', 5);
$gantry->addLess('bootstrap.less', 'bootstrap.css', 6);
if ($gantry->browser->name == 'ie') {
if ($gantry->browser->shortversion == 8) {
$gantry->addScript('html5shim.js');
}
}
$gantry->addScript('rokmediaqueries.js');
ob_start();
?>
<body <?php echo $gantry->displayBodyTag(); ?>>
<div id="rt-offline-body">
<div class="rt-container">
<div class="component-content">
<div class="rt-grid-12">
<div class="rt-block offline-image">
<h1 class="sitename">
<?php echo htmlspecialchars($app->getCfg('sitename')); ?>
</h1>
<?php if ($app->getCfg('offline_image')) : ?>
<img src="<?php echo $app->getCfg('offline_image'); ?>" alt="<?php echo htmlspecialchars($app->getCfg('sitename')); ?>" />
<?php endif; ?>
</div>
<div class="rt-block">
<div class="table">
<div class="row">
<div class="cell gantry-width-50 center">
<div class="rt-block offline">
<h1>Site Offline</h1>
<?php if ($app->getCfg('display_offline_message', 1) == 1 && str_replace(' ', '', $app->getCfg('offline_message')) != ''): ?>
<p>
<?php echo $app->getCfg('offline_message'); ?>
</p>
<?php elseif ($app->getCfg('display_offline_message', 1) == 2 && str_replace(' ', '', JText::_('JOFFLINE_MESSAGE')) != ''): ?>
<p>
<?php echo JText::_('JOFFLINE_MESSAGE'); ?>
</p>
<?php endif; ?>
</div>
</div>
<div class="cell gantry-width-50 center">
<div class="rt-block box1">
<h1 class="title"><?php echo JText::_("AUTHORIZED_LOGIN"); ?></h1>
<form class="form-horizontal" action="<?php echo JRoute::_('index.php', true); ?>" method="post" id="form-login">
<div class="control-group">
<label class="control-label" for="username"><?php echo JText::_('JGLOBAL_USERNAME') ?></label>
<div class="controls">
<input name="username" id="username" type="text" alt="<?php echo JText::_('JGLOBAL_USERNAME') ?>" placeholder="<?php echo JText::_('JGLOBAL_USERNAME') ?>" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="passwd"><?php echo JText::_('JGLOBAL_PASSWORD') ?></label>
<div class="controls">
<input type="password" name="password" class="inputbox" alt="<?php echo JText::_('JGLOBAL_PASSWORD') ?>" id="passwd" placeholder="<?php echo JText::_('JGLOBAL_PASSWORD') ?>" />
</div>
</div>
<div class="control-group">
<div class="controls">
<label for="remember"><?php echo JText::_('JGLOBAL_REMEMBER_ME') ?>
<input type="checkbox" name="remember" class="inputbox" value="yes" alt="<?php echo JText::_('JGLOBAL_REMEMBER_ME') ?>" id="remember" />
</label>
<input type="submit" name="Submit" class="button" value="<?php echo JText::_('JLOGIN') ?>" />
</div>
</div>
<input type="hidden" name="option" value="com_users" />
<input type="hidden" name="task" value="user.login" />
<input type="hidden" name="return" value="<?php echo base64_encode(JURI::base()) ?>" />
<?php echo JHtml::_('form.token'); ?>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
<?php
$body = ob_get_clean();
$gantry->finalize();
require_once(JPATH_LIBRARIES.'/joomla/document/html/renderer/head.php');
$header_renderer = new JDocumentRendererHead($doc);
$header_contents = $header_renderer->render(null);
ob_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
<head>
<?php echo $header_contents; ?>
<?php if ($gantry->get('layout-mode') == '960fixed') : ?>
<meta name="viewport" content="width=960px">
<?php elseif ($gantry->get('layout-mode') == '1200fixed') : ?>
<meta name="viewport" content="width=1200px">
<?php else : ?>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<?php endif; ?>
</head>
<?php
$header = ob_get_clean();
echo $header.$body;;