-
Notifications
You must be signed in to change notification settings - Fork 0
/
reg_form.php
169 lines (149 loc) · 4.63 KB
/
reg_form.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
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
<link href='https://fonts.googleapis.com/css?family=Abel' rel='stylesheet'>
<title>REGISTER</title>
<style type="text/css">
html {
background: url(bck.jpg) no-repeat center center fixed;
background-size: cover;
height: 100%;
overflow: hidden;
}
.footer {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
background-color: rgba(0, 0, 0, 0.5);
color: white;
text-align: center;
}
body {
font-family: 'Abel';
font-size: 22px;
}
#container {
position: absolute;
top: 120px;
left: 100px;
width: 100%;
height: auto;
}
img {
position: fixed;
margin-left: 45%;
margin-top: 8%;
height: auto;
width: 700px;
}
.button {
background-color: #4CAF50;
/* Green */
border: none;
color: white;
padding: 16px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
-webkit-transition-duration: 0.4s;
/* Safari */
transition-duration: 0.4s;
cursor: pointer;
}
.button1 {
background-color: white;
color: black;
border: 2px solid #4CAF50;
}
.button1:hover {
background-color: #4CAF50;
color: white;
}
.button2 {
background-color: white;
color: black;
border: 2px solid #008CBA;
}
.button2:hover {
background-color: #008CBA;
color: white;
}
.button3 {
background-color: white;
color: black;
border: 2px solid #f44336;
}
.button3:hover {
background-color: #f44336;
color: white;
}
.button4 {
background-color: white;
color: black;
border: 2px solid #e7e7e7;
}
.button4:hover {
background-color: #e7e7e7;
}
.firstItem {
margin: 10px 0 10px 0;
}
</style>
</head>
<body>
<script src='script.js'> </script>
<nav class="navbar navbar-expand-sm bg-dark navbar-dark">
<ul class="navbar-nav">
<li class="nav-item active">
<?php
if (isset($_SESSION['logged']) && $_SESSION['logged'] == true) {
echo "<a class='nav-link' href='#'>" . $_SESSION['name'] . "</a>";
} else {
echo "<a class='nav-link' href='#'> Guest </a>";
}
?>
</li>
<li class="nav-item">
<a class="nav-link" href="index.php">Main page</a>
</li>
<li class="nav-item">
<a class="nav-link" href="documentation.php">Documentation</a>
</li>
<?php
if (isset($_SESSION['logged']) && $_SESSION['logged'] == true) {
echo "<a class='nav-link' href='logout.php'>Logout</a>";
}
?>
</ul>
</nav>
<div id='container'>
<form action='createuser.php' method='post'>
<br>Name<input type='text' name='name'>
<br>Login<input type='text' name='login'>
<br>Password<input type='text' name='password'>
<br>
<?php
echo "Age <select name='age'>";
for ($i = 1; $i <= 100; $i++) {
echo "<option value=$i>$i</option>";
}
?>
<br>
<input type='submit' value='' style='visibility: hidden;'><button class='button button1' value='Register'>Create account</button>
</form>
</div>
<img src="flag.png">
<div class="footer">
<p>Techniki Internetowe 2019/2020 Michal Stefaniuk</p>
</div>
</body>
</html>