-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
124 lines (117 loc) · 5.31 KB
/
Copy pathindex.php
File metadata and controls
124 lines (117 loc) · 5.31 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
<?php session_start();
unset($_SESSION['login']);
unset($_SESSION['username']);
unset($_SESSION['Rol']);
unset($_SESSION['Name']);
$_SESSION["servername"]="localhost";
$_SESSION["sv_username"]="root";
$_SESSION["password"]="";
?>
<!DOCTYPE html>
<html>
<head>
<style>
<?php include 'style.css'?>
</style>
</head>
<body>
<video autoplay loop class="video-background" muted plays-inline>
<source src="background_video.mp4" type="video/mp4">
</video>
<div class="formular">
<div class="form-box">
<div class="button-box">
<div id="btn"></div>
<button type="button" class="toggle-btn" onclick="login()">Log in/Cerere</button>
<button type="button" class="toggle-btn" onclick="register()">Inregistrare</button>
</div>
<form action="login.php" method="post" id="login" class="input-group">
<input type="text" class="input-field" name="username" placeholder="username" ><br>
<input type="password" class="input-field" name="password" placeholder="password" ><br>
<button type="submit" class="submit-btn">Log in</button>
<?php
if(!empty($_GET)){
$err=$_GET["err"];
if($err==0)
echo "<p>Username sau parola incorecte!</p> <br>";
}
?>
</form>
<form action="request.php" method="post" id="request" class="input-group">
<input type="email" name="email" class="input-field" placeholder="email" ><br>
<button type="submit" value="Request" class="submit-btn">Cerere</button>
<?php
if(!empty($_GET)){
$err=$_GET["err"];
switch($err){
case 1:
echo "<p>Nu email de bestis!</p>";
break;
case 2:
echo "<p>Email-ul deja se afla in request!</p>";
break;
}
}
?>
<br>
<p style="text-align:center;">
<a href="https://docs.google.com/document/d/1EIrsDxk75jICVP-8UDJTrxs12OKp7StohkorCyLCiT8/edit" target="blank">Tutorial aplicatie</a>
</p>
</form>
<form id="register" action="register.php" method="post" class="input-group">
<input type="email" name="email" class="input-field" placeholder="email" ><br>
<input type="password" name="password" class="input-field" placeholder="password" ><br>
<input type="password" name="rpassword" class="input-field" placeholder="repeat password" ><br>
<p>Gender:</p><br>
<p>Male</p><input type="radio" name="gender" value="male">
<p>Female</p><input type="radio" name="gender" value="female">
<p>Nu exista altceva!</p><input type="radio" name="gender" value="gay"><br>
<button type="submit" class="submit-btn">Inregistrare</button>
<?php
if(!empty($_GET)){
$err=$_GET["err"];
switch($err){
case 3:
echo "<p>Nu exista cerere pentru email!<p>";
break;
case 4:
echo "<p>Email-ul nu este aprobat!</p>";
break;
case 5:
echo "<p>Email-ul deja e folosit!</p>";
break;
case 6:
echo "<p>Introdu aceeasi parola!</p>";
break;
case 7:
echo "<p>Alege gender-ul!</p>";
break;
case 8:
echo "<p>Parola sa aiba minim 5 caractere!</p>";
break;
}
}
?>
</form>
</div>
</div>
<script>
var x= document.getElementById("login");
var y= document.getElementById("register");
var w= document.getElementById("request");
var z= document.getElementById("btn");
function register(){
x.style.left = "-450px";
w.style.left="-450px";
y.style.left= "40px";
z.style.left ="110px";
}
function login(){
x.style.left = "40px";
y.style.left= "450px";
w.style.left="40px";
z.style.left ="0px";
}
</script>
</body>
</html>