-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathoffline.php
89 lines (70 loc) · 3.77 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
<?php
/**
* J!Blank Template for Joomla by JBlank.pro (JBZoo.com)
*
* @package JBlank
* @author SmetDenis <admin@jbzoo.com>
* @copyright Copyright (c) JBlank.pro
* @license http://www.gnu.org/licenses/gpl.html GNU/GPL
* @link http://jblank.pro/ JBlank project page
*/
defined('_JEXEC') or die;
// init $tpl helper
require dirname(__FILE__) . '/php/init.php';
// add CSS
$app = $tpl->app;
// check Joomla auth method
require_once JPATH_ADMINISTRATOR . '/components/com_users/helpers/users.php';
if (method_exists('UsersHelper','getTwoFactorMethods')) {
$twoFactors = UsersHelper::getTwoFactorMethods();
}
?><?php echo $tpl->renderHTML(); ?>
<head>
<jdoc:include type="head" />
</head>
<body class="<?php echo $tpl->getBodyClasses(); ?>" id="page-offline">
<jdoc:include type="message" />
<div id="frame" class="outline component-wrapper">
<?php if ($app->get('offline_image') && file_exists($app->get('offline_image'))) : ?>
<img src="<?php echo $app->get('offline_image'); ?>" alt="<?php echo htmlspecialchars($app->get('sitename')); ?>" />
<?php endif; ?>
<h1><?php echo htmlspecialchars($app->get('sitename')); ?></h1>
<?php if ($app->get('display_offline_message', 1) == 1 && str_replace(' ', '', $app->get('offline_message')) != '') : ?>
<p><?php echo $app->get('offline_message'); ?></p>
<?php elseif ($app->get('display_offline_message', 1) == 2 && str_replace(' ', '', JText::_('JOFFLINE_MESSAGE')) != '') : ?>
<p><?php echo JText::_('JOFFLINE_MESSAGE'); ?></p>
<?php endif; ?>
<form action="<?php echo JRoute::_('index.php', true); ?>" method="post" id="form-login">
<fieldset class="input">
<p id="form-login-username">
<label for="username"><?php echo JText::_('JGLOBAL_USERNAME'); ?></label>
<input name="username" id="username" type="text" class="inputbox" alt="<?php echo JText::_('JGLOBAL_USERNAME'); ?>" size="18" />
</p>
<p id="form-login-password">
<label for="passwd"><?php echo JText::_('JGLOBAL_PASSWORD'); ?></label>
<input type="password" name="password" class="inputbox" size="18" alt="<?php echo JText::_('JGLOBAL_PASSWORD'); ?>" id="passwd" />
</p>
<?php if (isset($twoFactors) && count($twoFactors) > 1) : ?>
<p id="form-login-secretkey">
<label for="secretkey"><?php echo JText::_('JGLOBAL_SECRETKEY'); ?></label>
<input type="text" name="secretkey" class="inputbox" size="18" alt="<?php echo JText::_('JGLOBAL_SECRETKEY'); ?>" id="secretkey" />
</p>
<?php endif; ?>
<?php if (JPluginHelper::isEnabled('system', 'remember')) : ?>
<p id="form-login-remember">
<label for="remember"><?php echo JText::_('JGLOBAL_REMEMBER_ME'); ?></label>
<input type="checkbox" name="remember" class="inputbox" value="yes" alt="<?php echo JText::_('JGLOBAL_REMEMBER_ME'); ?>" id="remember" />
</p>
<?php endif; ?>
<p id="submit-buton">
<label> </label>
<input type="submit" name="Submit" class="button login" value="<?php echo JText::_('JLOGIN'); ?>" />
</p>
<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'); ?>
</fieldset>
</form>
</div>
</body></html>