-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathabout.php
102 lines (91 loc) · 2.9 KB
/
about.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
<?php
include("./includes/init.php");
include_once("./includes/variables.php");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<?php include("./includes/head.php"); ?>
<title>À propos de CarDrive</title>
</head>
<body>
<?php include("./includes/topbar.php"); ?>
<div class="jumbotron">
<div class="container">
<h1>À propos</h1>
<h2>TP de Florentin Le Moal</h2>
<br>
<p>
Propulsé avec amour et tradition par :
<ul>
<li><a href="FontAwesome">Bootstrap</a> (v3.0.3) : Framework CSS</li>
<li><a href="http://fontawesome.io">FontAwesome</a> (v4.0.3) : extension d'icônes vectorielles</li>
<li><a href="http://justgage.com">JustGage</a> (v1.0.1) : générateur de jauges </li>
</ul>
</p>
</div><!-- /.container -->
</div>
<div class="container">
<div class="col-md-offset-4 col-sm-4">
<div class="well" style="text-align: center;">
<legend>Remise à zéro de la base</legend>
<button type="button" name="sent" class="btn btn-lg btn-danger" onClick='raz()'><span class="fa fa-refresh" id="icn-btn"></span> Restaurer</button>
</div>
</div>
</div>
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="myModalLabel">Restauration</h4>
</div>
<div class="modal-body">
<div id="myModalAlert"></div>
</div>
<div class="modal-footer" id="myModalFooter">
<button type="button" class="btn btn-default" data-dismiss="modal">Fermer</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<div class="hide" id="success_mod">
<div class="alert alert-success">
<h2>Restauration réussie !</h2>
C'est bon, tout est comme neuf.<br>
</div>
</div>
<div class="hide" id="fail_mod">
<div class="alert alert-error">
<h2>Restauration impossible !</h2>
Il y a eu une erreur lors de la restauration<br>
</div>
</div>
<?php include("./includes/js.php"); ?>
<script type="text/javascript">
function raz () {
$('#icn-btn').addClass('fa-spin');
var reqpri = $.ajax({
url:"ajax/raz.php"
});
reqpri.done(function(data, textStatus, jqXHR){
if (data == "") {
$('#myModalAlert').html($('#success_mod').html());
$('#myModal').modal('show');
}
else {
$('#myModalAlert').html($('#fail_mod').html());
$('#myModal').modal('show');
}
$("#icn-btn").removeClass("fa-spin");
});
reqpri.fail(function(jqXHR, textStatus){
$('#myModalAlert').html($('#fail_mod').html());
$('#myModal').modal('show');
$("#icn-btn").removeClass("fa-spin");
});
}
</script>
</body>
</html>