4 |
david |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/***************************************************************************\
|
|
|
4 |
* SPIP, Systeme de publication pour l'internet *
|
|
|
5 |
* *
|
|
|
6 |
* Copyright (c) 2001-2005 *
|
|
|
7 |
* Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
|
|
|
8 |
* *
|
|
|
9 |
* Ce programme est un logiciel libre distribue sous licence GNU/GPL. *
|
|
|
10 |
* Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. *
|
|
|
11 |
\***************************************************************************/
|
|
|
12 |
|
|
|
13 |
|
|
|
14 |
include ("inc.php3");
|
|
|
15 |
include ("inc_signatures.php3");
|
|
|
16 |
|
|
|
17 |
function message_de_signature($row)
|
|
|
18 |
{
|
|
|
19 |
return propre(echapper_tags($row['message']));
|
|
|
20 |
}
|
|
|
21 |
|
|
|
22 |
|
|
|
23 |
debut_page(_T('titre_page_controle_petition'), "redacteurs", "suivi-petition");
|
|
|
24 |
debut_gauche();
|
|
|
25 |
|
|
|
26 |
//
|
|
|
27 |
// Raccourcis
|
|
|
28 |
//
|
|
|
29 |
/*
|
|
|
30 |
debut_raccourcis();
|
|
|
31 |
// rien
|
|
|
32 |
fin_raccourcis();
|
|
|
33 |
*/
|
|
|
34 |
|
|
|
35 |
debut_droite();
|
|
|
36 |
|
|
|
37 |
|
|
|
38 |
echo "<div class='serif2'>";
|
|
|
39 |
|
|
|
40 |
if ($connect_statut == "0minirezo") {
|
|
|
41 |
gros_titre(_T('titre_suivi_petition'));
|
|
|
42 |
|
|
|
43 |
if ($supp_petition){
|
|
|
44 |
$query_forum = "UPDATE spip_signatures SET statut='poubelle' WHERE id_signature=$supp_petition";
|
|
|
45 |
$result_forum = spip_query($query_forum);
|
|
|
46 |
}
|
|
|
47 |
|
|
|
48 |
if ($add_petition){
|
|
|
49 |
$query_forum = "UPDATE spip_signatures SET statut='publie' WHERE id_signature=$add_petition";
|
|
|
50 |
$result_forum = spip_query($query_forum);
|
|
|
51 |
}
|
|
|
52 |
|
|
|
53 |
// Invalider les pages ayant trait aux petitions
|
|
|
54 |
if ($id_signature = ($add_petition?$add_petition:$supp_petition)) {
|
|
|
55 |
include_ecrire('inc_invalideur.php3');
|
|
|
56 |
list ($id_article) = spip_fetch_array(spip_query("SELECT id_article
|
|
|
57 |
FROM spip_signatures WHERE id_signature=$id_signature"));
|
|
|
58 |
suivre_invalideur("id='varia/pet$id_article'");
|
|
|
59 |
}
|
|
|
60 |
|
|
|
61 |
if (!$debut) $debut = 0;
|
|
|
62 |
|
|
|
63 |
spip_query("DELETE FROM spip_signatures WHERE NOT (statut='publie' OR statut='poubelle') AND date_time<DATE_SUB(NOW(),INTERVAL 10 DAY)");
|
|
|
64 |
|
|
|
65 |
controle_signatures('controle_petition.php3',
|
|
|
66 |
$id_article,
|
|
|
67 |
$debut,
|
|
|
68 |
"(statut='publie' OR statut='poubelle')",
|
|
|
69 |
"date_time DESC");
|
|
|
70 |
|
|
|
71 |
}
|
|
|
72 |
else {
|
|
|
73 |
echo "<B>"._T('avis_non_acces_page')."</B>";
|
|
|
74 |
}
|
|
|
75 |
|
|
|
76 |
|
|
|
77 |
echo "</div>";
|
|
|
78 |
|
|
|
79 |
fin_page();
|
|
|
80 |
|
|
|
81 |
|
|
|
82 |
?>
|
|
|
83 |
|