source: spip-zone/_plugins_/abomailmans/trunk/abomailmans_fonctions.php @ 92967

Last change on this file since 92967 was 92967, checked in by teddy.spip@…, 4 years ago

Indentation de code + class SPIP 3.1 sur les formulaires

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Date Author Id Revision HeadURL
  • Property svn:mime-type set to text/plain
File size: 916 bytes
Line 
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
11if (!defined('_ECRIRE_INC_VERSION')) {
12    return;
13}
14
15function 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
26function noextension($chemin)
27{
28    return str_replace('.html', '', $chemin);
29}
30
31function 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
44function array_param($params)
45{
46    parse_str($params, $output);
47
48    return $output;
49}
50
51function moins30($date)
52{
53    $moins30 = date('Y-m-d h:m:s', time() - 24 * 3600 * 30);
54
55    return $moins30;
56}
Note: See TracBrowser for help on using the repository browser.