[ Index ] |
|
Code source de SPIP 1.8.3 |
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_ecrire ("inc_documents.php3"); 16 include_ecrire ("inc_barre.php3"); 17 18 function enfant($leparent) { 19 global $id_parent; 20 global $id_rubrique; 21 global $spip_lang_left; 22 23 $query="SELECT * FROM spip_rubriques WHERE id_parent='$leparent' 24 ORDER BY 0+titre,titre"; 25 $result=spip_query($query); 26 $style = http_style_background('secteur-12.gif', "$spip_lang_left no-repeat; padding-$spip_lang_left: 16px"); 27 28 while($row=spip_fetch_array($result)){ 29 $my_rubrique=$row['id_rubrique']; 30 $titre=$row['titre']; 31 $lang_rub = $row['lang']; 32 $langue_choisie_rub = $row['langue_choisie']; 33 34 $titre = couper(textebrut(typo($titre)), 50); // largeur maxi 35 if (lire_meta('multi_rubriques') == 'oui' AND ($langue_choisie_rub == "oui" OR $leparent == 0)) $titre = $titre." [".traduire_nom_langue($lang_rub)."]"; 36 echo "<OPTION".mySel($my_rubrique,$id_rubrique). $style .'>' . 37 supprimer_tags($titre)."\n"; 38 } 39 } 40 41 $id_breve = intval($id_breve); 42 if ($new != "oui") { 43 $query = "SELECT * FROM spip_breves WHERE id_breve='$id_breve'"; 44 $result = spip_query($query); 45 46 if ($row=spip_fetch_array($result)) { 47 $id_breve=$row['id_breve']; 48 $date_heure=$row['date_heure']; 49 $titre=$row['titre']; 50 $texte=$row['texte']; 51 $lien_titre=$row['lien_titre']; 52 $lien_url=$row['lien_url']; 53 $statut=$row['statut']; 54 $id_rubrique=$row['id_rubrique']; 55 $id_secteur=$id_rubrique; 56 $extra = $row['extra']; 57 $pour_doublons = propre ("$titre.$texte"); 58 } 59 } 60 else { 61 $titre = filtrer_entites(_T('titre_nouvelle_breve')); 62 $onfocus = " onfocus=\"if(!antifocus){this.value='';antifocus=true;}\""; 63 $statut = "prop"; 64 } 65 66 67 debut_page(_T('titre_page_breves_edit', array('titre' => $titre)), "documents", "breves"); 68 69 70 debut_grand_cadre(); 71 72 afficher_hierarchie($id_rubrique); 73 74 fin_grand_cadre(); 75 debut_gauche(); 76 if ($new != 'oui' AND ($connect_statut=="0minirezo" OR $statut=="prop")) { 77 maj_documents($id_breve, 'breve'); 78 afficher_documents_colonne($id_breve, "breve", true); 79 } 80 debut_droite(); 81 debut_cadre_formulaire(); 82 83 84 if ($new != "oui") { 85 echo "\n<table cellpadding=0 cellspacing=0 border=0 width='100%'>"; 86 echo "<tr width='100%'>"; 87 echo "<td>"; 88 icone(_T('icone_retour'), "breves_voir.php3?id_breve=$id_breve", "breve-24.gif", "rien.gif"); 89 90 echo "</td>"; 91 echo "<td>", http_img_pack("rien.gif", ' ', "width='10'"), "</td>\n"; 92 echo "<td width='100%'>"; 93 echo _T('info_modifier_breve'); 94 gros_titre($titre); 95 echo "</td></tr></table>"; 96 echo "<p>"; 97 } 98 99 100 if ($connect_statut=="0minirezo" OR $statut=="prop" OR $new == "oui") { 101 if ($id_breve) $lien = "?id_breve=$id_breve"; 102 echo "<FORM ACTION='breves_voir.php3$lien' METHOD='post' name='formulaire'>"; 103 104 echo "<INPUT TYPE='Hidden' NAME='modifier_breve' VALUE=\"oui\">"; 105 echo "<INPUT TYPE='Hidden' NAME='id_breve' VALUE=\"$id_breve\">"; 106 echo "<INPUT TYPE='Hidden' NAME='statut_old' VALUE=\"$statut\">"; 107 if ($new == "oui") echo "<INPUT TYPE='Hidden' NAME='new' VALUE=\"oui\">"; 108 109 $titre = entites_html($titre); 110 $lien_titre = entites_html($lien_titre); 111 112 echo _T('entree_titre_obligatoire'); 113 echo "<INPUT TYPE='text' CLASS='formo' NAME='titre' VALUE=\"$titre\" SIZE='40' $onfocus>"; 114 115 116 /// Dans la rubrique.... 117 echo "<INPUT TYPE='Hidden' NAME='id_rubrique_old' VALUE=\"$id_rubrique\"><p />"; 118 119 if ($id_rubrique == 0) $logo_parent = "racine-site-24.gif"; 120 else { 121 $query = "SELECT id_parent FROM spip_rubriques WHERE id_rubrique='$id_rubrique'"; 122 $result=spip_query($query); 123 while($row=spip_fetch_array($result)){ 124 $parent_parent=$row['id_parent']; 125 } 126 if ($parent_parent == 0) $logo_parent = "secteur-24.gif"; 127 else $logo_parent = "rubrique-24.gif"; 128 } 129 130 131 debut_cadre_couleur("$logo_parent", false, "",_T('entree_interieur_rubrique').aide ("brevesrub")); 132 133 echo "<SELECT NAME='id_rubrique' CLASS='forml' style='max-height: 24px; font-size: 90%;' SIZE=1>\n"; 134 enfant(0); 135 echo "</SELECT>\n"; 136 137 fin_cadre_couleur(); 138 139 if ($spip_ecran == "large") $rows = 28; 140 else $rows = 15; 141 142 echo "<p /><B>"._T('entree_texte_breve')."</B><BR>"; 143 echo afficher_barre('document.formulaire.texte'); 144 echo "<TEXTAREA NAME='texte' ".$GLOBALS['browser_caret']." ROWS='$rows' CLASS='formo' COLS='40' wrap=soft>"; 145 echo $texte; 146 echo "</TEXTAREA><P>\n"; 147 148 149 echo _T('entree_liens_sites').aide ("breveslien")."<BR>"; 150 echo _T('info_titre')."<BR>"; 151 echo "<INPUT TYPE='text' CLASS='forml' NAME='lien_titre' VALUE=\"$lien_titre\" SIZE='40'><BR>"; 152 153 if (strlen($lien_url) < 8) $lien_url="http://"; 154 echo _T('info_url')."<BR>"; 155 echo "<INPUT TYPE='text' CLASS='forml' NAME='lien_url' VALUE=\"$lien_url\" SIZE='40'><P>"; 156 157 if ($champs_extra) { 158 include_ecrire ("inc_extra.php3"); 159 extra_saisie($extra, 'breves', $id_secteur); 160 } 161 162 if ($connect_statut=="0minirezo" AND acces_rubrique($id_rubrique)) { 163 debut_cadre_relief(); 164 echo "<B>"._T('entree_breve_publiee')."</B>\n"; 165 166 echo "<SELECT NAME='statut' SIZE=1 CLASS='fondl'>\n"; 167 168 echo "<OPTION".mySel("prop",$statut)." style='background-color: white'>"._T('item_breve_proposee')."\n"; 169 echo "<OPTION".mySel("refuse",$statut). http_style_background('rayures-sup.gif'). ">"._T('item_breve_refusee')."\n"; 170 echo "<OPTION".mySel("publie",$statut)." style='background-color: #B4E8C5'>"._T('item_breve_validee')."\n"; 171 172 echo "</SELECT>".aide ("brevesstatut")."<P>\n"; 173 fin_cadre_relief(); 174 } 175 else { 176 echo "<INPUT TYPE='Hidden' NAME='statut' VALUE=\"$statut\">"; 177 } 178 echo "<P ALIGN='right'><INPUT TYPE='submit' NAME='Valider' VALUE='"._T('bouton_enregistrer')."' CLASS='fondo' >"; 179 echo "</FORM>"; 180 } 181 else echo "<H2>"._T('info_page_interdite')."</H2>"; 182 183 fin_cadre_formulaire(); 184 fin_page(); 185 186 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Thu Feb 22 22:27:47 2007 | par Balluche grâce à PHPXref 0.7 |