From 71f1c5ada3868cc550aacbf2823f28a716c0c89c Mon Sep 17 00:00:00 2001 From: "Committo,Ergo:sum" <esj@rezo.net> Date: Wed, 10 Nov 2004 23:28:55 +0000 Subject: [PATCH] =?UTF-8?q?abstraction=20du=20r=C3=A9pertoire=20img=5Fpack?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ecrire/admin_effacer.php3 | 2 +- ecrire/admin_index.php3 | 4 ++-- ecrire/admin_tech.php3 | 2 +- ecrire/articles.php3 | 21 +++++++++++---------- ecrire/articles_edit.php3 | 8 ++++---- ecrire/articles_forum.php3 | 2 +- ecrire/articles_tous.php3 | 12 ++++++------ ecrire/auteur_infos.php3 | 9 +++++---- ecrire/auteur_messagerie.php3 | 16 ++++++++-------- ecrire/breves_edit.php3 | 7 ++++--- ecrire/brouteur.php3 | 9 ++++++--- ecrire/brouteur_frame.php3 | 14 ++++++++------ ecrire/inc_documents.php3 | 12 ++++++------ ecrire/inc_filtres.php3 | 2 +- ecrire/inc_mots.php3 | 4 ++-- ecrire/inc_presentation.php3 | 6 +++--- ecrire/inc_sites.php3 | 4 ++-- ecrire/naviguer.php3 | 3 ++- ecrire/rubriques_edit.php3 | 6 ++---- ecrire/sites_edit.php3 | 20 +++++++------------- ecrire/spip_style.php3 | 4 ++-- inc-calcul-outils.php3 | 1 - spip_image.php3 | 3 +-- 23 files changed, 85 insertions(+), 86 deletions(-) diff --git a/ecrire/admin_effacer.php3 b/ecrire/admin_effacer.php3 index a559dc21f9..1b871bb3e8 100644 --- a/ecrire/admin_effacer.php3 +++ b/ecrire/admin_effacer.php3 @@ -43,7 +43,7 @@ echo _T('texte_effacer_base')."</FONT></B></TD></TR>"; echo "<tr><td class='serif'>"; echo "\n<p align='justify'>"; -echo '<img src="img_pack/warning.gif" alt="'._T('info_avertissement').'" width="48" height="48" align="right">'; +echo '<img src="' . _DIR_IMG_PACK . 'warning.gif" alt="'._T('info_avertissement').'" width="48" height="48" align="right">'; echo _T('texte_admin_effacer_01'); echo "<CENTER>"; diff --git a/ecrire/admin_index.php3 b/ecrire/admin_index.php3 index 777640ca06..4375677ce1 100644 --- a/ecrire/admin_index.php3 +++ b/ecrire/admin_index.php3 @@ -74,7 +74,7 @@ debut_cadre_relief(); function jauge($couleur,$pixels) { if ($pixels) - echo "<img src='img_pack/jauge-$couleur.gif' height='10' width='$pixels' alt='$couleur' />"; + echo http_img_pack('jauge-$couleur.gif', "height='10' width='$pixels' alt='$couleur'"); } echo "<table>"; @@ -87,7 +87,7 @@ while (list(,$type) = each($types)) if ($index_total[$type]>0) { $ifond=0; $couleur="#FFFFFF"; } - echo "<TR BGCOLOR='$couleur' BACKGROUND='img_pack/rien.gif'><TD WIDTH=\"100\">"; + echo "<TR BGCOLOR='$couleur' BACKGROUND='" . _DIR_RESTREINT . "rien.gif'><TD WIDTH=\"100\">"; echo "<FONT FACE='arial,helvetica,sans-serif' SIZE=2>"; echo $type; echo "</FONT><TD>"; diff --git a/ecrire/admin_tech.php3 b/ecrire/admin_tech.php3 index 9d9f636a3f..44f6bbb8e0 100644 --- a/ecrire/admin_tech.php3 +++ b/ecrire/admin_tech.php3 @@ -50,7 +50,7 @@ echo "\n<FORM ACTION='export_all.php3' METHOD='get'>"; echo "\n<p align='justify'>"; -echo '<img src="img_pack/warning.gif" alt="'._T('info_avertissement').'" width="48" height="48" align="right">'; +echo http_img_pack('warning.gif', 'alt="'._T('info_avertissement').'" width="48" height="48" align="right">'); echo _T('texte_admin_tech_01'); echo "<p>"._T('texte_admin_tech_02'); diff --git a/ecrire/articles.php3 b/ecrire/articles.php3 index 1d96cc0f2c..56ad0eedf7 100644 --- a/ecrire/articles.php3 +++ b/ecrire/articles.php3 @@ -777,7 +777,7 @@ echo "</td>"; if ($flag_editable) { - echo "<td><img src='img_pack/rien.gif' alt='' width=5></td>\n"; + echo "<td>". http_img_pack('rien.gif', "alt='' width=5") . "</td>\n"; echo "<td align='center'>"; $flag_modif = false; @@ -1125,7 +1125,7 @@ if (spip_num_rows($result)) { else $vals[] = " "; if ($flag_editable AND ($connect_id_auteur != $id_auteur OR $connect_statut == '0minirezo') AND $options == 'avancees') { - $vals[] = "<A HREF='articles.php3?id_article=$id_article&supp_auteur=$id_auteur#auteurs'>"._T('lien_retirer_auteur')." <img src='img_pack/croix-rouge.gif' alt='X' width='7' height='7' border='0' align='middle'></A>"; + $vals[] = "<A HREF='articles.php3?id_article=$id_article&supp_auteur=$id_auteur#auteurs'>"._T('lien_retirer_auteur')." ". http_img_pack('croix-rouge.gif', "alt='X' width='7' height='7' border='0' align='middle'") . "</A>"; } else { $vals[] = ""; } @@ -1360,14 +1360,14 @@ if ((lire_meta('multi_articles') == 'oui') } - $vals[] = "<img src='img_pack/puce-".puce_statut($statut_trad).".gif' alt='' width='7' height='7' border='0' NAME='statut'>"; + $vals[] = http_img_pack("puce-".puce_statut($statut_trad).'.gif', "alt='' width='7' height='7' border='0' NAME='statut'"); if ($id_article_trad == $id_trad) { - $vals[] = "<img src='img_pack/langues-12.gif' width='12' height='12' alt='' border='0'>"; + $vals[] = http_img_pack(langues-'12.gif', "width='12' height='12' alt='' border='0'"); $titre_trad = "<b>$titre_trad</b>"; } else { - if ($connect_statut=='0minirezo') $vals[] = "<a href='articles.php3?id_article=$id_article&id_trad_old=$id_trad&id_trad_new=$id_article_trad'><img src='img_pack/langues-off-12.gif' width='12' height='12' alt='' border='0'></a>"; - else $vals[] = "<img src='img_pack/langues-off-12.gif' width='12' height='12' alt='' border='0'>"; + if ($connect_statut=='0minirezo') $vals[] = "<a href='articles.php3?id_article=$id_article&id_trad_old=$id_trad&id_trad_new=$id_article_trad'>". http_img_pack('langues-off-12.gif', "width='12' height='12' alt='' border='0'") . "</a>"; + else $vals[] = http_img_pack(langues-off-'12.gif', "width='12' height='12' alt='' border='0'"); } $ret .= "</td>"; @@ -1420,7 +1420,7 @@ if ((lire_meta('multi_articles') == 'oui') echo "</form>"; echo "</td>\n"; echo "<td background='' width='10'> </td>"; - echo "<td background='img_pack/tirets-separation.gif' width='2'><img src='img_pack/rien.gif' alt='' width=2 height=2></td>"; + echo "<td background='" . _DIR_IMG_PACK . "tirets-separation.gif' width='2'>". http_img_pack('rien.gif', "alt='' width=2 height=2") . "</td>"; echo "<td background='' width='10'> </td>"; } echo "<td>"; @@ -1428,7 +1428,7 @@ if ((lire_meta('multi_articles') == 'oui') echo "</td>"; if ($flag_editable AND $options == "avancees" AND $ret) { echo "<td background='' width='10'> </td>"; - echo "<td background='img_pack/tirets-separation.gif' width='2'><img src='img_pack/rien.gif' alt='' width=2 height=2></td>"; + echo "<td background='" . _DIR_IMG_PACK . "tirets-separation.gif' width='2'>". http_img_pack('rien.gif', "alt='' width=2 height=2") . "</td>"; echo "<td background='' width='10'> </td>"; echo "<td>"; icone_horizontale(_T('trad_delier'), "articles.php3?id_article=$id_article&supp_trad=oui", "traductions-24.gif", "supprimer.gif"); @@ -1489,11 +1489,12 @@ if ($connect_statut == '0minirezo' AND acces_rubrique($rubrique_article)) { echo "<OPTION" . mySel("prepa", $statut_article) ." style='background-color: white'>"._T('texte_statut_en_cours_redaction')."\n"; echo "<OPTION" . mySel("prop", $statut_article) . " style='background-color: #FFF1C6'>"._T('texte_statut_propose_evaluation')."\n"; echo "<OPTION" . mySel("publie", $statut_article) . " style='background-color: #B4E8C5'>"._T('texte_statut_publie')."\n"; - echo "<OPTION" . mySel("poubelle", $statut_article) . " style='background:url(img_pack/rayures-sup.gif)'>"._T('texte_statut_poubelle')."\n"; + echo "<OPTION" . mySel("poubelle", $statut_article) + . http_style_background('rayures-sup.gif') . '>' ._T('texte_statut_poubelle')."\n"; echo "<OPTION" . mySel("refuse", $statut_article) . " style='background-color: #FFA4A4'>"._T('texte_statut_refuse')."\n"; echo "</SELECT>"; - echo " <img src='img_pack/puce-".puce_statut($statut_article).".gif' alt='' border='0' NAME='statut'> "; + echo " ". http_img_pack("puce-".puce_statut($statut_article).'.gif', "alt='' border='0' NAME='statut'") . " "; // echo "<noscript><INPUT TYPE='submit' NAME='Modifier' VALUE='"._T('bouton_modifier')."' CLASS='fondo'></noscript>"; echo "<span class='visible_au_chargement' id='valider_statut'>"; diff --git a/ecrire/articles_edit.php3 b/ecrire/articles_edit.php3 index 91bfe3b235..b7e2642c88 100644 --- a/ecrire/articles_edit.php3 +++ b/ecrire/articles_edit.php3 @@ -312,17 +312,17 @@ function enfant($leparent){ break; } if ($i==1) { - $style .= "background-image: url(img_pack/secteur-12.gif);"; + $style .= "background-image: url(" . _DIR_IMG_PACK. "secteur-12.gif);"; $style .= "background-color: $couleur_claire;"; $style .= "font-weight: bold;"; } else if ($i==2) { - //$style .= "background: url(img_pack/rubrique-12.gif) $spip_lang_left no-repeat;"; + //$style .= "background: url(" . _DIR_IMG_PACK. "rubrique-12.gif) $spip_lang_left no-repeat;"; $style .= "border-bottom: 1px solid $couleur_claire;"; $style .= "font-weight: bold;"; } else { - //$style .= "background: url(img_pack/rubrique-12.gif) $spip_lang_left no-repeat;"; + //$style .= "background: url(" . _DIR_IMG_PACK. "rubrique-12.gif) $spip_lang_left no-repeat;"; } if ($rubrique_acceptable) { @@ -345,7 +345,7 @@ echo "<td>"; else icone(_T('icone_retour'), "articles.php3?id_article=$id_article", "article-24.gif", "rien.gif"); echo "</td>"; - echo "<td><img src='img_pack/rien.gif' alt='' width=10></td>\n"; +echo "<td>". http_img_pack('rien.gif', "alt='' width=10") . "</td>\n"; echo "<td width='100%'>"; echo _T('texte_modifier_article'); gros_titre($titre); diff --git a/ecrire/articles_forum.php3 b/ecrire/articles_forum.php3 index ceb1fbf863..ff29f23290 100644 --- a/ecrire/articles_forum.php3 +++ b/ecrire/articles_forum.php3 @@ -50,7 +50,7 @@ echo "<td>"; icone(_T('icone_retour'), "articles.php3?id_article=$id_article", "article-24.gif", "rien.gif"); echo "</td>"; - echo "<td><img src='img_pack/rien.gif' width=10></td>\n"; +echo "<td>" . http_img_pack('rien.gif', "width=10") ."</td>\n"; echo "<td width='100%'>"; echo _T('texte_messages_publics'); gros_titre($titre); diff --git a/ecrire/articles_tous.php3 b/ecrire/articles_tous.php3 index 4a34458898..45e82dc77e 100644 --- a/ecrire/articles_tous.php3 +++ b/ecrire/articles_tous.php3 @@ -141,7 +141,7 @@ if ($aff_statut["prepa"]) { else { echo "<input type='checkbox' name='aff_art[]' value='prepa' id='prepa'>"; } - echo " <label for='prepa'><img src='img_pack/puce-blanche-breve.gif' alt='' width='8' height='9' border='0'>"; + echo " <label for='prepa'>". http_img_pack('puce-blanche-breve.gif', "alt='' width='8' height='9' border='0'"); echo " "._T('texte_statut_en_cours_redaction')."</label><BR>"; } @@ -153,7 +153,7 @@ if ($aff_statut["prop"]) { else { echo "<input type='checkbox' name='aff_art[]' value='prop' id='prop'>"; } - echo " <label for='prop'><img src='img_pack/puce-orange-breve.gif' alt='' width='8' height='9' border='0'>"; + echo " <label for='prop'>". http_img_pack('puce-orange-breve.gif', "alt='' width='8' height='9' border='0'"); echo " "._T('texte_statut_attente_validation')."</label><BR>"; } @@ -164,7 +164,7 @@ if ($aff_statut["publie"]) { else { echo "<input type='checkbox' name='aff_art[]' value='publie' id='publie'>"; } - echo " <label for='publie'><img src='img_pack/puce-verte-breve.gif' alt='' width='8' height='9' border='0'>"; + echo " <label for='publie'>". http_img_pack('puce-verte-breve.gif', "alt='' width='8' height='9' border='0'"); echo " "._T('texte_statut_publies')."</label><BR>"; } @@ -175,7 +175,7 @@ if ($aff_statut["refuse"]) { else { echo "<input type='checkbox' name='aff_art[]' value='refuse' id='refuse'>"; } - echo " <label for='refuse'><img src='img_pack/puce-rouge-breve.gif' alt='' width='8' height='9' border='0'>"; + echo " <label for='refuse'>" . http_img_pack('puce-rouge-breve.gif', "alt='' width='8' height='9' border='0'"); echo " "._T('texte_statut_refuses')."</label><BR>"; } @@ -186,7 +186,7 @@ if ($aff_statut["poubelle"]) { else { echo "<input type='checkbox' name='aff_art[]' value='poubelle' id='poubelle'>"; } - echo " <label for='poubelle'><img src='img_pack/puce-poubelle-breve.gif' alt='' width='8' height='9' border='0'>"; + echo " <label for='poubelle'>" . http_img_pack('puce-poubelle-breve.gif', "alt='' width='8' height='9' border='0'"); echo " "._T('texte_statut_poubelle')."</label>"; } @@ -262,7 +262,7 @@ function afficher_rubriques_filles($id_parent) { $bgcolor = ""; } - echo "<div style='padding-top: 5px; padding-bottom: 5px; padding-$spip_lang_left: 28px; background: url(img_pack/$icone) $spip_lang_left center no-repeat;$bgcolor'>"; + echo "<div style='padding-top: 5px; padding-bottom: 5px; padding-$spip_lang_left: 28px; background: url(" . _DIR_IMG_PACK . "$icone) $spip_lang_left center no-repeat;$bgcolor'>"; if ($enfant[$id_rubrique] OR $article[$id_rubrique]) echo bouton_block_invisible("rubrique$id_rubrique"); diff --git a/ecrire/auteur_infos.php3 b/ecrire/auteur_infos.php3 index da5fe61c80..9666196d73 100644 --- a/ecrire/auteur_infos.php3 +++ b/ecrire/auteur_infos.php3 @@ -253,7 +253,7 @@ debut_droite(); if ($echec){ debut_cadre_relief(); - echo '<img src="img_pack/warning.gif" alt="'._T('info_avertissement').'" width="48" height="48" align="left">'; + echo http_img_pack("warning.gif", 'alt="'._T('info_avertissement').'" width="48" height="48" align="left">'); echo "<font color='red'>$echec <p>"._T('info_recommencer')."</font>"; fin_cadre_relief(); echo "<p>"; @@ -354,7 +354,7 @@ debut_cadre_relief("base-24.gif"); // Avertissement en cas de modifs de ses propres donnees if (($edit_login OR $edit_pass) AND $connect_id_auteur == $id_auteur) { debut_cadre_enfonce(); - echo '<img src="img_pack/warning.gif" alt="'._T('info_avertissement').'" width="48" height="48" align="right">'; + echo http_img_pack("warning.gif", 'alt="'._T('info_avertissement').'" width="48" height="48" align="right">'); echo "<b>"._T('texte_login_precaution')."</b>\n"; fin_cadre_enfonce(); echo "<p>"; @@ -435,7 +435,8 @@ if ($connect_statut == "0minirezo" if (($statut == '6forum') OR (lire_meta('accepter_visiteurs') == 'oui') OR (lire_meta('forums_publics') == 'abo')) echo "<OPTION".mySel("6forum",$statut).">"._T('item_visiteur'); - echo "<OPTION".mySel("5poubelle",$statut)." style='background:url(img_pack/rayures-sup.gif)'>> "._T('texte_statut_poubelle'); + echo "<OPTION".mySel("5poubelle",$statut). + " style='background:url(" . _DIR_RESTREINT . "rayures-sup.gif)'>> "._T('texte_statut_poubelle'); echo "</SELECT></center>\n"; fin_cadre_relief(); @@ -457,7 +458,7 @@ if ($statut == '0minirezo') { echo _T('info_admin_gere_toutes_rubriques'); } else { echo _T('info_admin_gere_rubriques')."\n"; - echo "<ul style='list-style-image: url(img_pack/rubrique-12.gif)'>"; + echo "<ul style='list-style-image: url(" . _DIR_IMG_PACK . "rubrique-12.gif)'>"; while ($row_admin = spip_fetch_array($result_admin)) { $id_rubrique = $row_admin["id_rubrique"]; $titre = typo($row_admin["titre"]); diff --git a/ecrire/auteur_messagerie.php3 b/ecrire/auteur_messagerie.php3 index 69c3c608a2..acad5fdc75 100644 --- a/ecrire/auteur_messagerie.php3 +++ b/ecrire/auteur_messagerie.php3 @@ -120,20 +120,20 @@ function mySel($varaut,$variable) { debut_cadre_formulaire(); echo "<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=3 WIDTH=\"100%\">"; - echo "<TR><TD BGCOLOR='$couleur_foncee' BACKGROUND='img_pack/rien.gif'><B><FONT FACE='Verdana,Arial,Sans,sans-serif' SIZE=3 COLOR='#FFFFFF'>"._T('info_messagerie_interne')."</FONT></B>".aide ("messconf")."</TD></TR>"; - echo "<TR><TD BACKGROUND='img_pack/rien.gif'>"; + echo "<TR><TD BGCOLOR='$couleur_foncee' BACKGROUND='" . _DIR_IMG_PACK . "rien.gif'><B><FONT FACE='Verdana,Arial,Sans,sans-serif' SIZE=3 COLOR='#FFFFFF'>"._T('info_messagerie_interne')."</FONT></B>".aide ("messconf")."</TD></TR>"; + echo "<TR><TD BACKGROUND='" . _DIR_IMG_PACK . "rien.gif'>"; echo "<FONT FACE='Verdana,Arial,Sans,sans-serif' SIZE=2>"._T('texte_auteur_messagerie_1')."</FONT>"; echo "</TD></TR>"; echo "<TR><TD> </TD></TR>"; - echo "<TR><TD BGCOLOR='#EEEECC' BACKGROUND='img_pack/rien.gif'><B><FONT FACE='Verdana,Arial,Sans,sans-serif' SIZE=3>"._T('info_messagerie_interne')."</FONT></B></TD></TR>"; + echo "<TR><TD BGCOLOR='#EEEECC' BACKGROUND='" . _DIR_IMG_PACK . "rien.gif'><B><FONT FACE='Verdana,Arial,Sans,sans-serif' SIZE=3>"._T('info_messagerie_interne')."</FONT></B></TD></TR>"; - echo "<TR><TD BACKGROUND='img_pack/rien.gif'>"; + echo "<TR><TD BACKGROUND='" . _DIR_IMG_PACK . "rien.gif'>"; echo "<FONT FACE='Verdana,Arial,Sans,sans-serif' SIZE=2 COLOR='#000000'>"._T('info_desactiver_messagerie_personnelle')."</FONT>"; echo "</TD></TR>"; - echo "<TR><TD BACKGROUND='img_pack/rien.gif' ALIGN='left'>"; + echo "<TR><TD BACKGROUND='" . _DIR_IMG_PACK . "rien.gif' ALIGN='left'>"; echo "<FONT FACE='Verdana,Arial,Sans,sans-serif' SIZE=2 COLOR='#000000'>"; if ($messagerie=="non"){ echo "<INPUT TYPE='radio' NAME='perso_activer_messagerie' VALUE='oui' id='perso_activer_messagerie_on'>"; @@ -156,13 +156,13 @@ function mySel($varaut,$variable) { /// Liste des redacteurs connectes echo "<TR><TD> </TD></TR>"; - echo "<TR><TD BGCOLOR='#EEEECC' BACKGROUND='img_pack/rien.gif'><B><FONT FACE='Verdana,Arial,Sans,sans-serif' SIZE=3>"._T('info_liste_redacteurs_connectes')."</FONT></B></TD></TR>"; + echo "<TR><TD BGCOLOR='#EEEECC' BACKGROUND='" . _DIR_IMG_PACK . "rien.gif'><B><FONT FACE='Verdana,Arial,Sans,sans-serif' SIZE=3>"._T('info_liste_redacteurs_connectes')."</FONT></B></TD></TR>"; - echo "<TR><TD BACKGROUND='img_pack/rien.gif'>"; + echo "<TR><TD BACKGROUND='" . _DIR_IMG_PACK . "rien.gif'>"; echo "<FONT FACE='Verdana,Arial,Sans,sans-serif' SIZE=2 COLOR='#000000'>"._T('texte_auteur_messagerie')."</FONT>"; echo "</TD></TR>"; - echo "<TR><TD BACKGROUND='img_pack/rien.gif' ALIGN='left'>"; + echo "<TR><TD BACKGROUND='" . _DIR_IMG_PACK . "rien.gif' ALIGN='left'>"; echo "<FONT FACE='Verdana,Arial,Sans,sans-serif' SIZE=2 COLOR='#000000'>"; if ($imessage=="non"){ echo "<INPUT TYPE='radio' NAME='perso_activer_imessage' VALUE='oui' id='perso_activer_imessage_on'>"; diff --git a/ecrire/breves_edit.php3 b/ecrire/breves_edit.php3 index 7465f7279c..8b51872a47 100644 --- a/ecrire/breves_edit.php3 +++ b/ecrire/breves_edit.php3 @@ -21,7 +21,7 @@ function enfant($leparent) { $query="SELECT * FROM spip_rubriques WHERE id_parent='$leparent'"; $result=spip_query($query); - $style .= "background: url(img_pack/secteur-12.gif) $spip_lang_left no-repeat; padding-$spip_lang_left: 16px;"; + $style = http_style_background('secteur-12.gif', "$spip_lang_left no-repeat; padding-$spip_lang_left: 16px"); while($row=spip_fetch_array($result)){ $my_rubrique=$row['id_rubrique']; @@ -31,7 +31,8 @@ function enfant($leparent) { $titre = couper(textebrut(typo($titre)), 50); // largeur maxi if (lire_meta('multi_rubriques') == 'oui' AND ($langue_choisie_rub == "oui" OR $leparent == 0)) $titre = $titre." [".traduire_nom_langue($lang_rub)."]"; - echo "<OPTION".mySel($my_rubrique,$id_rubrique)." style='$style'>".supprimer_tags($titre)."\n"; + echo "<OPTION".mySel($my_rubrique,$id_rubrique). $style .'>' . + supprimer_tags($titre)."\n"; } } @@ -180,7 +181,7 @@ if ($connect_statut=="0minirezo" OR $statut=="prop" OR $new == "oui") { echo "<SELECT NAME='statut' SIZE=1 CLASS='fondl'>\n"; echo "<OPTION".mySel("prop",$statut)." style='background-color: white'>"._T('item_breve_proposee')."\n"; - echo "<OPTION".mySel("refuse",$statut)." style='background:url(img_pack/rayures-sup.gif)'>"._T('item_breve_refusee')."\n"; + echo "<OPTION".mySel("refuse",$statut). http_style_background('rayures-sup.gif'). ">"._T('item_breve_refusee')."\n"; echo "<OPTION".mySel("publie",$statut)." style='background-color: #B4E8C5'>"._T('item_breve_validee')."\n"; echo "</SELECT>".aide ("brevesstatut")."<P>\n"; diff --git a/ecrire/brouteur.php3 b/ecrire/brouteur.php3 index cce3103558..42a0e0944e 100644 --- a/ecrire/brouteur.php3 +++ b/ecrire/brouteur.php3 @@ -71,12 +71,15 @@ echo "<div> </div>"; $lien = $dest[$nb_col-$compteur-1]; if ($la_rubrique == 0) $icone = "secteur-24.gif"; else $icone = "rubrique-24.gif"; - $ret = "<div style='padding-top: 5px; padding-bottom: 5px; padding-$spip_lang_left: 28px; background: url(img_pack/$icone) $spip_lang_left no-repeat;'><a href='brouteur.php3?id_rubrique=$lien'>$titre</a></div><div style='margin-$spip_lang_left: 28px;'>$ret</div>"; + $ret = "<div " . + http_style_background($icone, + "$spip_lang_left no-repeat; padding-top: 5px; padding-bottom: 5px; padding-$spip_lang_left: 28px") . "><a href='brouteur.php3?id_rubrique=$lien'>$titre</a></div><div style='margin-$spip_lang_left: 28px;'>$ret</div>"; } } $lien = $dest[$nb_col-$compteur-2]; - $icone = "racine-site-24.gif"; - $ret = "<div style='padding-top: 5px; padding-bottom: 5px; padding-$spip_lang_left: 28px; background: url(img_pack/$icone) $spip_lang_left no-repeat;'><a href='brouteur.php3?id_rubrique=$lien'>"._T('info_racine_site')."</a></div><div style='margin-$spip_lang_left: 28px;'>$ret</div>"; + $ret = "<div " . + http_style_background("racine-site-24.gif", + "$spip_lang_left no-repeat; padding-top: 5px; padding-bottom: 5px; padding-$spip_lang_left: 28px") . "><a href='brouteur.php3?id_rubrique=$lien'>"._T('info_racine_site')."</a></div><div style='margin-$spip_lang_left: 28px;'>$ret</div>"; echo $ret; echo "</div>"; diff --git a/ecrire/brouteur_frame.php3 b/ecrire/brouteur_frame.php3 index 7440b073a3..248eb33375 100644 --- a/ecrire/brouteur_frame.php3 +++ b/ecrire/brouteur_frame.php3 @@ -97,11 +97,12 @@ debut_html(); echo "<div class='brouteur_rubrique' onMouseOver=\"changeclass(this, 'brouteur_rubrique_on');\" onMouseOut=\"changeclass(this, 'brouteur_rubrique');\">"; if ($id_parent == '0') { - echo "<div style='background-image: url(img_pack/secteur-24.gif);'><a href='brouteur_frame.php3?id_rubrique=$ze_rubrique&frame=".($frame+1)."&effacer_suivant=oui' target='iframe".($frame+1)."'>$titre</a></div>"; + echo "<div style='background-image: url(" . _DIR_IMG_PACK . "secteur-24.gif);'><a href='brouteur_frame.php3?id_rubrique=$ze_rubrique&frame=".($frame+1)."&effacer_suivant=oui' target='iframe".($frame+1)."'>$titre</a></div>"; } else { - if ($frame+1 < $nb_col) echo "<div style='background-image: url(img_pack/rubrique-24.gif);'><a href='brouteur_frame.php3?id_rubrique=$ze_rubrique&frame=".($frame+1)."&effacer_suivant=oui' target='iframe".($frame+1)."'>$titre</a></div>"; - else echo "<div style='background-image: url(img_pack/rubrique-24.gif);'><a href='javascript:window.parent.location=\"brouteur.php3?id_rubrique=$ze_rubrique\"'>$titre</a></div>"; + if ($frame+1 < $nb_col) + echo "<div style='background-image: url(" . _DIR_IMG_PACK . "rubrique-24.gif);'><a href='brouteur_frame.php3?id_rubrique=$ze_rubrique&frame=".($frame+1)."&effacer_suivant=oui' target='iframe".($frame+1)."'>$titre</a></div>"; + else echo "<div style='background-image: url(" . _DIR_IMG_PACK . "rubrique-24.gif);'><a href='javascript:window.parent.location=\"brouteur.php3?id_rubrique=$ze_rubrique\"'>$titre</a></div>"; } echo "</div>\n"; } @@ -185,7 +186,7 @@ debut_html(); $puce = 'poubelle'; break; } - echo "<div style='margin:3px; padding-top: 5px; padding-bottom: 5px; padding-$spip_lang_left: 28px; background: url(img_pack/site-24.gif) $spip_lang_left center no-repeat;'><b><a href='javascript:window.parent.location=\"sites.php3?id_syndic=$id_syndic\"'>$titre</a></b></div>"; + echo "<div " . http_style_background('site-24.gif', "$spip_lang_left center no-repeat; margin:3px; padding-top: 5px; padding-bottom: 5px; padding-$spip_lang_left: 28px") . "><b><a href='javascript:window.parent.location=\"sites.php3?id_syndic=$id_syndic\"'>$titre</a></b></div>"; } } } @@ -196,7 +197,7 @@ debut_html(); $query = "SELECT articles.id_article, articles.titre, articles.statut FROM spip_articles AS articles, spip_auteurs_articles AS lien WHERE articles.statut = 'prepa' AND articles.id_article = lien.id_article AND lien.id_auteur = $connect_id_auteur GROUP BY id_article ORDER BY articles.date DESC"; $result=spip_query($query); if (spip_num_rows($result)>0) { - echo "<div style='margin:3px; padding-top: 5px; padding-bottom: 5px; padding-$spip_lang_left: 28px; background: url(img_pack/article-24.gif) $spip_lang_left center no-repeat;'><b class='verdana2'><a href='brouteur_frame.php3?special=redac&frame=".($frame+1)."&effacer_suivant=oui' target='iframe".($frame+1)."'>"._T("info_cours_edition")."</a></b></div>"; + echo "<div ", http_style_background('article-24.gif', "$spip_lang_left center no-repeat; margin:3px; padding-top: 5px; padding-bottom: 5px; padding-$spip_lang_left: 28px"),"><b class='verdana2'><a href='brouteur_frame.php3?special=redac&frame=".($frame+1)."&effacer_suivant=oui' target='iframe".($frame+1)."'>"._T("info_cours_edition")."</a></b></div>"; } $query = "SELECT articles.id_article, articles.titre, articles.statut FROM spip_articles AS articles WHERE articles.statut = 'prop' ORDER BY articles.date DESC"; @@ -208,7 +209,8 @@ debut_html(); $total_breves = spip_num_rows($result); if ($total_articles + $total_breves > 0) - echo "<div style='margin:3px; padding-top: 5px; padding-bottom: 5px; padding-$spip_lang_left: 28px; background: url(img_pack/article-24.gif) $spip_lang_left center no-repeat;'><b class='verdana2'><a href='brouteur_frame.php3?special=valider&frame=".($frame+1)."&effacer_suivant=oui' target='iframe".($frame+1)."'>"._T("info_articles_proposes")." / "._T("info_breves_valider")."</a></b></div>"; + echo "<div ", http_style_background('article-24.gif', "$spip_lang_left center no-repeat; margin:3px; padding-top: 5px; padding-bottom: 5px; padding-$spip_lang_left: 28px"), + "><b class='verdana2'><a href='brouteur_frame.php3?special=valider&frame=".($frame+1)."&effacer_suivant=oui' target='iframe".($frame+1)."'>"._T("info_articles_proposes")." / "._T("info_breves_valider")."</a></b></div>"; diff --git a/ecrire/inc_documents.php3 b/ecrire/inc_documents.php3 index d2c67a9613..b196a54381 100644 --- a/ecrire/inc_documents.php3 +++ b/ecrire/inc_documents.php3 @@ -547,7 +547,7 @@ function afficher_documents_non_inclus($id_article, $type = "article", $flag_mod $format = "gif"; break; } - + if ($flag_modif) { if ($id_vignette == 0) { echo "<div style='float: $spip_lang_left;'>"; @@ -563,7 +563,7 @@ function afficher_documents_non_inclus($id_article, $type = "article", $flag_mod $link->addVar('doc_supp', $id_vignette); echo "<div style='float: $spip_lang_left'>"; - echo "<a href='".$link->getUrl("porfolio")."' title=\""._T('info_supprimer_vignette')."\" class='bouton_rotation'><img src='img_pack/croix-rouge.gif' border='0' /></a>"; + echo "<a href='".$link->getUrl("porfolio")."' title=\""._T('info_supprimer_vignette')."\" class='bouton_rotation'>" . http_img_pack('croix-rouge.gif', "border='0'") ."</a>"; echo "</div>"; $vignette_perso = true; @@ -584,7 +584,7 @@ function afficher_documents_non_inclus($id_article, $type = "article", $flag_mod $link_rot->addVar('doc_rotate', $id_document); $link_rot->addVar('vignette_aff', $id_document); $link_rot->addVar('var_rot', -90); - echo "<a href='".$link_rot->getUrl("portfolio")."' class='bouton_rotation'><img src='img_pack/tourner-gauche.gif' border='0' /></a>"; + echo "<a href='".$link_rot->getUrl("portfolio")."' class='bouton_rotation'>" . http_img_pack('tourner-gauche.gif', "border='0'") ."</a>"; echo "<br />"; $link_rot = $image_link; $link_rot->addVar('redirect', $redirect_url); @@ -593,7 +593,7 @@ function afficher_documents_non_inclus($id_article, $type = "article", $flag_mod $link_rot->addVar('doc_rotate', $id_document); $link_rot->addVar('vignette_aff', $id_document); $link_rot->addVar('var_rot', 90); - echo "<a href='".$link_rot->getUrl("portfolio")."' class='bouton_rotation'><img src='img_pack/tourner-droite.gif' border='0' /></a>"; + echo "<a href='".$link_rot->getUrl("portfolio")."' class='bouton_rotation'>" . http_img_pack('tourner-droite.gif', "border='0'") ."</a>"; echo "<br />"; $link_rot = $image_link; @@ -603,7 +603,7 @@ function afficher_documents_non_inclus($id_article, $type = "article", $flag_mod $link_rot->addVar('doc_rotate', $id_document); $link_rot->addVar('vignette_aff', $id_document); $link_rot->addVar('var_rot', 180); - echo "<a href='".$link_rot->getUrl("portfolio")."' class='bouton_rotation'><img src='img_pack/tourner-180.gif' border='0' /></a>"; + echo "<a href='".$link_rot->getUrl("portfolio")."' class='bouton_rotation'>" . http_img_pack('tourner-180.gif', "border='0'") ."</a>"; echo "</div>"; } } @@ -819,7 +819,7 @@ function afficher_documents_non_inclus($id_article, $type = "article", $flag_mod $link->addVar('doc_supp', $id_vignette); echo "<div style='float: $spip_lang_left'>"; - echo "<a href='".$link->getUrl("porfolio")."' title=\""._T('info_supprimer_vignette')."\" class='bouton_rotation'><img src='img_pack/croix-rouge.gif' border='0' /></a>"; + echo "<a href='".$link->getUrl("porfolio")."' title=\""._T('info_supprimer_vignette')."\" class='bouton_rotation'>" . http_img_pack('croix-rouge.gif', "border='0'") ."</a>"; echo "</div>"; $vignette = spip_fetch_array(spip_query("SELECT * FROM spip_documents WHERE id_document = $id_vignette"));; diff --git a/ecrire/inc_filtres.php3 b/ecrire/inc_filtres.php3 index 575935553a..5a8c72aa97 100644 --- a/ecrire/inc_filtres.php3 +++ b/ecrire/inc_filtres.php3 @@ -685,7 +685,7 @@ function ajoute_popup_multi($langue_demandee, $trads, $texte) { if ($survol) { $num_multi ++; - $texte .= " <img src=\"img_pack/langues-modif-12.gif\" alt=\"(multi)\" title=\"$survol\" height=\"12\" width=\"12\" border=\"0\" onclick=\"return openmulti($num_multi)\" />"; + $texte .= " <img src=\"" . _DIR_IMG_PACK . "langues-modif-12.gif\" alt=\"(multi)\" title=\"$survol\" height=\"12\" width=\"12\" border=\"0\" onclick=\"return openmulti($num_multi)\" />"; $multi_popup .= "textes_multi[$num_multi] = '".addslashes($texte_popup)."';\n"; } diff --git a/ecrire/inc_mots.php3 b/ecrire/inc_mots.php3 index 9c2b7369f0..fb416190b4 100644 --- a/ecrire/inc_mots.php3 +++ b/ecrire/inc_mots.php3 @@ -305,7 +305,7 @@ function formulaire_mots($table, $id_objet, $nouv_mot, $supp_mot, $cherche_mot, $url = "mots_edit.php3?id_mot=$id_mot&redirect=".rawurlencode($url_base.'#mots'); - $vals[] = "<A HREF='$url'><img src='img_pack/petite-cle.gif' alt='' width='23' height='12' border='0'></A>"; + $vals[] = "<A HREF='$url'>" . http_img_pack('petite-cle.gif', "alt='' width='23' height='12' border='0'") ."</A>"; // Changer @@ -342,7 +342,7 @@ function formulaire_mots($table, $id_objet, $nouv_mot, $supp_mot, $cherche_mot, if ($flag_editable){ $s = ""; if ($flag_groupe) - $s .= "<A HREF=\"$url_base&supp_mot=$id_mot#mots\">"._T('info_retirer_mot')." <img src='img_pack/croix-rouge.gif' alt='X' width='7' height='7' border='0' align='middle'></A>"; + $s .= "<A HREF=\"$url_base&supp_mot=$id_mot#mots\">"._T('info_retirer_mot')." " . http_img_pack('croix-rouge.gif', "alt='X' width='7' height='7' border='0' align='middle'") ."</A>"; else $s .= " "; } $vals[] = $s; diff --git a/ecrire/inc_presentation.php3 b/ecrire/inc_presentation.php3 index dadb2a94ee..0484c5c620 100644 --- a/ecrire/inc_presentation.php3 +++ b/ecrire/inc_presentation.php3 @@ -3408,9 +3408,9 @@ function http_img_pack($img, $att) ($att ? ("' " . $att) : "'") . " />"; } -function http_style_background($img, $att) +function http_style_background($img, $att='') { - return "style='background: url(\"" . _DIR_IMG_PACK . $img . - ($att ? ('") ' . $att) : '")') . ";'"; + return " style='background: url(\"" . _DIR_IMG_PACK . $img . '")' . + ($att ? (' ' . $att) : '') . ";'"; } ?> diff --git a/ecrire/inc_sites.php3 b/ecrire/inc_sites.php3 index 8262f2b2aa..bdad8661cc 100644 --- a/ecrire/inc_sites.php3 +++ b/ecrire/inc_sites.php3 @@ -500,7 +500,7 @@ function afficher_sites($titre_table, $requete) { } - $s .= "<img src='img_pack/$puce' alt='' width='7' height='7' border='0'> "; + $s .= http_img_pack('$puce', "alt='' width='7' height='7' border='0'") ." "; $s .= typo($nom_site); /*if ($moderation == 'oui') @@ -642,7 +642,7 @@ function afficher_syndic_articles($titre_table, $requete, $afficher_site = false $puce = 'puce-rouge-anim.gif'; } - echo "<img src='img_pack/$puce' width='7' height='7' border='0' alt='' />"; + echo http_img_pack('$puce', "width='7' height='7' border='0' alt='' /"); if ($statut == "refuse") echo "<font color='black'> $titre</font>"; diff --git a/ecrire/naviguer.php3 b/ecrire/naviguer.php3 index 6773758865..1ecaa76c7c 100644 --- a/ecrire/naviguer.php3 +++ b/ecrire/naviguer.php3 @@ -99,7 +99,8 @@ function sous_enfant($collection2){ $titre2=$row['titre']; changer_typo($row['lang']); - $retour.="<div class='arial11' style='background: url(img_pack/rubrique-12.gif) left center no-repeat; padding: 2px; padding-$spip_lang_left: 18px; margin-$spip_lang_left: 3px;'><A HREF='naviguer.php3?coll=$id_rubrique2'><span dir='$lang_dir'>".typo($titre2)."</span></a></div>\n"; + $retour.="<div class='arial11' " . + http_style_background('rubrique-12.gif', "left center no-repeat; padding: 2px; padding-$spip_lang_left: 18px; margin-$spip_lang_left: 3px") . "><A HREF='naviguer.php3?coll=$id_rubrique2'><span dir='$lang_dir'>".typo($titre2)."</span></a></div>\n"; } $retour .= "</ul>\n\n".fin_block()."\n\n"; } diff --git a/ecrire/rubriques_edit.php3 b/ecrire/rubriques_edit.php3 index bba48b4453..3abb190282 100644 --- a/ecrire/rubriques_edit.php3 +++ b/ecrire/rubriques_edit.php3 @@ -47,17 +47,15 @@ function enfant($leparent){ if ($i > 4) $style .= "font-style: italic;"; if ($i < 3) $style .= "font-weight:bold; "; if ($i==1) { - $style .= "background-image: url(img_pack/secteur-12.gif);"; + $style .= "background-image: url(" . _DIR_IMG_PACK . 'secteur-12.gif);'; $style .= "background-color: $couleur_claire;"; $style .= "font-weight: bold;"; } else if ($i==2) { - // $style .= "background: url(img_pack/rubrique-12.gif) $spip_lang_left no-repeat;"; $style .= "border-bottom: 1px solid $couleur_claire;"; $style .= "font-weight: bold;"; } else { - // $style .= "background: url(img_pack/rubrique-12.gif) $spip_lang_left no-repeat;"; } if ($statut_rubrique!='publie') $titre = "($titre)"; @@ -169,7 +167,7 @@ debut_cadre_couleur("$logo_parent", false, '', _T('entree_interieur_rubrique').a //echo "<B>"._T('entree_interieur_rubrique')."</B> ".aide ("rubrub")."<BR>\n"; echo "<SELECT NAME='id_parent' style='background-color:#ffffff; font-size:90%; font-face:verdana,arial,helvetica,sans-serif; max-height: 24px;' class='forml' SIZE='1'>\n"; if ($connect_toutes_rubriques) { - echo "<OPTION".mySel("0",$id_parent)." style='background: url(img_pack/racine-site-12.gif) $spip_lang_left no-repeat; background-color:$couleur_foncee; padding-$spip_lang_left: 16px; font-weight:bold; color:white;'>"._T('info_racine_site')."\n"; + echo "<OPTION".mySel("0",$id_parent). http_style_background('racine-site-12.gif', "$spip_lang_left no-repeat; background-color:$couleur_foncee; padding-$spip_lang_left: 16px; font-weight:bold; color:white") .'>'._T('info_racine_site')."\n"; } else { echo "<OPTION".mySel("0",$id_parent).">"._T('info_non_deplacer')."\n"; } diff --git a/ecrire/sites_edit.php3 b/ecrire/sites_edit.php3 index 1574bd2c62..1f524b65e6 100644 --- a/ecrire/sites_edit.php3 +++ b/ecrire/sites_edit.php3 @@ -65,13 +65,18 @@ function enfant($leparent){ for ($count = 0; $count <= $i; $count ++) $espace .= " "; } + $img = _DIR_IMG_PACK . 'rubrique-12.gif'; switch ($i) { case 1: $espace= ""; + $img = _DIR_IMG_PACK . 'secteur-12.gif'; $style .= "font-weight: bold;"; + $style .= "background-color: $couleur_claire;"; break; case 2: $style .= "color: #202020;"; + $style .= "font-weight: bold;"; + $style .= "border-bottom: 1px solid $couleur_claire;"; break; case 3: $style .= "color: #404040;"; @@ -86,19 +91,8 @@ function enfant($leparent){ $style .= "color: #A0A0A0;"; break; } - if ($i==1) { - $style .= "background: url(img_pack/secteur-12.gif) $spip_lang_left no-repeat;"; - $style .= "background-color: $couleur_claire;"; - $style .= "font-weight: bold;"; - } - else if ($i==2) { - $style .= "background: url(img_pack/rubrique-12.gif) $spip_lang_left no-repeat;"; - $style .= "border-bottom: 1px solid $couleur_claire;"; - $style .= "font-weight: bold;"; - } - else { - $style .= "background: url(img_pack/rubrique-12.gif) $spip_lang_left no-repeat;"; - } + + $style .= "background: url($img) $spip_lang_left no-repeat;"; if ($rubrique_acceptable) { if ($i == 1 && !$premier) echo "<OPTION VALUE='$my_rubrique'>\n"; // sert a separer les secteurs diff --git a/ecrire/spip_style.php3 b/ecrire/spip_style.php3 index f176debb3a..f6cd0fedd6 100644 --- a/ecrire/spip_style.php3 +++ b/ecrire/spip_style.php3 @@ -1159,7 +1159,7 @@ div.brouteur_rubrique { border-bottom: 1px solid <?php echo $couleur_foncee; ?>; border-left: 1px solid <?php echo $couleur_foncee; ?>; border-right: 1px solid <?php echo $couleur_foncee; ?>; - background: url(<?php echo http_img_pack('triangle-droite'. $_rtl . 'gif'), ')', $right; ?> center no-repeat; + background: url(<?php echo http_img_pack('triangle-droite'. $_rtl . '.gif'), ')', $right; ?> center no-repeat; background-color: white; } @@ -1171,7 +1171,7 @@ div.brouteur_rubrique_on { border-bottom: 1px solid <?php echo $couleur_foncee; ?>; border-left: 1px solid <?php echo $couleur_foncee; ?>; border-right: 1px solid <?php echo $couleur_foncee; ?>; - background: url(<?php echo http_img_pack('triangle-droite' . $_rtl . 'gif'), ')', $right; ?> center no-repeat; + background: url(<?php echo http_img_pack('triangle-droite' . $_rtl . '.gif'), ')', $right; ?> center no-repeat; background-color: #e0e0e0; } diff --git a/inc-calcul-outils.php3 b/inc-calcul-outils.php3 index 5463ed9f68..e253c44410 100644 --- a/inc-calcul-outils.php3 +++ b/inc-calcul-outils.php3 @@ -39,7 +39,6 @@ function calcule_logo($type, $onoff, $id, $id_rubrique, $lien, $align, $ff){ ); $type = $table_logos[$type]; $nom = strtolower($onoff); - spip_log("$type, $onoff, $id, $id_rubrique, $lien, $align, $ff"); # attention au cas $id = '0' pour LOGO_SITE_SPIP : utiliser intval() while (1) { $on = cherche_image_nommee($type . $nom . intval($id)); diff --git a/spip_image.php3 b/spip_image.php3 index 9d2b9ac5f2..36f4c53d77 100644 --- a/spip_image.php3 +++ b/spip_image.php3 @@ -19,7 +19,6 @@ function copier_document($ext, $orig, $source) { $n = 0; while (@file_exists($newFile = $dest.($n++ ? '-'.$n : '').'.'.$ext)); $r = deplacer_fichier_upload($source, $newFile); - spip_log("ajout_doc: copie de $source dans $newFile impossible"); return (!$r ? '' : $newFile); } @@ -255,7 +254,7 @@ function ajout_doc($orig, $source, $mode, $id_document) { // Preparation if ($mode == 'vignette') { $id_document_lie = $id_document; - $query = "UPDATE spip_documents SET mode='document' where id_document=$id_document_lie"; + $query = "UPDATE spip_documents SET mode='document' where id_document='$id_document_lie'"; spip_query($query); // requete inutile a mon avis (Fil)... $id_document = 0; } -- GitLab