<?php

include("config.php");



			
			//Check Pass Code if matched
			
			$stmt=$pdo->prepare("SELECT * FROM maintenance");
			$stmt->execute();
			$value = $stmt->fetch();
			
			
			//check if locked is on
			if($value["locked"] !== "locked"){
				header("location:index.php");
			}
			
			
			if(isset($_POST["submit"])){
			
			//if form was submitted, check if passCode match the one in db
			
			if($_POST["passCode"] == $value["passCode"]){
			
				session_start();
				$_SESSION["site_lock"] = $_POST["passCode"];
				
				header("location:index.php");
				
			}else{
				
				echo "<script>alert('Invalid Pass Code. Check Pass Code and try again')</script>";
			}
			
			}
	?>
	
	
	
	
	
	
	<!DOCTYPE html>
<html lang="en">
<head>
    <!-- basic -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!-- mobile metas -->
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- site metas -->
    <title>Site Under Maintainace | Sujfix Trades</title>
    <meta name="keywords" content="trade, trading, forex, investing, invest, investment, investor, Sujfix, money, chart, bitcoin, ethereum, USDT, coins, cryptocurrencies, crypto, profit, market, online money, money online,">
    <meta name="description" content="Sujfix Trades provides a full investment service focused on the Bitcoin and cryptocurrency trading market. A certified legal investment company incorporated and headquartered in Australia.">
    <meta name="author" content="Sujfix Trades">
    <!-- bootstrap css -->
    <link rel="stylesheet" href="css/bootstrap.min.css">
	
	<!-- Flaticons -->
    <link href="css/flaticon7eda.css" rel="stylesheet">
	
	<link href="css/style7eda3860.css" rel="stylesheet">
	
    <!-- awesome fontfamily -->
    <link rel="stylesheet" href="css/font-awesome.min.css">
	
</head>
<!-- body -->






<body>




		
		<div style="margin:20px;">
				<center>
				<div style="font-size:16px;font-weight:550;padding:10px; background:#ef5a5a; max-width:500px;border-radius:10px; color:#fff">
				<i class="fa fa-exclamation"></i> &nbsp;THIS SITE IS UNDER MAINTENANCE</div>
				<br>
				<br>
				
				
				
				<img src="img/gears.gif" width="80px;">
				
				
				
				<br><p>
				<br><p>
				<div style="font-size:17px; color:#8ba3b5"><?php echo htmlspecialchars($value["text"]);?></div>
				
				<div class="dropdown-divider"></div>
				
				
			<br>
			<form method="post" action="">
			<div class="col-md-6">
			<label for="passCode" style="color: #405972;font-size:17px;margin-top:10px;"><b>Enter Pass Code</b></label>
			<div class="form-group charge" style="margin:-2px auto 10px auto">
			<input type="text" name="passCode" id="passCode" class="form-control" placeholder="Pass Code">
			</div>
			
			<button type="submit" name="submit" id="lock" class="btnss btn btn-block" style="cursor:pointer;color:#fff;border-radius:0px;">
			Continue &nbsp; <i class="fa fa-angle-right"></i></button>
			</div>
			</form>	
				
				</center>
				
                    <!-- Start Content-->

                    <div class="container-fluid" >

                        <div id="google_translate_element"></div>

                         <div class="row">

                            <div class="col-md-12" style="padding-left:0px; padding-right:0px">
                            
						
						
				<div class="col-md-7" style="margin-top:20px!important;margin: auto;">
                <div class="card-box">
				
				
				
				
				
	
				</div>
				</div>
				
				
				</div>
				</div>
				</div>
				</div>


</body>

</html>	
				
				
				
				
				
				
				
				