-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
136 lines (109 loc) · 4.07 KB
/
index.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
<?php
/* Main page with two forms: Inscription and log in */
require 'db.php';
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<title>Gestion des emplois du temp</title>
<?php include 'css/css.html'; ?>
</head>
<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST')
{
if (isset($_POST['login'])) { //user logging in
require 'login (2).php';
}
elseif (isset($_POST['register'])) { //user registering
require 'register.php';
}
}
?>
<body>
<div class="form">
<!--
<ul class="tab-group">
<li class="tab"><a href="#signup">Inscription</a></li>
<li class="tab active"><a href="#login">Connexion</a>
<!-- </li>
</ul> -->
<div class="tab-content">
<div id="login">
<!-- <h1>Bienvenue!</h1> -->
<form action="index.php" method="post" autocomplete="off">
<h1>Veuillez choisir votre rôle : admin, enseignant ou étudiant</h1>
<div class="field-wrap">
<label>
Choisir votre rôle <span class="req">*</span>
</label>
<input type="text" required autocomplete="on" name="post"/>
</div>
<!-- <select name="post_util" id="post_util" class="field-wrap form-control">
<option >Choisir votre post</option>
<option value="admin">admin</option>
<option value="etudiant">etudiant</option>
<option value="enseignant">enseignant</option>
<option value="administration">administration</option>
</select> -->
</div>
<div class="field-wrap">
<label>
Adresse email<span class="req">*</span>
</label>
<input type="email" required autocomplete="on" name="email"/>
</div>
<div class="field-wrap">
<label>
Mot de passe<span class="req">*</span>
</label>
<input type="password" required autocomplete="of" name="password"/>
</div>
<!-- <p class="forgot"><a href="forgot.php">Mot de passe oublié?</a></p> -->
<button class="button button-block" name="login" />Valider</button>
</form>
</div>
<div id="signup">
<h1></h1>
<!-- <form action="login.php" method="post" autocomplete="on">
<div class="top-row">
<div class="field-wrap">
<label>
Prénom<span class="req">*</span>
</label>
<input type="text" required autocomplete="on" name='firstname' />
</div>
<div class="field-wrap">
<label>
Nom<span class="req">*</span>
</label>
<input type="text" required autocomplete="on" name='lastname' />
</div>
</div>
<div class="field-wrap">
<label>
Adresse email<span class="req">*</span>
</label>
<input type="email" required autocomplete="on" name='email' />
</div>
<div class="field-wrap">
<label>
Post<span class="req">*</span>
</label>
<input type="text" required autocomplete="on" name='post' />
</div>
<div class="field-wrap">
<label>
Mot de passe<span class="req">*</span>
</label>
<input type="password" required autocomplete="on" name='password'/>
</div>
<button type="submit" class="button button-block" name="register" />Enregistrer</button>
</form> -->
</div>
</div><!-- tab-content -->
</div> <!-- /form -->
<script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src="js/index.js"></script>
</body>
</html>