[PLUGINS] +emb_pdf
[lhc/web/www.git] / www / plugins / abomailmans / abomailmans_fonctions.php
1 <?php
2
3 /*
4 * Abomailmans
5 * MaZiaR - NetAktiv
6 * tech@netaktiv.com
7 * Printemps 2007 - 2012
8 * $Id: abomailmans_fonctions.php 92967 2015-11-16 14:24:09Z teddy.spip@gmail.com $
9 */
10
11 if (!defined('_ECRIRE_INC_VERSION')) {
12 return;
13 }
14
15 function nettoie_chemin($chemin)
16 {
17 $liste = explode('/', $chemin);
18 $dernier = count($liste) - 1;
19 $chemin = str_replace('.html', '', $liste[$dernier]);
20 $liste2 = explode('&', $chemin);
21 $chemin = $liste2[0];
22
23 return $chemin;
24 }
25
26 function noextension($chemin)
27 {
28 return str_replace('.html', '', $chemin);
29 }
30
31 function recup_param($chemin)
32 {
33 $a = explode('&', $chemin);
34 $retour = '';
35 $i = 1;
36 while ($i < count($a)) {
37 $retour .= '&'.htmlspecialchars(urldecode($a[$i]));
38 ++$i;
39 }
40
41 return $retour;
42 }
43
44 function array_param($params)
45 {
46 parse_str($params, $output);
47
48 return $output;
49 }
50
51 function moins30($date)
52 {
53 $moins30 = date('Y-m-d h:m:s', time() - 24 * 3600 * 30);
54
55 return $moins30;
56 }