-
Notifications
You must be signed in to change notification settings - Fork 2
/
premium.php
60 lines (53 loc) · 1.59 KB
/
premium.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php
use src\php\classes\User\User;
include_once("bootstrap.php");
try {
$user = new User();
$currentUserId = $_SESSION["userId"];
$currentUser = $user->getUserInfo($currentUserId);
} catch (\Throwable $th) {
$error = $th->getMessage();
}
if (!empty($_POST)) {
try {
$user = new User();
$user->setPremium($_POST["premium"]);
$user->updatePremium();
header("Location: index.php");
} catch (\Throwable $th) {
$error = $th->getMessage();
}
}
include_once("header.inc.php");
include_once("navbar.inc.php");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/styles.css">
<link rel="stylesheet" href="css/premium.css">
<title>Epicards | Go Premium</title>
</head>
<body>
<div class="premium_container">
<img src="assets/logo.png" alt="logo" class="logo">
<div class="premium_info">
<div class="premium_text">
<h2>Epicards Premium</h2>
<ul>
<li>More than three collections</li>
<li>See how much your collection is worth</li>
<li>Store more than 1 000 cards</li>
</ul>
</div>
</div>
<form action="" method="post">
<input type="hidden" name="premium" value="ja">
<button type="submit" class="w-100 btn_buy btn-lg submit">Buy</button>
</form>
</div>
</body>
</html>