-
Notifications
You must be signed in to change notification settings - Fork 1
/
header.php
95 lines (73 loc) · 3.04 KB
/
header.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
<?php
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="main.css">
<link rel="stylesheet" type="text/css" href="main2.css">
<script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
</head>
<body>
<header class="main_header">
<nav>
<ul class="main-nav">
<li><a href="index.php">Начална страница</a></li>
<li><a href="levelchoosing.php">Нива</a></li>
<li><a href="vocabulary.php">Лексика</a></li>
<li><a href="others.php">Други</a></li>
<li><a href="contact.php">Контакти</a></li>
</ul>
<div class="menu-button">
<a href="#"><span class="text"> Меню</span></a>
</div>
</nav>
<a class="logo" display="block" href="index.php">EnglishKo</a>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js">
</script>
<script>
$().ready(function() {
// menu button for top nav
$('.menu-button a').click(function(e) {
e.preventDefault();
$('nav ul.main-nav').toggleClass('active');
});
// # links
$('a[href="#"]').click(function(e) {
$('html, body').animate({
scrollTop: 0
}, 'slow');
});
});
</script>
<?php
if(isset($_SESSION['userId'])) {
echo '<form action="profilepage.php">
<input class="signbtn" type="submit" value="Профил" />
</form>
<form action="includes/logout.inc.php" method="post">
<button class="signbtn" type="submit" name="logout-submit">Излез</button>
</form>
';
} else {
echo '<form action="includes/login.inc.php" method="post">
<input class="login" type="text" name="mailuid" placeholder="Потребителско име/E-mail..">
<input class="login" type="password" name="pwd" placeholder="Парола..">
<button class="signbtn" type="submit" name="login-submit">Влез</button>
</form>
<form action="signup.php" method="post">
<button class="signbtn" type="submit" name="signup">Регистрация</button>
<a class="forgPwd" href="reset-password.php">Забравена парола</a>
</form>';
}
?>
<?php
if (isset($_GET['newpwd'])) {
if ($_GET['newpwd'] == "passwordupdated") {
alert("Паролата Ви беше обновена!");
}
}
?>
</header>