[ Index ] |
|
Code source de SPIP 1.9.2c |
1 <?php 2 3 /***************************************************************************\ 4 * SPIP, Systeme de publication pour l'internet * 5 * * 6 * Copyright (c) 2001-2007 * 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 if (!defined("_ECRIRE_INC_VERSION")) return; 14 15 // Recuperer le reglage des forums publics de l'article x 16 // http://doc.spip.org/@get_forums_publics 17 function get_forums_publics($id_article=0) { 18 19 if ($id_article) { 20 $res = spip_query("SELECT accepter_forum FROM spip_articles WHERE id_article=$id_article"); 21 22 if ($obj = spip_fetch_array($res)) 23 return $obj['accepter_forum']; 24 } else { // dans ce contexte, inutile 25 return substr($GLOBALS['meta']["forums_publics"],0,3); 26 } 27 return $GLOBALS['meta']["forums_publics"]; 28 } 29 30 // Cree le formulaire de modification du reglage des forums de l'article 31 // http://doc.spip.org/@inc_regler_moderation_dist 32 function inc_regler_moderation_dist($id_article, $script, $args) { 33 include_spip('inc/presentation'); 34 35 global $spip_lang_right; 36 37 $statut_forum = get_forums_publics($id_article); 38 39 $nb_forums = spip_fetch_array(spip_query("SELECT COUNT(*) AS count FROM spip_forum WHERE id_article=$id_article AND statut IN ('publie', 'off', 'prop')")); 40 $nb_forums = $nb_forums['count']; 41 42 if ($nb_forums) { 43 $r = '<!-- visible -->' // message pour l'appelant 44 . icone_horizontale( 45 _T('icone_suivi_forum', array('nb_forums' => $nb_forums)), 46 generer_url_ecrire("articles_forum","id_article=$id_article"), 47 "suivi-forum-24.gif", 48 "", 49 false 50 ); 51 } else 52 $r = ''; 53 54 $r .= "\n\t" 55 . _T('info_fonctionnement_forum') 56 . "\n\t<select name='change_accepter_forum' 57 class='fondl spip_xx-small' 58 onchange=\"findObj_forcer('valider_regler_moderation_$id_article').style.visibility='visible';\" 59 >"; 60 61 foreach (array( 62 'pos'=>_T('bouton_radio_modere_posteriori'), 63 'pri'=>_T('bouton_radio_modere_priori'), 64 'abo'=>_T('bouton_radio_modere_abonnement'), 65 'non'=>_T('info_pas_de_forum')) 66 as $val => $desc) { 67 $r .= "\n\t<option"; 68 if ($statut_forum == $val) 69 $r .= " selected='selected'"; 70 $r .= " value='$val'>".$desc."</option>"; 71 } 72 $r .= "\n\t</select><br />\n"; 73 74 $atts = " style='float: $spip_lang_right' id='valider_regler_moderation_$id_article' class='fondo visible_au_chargement spip_xx-small'"; 75 76 $r = ajax_action_post('regler_moderation', $id_article, $script, $args, $r,_T('bouton_changer'), $atts); 77 78 return ajax_action_greffe("regler_moderation-$id_article", $r); 79 } 80 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Wed Nov 21 10:20:27 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |