<?php
date_default_timezone_set('Asia/Makassar');
$date = date('dHis');

if (isset($_POST['profile'], $_POST['saldo'], $_POST['mac'])) {
    $profile = htmlspecialchars($_POST['profile'], ENT_QUOTES, 'UTF-8');
    $saldo = htmlspecialchars($_POST['saldo'], ENT_QUOTES, 'UTF-8');
    $mac = htmlspecialchars($_POST['mac'], ENT_QUOTES, 'UTF-8');
} else {
    die('Data tidak lengkap. Pastikan semua field telah diisi.');
}
?>

<!DOCTYPE html>
<html lang="id-ID">
<head>
	<meta charset="UTF-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
	<meta name="Author" content="Acil" />
	<meta name="theme-color" content="#16ac91" />
	<meta name="msapplication-navbutton-color" content="#16ac91" />
	<meta name="apple-mobile-web-app-status-bar-style" content="#16ac91" />
	<meta name="apple-mobile-web-app-capable" content="yes" />
	<link rel="icon" href="img/favicon.png" />
	<title>Paket&mdash;$(identity)</title>
	<link rel="stylesheet" href="css/all.min.css" />
	<link rel="stylesheet" href="css/style.css" />

	<style>
	input[type=checkbox]{
		width:auto;
		padding:5px 12px;
		margin:8px 0;
		display:inline-block;
		border:1px solid #ccc;
		box-sizing:border-box;
		text-align:left
	}
	a{ 
		color: #35aadc;
		text-decoration:none;
	}
	.toolbar a{ 
		color: #313131;
		text-decoration:none;
	}
	.content-writter p {
	max-width:47rem;
	font-family: 'Poppins', sans-serif;
	font-size: 14px;		
	color: #000000;
	margin: 1rem auto;
	}
	.content-writter ul li{	
		
	font-family: 'Poppins', sans-serif;	
	max-width:44rem;
	font-size: 14px;
    list-style-type: number;
	color: #000000;
	display: list-item;	
	margin: 3px auto;
}

</style>
</head>

<body>
	<div class="app-container">
		<div class="page page-home page-with-subnavbar">

		<!-- header -->
		<header class="background-main">
			<div class="back-panel color-white"><i class="fas fa-chevron-left"></i></div>
			<h1 class="color-white margin-left-small">$(identity)</h1>

				<div class="header-right">
					<ul class="links">
						<li class="rad-dropdown"><a class="rad-menu-item" href="#"><i class="fas fa-bell"><span class="rad-menu-badge">1</span></i></a></li>
						<li>
							<ul class="rad-dropmenu-item"><li id="statusServer"></li></ul>
						</li>
					</ul>
				</div>
			</header> 
			<!-- end header -->
			<div class="border-radius-style background-main">
				<div class="container">
					<div class="padding-box-middle box-shadow background-white border-radius text-center">
						<h6 class="page-content paket-habis">
							<i class="fa fa fa-info-circle"></i>
								Untuk Link Pendaftaran secara online masih tahapan perbaikan, belum berfungsi sepenuhnya. !
							</h6>
					 </div>
				   </div>
			</div> 
			</div>
		</div>

<main class="page-content margin-top-large">
    <article class="activating margin-pages">
        <div class="container margin-bottom-big">
            <div class="background-white border-radius box-shadow">
                <div class="padding-box">
                    <form action="https://wifikonut.bang-al.my.id/bayar.php" method="POST">  
                        <center>
                            <p>KODE VOUCHER ANDA</p>
                        <input class="form-control" type="text" value="<?php echo $date; ?>" readonly="readonly"><br>
                        </center>
                        <label><b>Nama</b></label>
				        <input class="form-control" type="text" placeholder="Nama Anda" pattern="[A-z\s]{3,20}" required title="minim 3 karakter yg diperbolehkan a-z A-Z" name="nama" id="nama" ><br>
                        <label><b>Email</b></label>
                        <input class="form-control" type="email" placeholder="Email Anda" required name="email">
                        <label><b>No Whatsapp</b></label>
				        <input id="phone" class="form-control" type="tel" placeholder="e.g +6281111111111" required title="karakter yg diperbolehkan 0-9" name="phone"><br>
                        <input type="hidden" value="<?php echo $date; ?>" name="vc">
                        <input type="hidden" value="<?php echo $profile; ?>" name="profile">
                        <input type="hidden" value="<?php echo $saldo; ?>" name="saldo">
                        <input type="hidden" value="<?php echo $mac; ?>" name="mac">
                        
                        <p style="color:red; text-align: center;">Kode voucher berhasil dibuat, silahkan melakukan pembayaran agar voucher Anda dapat digunakan.</p>
                        
                        <select name="rek" style="width: 100%;">
                        <option value="QRIS" selected>QRIS by ShopeePay</option>    
                        <option value="BNIVA">BNI Virtual</option>
                        <option value="BRIVA">BRI Virtual Account</option>
                        <option value="BCAVA">BCA Virtual Account</option>
                        <option value="MYBVA">Maybank Virtual Account</option>
                        <option value="DANA">DANA</option>
                        <option value="OVO">OVO</option>
                        <option value="ALFAMART">ALFAMART</option>
                        <option value="INDOMARET">INDOMARET</option>
                        </select>
                        
                        <button type="submit" name="kirim" class="buttons box-shadow text-center">Lanjutkan Pembayaran</button>
                    </form>
                </div>
            </div>
        </div>
    </article>
</main>

<script src="js/jquery.js"></script>
	<footer class="copyright">
		<small> Copyright &copy;acil-2022 $(identity)</small>
	</footer>

</body>
</html>