<?php
/*
 * ------------------------------------------------------------------------
 * JA Directory Template
 * ------------------------------------------------------------------------
 * Copyright (C) 2004-2018 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
 * @license - Copyrighted Commercial Software
 * Author: J.O.O.M Solutions Co., Ltd
 * Websites:  http://www.joomlart.com -  http://www.joomlancers.com
 * This file may not be redistributed in whole or significant part.
 * ------------------------------------------------------------------------
*/

defined('_JEXEC') or die;
$app = JFactory::getApplication();
if(version_compare(JVERSION, '3.0', 'ge')){
 JHtml::_('bootstrap.framework');
}

$joomlaClass = "";
if (version_compare(JVERSION, '4', 'ge')):
$joomlaClass = "j40"; 
endif;
?>
<!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; ?>" class="<?php echo $joomlaClass;?>">
<head>
	<jdoc:include type="head" />
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<?php if(version_compare(JVERSION, '3.0', 'lt')) { ?>
	<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/offline.css" type="text/css" />
	<?php if ($this->direction == 'rtl') : ?>
	<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/offline_rtl.css" type="text/css" />
	<?php endif; ?>
	<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/general.css" type="text/css" />
	<?php } else { 
		$wa  = $this->getWebAssetManager();
		// Styles
		$wa->registerAndUseStyle('template.system.offline', 'media/system/css/system-site-offline.css');

		if ($this->direction === 'rtl')
		{
			$wa->registerAndUseStyle('template.system.offline_rtl', 'media/system/css/system-site-offline_rtl.css');
		}

		$wa->registerAndUseStyle('template.system.general', 'media/system/css/system-site-general.css');
	} ?>
	<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/offline.css" type="text/css" />
	<link href='http://fonts.googleapis.com/css?family=Pacifico' rel='stylesheet' type='text/css'>
	<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
  <script src="<?php echo $this->baseurl ?>/media/jui/js/bootstrap.min.js" type="text/javascript"></script>
</head>
<body>
	<div class="offline-body">
	
		<div id="frame" class="outline">

			<jdoc:include type="message" />
			
			<div class="offline-container clearfix">
				<?php if ($app->getCfg('offline_image')) : ?>
					<div id="offline-img"><img src="<?php echo $app->getCfg('offline_image'); ?>" alt="<?php echo htmlspecialchars($app->getCfg('sitename')); ?>" /></div>
				<?php endif; ?>
				
				<!-- Title offline -->
				<div id="offline-title">
					<h1><?php echo htmlspecialchars($app->getCfg('sitename')); ?></h1>
				</div>
				
				<!-- Message offline -->
				<?php if ($app->getCfg('display_offline_message', 1) == 1 && str_replace(' ', '', $app->getCfg('offline_message')) != ''): ?>
				<div class="des-offline">
					<div class="offline-des">
						<?php echo $app->getCfg('offline_message'); ?>
					</div>
				</div>

				<?php elseif ($app->getCfg('display_offline_message', 1) == 2 && str_replace(' ', '', JText::_('JOFFLINE_MESSAGE')) != ''): ?>
					<div>
						<?php echo JText::_('JOFFLINE_MESSAGE'); ?>
					</div>
				<?php  endif; ?>
				<!-- //Message offline -->
					<div id="offline-content">

						<form action="<?php echo JRoute::_('index.php', true); ?>" method="post" id="form-login">
							<div class="input">
									<div class="form-offline">
										<div id="form-login-username" class="form-group" >
											<label class="control-label" for="username"><?php echo JText::_('JGLOBAL_USERNAME') ?></label>
											<input class="control-input" name="username" id="username" type="text" class="inputbox" alt="<?php echo JText::_('JGLOBAL_USERNAME') ?>" size="18" />
										</div>
										<div id="form-login-password" class="form-group" >
											<label class="control-label" for="passwd"><?php echo JText::_('JGLOBAL_PASSWORD') ?></label>
											<input class="control-input" type="password" name="password" class="inputbox" size="18" alt="<?php echo JText::_('JGLOBAL_PASSWORD') ?>" id="passwd"/>
										</div>
									</div>
								<?php if (JPluginHelper::isEnabled('system', 'remember')) : ?>
								<div id="form-login-remember">
									<input type="checkbox" name="remember" class="inputbox" value="yes" alt="<?php echo JText::_('JGLOBAL_REMEMBER_ME') ?>" id="remember" />
									<label for="remember"><?php echo JText::_('JGLOBAL_REMEMBER_ME') ?></label>
								</div>
								<?php  endif; ?>
								
								<div id="submit-buton">
									<input type="submit" name="Submit" class="button login" value="<?php echo JText::_('JLOGIN') ?>" />
								</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'); ?>
							</div>
						</form>
				</div>
			</div>

		</div>
	</div>
</body>
</html>
