190 lines
6.1 KiB
PHP
190 lines
6.1 KiB
PHP
<?php
|
|
$destination = isset($_GET['destination']) ? $_GET['destination'] : '';
|
|
$mode = isset($_GET['mode']) ? $_GET['mode'] : '';
|
|
//$appVersion = 'v1.1.10';
|
|
?>
|
|
|
|
<?
|
|
ob_start();
|
|
|
|
include getenv("DOCUMENT_ROOT")."/include/session_include.php";
|
|
|
|
|
|
require_once getenv("DOCUMENT_ROOT")."/lib/MobileDetect.php";
|
|
$detect = $detect = new \Detection\MobileDetect;
|
|
|
|
$cfg = $jdb->fQuery("SELECT cfg_app_version FROM tbl_config LIMIT 1", "config error");
|
|
$appVersion = $cfg['cfg_app_version'] ?? '';
|
|
|
|
if ($_SESSION['ss_LOGIN'] == 1) {
|
|
$msg = "You are already logged in. Please proceed to the main page.";
|
|
$func -> modalMsg ($msg, "/index_intranet.php");
|
|
exit;
|
|
}
|
|
|
|
?>
|
|
|
|
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta content="width=device-width, initial-scale=1.0" name="viewport">
|
|
|
|
<title>GOI</title>
|
|
<meta content="" name="description">
|
|
<meta content="" name="keywords">
|
|
|
|
<!-- Favicons -->
|
|
<link href="assets/img/cropped-green-oil-favicon-192x192.png" rel="icon">
|
|
<link href="assets/img/cropped-green-oil-favicon-192x192.png" rel="apple-touch-icon">
|
|
|
|
<!-- Google Fonts -->
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,600;1,700&family=Amatic+SC:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&family=Inter:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&display=swap" rel="stylesheet">
|
|
|
|
<!-- Vendor CSS Files -->
|
|
<link href="assets/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
|
|
<link href="assets/vendor/bootstrap-icons/bootstrap-icons.css" rel="stylesheet">
|
|
<link href="assets/vendor/glightbox/css/glightbox.min.css" rel="stylesheet">
|
|
<link href="assets/vendor/swiper/swiper-bundle.min.css" rel="stylesheet">
|
|
|
|
<!-- Template Main CSS File -->
|
|
<link href="assets/css/main.css" rel="stylesheet">
|
|
<link href="assets/css/table-style.css" rel="stylesheet">
|
|
|
|
</head>
|
|
|
|
<script src="https://www.google.com/recaptcha/api.js?render=6LelsdAsAAAAABezjgy67C3dnEAtEX0oojwdZWeh"></script>
|
|
|
|
|
|
|
|
<style>
|
|
@media (max-width:575px) {
|
|
#rc-imageselect, .g-recaptcha {
|
|
transform:scale(0.70);
|
|
transform-origin:0 0;
|
|
margin-bottom: -20px;
|
|
}
|
|
}
|
|
</style>
|
|
|
|
<body>
|
|
|
|
|
|
<? if( $detect->isMobile() || $detect->isTablet() ){ ?>
|
|
<? } else { ?>
|
|
|
|
<!-- ======= Hero Section ======= -->
|
|
|
|
|
|
<? } ?>
|
|
|
|
|
|
<main id="main" class="main">
|
|
|
|
<section id="section-login" class="page">
|
|
<div class="container section-inner" data-aos="fade-up">
|
|
|
|
<div class="section-header" style="padding-bottom: 0;">
|
|
<h2>Welcome to GOI Intranet</h2>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="container">
|
|
<form id="login-form" method="post" role="form" class="form-login" action="/lib/login_process.php" data-aos="fade-up" data-aos-delay="100">
|
|
<input type="hidden" name="action" value="login">
|
|
<input type="hidden" name="destination" value="<?=$destination?>">
|
|
<input type="hidden" name="mode" value="<?=$mode?>">
|
|
|
|
<input type="hidden" id="g-recaptcha-response" name="g-recaptcha-response">
|
|
|
|
<input type="email" class="form-control" name="confirmID" id="email" required placeholder="Your Email">
|
|
<input type="password" class="form-control" name="confirmPW" id="password" required placeholder="Password">
|
|
|
|
<div class="text-center">
|
|
<button class="btn-primary" type="button" onclick="runRecaptcha()">LOGIN</button>
|
|
</div>
|
|
</form>
|
|
<div class="text-center mt-3">
|
|
<small class="text-muted">
|
|
<a href="https://docs.google.com/spreadsheets/d/1PsjWNuUNyjZv7AuFSJwm5m_rsj36d9q19r27PhZp43M/edit?usp=sharing" target="_blank">
|
|
<?=$appVersion?>
|
|
</a>
|
|
</small>
|
|
</div>
|
|
</div><!-- End login Form -->
|
|
|
|
|
|
</div>
|
|
</section><!-- End Book A Table Section -->
|
|
|
|
|
|
</main><!-- End #main -->
|
|
|
|
|
|
<!-- ======= Footer ======= -->
|
|
<footer id="footer" class="footer">
|
|
|
|
<div class="container">
|
|
<div class="copyright">
|
|
Copyright © 2022 Green Oil Inc. All Rights Reserved.
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
</footer><!-- End Footer -->
|
|
<!-- End Footer -->
|
|
|
|
<a href="#" class="scroll-top d-flex align-items-center justify-content-center"><i class="bi bi-arrow-up-short"></i></a>
|
|
|
|
<div id="preloader"></div>
|
|
|
|
<!-- Vendor JS Files -->
|
|
<script src="assets/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
|
|
<script src="assets/vendor/glightbox/js/glightbox.min.js"></script>
|
|
<script src="assets/vendor/purecounter/purecounter_vanilla.js"></script>
|
|
<script src="assets/vendor/swiper/swiper-bundle.min.js"></script>
|
|
|
|
<!-- jQuery JS -->
|
|
<script src="/assets/js/vendor/jquery-3.3.1.min.js"></script>
|
|
|
|
<!-- Bootstrap JS -->
|
|
<script src="/assets/js/vendor/bootstrap.min.js"></script>
|
|
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.19.0/jquery.validate.js"></script>
|
|
|
|
<!-- Template Main JS File -->
|
|
<script src="assets/js/main.js"></script>
|
|
|
|
<!-- reChapchat v3. script 새로 추가 -->
|
|
<script src="https://www.google.com/recaptcha/api.js?render=6LelsdAsAAAAABezjgy67C3dnEAtEX0oojwdZWeh"></script>
|
|
|
|
<script type="text/javascript">
|
|
function runRecaptcha() {
|
|
// 1. 폼 요소를 가져옵니다.
|
|
var form = document.getElementById('login-form');
|
|
|
|
// 2. [핵심] 브라우저에게 "비어있는 칸이 있으면 말풍선을 띄워줘!"라고 명령합니다.
|
|
if (!form.checkValidity()) {
|
|
form.reportValidity(); // 말풍선.
|
|
return; // 칸이 비어있으면 여기서 중단합니다.
|
|
}
|
|
|
|
// 3. 모든 칸이 채워졌을 때만 캡차 실행
|
|
grecaptcha.ready(function() {
|
|
grecaptcha.execute('6LelsdAsAAAAABezjgy67C3dnEAtEX0oojwdZWeh', {action: 'login'}).then(function(token) {
|
|
document.getElementById('g-recaptcha-response').value = token;
|
|
form.submit(); // 검증 완료 후 제출
|
|
});
|
|
});
|
|
}
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|