mirror of https://github.com/itflow-org/itflow
Tidy client portal
This commit is contained in:
parent
e1e3ffd786
commit
a3edfb70bc
165
portal/login.php
165
portal/login.php
|
|
@ -23,9 +23,6 @@ $user_agent = strip_tags(mysqli_real_escape_string($mysqli,$_SERVER['HTTP_USER_A
|
||||||
$sql_settings = mysqli_query($mysqli,"SELECT config_azure_client_id FROM settings WHERE company_id = '1'");
|
$sql_settings = mysqli_query($mysqli,"SELECT config_azure_client_id FROM settings WHERE company_id = '1'");
|
||||||
$settings = mysqli_fetch_array($sql_settings);
|
$settings = mysqli_fetch_array($sql_settings);
|
||||||
|
|
||||||
//$client_id = "e821e3a6-02c8-40e8-9f22-b84d951a62e7";
|
|
||||||
//$client_secret = "axL7Q~hKbmIwqa3DoxJLy4p88AdBz96XAcNZW";
|
|
||||||
|
|
||||||
$client_id = $settings['config_azure_client_id'];
|
$client_id = $settings['config_azure_client_id'];
|
||||||
|
|
||||||
if($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['login'])){
|
if($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['login'])){
|
||||||
|
|
@ -69,93 +66,91 @@ if($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['login'])){
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<title><?php echo $config_app_name; ?> | Client Portal Login</title>
|
<title><?php echo $config_app_name; ?> | Client Portal Login</title>
|
||||||
|
|
||||||
<!-- Tell the browser to be responsive to screen width -->
|
<!-- Tell the browser to be responsive to screen width -->
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
|
||||||
<!-- Font Awesome -->
|
<!-- Font Awesome -->
|
||||||
<link rel="stylesheet" href="../plugins/fontawesome-free/css/all.min.css">
|
<link rel="stylesheet" href="../plugins/fontawesome-free/css/all.min.css">
|
||||||
|
|
||||||
<!-- Theme style -->
|
<!-- Theme style -->
|
||||||
<link rel="stylesheet" href="../dist/css/adminlte.min.css">
|
<link rel="stylesheet" href="../dist/css/adminlte.min.css">
|
||||||
|
|
||||||
<!-- Google Font: Source Sans Pro -->
|
<!-- Google Font: Source Sans Pro -->
|
||||||
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="hold-transition login-page">
|
|
||||||
<div class="login-box">
|
|
||||||
<div class="login-logo"><b>IT</b>Flow <br>Client Portal Login</h2></div>
|
|
||||||
<div class="card">
|
|
||||||
<div class="card-body login-card-body">
|
|
||||||
<p class="login-box-msg text-danger">
|
|
||||||
<?php
|
|
||||||
if(!empty($_SESSION['login_message'])){
|
|
||||||
echo $_SESSION['login_message'];
|
|
||||||
unset($_SESSION['login_message']);
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</p>
|
|
||||||
<form method="post">
|
|
||||||
<div class="input-group mb-3">
|
|
||||||
<input type="text" class="form-control" placeholder="Email" name="email" required autofocus>
|
|
||||||
<div class="input-group-append">
|
|
||||||
<div class="input-group-text">
|
|
||||||
<span class="fas fa-envelope"></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="input-group mb-3">
|
|
||||||
<input type="password" class="form-control" placeholder="Password" name="password" required>
|
|
||||||
<div class="input-group-append">
|
|
||||||
<div class="input-group-text">
|
|
||||||
<span class="fas fa-lock"></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<?php if(!empty($token_field)){ echo $token_field; } ?>
|
|
||||||
|
|
||||||
<button type="submit" class="btn btn-primary btn-block mb-3" name="login">Login</button>
|
<body class="hold-transition login-page">
|
||||||
|
<div class="login-box">
|
||||||
<hr><br>
|
<div class="login-logo"><b>IT</b>Flow <br>Client Portal Login</h2></div>
|
||||||
|
<div class="card">
|
||||||
<?php
|
<div class="card-body login-card-body">
|
||||||
if(!empty($client_id)){ ?>
|
<p class="login-box-msg text-danger">
|
||||||
<div class="col-4 offset-2">
|
<?php
|
||||||
<h4>SSO</h4>
|
if(!empty($_SESSION['login_message'])){
|
||||||
<button type="button" class="btn btn-secondary" onclick="location.href = 'login_microsoft.php';">Login with Microsoft Azure AD</button>
|
echo $_SESSION['login_message'];
|
||||||
</div>
|
unset($_SESSION['login_message']);
|
||||||
</div>
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
</form>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<!-- /.login-card-body -->
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- /.login-box -->
|
|
||||||
|
|
||||||
<!-- jQuery -->
|
|
||||||
<script src="plugins/jquery/jquery.min.js"></script>
|
|
||||||
<!-- Bootstrap 4 -->
|
|
||||||
<script src="plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
|
|
||||||
<!-- AdminLTE App -->
|
|
||||||
<script src="dist/js/adminlte.min.js"></script>
|
|
||||||
|
|
||||||
<script src="plugins/Show-Hide-Passwords-Bootstrap-4/bootstrap-show-password.min.js"></script>
|
|
||||||
|
|
||||||
<!-- Prevents resubmit on refresh or back -->
|
|
||||||
<script>
|
|
||||||
|
|
||||||
if(window.history.replaceState){
|
|
||||||
window.history.replaceState(null,null,window.location.href);
|
|
||||||
}
|
}
|
||||||
|
?>
|
||||||
|
</p>
|
||||||
|
<form method="post">
|
||||||
|
<div class="input-group mb-3">
|
||||||
|
<input type="text" class="form-control" placeholder="Client Email" name="email" required autofocus>
|
||||||
|
<div class="input-group-append">
|
||||||
|
<div class="input-group-text">
|
||||||
|
<span class="fas fa-envelope"></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="input-group mb-3">
|
||||||
|
<input type="password" class="form-control" placeholder="Client Password" name="password" required>
|
||||||
|
<div class="input-group-append">
|
||||||
|
<div class="input-group-text">
|
||||||
|
<span class="fas fa-lock"></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</script>
|
<button type="submit" class="btn btn-success btn-block mb-3" name="login">Login</button>
|
||||||
</body>
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if(!empty($client_id)){ ?>
|
||||||
|
<hr>
|
||||||
|
<div class="col text-center">
|
||||||
|
<button type="button" class="btn btn-secondary" onclick="location.href = 'login_microsoft.php';">Login with Microsoft Azure AD</button>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- /.login-card-body -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- /.div.card -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- /.login-box -->
|
||||||
|
|
||||||
|
<!-- jQuery -->
|
||||||
|
<script src="../plugins/jquery/jquery.min.js"></script>
|
||||||
|
<!-- Bootstrap 4 -->
|
||||||
|
<script src="../plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
|
||||||
|
<!-- AdminLTE App -->
|
||||||
|
<script src="../dist/js/adminlte.min.js"></script>
|
||||||
|
|
||||||
|
<script src="../plugins/Show-Hide-Passwords-Bootstrap-4/bootstrap-show-password.min.js"></script>
|
||||||
|
|
||||||
|
<!-- Prevents resubmit on refresh or back -->
|
||||||
|
<script>
|
||||||
|
if(window.history.replaceState){
|
||||||
|
window.history.replaceState(null,null,window.location.href);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
||||||
Loading…
Reference in New Issue