-
Notifications
You must be signed in to change notification settings - Fork 1
/
book.php
166 lines (150 loc) · 5.86 KB
/
book.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Réserver les billets</title>
<link rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css"
integrity="sha384-9gVQ4dYFwwWSjIDZnLEWnxCjeSWFphJiwGPXr1jddIhOegiu1FwO5qRGvFXOdJZ4"
crossorigin="anonymous">
<link rel="stylesheet"
href="https://use.fontawesome.com/releases/v5.0.10/css/all.css"
integrity="sha384-+d0P83n9kaQMCwj8F4RJB66tzIwOKmrdb46+porD/OvrJ+37WqIM7UoBtwHO6Nlg"
crossorigin="anonymous">
</head>
<body>
<br>
<div class="container">
<div class="page-header">
<h1>Réserver les billets</h1>
</div>
<?php
//message retourner aprés la réservation
if (isset($_GET['s']))
{
echo "<div class=\"alert alert-success\">".$_GET['s']." Vous serez automatiquement redirigé après 5 secondes.</div>";
header("refresh: 5; login.php");
}
elseif (isset($_GET['e']))
echo "<div class=\"alert alert-danger\">".$_GET['e']."</div>";
?>
<form name="contactForm" action="register.php" method="POST" class="form-horizontal">
<div >
<label for='input1'>Numero de place</label>
<div class="form-group" >
<?php
for($i=1; $i<11; $i++)
{
$chparam = "ch" . strval($i);
if(isset($_POST[$chparam]))
{
echo "<input class='form-control' type='text' name=ch".$i." value=".$i." readonly/><br>";
}
}
?>
</div>
</div>
<?php
if(isset($_POST['doj']))
{
echo "<div >";
echo "<label for='input1'>Date du voyage</label>";
echo "<div class='form-group' >";
echo "<input type='text' class='form-control' name='journey_date' id='input1' value=". $_POST['doj'] ." readonly />";
echo "</div>";
echo "</div>";
}
?>
<div >
<label class="control-label" for="input1">Nom</label>
<div class='form-group' >
<input type="text"
name="user_name"
id="input1"
placeholder="Tapez votre nom"
class='form-control'
pattern="[A-z ]{3,}"
title="Merci d'entrer un nom valide."
required>
</div>
</div>
<div >
<label for="input2">Adresse</label>
<div class='form-group'>
<input type="text"
name="address"
id="input2"
placeholder="Tapez votre adresse"
class='form-control'
required>
</div>
</div>
<div >
<label for="input3">Numéro de contact (seulement 8 chiffres)</label>
<div class='form-group'>
<input type="text"
name="mobile"
pattern=".{8}"
title="Veuillez entrer 8 chiffres."
class='form-control'
placeholder="Tapez votre numéro de portable"
maxlength="8"
required/>
</div>
</div>
<div >
<label for="input4">Identifiant d'utilisateur</label>
<div class='form-group'>
<input type="text"
class='form-control'
placeholder="Entrez votre identifiant utilisateur"
name="userid"
pattern="[A-z ]{3,}"
title="Merci d'entrer un nom d'utilisateur valide."
required/>
</div>
</div>
<div >
<label for="input5">Email</label>
<div class='form-group'>
<input type="email"
class='form-control'
placeholder="Entrez votre identifiant email"
name="email"
title="Veuillez entrer un identifiant email valide"
required/>
</div>
</div>
<div >
<label for="input6">Mot de passe</label>
<div class='form-group'>
<input type="password"
class='form-control'
name="password"
placeholder="Tapez votre mot de passe"
required/>
</div>
</div>
<div >
<label for="input6">Message</label>
<div class='form-group'>
<textarea class='form-control'
rows="3"
name="message"
title="S'il vous plaît entrer un message valide." >
</textarea>
</div>
</div>
<div >
<button type="submit" class="btn btn-primary">
<i class="fas fa-sign-in-alt"></i> Réserver
</button>
<button type="reset" class="btn btn-warning">
<i class="fas fa-eraser"></i> Remettre
</button>
</div>
</form>
</div>
</body>
</html>