-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.php
More file actions
127 lines (117 loc) · 4.04 KB
/
main.php
File metadata and controls
127 lines (117 loc) · 4.04 KB
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<?php
session_start();
function Redirect($url, $dur) {
header("refresh:$dur; url=$url");
}
$html = "
<html>
<head>
<meta charset=\"utf-8\" />
<title>Welcome</title>
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
</head>
<body>
<div class='header-div'>
<input class='header-button header-left-button' onclick=\"location.href='buywelcome.php'\" type=\"button\" value=\"Buy a ticket\"/>
<div class='header-right-div'>
<input class='header-button' onclick=\"location.href='comment.php'\" type=\"button\" value=\"Movie Review\"/>
<input class='header-button' onclick=\"location.href='history.php'\" type=\"button\" value=\"Purchase History\"/>
<input class='header-button' onclick=\"location.href='logout.php'\" type=\"button\" value=\"Logout\"/>
</div>
</div>
<div class='background-div'>
<div class='description-div'>
<h1 class='description' style='font-size: 50px'>Enjoy the film in our best cinemas!</h1>
<h3 class='description' style='font-size: 30px'>Simply Book</h3>
</div>
</div>
</body>
<style>
.description-div {
width: 100%;
justify-content: center;
align-items: center;
background-color: rgba(0,0,0,0.75);
}
.description {
color: white;
font-weight: 300;
margin : 5px;
text-align: center;
}
.header-right-div {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: flex-end;
}
.header-div {
background-color: rgba(241, 241, 241, 1);
height: 75px;
display: flex;
flex-direction: row;
padding: 0px 1%;
align-items: center;
position: fixed;
width: 100%;
}
body {
margin: 0;
}
.header-button {
background: linear-gradient(0.45turn, red, orange);
width: 250px;
height: 90%;
font-size: 30px;
white-space: normal;
}
.background-div {
height: 93%;
width: 100%;
background: url(images/theater1.jpg) no-repeat center center fixed;
background-size: cover;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
@media only screen and (max-width: 1000px) {
.header-button {
width: 150px;
font-size: 25px;
}
}
@media only screen and (max-width: 600px) {
.header-div {
align-items: center;
justify-content: center;
flex-direction: column;
height: 150px;
}
.header-right-div {
justify-content: center;
}
.header-button {
font-size: 18px;
width: 33%;
}
.header-left-button {
width: 80%;
font-size: 30px;
}
.username-div {
padding-top: 150px;
}
}
</style>
</html>
";
if(isset($_SESSION['userId'])) {
print $html;
}
else {
print "<h1>You have not logged in!</h1>";
Redirect("index.html", 3);
}
?>