Subversion Repositories Sites.tela-botanica.org

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1133 mathias 1
<html>
2
<head>
3
	<style media="screen" type="text/css">
4
		body {
5
			background-image: url('http://www.tela-botanica.org/reseau/maintenance/fond.jpg');
6
			background-repeat: no-repeat;
7
			background-position: fixed;
8
			background-size: cover;
9
		}
10
		.bloc-centre {
11
			position: absolute;
12
			top:0;
13
			bottom: 0;
14
			left: 0;
15
			right: 0;
16
			width: 700px;
17
			height: 350px;
18
		    margin: auto;
19
			padding-top: 20px;
20
			text-align: center;
21
			border: solid #daf0da 1px;
22
			border-radius : 10px;
23
		}
24
		.bloc-centre h1 {
25
			margin-bottom: 0;
26
			font-family: Trebuchet MS, Calibri, Verdana, Nimbus, Times, Arial;
27
			font-size: 1.7em;
28
			color: #202020;
29
		}
30
		.bloc-centre h2 {
31
			margin-top: 10px;
32
			margin-bottom: 0;
33
			font-family: Trebuchet MS, Calibri, Verdana, Nimbus, Times, Arial;
34
			font-size: 1.3em;
35
			color: #808080;
36
		}
37
		.bloc-centre h3 {
38
			margin-top: 5px;
39
			margin-bottom: 0;
40
			font-family: Trebuchet MS, Calibri, Verdana, Nimbus, Times, Arial;
41
			font-size: 1em;
42
			font-weight: normal;
43
			font-style: italic;
44
			color: #a0a0a0;
45
		}
46
		.bloc-centre h3 strong {
47
			font-weight: bold;
48
			font-style: normal;
49
			color: #505050;
50
		}
51
	</style>
52
</head>
53
<body>
54
	<?php
55
		// gestion des dates : fournir une URL du type maintenance.php?debut=2015-03-04 10:15&fin=2015-03-06 18:00
56
		$debut = null;
57
		$fin = null;
58
		// paramètres de l'URL
59
		if (isset($_GET['debut']) && preg_match('/(\d{4})-(\d{2})-(\d{2})[ _](\d{2}):(\d{2})/', $_GET['debut'])) {
60
			$debut = strtotime(str_replace('_', ' ', $_GET['debut']));
61
		}
62
		if (isset($_GET['fin']) && preg_match('/(\d{4})-(\d{2})-(\d{2})[ _](\d{2}):(\d{2})/', $_GET['fin'])) {
63
			$fin = strtotime(str_replace('_', ' ', $_GET['fin']));
64
		}
65
		// donne le jour de la semaine en français
66
		function jour($date) {
67
			$j = date("N", $date);
68
			$jours = array('lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi', 'dimanche');
69
			return $jours[$j-1];
70
		}
71
	?>
72
	<div class="bloc-centre">
73
		<img src="http://www.tela-botanica.org/reseau/maintenance/logo-petit.png" alt="Tela-Botanica"/>
74
		<h1>Cette application est en cours de maintenance</h1>
75
		<?php if ($debut != null || $fin != null): ?>
76
			<?php if ($debut == null): ?>
77
				<h3>jusqu'au <?= jour($fin) ?> <strong><?= date("d/m/Y", $fin) ?></strong> à <strong><?= date("H:i", $fin) ?></strong></h3>
78
			<?php elseif ($fin == null): ?>
79
				<h3>à partir du <?= jour($debut) ?> <strong><?= date("d/m/Y", $debut) ?></strong> à <strong><?= date("H:i", $debut) ?></strong></h3>
80
			<?php elseif (date("Y-m-d", $debut) == date("Y-m-d", $fin)): ?>
81
				<h3>le <?= jour($debut) ?> <strong><?= date("d/m/Y", $debut) ?></strong> de <strong><?= date("H:i", $debut) ?></strong> à <strong><?= date("H:i", $fin) ?></strong></h3>
82
			<?php else: ?>
83
				<h3>du <?= jour($debut) ?> <strong><?= date("d/m/Y", $debut) ?></strong> à <strong><?= date("H:i", $debut) ?></strong> au <?= jour($fin) ?> <strong><?= date("d/m/Y", $fin) ?></strong> à <strong><?= date("H:i", $fin) ?></strong></h3>
84
			<?php endif; ?>
85
		<?php endif; ?>
86
		<h2>Veuillez nous excuser pour la gêne occasionnée</h2>
87
	</div>
88
</body>
89
</html>