-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathheader.php
More file actions
72 lines (65 loc) · 1.88 KB
/
Copy pathheader.php
File metadata and controls
72 lines (65 loc) · 1.88 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
<header><!--<div id="header">-->
<div id="logo" >
<h1><a href="http://localhost/genmon-ch/index.php"><strong><font color="#FFFFFF">GenMon-CH</font></strong></a></h1>
</div><!-- end #logo -->
<div id="user" >
<?php
$url="http://localhost/genmon-ch";
include("/var/www/html/genmon-ch/membres/sessStarted.php");
if ( is_session_started() === FALSE ) session_start();
if(isset($_SESSION['user'])) //if user is loged in show account management and logout option
{
?>
<br />
<br />
<?php
echo "<b> Welcome ".$_SESSION['user']." </b>" ;
?>
<br />
<input type="button" value="Logout" onclick="window.location='membres/logout.php'"/>
<p>
<b>
<br />
<a href="<?php echo $url;?>/membres/AccManage.php">Account Management</a>
<a href="<?php echo $url;?>/tutorial.php">Tutorial</a>
</b>
</p>
<?php
}
else //if user is not loged in show sign in and sign up option
{
?>
<form action="<?php echo $url;?>/membres/login.php" method="post">
</br>
<?php
if(isset($_GET['error']) && $_GET['error']=='log')
{
echo "<er>Wrong pseudo and/or password
</er>";
}
?>
<b>Pseudo: </b>
<input type="text" name="pseudo" />
<br>
<b>Password: </b>
<input type="password" name="pwd" />
<br />
<input type="submit" value="login"/>
</form> <br />
<b>
<a href="<?php echo $url;?>/membres/reinitpwd.php">Reinitialize password</a>
<a href="<?php echo $url;?>/membres/signUp.php"> Sign Up</a>
<a href="<?php echo $url;?>/tutorial.php"> Tutorial</a>
<a href="<?php echo $url;?>/pdf/data_sample.csv"> Example data</a>
</b>
<?php
}
?>
</div><!-- end #user -->
</header><!-- end #header -->