Changeset 96105 in spip-zone
- Timestamp:
- Mar 20, 2016, 8:06:10 PM (4 years ago)
- Location:
- _squelettes_/eva-web/4_2/eva_habillage
- Files:
-
- 104 edited
Legend:
- Unmodified
- Added
- Removed
-
_squelettes_/eva-web/4_2/eva_habillage/balise/evaflashlogobascode.php
r23638 r96105 4 4 $envoi=''; 5 5 while ($row = sql_fetch($titre)) { 6 $envoi.='<li>';7 $envoi.='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab';8 if (isset($row['repetition'])) {$envoi.='#version='.$row['repetition'];}9 $envoi.='" width="'.$row['pos_x'].'" height="'.$row['pos_y'].'" align="middle">';10 $envoi.="\n";11 $envoi.='<param name="movie" value="'._DIR_IMG.'eva_habillage/flash/'.$row['nom_image'].'" align="middle">';12 $envoi.="\n";13 $envoi.='<param name="quality" value="high">';14 $envoi.="\n";15 $envoi.='<embed src="'._DIR_IMG.'eva_habillage/flash/'.$row['nom_image'].'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'.$row['pos_x'].'" height="'.$row['pos_y'].'"></embed></object>';;16 $envoi.='</li>';6 $envoi.='<li>'; 7 $envoi.='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab'; 8 if (isset($row['repetition'])) {$envoi.='#version='.$row['repetition'];} 9 $envoi.='" width="'.$row['pos_x'].'" height="'.$row['pos_y'].'" align="middle">'; 10 $envoi.="\n"; 11 $envoi.='<param name="movie" value="'._DIR_IMG.'eva_habillage/flash/'.$row['nom_image'].'" align="middle">'; 12 $envoi.="\n"; 13 $envoi.='<param name="quality" value="high">'; 14 $envoi.="\n"; 15 $envoi.='<embed src="'._DIR_IMG.'eva_habillage/flash/'.$row['nom_image'].'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'.$row['pos_x'].'" height="'.$row['pos_y'].'"></embed></object>';; 16 $envoi.='</li>'; 17 17 } 18 18 $p->code = "'".$envoi."'"; -
_squelettes_/eva-web/4_2/eva_habillage/balise/evaflashlogobloccode.php
r23638 r96105 4 4 $envoi=''; 5 5 while ($row = sql_fetch($titre)) { 6 $envoi.='<li><center>';7 $envoi.='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab';8 if (isset($row['repetition'])) {$envoi.='#version='.$row['repetition'];}9 $envoi.='" width="'.$row['pos_x'].'" height="'.$row['pos_y'].'" align="center">';10 $envoi.="\n";11 $envoi.='<param name="movie" value="'._DIR_IMG.'eva_habillage/flash/'.$row['nom_image'].'" align="center">';12 $envoi.="\n";13 $envoi.='<param name="quality" value="high">';14 $envoi.="\n";15 $envoi.='<embed src="'._DIR_IMG.'eva_habillage/flash/'.$row['nom_image'].'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'.$row['pos_x'].'" height="'.$row['pos_y'].'"></embed></object>';;16 $envoi.='</center></li>';6 $envoi.='<li><center>'; 7 $envoi.='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab'; 8 if (isset($row['repetition'])) {$envoi.='#version='.$row['repetition'];} 9 $envoi.='" width="'.$row['pos_x'].'" height="'.$row['pos_y'].'" align="center">'; 10 $envoi.="\n"; 11 $envoi.='<param name="movie" value="'._DIR_IMG.'eva_habillage/flash/'.$row['nom_image'].'" align="center">'; 12 $envoi.="\n"; 13 $envoi.='<param name="quality" value="high">'; 14 $envoi.="\n"; 15 $envoi.='<embed src="'._DIR_IMG.'eva_habillage/flash/'.$row['nom_image'].'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'.$row['pos_x'].'" height="'.$row['pos_y'].'"></embed></object>';; 16 $envoi.='</center></li>'; 17 17 } 18 18 $p->code = "'".$envoi."'"; -
_squelettes_/eva-web/4_2/eva_habillage/balise/evaflashpied.php
r52480 r96105 5 5 if ($titre_result['nom_image']=='') {return;} 6 6 else { 7 $envoi='<div style="text-align:center;"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab';8 if (isset($titre_result['repetition'])) {$envoi.='#version='.$titre_result['repetition'];}9 $envoi.='" width="'.$titre_result['pos_x'].'" height="'.$titre_result['pos_y'].'">';10 $envoi.="\n";11 $envoi.='<param name="movie" value="'._DIR_IMG.'eva_habillage/flash/'.$titre_result['nom_image'].'" />';12 $envoi.="\n";13 $envoi.='<param name="quality" value="high" />';14 $envoi.="\n";15 $envoi.='<embed src="'._DIR_IMG.'eva_habillage/flash/'.$titre_result['nom_image'].'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'.$titre_result['pos_x'].'" height="'.$titre_result['pos_y'].'"></embed></object></div>';16 $p->code = "'".$envoi."'";17 $p->interdire_scripts = false;18 return $p;7 $envoi='<div style="text-align:center;"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab'; 8 if (isset($titre_result['repetition'])) {$envoi.='#version='.$titre_result['repetition'];} 9 $envoi.='" width="'.$titre_result['pos_x'].'" height="'.$titre_result['pos_y'].'">'; 10 $envoi.="\n"; 11 $envoi.='<param name="movie" value="'._DIR_IMG.'eva_habillage/flash/'.$titre_result['nom_image'].'" />'; 12 $envoi.="\n"; 13 $envoi.='<param name="quality" value="high" />'; 14 $envoi.="\n"; 15 $envoi.='<embed src="'._DIR_IMG.'eva_habillage/flash/'.$titre_result['nom_image'].'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'.$titre_result['pos_x'].'" height="'.$titre_result['pos_y'].'"></embed></object></div>'; 16 $p->code = "'".$envoi."'"; 17 $p->interdire_scripts = false; 18 return $p; 19 19 } 20 20 } -
_squelettes_/eva-web/4_2/eva_habillage/balise/evaflashtitre.php
r52478 r96105 5 5 if ($titre_result['nom_image']=='') {return;} 6 6 else { 7 $envoi='<div style="text-align:center;"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab';8 if (isset($titre_result['repetition'])) {$envoi.='#version='.$titre_result['repetition'];}9 $envoi.='" width="'.$titre_result['pos_x'].'" height="'.$titre_result['pos_y'].'">';10 $envoi.="\n";11 $envoi.='<param name="movie" value="'._DIR_IMG.'eva_habillage/flash/'.$titre_result['nom_image'].'" />';12 $envoi.="\n";13 $envoi.='<param name="quality" value="high" />';14 $envoi.="\n";15 $envoi.='<embed src="'._DIR_IMG.'eva_habillage/flash/'.$titre_result['nom_image'].'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'.$titre_result['pos_x'].'" height="'.$titre_result['pos_y'].'"></embed></object></div>';16 $p->code = "'".$envoi."'";17 $p->interdire_scripts = false;18 return $p;7 $envoi='<div style="text-align:center;"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab'; 8 if (isset($titre_result['repetition'])) {$envoi.='#version='.$titre_result['repetition'];} 9 $envoi.='" width="'.$titre_result['pos_x'].'" height="'.$titre_result['pos_y'].'">'; 10 $envoi.="\n"; 11 $envoi.='<param name="movie" value="'._DIR_IMG.'eva_habillage/flash/'.$titre_result['nom_image'].'" />'; 12 $envoi.="\n"; 13 $envoi.='<param name="quality" value="high" />'; 14 $envoi.="\n"; 15 $envoi.='<embed src="'._DIR_IMG.'eva_habillage/flash/'.$titre_result['nom_image'].'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'.$titre_result['pos_x'].'" height="'.$titre_result['pos_y'].'"></embed></object></div>'; 16 $p->code = "'".$envoi."'"; 17 $p->interdire_scripts = false; 18 return $p; 19 19 } 20 20 } 21 22 21 ?> -
_squelettes_/eva-web/4_2/eva_habillage/balise/evahabillage.php
r86302 r96105 38 38 if (strpos($image_cle, 'image_')!==FALSE){ 39 39 if ($f = find_in_path("eva_habillage/" . $tab_image_def['nom_image']) 40 41 40 OR file_exists($f=_DIR_IMG . "eva_habillage/" . $tab_image_def['nom_image']) 41 OR file_exists($f=_DIR_PLUGIN_EVA_HABILLAGE . "mon_image/" . $tab_image_def['nom_image']) ){ 42 42 $envoi .= implode(' , ', $image_val); 43 43 $envoi .= " {background-image : url($f);"; … … 48 48 } elseif (strpos($image_cle, 'liste_')!==FALSE) { 49 49 if ($f = find_in_path("eva_habillage/" . $tab_image_def['nom_image']) 50 51 50 OR file_exists($f=_DIR_IMG . "eva_habillage/" . $tab_image_def['nom_image']) 51 OR file_exists($f=_DIR_PLUGIN_EVA_HABILLAGE . "mon_image/" . $tab_image_def['nom_image']) ){ 52 52 $envoi .= implode(', ', $image_val); 53 53 $envoi .= " {list-style-image : url($f);"; … … 92 92 return $p; 93 93 } 94 95 94 ?> -
_squelettes_/eva-web/4_2/eva_habillage/balise/evamenudepliant.php
r23982 r96105 2 2 function balise_EVAMENUDEPLIANT($p) { 3 3 $flux = '<script type="text/javascript" src="'._DIR_PLUGIN_EVA_HABILLAGE.'javascript/menu_depliant.js"></script> 4 <style type="text/css">5 #sommaire {6 border:1px solid #ccc;7 -moz-border-radius: 12px;8 background-color:#F4F4F4;4 <style type="text/css"> 5 #sommaire { 6 border:1px solid #ccc; 7 -moz-border-radius: 12px; 8 background-color:#F4F4F4; 9 9 } 10 #sommaire, #sommaire li, #sommaire li ul { 11 margin: 0; 12 padding : 0; 13 list-style : none; 10 #sommaire, #sommaire li, #sommaire li ul { 11 margin: 0; 12 padding : 0; 13 list-style : none; 14 } 15 #sommaire * { 16 font-size : 14px; 17 text-decoration : none; 18 } 19 #sommaire li { 20 list-style-position: inside; 21 margin-left:22px; 22 vertical-align : top; 23 } 24 #sommaire li a { 25 height : 10px; 26 } 27 #sommaire .noeud { 28 list-style-image:url('._DIR_PLUGIN_EVA_HABILLAGE.'img_pack/deplierbas.gif); 29 } 30 #sommaire .plier { 31 list-style-image:url('._DIR_PLUGIN_EVA_HABILLAGE.'img_pack/deplierhaut.gif); 32 } 33 #sommaire .plier > ul { 34 display : none; 35 } 36 #sommaire .pliermsie { 37 display : none; 38 } 39 #sommaire a.noeud { 40 margin-left : -12px; 41 width : 10px; 42 height : 10px; 43 text-decoration: none ; 44 background-image:url('._DIR_PLUGIN_EVA_HABILLAGE.'img_pack/invisible.gif); 45 } 46 #sommaire .feuille { 47 list-style-type : square; 48 color : black; 49 } 50 #sommaire .on { 51 color : red; 52 } 53 /* suivi du fil actif */ 54 #sommaire .noeud.on,#sommaire .feuille.on{ 55 list-style-image:url('._DIR_PLUGIN_EVA_HABILLAGE.'img_pack/puceon.gif); 56 } 57 /* suivi du fil actif */ 58 #sommaire ul.on{ 59 display : block; 60 } 61 ul#sommaire a { 62 display:inline;} 63 </style>'; 64 65 $p->code = "'".$flux."'"; 66 $p->interdire_scripts = false; 67 return $p; 14 68 } 15 #sommaire * {16 font-size : 14px;17 text-decoration : none;18 }19 #sommaire li {20 list-style-position: inside;21 margin-left:22px;22 vertical-align : top;23 }24 #sommaire li a {25 height : 10px;26 }27 #sommaire .noeud {28 list-style-image:url('._DIR_PLUGIN_EVA_HABILLAGE.'img_pack/deplierbas.gif);29 }30 #sommaire .plier {31 list-style-image:url('._DIR_PLUGIN_EVA_HABILLAGE.'img_pack/deplierhaut.gif);32 }33 #sommaire .plier > ul {34 display : none;35 }36 #sommaire .pliermsie {37 display : none;38 }39 #sommaire a.noeud {40 margin-left : -12px;41 width : 10px;42 height : 10px;43 text-decoration: none ;44 background-image:url('._DIR_PLUGIN_EVA_HABILLAGE.'img_pack/invisible.gif);45 }46 #sommaire .feuille {47 list-style-type : square;48 color : black;49 }50 #sommaire .on {51 color : red;52 }53 /* suivi du fil actif */54 #sommaire .noeud.on,#sommaire .feuille.on{55 list-style-image:url('._DIR_PLUGIN_EVA_HABILLAGE.'img_pack/puceon.gif);56 }57 /* suivi du fil actif */58 #sommaire ul.on{59 display : block;60 }61 ul#sommaire a {62 display:inline;}63 </style>';64 65 $p->code = "'".$flux."'";66 $p->interdire_scripts = false;67 return $p;68 }69 70 69 ?> -
_squelettes_/eva-web/4_2/eva_habillage/base/eva_habillage_base.php
r23638 r96105 1 1 <?php 2 2 $EvaHabillageTable = array( 3 "id_habillage" => "INTEGER NOT NULL AUTO_INCREMENT", 4 "habillage" => "TEXT NOT NULL", 5 "sauvegarde" => "TEXT NOT NULL"); 3 "id_habillage" => "INTEGER NOT NULL AUTO_INCREMENT", 4 "habillage" => "TEXT NOT NULL", 5 "sauvegarde" => "TEXT NOT NULL" 6 ); 6 7 7 8 $EvaHabillageTable_key = array( 8 "PRIMARY KEY" => "id_habillage"); 9 "PRIMARY KEY" => "id_habillage" 10 ); 9 11 10 12 $EvaHabillageTable_themes = array( 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 13 "id" => "INTEGER NOT NULL AUTO_INCREMENT", 14 "nom" => "TEXT NOT NULL", 15 "fond_ecran" => "TEXT NOT NULL", 16 "fond_page" => "TEXT NOT NULL", 17 "fond_bloc" => "TEXT NOT NULL", 18 "fond_edito" => "TEXT NOT NULL", 19 "fond_titre_edito" => "TEXT NOT NULL", 20 "fond_entete_pages" => "TEXT NOT NULL", 21 "fond_barres_entete" => "TEXT NOT NULL", 22 "fond_barres_entete_arborescence" => "TEXT NOT NULL", 23 "fond_barres_entete_auteur" => "TEXT NOT NULL", 24 "fond_barres_entete_texte" => "TEXT NOT NULL", 25 "fond_titre_article" => "TEXT NOT NULL", 26 "fond_pied_pages" => "TEXT NOT NULL", 27 "fond_pied_logos" => "TEXT NOT NULL", 28 "fond_titres" => "TEXT NOT NULL", 29 "fond_menu_fond" => "TEXT NOT NULL", 30 "fond_menu_off" => "TEXT NOT NULL", 31 "fond_menu_on" => "TEXT NOT NULL", 32 "fond_liste_elements_impairs" => "TEXT NOT NULL", 33 "fond_liste_elements_pairs" => "TEXT NOT NULL", 34 "texte_police_type" => "TEXT NOT NULL", 35 "texte_principal" => "TEXT NOT NULL", 36 "texte_liste_paire" => "TEXT NOT NULL", 37 "texte_liste_impaire" => "TEXT NOT NULL", 38 "texte_entetes" => "TEXT NOT NULL", 39 "texte_surtitre" => "TEXT NOT NULL", 40 "texte_titre" => "TEXT NOT NULL", 41 "texte_soustitre" => "TEXT NOT NULL", 42 "texte_couleur_liens_menu" => "TEXT NOT NULL", 43 "texte_couleur_liens_menu_actif" => "TEXT NOT NULL", 44 "texte_couleur_liens_menu_survol" => "TEXT NOT NULL", 45 "texte_barres_entete" => "TEXT NOT NULL", 46 "texte_premiere_lettre_entete" => "TEXT NOT NULL", 47 "texte_edito" => "TEXT NOT NULL", 48 "texte_edito_titre" => "TEXT NOT NULL", 49 "texte_edito_titre_premier" => "TEXT NOT NULL", 50 "texte_entete_arborescence" => "TEXT NOT NULL", 51 "texte_auteur" => "TEXT NOT NULL", 52 "texte_pied" => "TEXT NOT NULL", 53 "lien_couleur_lien" => "TEXT NOT NULL", 54 "lien_couleur_lien_survol" => "TEXT NOT NULL", 55 "lien_couleur_lien_impair" => "TEXT NOT NULL", 56 "lien_couleur_lien_impair_survol" => "TEXT NOT NULL", 57 "lien_couleur_lien_pair" => "TEXT NOT NULL", 58 "lien_couleur_lien_pair_survol" => "TEXT NOT NULL", 59 "bordure_page" => "TEXT NOT NULL", 60 "bordure_largeur_page" => "TEXT NOT NULL", 61 "bordure_style_page" => "TEXT NOT NULL", 62 "bordure_couleur_bordure" => "TEXT NOT NULL", 63 "bordure_largeur_couleur_bordure" => "TEXT NOT NULL", 64 "bordure_style_couleur_bordure" => "TEXT NOT NULL", 65 "bordure_couleur_bordure_entete" => "TEXT NOT NULL", 66 "bordure_largeur_couleur_bordure_entete" => "TEXT NOT NULL", 67 "bordure_style_couleur_bordure_entete" => "TEXT NOT NULL", 68 "bordure_couleur_titre" => "TEXT NOT NULL", 69 "bordure_largeur_titre" => "TEXT NOT NULL", 70 "bordure_style_titre" => "TEXT NOT NULL", 71 "bordure_couleur_bordure_auteur" => "TEXT NOT NULL", 72 "bordure_largeur_couleur_bordure_auteur" => "TEXT NOT NULL", 73 "bordure_style_couleur_bordure_auteur" => "TEXT NOT NULL", 74 "bordure_couleur_bordure_edito" => "TEXT NOT NULL", 75 "bordure_largeur_couleur_bordure_edito" => "TEXT NOT NULL", 76 "bordure_style_couleur_bordure_edito" => "TEXT NOT NULL", 77 "bordure_couleur_bordure_pied" => "TEXT NOT NULL", 78 "bordure_largeur_couleur_bordure_pied" => "TEXT NOT NULL", 79 "bordure_style_couleur_bordure_pied" => "TEXT NOT NULL", 80 "bordure_couleur_bordure_menu" => "TEXT NOT NULL", 81 "bordure_largeur_couleur_bordure_menu" => "TEXT NOT NULL", 82 "bordure_style_couleur_bordure_menu" => "TEXT NOT NULL", 83 "bordure_couleur_bordure_menu_secteurs" => "TEXT NOT NULL", 84 "bordure_largeur_couleur_bordure_menu_secteurs" => "TEXT NOT NULL", 85 "bordure_style_couleur_bordure_menu_secteurs" => "TEXT NOT NULL", 86 "taille_largeur_page" => "TEXT NOT NULL", 87 "taille_largeur_menu" => "TEXT NOT NULL", 88 "taille_largeur_menudroite" => "TEXT NOT NULL", 89 "taille_largeur_contenu" => "TEXT NOT NULL", 90 "taille_hauteur_entete" => "TEXT NOT NULL", 91 "admin_deplacement_horizontal_bouton_admin" => "TEXT NOT NULL", 92 "admin_deplacement_vertical_bouton_admin" => "TEXT NOT NULL" 93 ); 92 94 93 95 $EvaHabillageTable_themes_key = array( 94 "PRIMARY KEY" => "id"); 96 "PRIMARY KEY" => "id" 97 ); 95 98 96 99 $EvaHabillageTable_images = array( 97 98 99 100 101 102 103 104 105 106 100 "id" => "INTEGER NOT NULL AUTO_INCREMENT", 101 "type" => "TEXT NOT NULL", 102 "nom_habillage" => "TEXT NOT NULL", 103 "nom_div" => "TEXT NOT NULL", 104 "nom_image" => "TEXT NOT NULL", 105 "pos_x" => "TEXT NOT NULL", 106 "pos_y" => "TEXT NOT NULL", 107 "repetition" => "TEXT NOT NULL", 108 "attach" => "TEXT NOT NULL" 109 ); 107 110 108 111 $EvaHabillageTable_images_key = array( 109 "PRIMARY KEY" => "id");112 "PRIMARY KEY" => "id"); 110 113 111 114 $GLOBALS['tables_principales']['spip_eva_habillage'] = 112 113 115 array('field' => &$EvaHabillageTable, 'key' => &$EvaHabillageTable_key); 116 114 117 $GLOBALS['tables_principales']['spip_eva_habillage_themes'] = 115 116 118 array('field' => &$EvaHabillageTable_themes, 'key' => &$EvaHabillageTable_themes_key); 119 117 120 $GLOBALS['tables_principales']['spip_eva_habillage_images'] = 118 121 array('field' => &$EvaHabillageTable_images, 'key' => &$EvaHabillageTable_images_key); 119 122 120 123 ?> -
_squelettes_/eva-web/4_2/eva_habillage/base/eva_habillage_base_patch.php
r37095 r96105 1 1 <?php 2 2 function eva_habillage_patch_table() { 3 $Table1 = 'spip_eva_habillage'; 4 $Table2 = 'spip_eva_habillage_themes'; 5 $Table3 = 'spip_eva_habillage_images'; 6 $test=sql_showtable('eva_habillage',true); 7 if ($test['field']) { 8 $eva_verif_ancien = sql_select('id_habillage','eva_habillage',"sauvegarde = 'Defaut'"); 9 $eva_ver_tab_ancien = sql_fetch($eva_verif_ancien); 10 $id_habillage_ancien = $eva_ver_tab_ancien['id_habillage']; 11 if (isset($id_habillage_ancien)) { 12 $eva_verif_nouveau = sql_select('id_habillage','spip_eva_habillage',"sauvegarde = 'Defaut'"); 13 $eva_ver_tab_nouveau = sql_fetch($eva_verif_nouveau); 14 $id_habillage_nouveau = $eva_ver_tab_nouveau['id_habillage']; 15 if (!isset($id_habillage_nouveau)) { 16 sql_query('RENAME TABLE eva_habillage TO '.$Table1); 17 sql_query('RENAME TABLE eva_habillage_themes TO '.$Table2); 18 sql_query('RENAME TABLE eva_habillage_images TO '.$Table3); 3 $Table1 = 'spip_eva_habillage'; 4 $Table2 = 'spip_eva_habillage_themes'; 5 $Table3 = 'spip_eva_habillage_images'; 6 $test=sql_showtable('eva_habillage',true); 7 if ($test['field']) { 8 $eva_verif_ancien = sql_select('id_habillage','eva_habillage',"sauvegarde = 'Defaut'"); 9 $eva_ver_tab_ancien = sql_fetch($eva_verif_ancien); 10 $id_habillage_ancien = $eva_ver_tab_ancien['id_habillage']; 11 if (isset($id_habillage_ancien)) { 12 $eva_verif_nouveau = sql_select('id_habillage','spip_eva_habillage',"sauvegarde = 'Defaut'"); 13 $eva_ver_tab_nouveau = sql_fetch($eva_verif_nouveau); 14 $id_habillage_nouveau = $eva_ver_tab_nouveau['id_habillage']; 15 if (!isset($id_habillage_nouveau)) { 16 sql_query('RENAME TABLE eva_habillage TO '.$Table1); 17 sql_query('RENAME TABLE eva_habillage_themes TO '.$Table2); 18 sql_query('RENAME TABLE eva_habillage_images TO '.$Table3); 19 } 20 } 19 21 } 20 22 } 21 }22 }23 23 ?> -
_squelettes_/eva-web/4_2/eva_habillage/eva_habillage_administrations.php
r63057 r96105 1 1 <?php 2 2 function eva_habillage_install($action){ 3 3 4 4 $Table1 = 'spip_eva_habillage'; 5 5 $Table2 = 'spip_eva_habillage_themes'; 6 6 $Table3 = 'spip_eva_habillage_images'; 7 7 switch ($action){ 8 9 case 'install':10 include_spip('base/eva_habillage_base_patch');11 eva_habillage_patch_table();12 include_spip('base/eva_habillage_base');13 include_spip('base/create');14 creer_base();15 $eva_verif = sql_select("id_habillage",$Table1,"sauvegarde = 'Defaut'");16 $eva_ver_tab = sql_fetch($eva_verif);17 $eva_id_habillage = $eva_ver_tab['id_habillage'];18 if (!isset($eva_id_habillage)) {19 sql_insertq($Table1,array('habillage' => 'eva4_menu_gauche.css','sauvegarde' => 'Defaut'));20 sql_insertq($Table2,array('nom'=>'Defaut'));}21 ecrire_meta('eva_habillage_base_version','0.3');22 $test_eva=$GLOBALS['meta']['eva_habillage_base_version'];23 if (!@opendir(_DIR_IMG."eva_habillage")) {mkdir(_DIR_IMG."eva_habillage");}24 if (!@opendir(_DIR_IMG."eva_habillage/flash")) {mkdir(_DIR_IMG."eva_habillage/flash");}25 if (!@opendir(_DIR_IMG."eva_habillage/favicon")) {mkdir(_DIR_IMG."eva_habillage/favicon");}26 $Table1 = 'spip_eva_habillage';27 $Table2 = 'spip_eva_habillage_themes';28 $Table3 = 'spip_eva_habillage_images';29 $eva_verif_table1=sql_select('id_habillage',$Table1,"sauvegarde = 'Defaut'");30 $eva_verif_table1_tab=sql_fetch($eva_verif_table1);31 $id_verif_table1=$eva_verif_table1_tab['id_habillage'];32 if (!$id_verif_table1) {sql_insertq($Table1,array('habillage' => 'eva4_menu_gauche.css','sauvegarde' => 'Defaut'));}33 $eva_verif_table2=sql_select('id',$Table2,"nom = 'Defaut'");34 $eva_verif_table2_tab=sql_fetch($eva_verif_table2);35 $id_verif_table2=$eva_verif_table2_tab['id'];36 if (!$id_verif_table2) {sql_insertq($Table2,array('nom'=>'Defaut'));}37 ecrire_meta('eva_habillage_base_version','0.4');38 39 //Préparation à la modlarité40 $test_eva=$GLOBALS['meta']['eva_habillage_base_version'];41 //On commence par la page de sommaire42 include_spip('inc/eva_habillage_transition_module');43 eva_habillage_transition_module();44 ecrire_meta('eva_habillage_base_version','0.5');45 break;46 47 case 'test':48 $test_eva=$GLOBALS['meta']['eva_habillage_base_version'];49 include_spip('base/eva_habillage_base_patch');50 eva_habillage_patch_table();51 if (!$GLOBALS['meta']['eva_habillage_base_version']) {return false;}52 else {53 include_spip('base/eva_habillage_base');54 include_spip('base/create');55 creer_base();56 $eva_verif = sql_select("id_habillage",$Table1,"sauvegarde = 'Defaut'");57 $eva_ver_tab = sql_fetch($eva_verif);58 $eva_id_habillage = $eva_ver_tab['id_habillage'];59 if (!isset($eva_id_habillage)) {60 sql_insertq($Table1,array('habillage' => 'eva4_menu_gauche.css','sauvegarde' => 'Defaut'));61 sql_insertq($Table2,array('nom'=>'Defaut'));}62 $test_eva=$GLOBALS['meta']['eva_habillage_base_version'];63 if (!@opendir(_DIR_IMG."eva_habillage")) {mkdir(_DIR_IMG."eva_habillage");}64 if (!@opendir(_DIR_IMG."eva_habillage/flash")) {mkdir(_DIR_IMG."eva_habillage/flash");}65 if (!@opendir(_DIR_IMG."eva_habillage/favicon")) {mkdir(_DIR_IMG."eva_habillage/favicon");}66 $Table1 = 'spip_eva_habillage';67 $Table2 = 'spip_eva_habillage_themes';68 $Table3 = 'spip_eva_habillage_images';69 $eva_verif_table1=sql_select('id_habillage',$Table1,"sauvegarde = 'Defaut'");70 $eva_verif_table1_tab=sql_fetch($eva_verif_table1);71 $id_verif_table1=$eva_verif_table1_tab['id_habillage'];72 if (!$id_verif_table1) {sql_insertq($Table1,array('habillage' => 'eva4_menu_gauche.css','sauvegarde' => 'Defaut'));}73 $eva_verif_table2=sql_select('id',$Table2,"nom = 'Defaut'");74 $eva_verif_table2_tab=sql_fetch($eva_verif_table2);75 $id_verif_table2=$eva_verif_table2_tab['id'];76 if (!$id_verif_table2) {sql_insertq($Table2,array('nom'=>'Defaut'));}77 ecrire_meta('eva_habillage_base_version','0.4');78 79 //Préparation à la modlarité80 $test_eva=$GLOBALS['meta']['eva_habillage_base_version'];81 //On commence par la page de sommaire82 include_spip('inc/eva_habillage_transition_module');83 eva_habillage_transition_module();84 ecrire_meta('eva_habillage_base_version','0.5');85 8 86 //Préparation au multilinguisme 87 $test_eva=$GLOBALS['meta']['eva_habillage_base_version']; 88 if ($test_eva=='0.5') { 89 $test_langue = sql_select("id","spip_eva_habillage_images","type='fichier_lang' AND attach=''"); 90 while ($tab = sql_fetch($test_langue)) { 91 sql_updateq('spip_eva_habillage_images',array('attach'=>utiliser_langue_site()),"id='".$tab['id']."'"); 9 case 'install': 10 include_spip('base/eva_habillage_base_patch'); 11 eva_habillage_patch_table(); 12 include_spip('base/eva_habillage_base'); 13 include_spip('base/create'); 14 creer_base(); 15 $eva_verif = sql_select("id_habillage",$Table1,"sauvegarde = 'Defaut'"); 16 $eva_ver_tab = sql_fetch($eva_verif); 17 $eva_id_habillage = $eva_ver_tab['id_habillage']; 18 if (!isset($eva_id_habillage)) { 19 sql_insertq($Table1,array('habillage' => 'eva4_menu_gauche.css','sauvegarde' => 'Defaut')); 20 sql_insertq($Table2,array('nom'=>'Defaut'));} 21 ecrire_meta('eva_habillage_base_version','0.3'); 22 $test_eva=$GLOBALS['meta']['eva_habillage_base_version']; 23 if (!@opendir(_DIR_IMG."eva_habillage")) {mkdir(_DIR_IMG."eva_habillage");} 24 if (!@opendir(_DIR_IMG."eva_habillage/flash")) {mkdir(_DIR_IMG."eva_habillage/flash");} 25 if (!@opendir(_DIR_IMG."eva_habillage/favicon")) {mkdir(_DIR_IMG."eva_habillage/favicon");} 26 $Table1 = 'spip_eva_habillage'; 27 $Table2 = 'spip_eva_habillage_themes'; 28 $Table3 = 'spip_eva_habillage_images'; 29 $eva_verif_table1=sql_select('id_habillage',$Table1,"sauvegarde = 'Defaut'"); 30 $eva_verif_table1_tab=sql_fetch($eva_verif_table1); 31 $id_verif_table1=$eva_verif_table1_tab['id_habillage']; 32 if (!$id_verif_table1) {sql_insertq($Table1,array('habillage' => 'eva4_menu_gauche.css','sauvegarde' => 'Defaut'));} 33 $eva_verif_table2=sql_select('id',$Table2,"nom = 'Defaut'"); 34 $eva_verif_table2_tab=sql_fetch($eva_verif_table2); 35 $id_verif_table2=$eva_verif_table2_tab['id']; 36 if (!$id_verif_table2) {sql_insertq($Table2,array('nom'=>'Defaut'));} 37 ecrire_meta('eva_habillage_base_version','0.4'); 38 39 //Préparation à la modlarité 40 $test_eva=$GLOBALS['meta']['eva_habillage_base_version']; 41 //On commence par la page de sommaire 42 include_spip('inc/eva_habillage_transition_module'); 43 eva_habillage_transition_module(); 44 ecrire_meta('eva_habillage_base_version','0.5'); 45 break; 46 47 case 'test': 48 $test_eva=$GLOBALS['meta']['eva_habillage_base_version']; 49 include_spip('base/eva_habillage_base_patch'); 50 eva_habillage_patch_table(); 51 if (!$GLOBALS['meta']['eva_habillage_base_version']) {return false;} 52 else { 53 include_spip('base/eva_habillage_base'); 54 include_spip('base/create'); 55 creer_base(); 56 $eva_verif = sql_select("id_habillage",$Table1,"sauvegarde = 'Defaut'"); 57 $eva_ver_tab = sql_fetch($eva_verif); 58 $eva_id_habillage = $eva_ver_tab['id_habillage']; 59 if (!isset($eva_id_habillage)) { 60 sql_insertq($Table1,array('habillage' => 'eva4_menu_gauche.css','sauvegarde' => 'Defaut')); 61 sql_insertq($Table2,array('nom'=>'Defaut'));} 62 $test_eva=$GLOBALS['meta']['eva_habillage_base_version']; 63 if (!@opendir(_DIR_IMG."eva_habillage")) {mkdir(_DIR_IMG."eva_habillage");} 64 if (!@opendir(_DIR_IMG."eva_habillage/flash")) {mkdir(_DIR_IMG."eva_habillage/flash");} 65 if (!@opendir(_DIR_IMG."eva_habillage/favicon")) {mkdir(_DIR_IMG."eva_habillage/favicon");} 66 $Table1 = 'spip_eva_habillage'; 67 $Table2 = 'spip_eva_habillage_themes'; 68 $Table3 = 'spip_eva_habillage_images'; 69 $eva_verif_table1=sql_select('id_habillage',$Table1,"sauvegarde = 'Defaut'"); 70 $eva_verif_table1_tab=sql_fetch($eva_verif_table1); 71 $id_verif_table1=$eva_verif_table1_tab['id_habillage']; 72 if (!$id_verif_table1) {sql_insertq($Table1,array('habillage' => 'eva4_menu_gauche.css','sauvegarde' => 'Defaut'));} 73 $eva_verif_table2=sql_select('id',$Table2,"nom = 'Defaut'"); 74 $eva_verif_table2_tab=sql_fetch($eva_verif_table2); 75 $id_verif_table2=$eva_verif_table2_tab['id']; 76 if (!$id_verif_table2) {sql_insertq($Table2,array('nom'=>'Defaut'));} 77 ecrire_meta('eva_habillage_base_version','0.4'); 78 79 //Préparation à la modlarité 80 $test_eva=$GLOBALS['meta']['eva_habillage_base_version']; 81 //On commence par la page de sommaire 82 include_spip('inc/eva_habillage_transition_module'); 83 eva_habillage_transition_module(); 84 ecrire_meta('eva_habillage_base_version','0.5'); 85 86 //Préparation au multilinguisme 87 $test_eva=$GLOBALS['meta']['eva_habillage_base_version']; 88 if ($test_eva=='0.5') { 89 $test_langue = sql_select("id","spip_eva_habillage_images","type='fichier_lang' AND attach=''"); 90 while ($tab = sql_fetch($test_langue)) { 91 sql_updateq('spip_eva_habillage_images',array('attach'=>utiliser_langue_site()),"id='".$tab['id']."'"); 92 } 93 ecrire_meta('eva_habillage_base_version','0.6'); 94 } 95 return true; 92 96 } 93 ecrire_meta('eva_habillage_base_version','0.6'); 94 } 95 return true; 96 } 97 break; 98 99 case 'uninstall': 100 sql_query('DROP TABLE '.$Table1); 101 sql_query('DROP TABLE '.$Table2); 102 sql_query('DROP TABLE '.$Table3); 103 effacer_meta('eva_habillage_base_version'); 104 break; 97 break; 98 99 case 'uninstall': 100 sql_query('DROP TABLE '.$Table1); 101 sql_query('DROP TABLE '.$Table2); 102 sql_query('DROP TABLE '.$Table3); 103 effacer_meta('eva_habillage_base_version'); 104 break; 105 105 } 106 106 } -
_squelettes_/eva-web/4_2/eva_habillage/exec/eva_habillage.php
r59340 r96105 2 2 3 3 if (!defined("_ECRIRE_INC_VERSION")) return; 4 4 include_spip('inc/presentation'); 5 5 6 6 function exec_eva_habillage(){ 7 7 8 9 10 $path = _DIR_PLUGIN_EVASQUELETTES."images/vignettes_styles/";11 $path_evastyle = _DIR_PLUGIN_EVASQUELETTES."eva_styles/";12 } 13 14 15 16 17 18 19 20 21 22 23 8 $evaTable = "spip_eva_habillage"; 9 if (defined("_DIR_PLUGIN_EVASQUELETTES")) { 10 $path = _DIR_PLUGIN_EVASQUELETTES."images/vignettes_styles/"; 11 $path_evastyle = _DIR_PLUGIN_EVASQUELETTES."eva_styles/"; 12 } 13 else { 14 $path = "../squelettes/images/vignettes_styles/"; 15 $path_evastyle = "../squelettes/eva_styles/"; 16 } 17 $icone = _DIR_PLUGIN_EVA_HABILLAGE."img_pack/eva.gif"; 18 19 ?><SCRIPT LANGUAGE="JavaScript"> 20 function showColor(val) { 21 document.colorform.hexval.value = val; 22 } 23 </script><?php 24 24 $commencer_page = charger_fonction('commencer_page', 'inc'); 25 25 echo $commencer_page(_T('evahabillage:EVA_nom') , '', '', ''); 26 26 echo gros_titre(_T('evahabillage:EVA_nom'),'',false); 27 27 28 29 30 echo _T('avis_non_acces_page');31 echo fin_gauche(), fin_page();32 exit;33 } 28 global $connect_statut; 29 if ($GLOBALS['connect_statut'] != "0minirezo" OR !$GLOBALS["connect_toutes_rubriques"]) { 30 echo _T('avis_non_acces_page'); 31 echo fin_gauche(), fin_page(); 32 exit; 33 } 34 34 35 35 echo debut_gauche("",true); … … 39 39 echo eva_habillage_boutons('structure'); 40 40 41 42 sql_updateq('spip_eva_habillage',array('habillage' => $_POST['changement_habillage']),"sauvegarde = 'Defaut'");43 if (!strpos($_POST['changement_habillage'],'3colonnes')){44 $test_quitte_3colonnes=sql_select('id','spip_eva_habillage_images',"type='bloc' AND nom_habillage='Defaut' AND nom_image='droite'");45 while ($tab_quitte_3colonnes=sql_fetch($test_quitte_3colonnes)) {46 sql_updateq('spip_eva_habillage_images',array('nom_image'=>'gauche'),"id='".$tab_quitte_3colonnes['id']."'");47 }48 }49 50 51 52 53 54 55 56 57 58 59 60 41 if (isset($_POST['changement_habillage'])) { 42 sql_updateq('spip_eva_habillage',array('habillage' => $_POST['changement_habillage']),"sauvegarde = 'Defaut'"); 43 if (!strpos($_POST['changement_habillage'],'3colonnes')){ 44 $test_quitte_3colonnes=sql_select('id','spip_eva_habillage_images',"type='bloc' AND nom_habillage='Defaut' AND nom_image='droite'"); 45 while ($tab_quitte_3colonnes=sql_fetch($test_quitte_3colonnes)) { 46 sql_updateq('spip_eva_habillage_images',array('nom_image'=>'gauche'),"id='".$tab_quitte_3colonnes['id']."'"); 47 } 48 } 49 } 50 51 include_spip("inc/eva_habillage_definition_themes"); 52 $def_themes = eva_habillage_definition_themes (); 53 54 $test_fri=sql_select('id_habillage','spip_eva_habillage',"sauvegarde='Defaut'"); 55 $tab_fri=sql_fetch($test_fri); 56 if (!isset($tab_fri['id_habillage'])) {sql_insertq('spip_eva_habillage',array('habillage' => '0','sauvegarde' => 'Defaut'));} 57 58 $resultat1 = sql_select('habillage','spip_eva_habillage',"sauvegarde = 'Defaut'"); 59 $resultat1_tableau = sql_fetch($resultat1); 60 $mon_habillage = $resultat1_tableau['habillage']; 61 61 62 62 // Premier Module - Choix de l'habillage de base … … 65 65 <!-- 66 66 if(document.images){ 67 newvign = new Array()68 69 70 71 67 newvign = new Array() 68 newvign["eva_style.png"] = new Image() 69 newvign["eva_style.png"].src = "eva_style.png" 70 newvign[0] = new Image() 71 newvign[0].src = "eva_style.png" 72 72 } 73 73 74 74 function affvign(){ 75 75 chemin = "<?php echo _DIR_PLUGIN_EVASQUELETTES.'images/vignettes_styles/'; ?>" 76 if(document.images){77 validevign=document.formvignette.changement_habillage.options[document.formvignette.changement_habillage.selectedIndex].value78 79 76 if(document.images){ 77 validevign=document.formvignette.changement_habillage.options[document.formvignette.changement_habillage.selectedIndex].value 78 document.vignetteaff.src = chemin+validevign+".png" 79 } 80 80 } 81 81 window.onerror = null; … … 83 83 </script> 84 84 <?php 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 $dir = opendir($path_evastyle);105 } 106 107 108 109 110 111 112 113 114 115 116 117 118 119 85 echo debut_cadre_trait_couleur(_DIR_PLUGIN_EVA_HABILLAGE."img_pack/image_pinceaux.png", true, '', _T('evahabillage:EVA_etape1')); 86 echo _T('evahabillage:EVA_a_penser').'<br />'; 87 echo '<div style="text-align:center;"><p>'. _T('evahabillage:EVA_actif'); 88 if ($mon_habillage=='0'){echo _T('evahabillage:EVA_style_defaut');} else {echo "<strong>".$mon_habillage."</strong>";} 89 echo '</p><br />'; 90 $image_habillage = preg_replace('/.css/','.png',$mon_habillage); 91 if ($image_habillage=='0') {$image_habillage='eva_style.png';} 92 if (file_exists($path.$image_habillage)) { 93 echo '<img name = "vignetteaff" src="'.$path.$image_habillage.'" style="border:#AAA solid 5px;" alt=""/><br />'; 94 } 95 else { 96 echo '<img name = "vignetteaff" src="'.$path.'eva_style.png" style="border:#AAA solid 5px;" alt=""/><br />'; 97 } 98 99 echo '<br />'._T('evahabillage:EVA_choix').'<br /> <br />'; 100 echo '<form method="POST" name ="formvignette" action="'.generer_url_ecrire("eva_habillage").'">';?> 101 <select name="changement_habillage" onChange = "affvign()"><option value="0" <?php if ($mon_habillage=='0') {echo "selected";}?> > 102 <?php echo _T('evahabillage:EVA_style_defaut')."</option>"; 103 if (defined("_DIR_PLUGIN_EVASQUELETTES")) { 104 $dir = opendir($path_evastyle); 105 } 106 else { 107 $dir = opendir('../squelettes/eva_styles/'); 108 } 109 while ($nom_fichier = readdir($dir)) { 110 if (($nom_fichier!='.') AND ($nom_fichier!='..') AND ($nom_fichier!='.png') AND (strpos($nom_fichier,'.css'))) { 111 echo '<option value="'.$nom_fichier.'"'; 112 if ($mon_habillage==$nom_fichier) {echo ' selected ';} 113 echo '>'.$nom_fichier.'</option>'; 114 } 115 } 116 closedir($dir); 117 echo '</select><br /> <br /><input type="submit" value="'._T('evahabillage:EVA_choisir').'" >'; 118 echo "</form></div><br />"; 119 echo fin_cadre_trait_couleur(true); 120 120 121 121 // Choix des noisettes dans les colonnes 122 123 122 echo debut_cadre_trait_couleur(_DIR_PLUGIN_EVA_HABILLAGE."img_pack/blocs.png", true, '', _T('evahabillage:EVA_choix_bloc')); 123 124 124 $test_3cols=sql_select('habillage','spip_eva_habillage',"sauvegarde='Defaut'"); 125 125 $tab_3cols=sql_fetch($test_3cols); … … 144 144 } 145 145 } 146 146 147 147 $verif_post_bloc=sql_select('*','spip_eva_habillage_images',"type='bloc' AND nom_habillage='Defaut'"); 148 148 while ($tab_eva_bloc = sql_fetch($verif_post_bloc)) { … … 151 151 } 152 152 } 153 153 154 154 if ($_POST['eva_mon_bloc_perso_nom']) { 155 155 sql_insertq('spip_eva_habillage_images',array( … … 161 161 'repetition' => 'perso', 162 162 'attach' => $_POST['eva_mon_bloc_perso_skel'] 163 164 } 165 163 )); 164 } 165 166 166 if ($_POST['EVA_suppr_skel_perso']) { 167 167 sql_delete('spip_eva_habillage_images',"id='".$_POST['EVA_suppr_skel_perso']."'"); 168 168 } 169 169 170 170 $les_blocs_array = EVA_les_blocs(); 171 171 foreach ($les_blocs_array as $les_blocs=>$les_noisettes) { 172 172 173 echo bouton_block_depliable(_T('evahabillage:EVA_choix_bloc_'.$les_blocs),false,''); 174 echo debut_block_depliable(false); 175 176 echo '<form method="POST" action="'.generer_url_ecrire("eva_habillage").'">'; 177 echo '<table><tr valign="top">'; 178 if ($eva_gauche) { 179 echo "<th width=$eva_gauche>"; 180 echo debut_cadre_trait_couleur('', true, '', 'Colonne de gauche'); 181 $test_noisettes=sql_select('*','spip_eva_habillage_images',"type='bloc' AND nom_habillage='Defaut' AND attach='$les_blocs' AND nom_image='gauche'",'','pos_x'); 173 echo bouton_block_depliable(_T('evahabillage:EVA_choix_bloc_'.$les_blocs),false,''); 174 echo debut_block_depliable(false); 175 176 echo '<form method="POST" action="'.generer_url_ecrire("eva_habillage").'">'; 177 echo '<table><tr valign="top">'; 178 if ($eva_gauche) { 179 echo "<th width=$eva_gauche>"; 180 echo debut_cadre_trait_couleur('', true, '', 'Colonne de gauche'); 181 $test_noisettes=sql_select('*','spip_eva_habillage_images',"type='bloc' AND nom_habillage='Defaut' AND attach='$les_blocs' AND nom_image='gauche'",'','pos_x'); 182 while ($tab_noisettes=sql_fetch($test_noisettes)) { 183 if ($tab_noisettes['repetition']=='perso') {$eva_nom_du_bloc='Squelette '.$tab_noisettes['nom_div'].'.html';} 184 else {$eva_nom_du_bloc=_T('evahabillage:'.$tab_noisettes['nom_div']);} 185 echo debut_cadre_enfonce('',true,'',$eva_nom_du_bloc); 186 echo 'Passer à<br />'; 187 echo '<input type="hidden" name="'.$tab_noisettes['nom_div'].'_nom_bloc'.'" value="'.$tab_noisettes['nom_div'].'">'; 188 echo "<select name='".$tab_noisettes['nom_div']."'> 189 <option value='gauche' selected>gauche</option> 190 <option value='centre'>centre</option>"; 191 if ($eva_droite) {echo "<option value='droite'>droite</option>";} 192 echo "<option value='non'>Non affiché</option>"; 193 echo '</select><br /> <br />'; 194 echo 'Ordre'; 195 echo "<select name='".$tab_noisettes['nom_div']."_pos_x'>"; 196 for ($i=1;$i<=9;$i++) { 197 echo '<option value="'.$i.'" '; 198 if ($i==$tab_noisettes['pos_x']) {echo 'selected';} 199 echo '>'.$i.'</option>'; 200 } 201 echo '</select>'; 202 echo fin_cadre_enfonce(true); 203 } 204 echo fin_cadre_trait_couleur(true); 205 echo '</th>'; 206 } 207 if ($eva_centre) { 208 echo "<th width=$eva_centre>"; 209 echo debut_cadre_trait_couleur('', true, '', 'Colonne centrale'); 210 $test_noisettes=sql_select('*','spip_eva_habillage_images',"type='bloc' AND nom_habillage='Defaut' AND attach='$les_blocs' AND nom_image='centre'",'','pos_x ASC'); 211 while ($tab_noisettes=sql_fetch($test_noisettes)) { 212 if ($tab_noisettes['repetition']=='perso') {$eva_nom_du_bloc='Squelette '.$tab_noisettes['nom_div'].'.html';} 213 else {$eva_nom_du_bloc=_T('evahabillage:'.$tab_noisettes['nom_div']);} 214 echo debut_cadre_enfonce('',true,'',$eva_nom_du_bloc); 215 echo 'Passer à<br />'; 216 echo '<input type="hidden" name="'.$tab_noisettes['nom_div'].'_nom_bloc'.'" value="'.$tab_noisettes['nom_div'].'">'; 217 echo "<select name='".$tab_noisettes['nom_div']."'>"; 218 if ($eva_gauche) {echo "<option value='gauche'>gauche</option>";} 219 echo "<option value='centre' selected>centre</option>"; 220 if (($eva_droite) AND (!$eva_gauche)) {echo "<option value='gauche'>droite</option>";} 221 elseif ($eva_droite) {echo "<option value='droite'>droite</option>";} 222 echo "<option value='non'>Non affiché</option>"; 223 echo '</select><br /> <br />'; 224 echo 'Ordre'; 225 echo "<select name='".$tab_noisettes['nom_div']."_pos_x'>"; 226 for ($i=1;$i<=9;$i++) { 227 echo '<option value="'.$i.'" '; 228 if ($i==$tab_noisettes['pos_x']) {echo 'selected';} 229 echo '>'.$i.'</option>'; 230 } 231 echo '</select>'; 232 echo fin_cadre_enfonce(true); 233 } 234 echo fin_cadre_trait_couleur(true); 235 echo '</th>'; 236 } 237 if ($eva_droite) { 238 echo "<th width=$eva_droite>"; 239 echo debut_cadre_trait_couleur('', true, '', 'Colonne de droite'); 240 if (!$eva_gauche) {$eva_colonne_test='gauche';} else {$eva_colonne_test='droite';} 241 $test_noisettes=sql_select('*','spip_eva_habillage_images',"type='bloc' AND nom_habillage='Defaut' AND attach='$les_blocs' AND nom_image='$eva_colonne_test'",'','pos_x ASC'); 242 while ($tab_noisettes=sql_fetch($test_noisettes)) { 243 if ($tab_noisettes['repetition']=='perso') {$eva_nom_du_bloc='Squelette '.$tab_noisettes['nom_div'].'.html';} 244 else {$eva_nom_du_bloc=_T('evahabillage:'.$tab_noisettes['nom_div']);} 245 echo debut_cadre_enfonce('',true,'',$eva_nom_du_bloc); 246 echo 'Passer à<br />'; 247 echo '<input type="hidden" name="'.$tab_noisettes['nom_div'].'_nom_bloc'.'" value="'.$tab_noisettes['nom_div'].'">'; 248 echo "<select name='".$tab_noisettes['nom_div']."'>"; 249 if ($eva_gauche) {echo "<option value='gauche'>gauche</option>";} 250 echo "<option value='centre'>centre</option>"; 251 echo "<option value='".$eva_colonne_test."' selected>droite</option>"; 252 echo "<option value='non'>Non affiché</option>"; 253 echo '</select><br /> <br />'; 254 echo 'Ordre'; 255 echo "<select name='".$tab_noisettes['nom_div']."_pos_x'>"; 256 for ($i=1;$i<=9;$i++) { 257 echo '<option value="'.$i.'" '; 258 if ($i==$tab_noisettes['pos_x']) {echo 'selected';} 259 echo '>'.$i.'</option>'; 260 } 261 echo '</select>'; 262 echo fin_cadre_enfonce(true); 263 } 264 echo fin_cadre_trait_couleur(true); 265 echo '</th>'; 266 } 267 echo '</tr></table>'; 268 269 $texte_eva='<table><tr><th width=489>'; 270 $texte_eva.= debut_cadre_trait_couleur('', true, '', 'Squelettes actuellement non affichés'); 271 $texte_eva.= "<table class='spip'><tr class='row_even'>"; 272 $texte_eva.= "<th>Squelette</th><th>Colonne</th><th>Ordre</th>"; 273 $texte_eva.= '</tr>'; 274 $test_affichage_eva=false; 275 276 $test_noisettes=sql_select('*','spip_eva_habillage_images',"type='bloc' AND nom_habillage='Defaut' AND attach='".$les_blocs."'",'','pos_x ASC'); 182 277 while ($tab_noisettes=sql_fetch($test_noisettes)) { 183 if ($tab_noisettes['repetition']=='perso') {$eva_nom_du_bloc='Squelette '.$tab_noisettes['nom_div'].'.html';} 184 else {$eva_nom_du_bloc=_T('evahabillage:'.$tab_noisettes['nom_div']);} 185 echo debut_cadre_enfonce('',true,'',$eva_nom_du_bloc); 186 echo 'Passer à<br />'; 187 echo '<input type="hidden" name="'.$tab_noisettes['nom_div'].'_nom_bloc'.'" value="'.$tab_noisettes['nom_div'].'">'; 188 echo "<select name='".$tab_noisettes['nom_div']."'> 189 <option value='gauche' selected>gauche</option> 190 <option value='centre'>centre</option>"; 191 if ($eva_droite) {echo "<option value='droite'>droite</option>";} 192 echo "<option value='non'>Non affiché</option>"; 193 echo '</select><br /> <br />'; 194 echo 'Ordre'; 195 echo "<select name='".$tab_noisettes['nom_div']."_pos_x'>"; 196 for ($i=1;$i<=9;$i++) { 197 echo '<option value="'.$i.'" '; 198 if ($i==$tab_noisettes['pos_x']) {echo 'selected';} 199 echo '>'.$i.'</option>'; 200 } 201 echo '</select>'; 202 echo fin_cadre_enfonce(true); 203 } 204 echo fin_cadre_trait_couleur(true); 205 echo '</th>'; 206 } 207 if ($eva_centre) { 208 echo "<th width=$eva_centre>"; 209 echo debut_cadre_trait_couleur('', true, '', 'Colonne centrale'); 210 $test_noisettes=sql_select('*','spip_eva_habillage_images',"type='bloc' AND nom_habillage='Defaut' AND attach='$les_blocs' AND nom_image='centre'",'','pos_x ASC'); 211 while ($tab_noisettes=sql_fetch($test_noisettes)) { 212 if ($tab_noisettes['repetition']=='perso') {$eva_nom_du_bloc='Squelette '.$tab_noisettes['nom_div'].'.html';} 213 else {$eva_nom_du_bloc=_T('evahabillage:'.$tab_noisettes['nom_div']);} 214 echo debut_cadre_enfonce('',true,'',$eva_nom_du_bloc); 215 echo 'Passer à<br />'; 216 echo '<input type="hidden" name="'.$tab_noisettes['nom_div'].'_nom_bloc'.'" value="'.$tab_noisettes['nom_div'].'">'; 217 echo "<select name='".$tab_noisettes['nom_div']."'>"; 218 if ($eva_gauche) {echo "<option value='gauche'>gauche</option>";} 219 echo "<option value='centre' selected>centre</option>"; 220 if (($eva_droite) AND (!$eva_gauche)) {echo "<option value='gauche'>droite</option>";} 221 elseif ($eva_droite) {echo "<option value='droite'>droite</option>";} 222 echo "<option value='non'>Non affiché</option>"; 223 echo '</select><br /> <br />'; 224 echo 'Ordre'; 225 echo "<select name='".$tab_noisettes['nom_div']."_pos_x'>"; 226 for ($i=1;$i<=9;$i++) { 227 echo '<option value="'.$i.'" '; 228 if ($i==$tab_noisettes['pos_x']) {echo 'selected';} 229 echo '>'.$i.'</option>'; 230 } 231 echo '</select>'; 232 echo fin_cadre_enfonce(true); 233 } 234 echo fin_cadre_trait_couleur(true); 235 echo '</th>'; 236 } 237 if ($eva_droite) { 238 echo "<th width=$eva_droite>"; 239 echo debut_cadre_trait_couleur('', true, '', 'Colonne de droite'); 240 if (!$eva_gauche) {$eva_colonne_test='gauche';} else {$eva_colonne_test='droite';} 241 $test_noisettes=sql_select('*','spip_eva_habillage_images',"type='bloc' AND nom_habillage='Defaut' AND attach='$les_blocs' AND nom_image='$eva_colonne_test'",'','pos_x ASC'); 242 while ($tab_noisettes=sql_fetch($test_noisettes)) { 243 if ($tab_noisettes['repetition']=='perso') {$eva_nom_du_bloc='Squelette '.$tab_noisettes['nom_div'].'.html';} 244 else {$eva_nom_du_bloc=_T('evahabillage:'.$tab_noisettes['nom_div']);} 245 echo debut_cadre_enfonce('',true,'',$eva_nom_du_bloc); 246 echo 'Passer à<br />'; 247 echo '<input type="hidden" name="'.$tab_noisettes['nom_div'].'_nom_bloc'.'" value="'.$tab_noisettes['nom_div'].'">'; 248 echo "<select name='".$tab_noisettes['nom_div']."'>"; 249 if ($eva_gauche) {echo "<option value='gauche'>gauche</option>";} 250 echo "<option value='centre'>centre</option>"; 251 echo "<option value='".$eva_colonne_test."' selected>droite</option>"; 252 echo "<option value='non'>Non affiché</option>"; 253 echo '</select><br /> <br />'; 254 echo 'Ordre'; 255 echo "<select name='".$tab_noisettes['nom_div']."_pos_x'>"; 256 for ($i=1;$i<=9;$i++) { 257 echo '<option value="'.$i.'" '; 258 if ($i==$tab_noisettes['pos_x']) {echo 'selected';} 259 echo '>'.$i.'</option>'; 260 } 261 echo '</select>'; 262 echo fin_cadre_enfonce(true); 263 } 264 echo fin_cadre_trait_couleur(true); 265 echo '</th>'; 266 } 267 echo '</tr></table>'; 268 269 $texte_eva='<table><tr><th width=489>'; 270 $texte_eva.= debut_cadre_trait_couleur('', true, '', 'Squelettes actuellement non affichés'); 271 $texte_eva.= "<table class='spip'><tr class='row_even'>"; 272 $texte_eva.= "<th>Squelette</th><th>Colonne</th><th>Ordre</th>"; 273 $texte_eva.= '</tr>'; 274 $test_affichage_eva=false; 275 276 $test_noisettes=sql_select('*','spip_eva_habillage_images',"type='bloc' AND nom_habillage='Defaut' AND attach='".$les_blocs."'",'','pos_x ASC'); 277 while ($tab_noisettes=sql_fetch($test_noisettes)) { 278 if ((!$eva_droite) AND ($tab_noisettes['nom_image']=='droite')) { 279 echo '<input type="hidden" name="'.$tab_noisettes['nom_div'].'_nom_bloc'.'" value="'.$tab_noisettes['nom_div'].'">'; 280 $test_affichage_eva=true; 281 $texte_eva.="<tr class='row_odd'><th>"; 282 if ($tab_noisettes['repetition']) { 283 $texte_eva.= 'Squelette '.$tab_noisettes['nom_div'].'.html'; 284 } 285 else { 286 $texte_eva.= _T('evahabillage:'.$tab_noisettes['nom_div']); 287 } 288 $texte_eva.= "</th><th><select name='".$tab_noisettes['nom_div']."'>"; 289 $texte_eva.= "<option value='gauche'>gauche</option>"; 290 $texte_eva.= "<option value='centre'>centre</option>"; 291 $texte_eva.= "<option value='droite' selected>droite</option>"; 292 $texte_eva.= "<option value='non'>Non affiché</option>"; 293 $texte_eva.= '</select></th><th>'; 294 $texte_eva.= "<select name='".$tab_noisettes['nom_div']."_pos_x'>"; 295 for ($i=1;$i<=9;$i++) { 296 $texte_eva.= '<option value="'.$i.'" '; 297 if ($i==$tab_noisettes['pos_x']) {$texte_eva.= 'selected';} 298 $texte_eva.= '>'.$i.'</option>'; 299 } 300 $texte_eva.= '</select></th>'; 301 $texte_eva.= '</tr>'; 302 } 303 elseif ((!$eva_gauche) AND ($tab_noisettes['nom_image']=='droite')) { 304 echo '<input type="hidden" name="'.$tab_noisettes['nom_div'].'_nom_bloc'.'" value="'.$tab_noisettes['nom_div'].'">'; 305 $test_affichage_eva=true; 306 $texte_eva.="<tr class='row_odd'><th>"; 307 if ($tab_noisettes['repetition']) { 308 $texte_eva.= 'Squelette '.$tab_noisettes['nom_div'].'.html'; 309 } 310 else { 311 $texte_eva.= _T('evahabillage:'.$tab_noisettes['nom_div']); 312 } 313 $texte_eva.= "</th><th><select name='".$tab_noisettes['nom_div']."'>"; 314 $texte_eva.= "<option value='gauche'>droite</option>"; 315 $texte_eva.= "<option value='centre'>centre</option>"; 316 $texte_eva.= "<option value='droite' selected>gauche</option>"; 317 $texte_eva.= "<option value='non'>Non affiché</option>"; 318 $texte_eva.= '</select></th><th>'; 319 $texte_eva.= "<select name='".$tab_noisettes['nom_div']."_pos_x'>"; 320 for ($i=1;$i<=9;$i++) { 321 $texte_eva.= '<option value="'.$i.'" '; 322 if ($i==$tab_noisettes['pos_x']) {$texte_eva.= 'selected';} 323 $texte_eva.= '>'.$i.'</option>'; 324 } 325 $texte_eva.= '</select></th>'; 326 $texte_eva.= '</tr>'; 327 } 328 elseif (($tab_noisettes['nom_image']=='non')) { 329 echo '<input type="hidden" name="'.$tab_noisettes['nom_div'].'_nom_bloc'.'" value="'.$tab_noisettes['nom_div'].'">'; 330 $test_affichage_eva=true; 331 $texte_eva.="<tr class='row_odd'><th>"; 332 if ($tab_noisettes['repetition']) { 333 $texte_eva.= 'Squelette '.$tab_noisettes['nom_div'].'.html'; 334 } 335 else { 336 $texte_eva.= _T('evahabillage:'.$tab_noisettes['nom_div']); 337 } 338 $texte_eva.= "</th><th><select name='".$tab_noisettes['nom_div']."'>"; 339 $texte_eva.= "<option value='non' selected='selected'>Non affiché</option>"; 340 $texte_eva.= "<option value='gauche'>"; 341 if (!$eva_gauche) {$texte_eva.='droite';} else {$texte_eva.='gauche';} 342 $texte_eva.="</option>"; 343 $texte_eva.= "<option value='centre'>centre</option>"; 344 if (($tab_3cols['habillage']=='eva4_3colonnes.css') OR ($tab_3cols['habillage']=='eva4_basic_3colonnes.css')){ 345 $texte_eva.= "<option value='droite'>droite</option>"; 346 } 347 $texte_eva.= '</select></th><th>'; 348 $texte_eva.= "<select name='".$tab_noisettes['nom_div']."_pos_x'>"; 349 for ($i=1;$i<=9;$i++) { 350 $texte_eva.= '<option value="'.$i.'" '; 351 if ($i==$tab_noisettes['pos_x']) {$texte_eva.= 'selected';} 352 $texte_eva.= '>'.$i.'</option>'; 353 } 354 $texte_eva.= '</select></th>'; 355 $texte_eva.= '</tr>'; 356 } 357 } 358 $texte_eva.= '</table>'; 359 $texte_eva.= fin_cadre_trait_couleur(true); 360 if ($test_affichage_eva) { echo $texte_eva;} 361 echo '</th></tr></table>'; 362 echo '<div style="text-align:center;"><input type="submit" value="'._T('evahabillage:EVA_valider').'"></div><br />'; 363 echo '</form>'; 364 echo fin_block(); 278 if ((!$eva_droite) AND ($tab_noisettes['nom_image']=='droite')) { 279 echo '<input type="hidden" name="'.$tab_noisettes['nom_div'].'_nom_bloc'.'" value="'.$tab_noisettes['nom_div'].'">'; 280 $test_affichage_eva=true; 281 $texte_eva.="<tr class='row_odd'><th>"; 282 if ($tab_noisettes['repetition']) { 283 $texte_eva.= 'Squelette '.$tab_noisettes['nom_div'].'.html'; 284 } 285 else { 286 $texte_eva.= _T('evahabillage:'.$tab_noisettes['nom_div']); 287 } 288 $texte_eva.= "</th><th><select name='".$tab_noisettes['nom_div']."'>"; 289 $texte_eva.= "<option value='gauche'>gauche</option>"; 290 $texte_eva.= "<option value='centre'>centre</option>"; 291 $texte_eva.= "<option value='droite' selected>droite</option>"; 292 $texte_eva.= "<option value='non'>Non affiché</option>"; 293 $texte_eva.= '</select></th><th>'; 294 $texte_eva.= "<select name='".$tab_noisettes['nom_div']."_pos_x'>"; 295 for ($i=1;$i<=9;$i++) { 296 $texte_eva.= '<option value="'.$i.'" '; 297 if ($i==$tab_noisettes['pos_x']) {$texte_eva.= 'selected';} 298 $texte_eva.= '>'.$i.'</option>'; 299 } 300 $texte_eva.= '</select></th>'; 301 $texte_eva.= '</tr>'; 302 } 303 elseif ((!$eva_gauche) AND ($tab_noisettes['nom_image']=='droite')) { 304 echo '<input type="hidden" name="'.$tab_noisettes['nom_div'].'_nom_bloc'.'" value="'.$tab_noisettes['nom_div'].'">'; 305 $test_affichage_eva=true; 306 $texte_eva.="<tr class='row_odd'><th>"; 307 if ($tab_noisettes['repetition']) { 308 $texte_eva.= 'Squelette '.$tab_noisettes['nom_div'].'.html'; 309 } 310 else { 311 $texte_eva.= _T('evahabillage:'.$tab_noisettes['nom_div']); 312 } 313 $texte_eva.= "</th><th><select name='".$tab_noisettes['nom_div']."'>"; 314 $texte_eva.= "<option value='gauche'>droite</option>"; 315 $texte_eva.= "<option value='centre'>centre</option>"; 316 $texte_eva.= "<option value='droite' selected>gauche</option>"; 317 $texte_eva.= "<option value='non'>Non affiché</option>"; 318 $texte_eva.= '</select></th><th>'; 319 $texte_eva.= "<select name='".$tab_noisettes['nom_div']."_pos_x'>"; 320 for ($i=1;$i<=9;$i++) { 321 $texte_eva.= '<option value="'.$i.'" '; 322 if ($i==$tab_noisettes['pos_x']) {$texte_eva.= 'selected';} 323 $texte_eva.= '>'.$i.'</option>'; 324 } 325 $texte_eva.= '</select></th>'; 326 $texte_eva.= '</tr>'; 327 } 328 elseif (($tab_noisettes['nom_image']=='non')) { 329 echo '<input type="hidden" name="'.$tab_noisettes['nom_div'].'_nom_bloc'.'" value="'.$tab_noisettes['nom_div'].'">'; 330 $test_affichage_eva=true; 331 $texte_eva.="<tr class='row_odd'><th>"; 332 if ($tab_noisettes['repetition']) { 333 $texte_eva.= 'Squelette '.$tab_noisettes['nom_div'].'.html'; 334 } 335 else { 336 $texte_eva.= _T('evahabillage:'.$tab_noisettes['nom_div']); 337 } 338 $texte_eva.= "</th><th><select name='".$tab_noisettes['nom_div']."'>"; 339 $texte_eva.= "<option value='non' selected='selected'>Non affiché</option>"; 340 $texte_eva.= "<option value='gauche'>"; 341 if (!$eva_gauche) {$texte_eva.='droite';} else {$texte_eva.='gauche';} 342 $texte_eva.="</option>"; 343 $texte_eva.= "<option value='centre'>centre</option>"; 344 if (($tab_3cols['habillage']=='eva4_3colonnes.css') OR ($tab_3cols['habillage']=='eva4_basic_3colonnes.css')){ 345 $texte_eva.= "<option value='droite'>droite</option>"; 346 } 347 $texte_eva.= '</select></th><th>'; 348 $texte_eva.= "<select name='".$tab_noisettes['nom_div']."_pos_x'>"; 349 for ($i=1;$i<=9;$i++) { 350 $texte_eva.= '<option value="'.$i.'" '; 351 if ($i==$tab_noisettes['pos_x']) {$texte_eva.= 'selected';} 352 $texte_eva.= '>'.$i.'</option>'; 353 } 354 $texte_eva.= '</select></th>'; 355 $texte_eva.= '</tr>'; 356 } 357 } 358 $texte_eva.= '</table>'; 359 $texte_eva.= fin_cadre_trait_couleur(true); 360 if ($test_affichage_eva) { echo $texte_eva;} 361 echo '</th></tr></table>'; 362 echo '<div style="text-align:center;"><input type="submit" value="'._T('evahabillage:EVA_valider').'"></div><br />'; 363 echo '</form>'; 364 echo fin_block(); 365 365 } 366 366 echo '<hr />'; … … 389 389 echo '<div style="text-align:center;"><input type="submit" value="'._T('evahabillage:EVA_valider').'"></div><br /></form>'; 390 390 echo fin_block(); 391 391 392 392 $test_suppr=false; 393 393 $texte_suppr=bouton_block_depliable(_T('evahabillage:EVA_supprimer_squelette'),false,''); … … 405 405 if ($test_suppr) {echo $texte_suppr;} 406 406 407 408 409 410 407 echo fin_cadre_trait_couleur(true).'<br />'; 408 409 410 echo debut_cadre_trait_couleur(_DIR_PLUGIN_EVA_HABILLAGE."img_pack/blocs.png", true, '', _T('evahabillage:EVA_choix_entete_pied')); 411 411 412 412 echo bouton_block_depliable(_T('evahabillage:EVA_choix_entete'),false,''); … … 424 424 $texte_entete.='<input type="hidden" name="'.$tab_entete1['nom_div'].'_nom_bloc'.'" value="'.$tab_entete1['nom_div'].'">'; 425 425 $texte_entete.="<select name='".$tab_entete1['nom_div']."_pos_x'>"; 426 427 428 429 430 426 for ($i=1;$i<=9;$i++) { 427 $texte_entete.= '<option value="'.$i.'" '; 428 if ($i==$tab_entete1['pos_x']) {$texte_entete.= 'selected';} 429 $texte_entete.= '>'.$i.'</option>'; 430 } 431 431 $texte_entete.= '</select> Statut : '; 432 432 $texte_entete.="<select name='".$tab_entete1['nom_div']."'>"; … … 438 438 $texte_entete.=fin_cadre_trait_couleur(true); 439 439 if ($test_entete) {echo $texte_entete;} 440 440 441 441 $test_entete=false; 442 442 $req_entete1=sql_select('*','spip_eva_habillage_images',"type='bloc' AND nom_habillage='Defaut' AND nom_image='non' AND attach='entete'",'','pos_x ASC'); … … 451 451 $texte_entete.='<input type="hidden" name="'.$tab_entete1['nom_div'].'_nom_bloc'.'" value="'.$tab_entete1['nom_div'].'">'; 452 452 $texte_entete.="<select name='".$tab_entete1['nom_div']."_pos_x'>"; 453 454 455 456 457 453 for ($i=1;$i<=9;$i++) { 454 $texte_entete.= '<option value="'.$i.'" '; 455 if ($i==$tab_entete1['pos_x']) {$texte_entete.= 'selected';} 456 $texte_entete.= '>'.$i.'</option>'; 457 } 458 458 $texte_entete.= '</select> Statut : '; 459 459 $texte_entete.="<select name='".$tab_entete1['nom_div']."'>"; … … 468 468 echo '</form>'; 469 469 echo fin_block(); 470 470 471 471 echo bouton_block_depliable(_T('evahabillage:EVA_choix_pied'),false,''); 472 472 echo debut_block_depliable(false); … … 484 484 $texte_entete.='<input type="hidden" name="'.$tab_entete1['nom_div'].'_nom_bloc'.'" value="'.$tab_entete1['nom_div'].'">'; 485 485 $texte_entete.="<select name='".$tab_entete1['nom_div']."_pos_x'>"; 486 487 488 489 490 486 for ($i=1;$i<=9;$i++) { 487 $texte_entete.= '<option value="'.$i.'" '; 488 if ($i==$tab_entete1['pos_x']) {$texte_entete.= 'selected';} 489 $texte_entete.= '>'.$i.'</option>'; 490 } 491 491 $texte_entete.= '</select> Statut : '; 492 492 $texte_entete.="<select name='".$tab_entete1['nom_div']."'>"; … … 498 498 $texte_entete.=fin_cadre_trait_couleur(true); 499 499 if ($test_entete) {echo $texte_entete;} 500 500 501 501 $test_entete=false; 502 502 $req_entete1=sql_select('*','spip_eva_habillage_images',"type='bloc' AND nom_habillage='Defaut' AND nom_image='non' AND attach='pied'",'','pos_x ASC'); … … 511 511 $texte_entete.='<input type="hidden" name="'.$tab_entete1['nom_div'].'_nom_bloc'.'" value="'.$tab_entete1['nom_div'].'">'; 512 512 $texte_entete.="<select name='".$tab_entete1['nom_div']."_pos_x'>"; 513 514 515 516 517 513 for ($i=1;$i<=9;$i++) { 514 $texte_entete.= '<option value="'.$i.'" '; 515 if ($i==$tab_entete1['pos_x']) {$texte_entete.= 'selected';} 516 $texte_entete.= '>'.$i.'</option>'; 517 } 518 518 $texte_entete.= '</select> Statut : '; 519 519 $texte_entete.="<select name='".$tab_entete1['nom_div']."'>"; … … 528 528 echo '</form>'; 529 529 echo fin_block(); 530 530 531 531 echo bouton_block_depliable(_T('evahabillage:EVA_choix_headers'),false,''); 532 532 echo debut_block_depliable(false); 533 533 echo '<form method="POST" action="'.generer_url_ecrire("eva_habillage").'">'; 534 534 $test_entete=false; 535 535 $req_entete1=sql_select('*','spip_eva_habillage_images',"type='bloc' AND nom_habillage='Defaut' AND nom_image='oui' AND attach='headers'",'','pos_x ASC'); … … 544 544 $texte_entete.='<input type="hidden" name="'.$tab_entete1['nom_div'].'_nom_bloc'.'" value="'.$tab_entete1['nom_div'].'">'; 545 545 $texte_entete.="<select name='".$tab_entete1['nom_div']."_pos_x'>"; 546 547 548 549 550 546 for ($i=1;$i<=9;$i++) { 547 $texte_entete.= '<option value="'.$i.'" '; 548 if ($i==$tab_entete1['pos_x']) {$texte_entete.= 'selected';} 549 $texte_entete.= '>'.$i.'</option>'; 550 } 551 551 $texte_entete.= '</select> Statut : '; 552 552 $texte_entete.="<select name='".$tab_entete1['nom_div']."'>"; … … 558 558 $texte_entete.=fin_cadre_trait_couleur(true); 559 559 if ($test_entete) {echo $texte_entete;} 560 560 561 561 $test_entete=false; 562 562 $req_entete1=sql_select('*','spip_eva_habillage_images',"type='bloc' AND nom_habillage='Defaut' AND nom_image='non' AND attach='headers'",'','pos_x ASC'); … … 571 571 $texte_entete.='<input type="hidden" name="'.$tab_entete1['nom_div'].'_nom_bloc'.'" value="'.$tab_entete1['nom_div'].'">'; 572 572 $texte_entete.="<select name='".$tab_entete1['nom_div']."_pos_x'>"; 573 574 575 576 577 573 for ($i=1;$i<=9;$i++) { 574 $texte_entete.= '<option value="'.$i.'" '; 575 if ($i==$tab_entete1['pos_x']) {$texte_entete.= 'selected';} 576 $texte_entete.= '>'.$i.'</option>'; 577 } 578 578 $texte_entete.= '</select> Statut : '; 579 579 $texte_entete.="<select name='".$tab_entete1['nom_div']."'>"; … … 588 588 echo '</form>'; 589 589 echo fin_block(); 590 590 591 591 echo '<hr />'; 592 592 echo bouton_block_depliable(_T('evahabillage:EVA_inserer_squel_entete_pied'),false,''); 593 593 echo debut_block_depliable(false); 594 594 595 595 echo '<br />'._T('evahabillage:EVA_choisir_squelette1bis').'<br /> <br />'; 596 596 echo _T('evahabillage:EVA_choisir_squelette2').'<br /> <br />'; … … 612 612 echo '</table>'; 613 613 echo '<div style="text-align:center;"><input type="submit" value="'._T('evahabillage:EVA_valider').'"></div><br /></form>'; 614 615 614 615 616 616 echo fin_block(); 617 617 echo fin_cadre_trait_couleur(true).'<br />'; 618 619 620 621 622 623 624 625 626 627 sql_delete('spip_eva_habillage_images',"nom_habillage='Defaut' AND nom_div='".$val."'");628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 elseif (($i==5) AND (!isset($test))) {echo 'selected';}645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 $val=mysql_escape_string($_POST[$cle]);672 sql_delete('spip_eva_habillage_images',"type = 'fichier_lang' AND attach='".$spip_lang."' AND nom_habillage = 'Defaut' AND nom_div = '".$cle."'");673 if ($val!='') {674 sql_insertq('spip_eva_habillage_images',array('type' => 'fichier_lang','nom_habillage' => 'Defaut','nom_div' => $cle,'nom_image' => $val,'attach' => $spip_lang));675 }676 677 } 678 679 680 681 682 683 684 685 $test_langue=sql_select('nom_image','spip_eva_habillage_images',"type = 'fichier_lang' AND nom_habillage = 'Defaut' AND attach='".$spip_lang."' AND nom_div = '$cle'");686 $result_langue=sql_fetch($test_langue);687 $resultat=$result_langue['nom_image'];688 echo '<tr align="center" ';689 if (($couleur_table%2)==0) {echo 'class="row_even"';} else {echo 'class="row_odd"';}690 $couleur_table++;691 echo '><td align="center">'.$val.'</td>';692 echo '<td align="center"><input type="text" name="'.$cle.'" value="'.htmlentities($resultat).'" size="25" /></td>';693 echo '</tr>';694 695 696 697 698 699 700 701 702 703 704 705 618 619 include_spip('inc/evabonus_menu_horizontal_structure'); 620 621 echo debut_cadre_trait_couleur(_DIR_PLUGIN_EVA_HABILLAGE."img_pack/nbre.png", true, '', _T('evahabillage:EVA_choix_nbre')); 622 623 $nbre = EVA_mes_nbres(); 624 foreach($nbre as $cle_nbre => $val_nbre) { 625 foreach($val_nbre as $val) { 626 if (isset($_POST[$val])) { 627 sql_delete('spip_eva_habillage_images',"nom_habillage='Defaut' AND nom_div='".$val."'"); 628 sql_insertq('spip_eva_habillage_images',array('type' => 'nbre','nom_habillage' => 'Defaut','nom_div' => $val,'nom_image' => $_POST[$val])); 629 } 630 } 631 echo bouton_block_depliable(_T('evahabillage:'.$cle_nbre),false,''); 632 echo debut_block_depliable(false); 633 634 echo '<form method="POST" action="'.generer_url_ecrire("eva_habillage").'">'; 635 foreach ($val_nbre as $val) { 636 $test_pres=sql_select('nom_image','spip_eva_habillage_images',"nom_habillage='Defaut' AND nom_div='$val'"); 637 $test_tab=sql_fetch($test_pres); 638 $test=$test_tab['nom_image']; 639 echo '<br /><span style="text-decoration:underline;">'._T('evahabillage:'.$val).'</span>'; 640 echo ' <select name="'.$val.'">'; 641 for ($i=0;$i<=20;$i++) { 642 echo '<option value="'.$i.'" '; 643 if ($i==$test) {echo 'selected';} 644 elseif (($i==5) AND (!isset($test))) {echo 'selected';} 645 echo '>'.$i.'</option>'; 646 } 647 echo '</select><br />'; 648 } 649 echo '<br /><div style="text-align:center;"><input type="submit" value="'._T('evahabillage:EVA_valider').'"></div></form>'; 650 echo fin_block(); 651 } 652 echo fin_cadre_trait_couleur(true); 653 654 global $spip_lang; 655 echo debut_cadre_trait_couleur(_DIR_PLUGIN_EVA_HABILLAGE."img_pack/titrebloc.png", true, '', "<center><span style='text-decoration:underline;'>"._T('evahabillage:titrebloc_titre').traduire_nom_langue($spip_lang)."</span></center>"); 656 if (file_exists(_DIR_PLUGIN_EVASQUELETTES.'lang/local_'.$spip_lang.'.php')) { 657 echo _T('evahabillage:titrebloc_debut'); 658 echo '<br />'; 659 660 echo bouton_block_depliable(_T('evahabillage:titrebloc_entites_html'),false,''); 661 echo debut_block_depliable(false); 662 echo _T('evahabillage:titrebloc_detail'); 663 echo fin_block(); 664 665 echo bouton_block_depliable(_T('evahabillage:titrebloc_go'),false,''); 666 echo debut_block_depliable(false); 667 668 include(_DIR_PLUGIN_EVASQUELETTES.'lang/local_'.$spip_lang.'.php'); 669 if ($_POST['evalangtest']) { 670 foreach ($langue_fichier_initial as $cle => $val) { 671 $val=mysql_escape_string($_POST[$cle]); 672 sql_delete('spip_eva_habillage_images',"type = 'fichier_lang' AND attach='".$spip_lang."' AND nom_habillage = 'Defaut' AND nom_div = '".$cle."'"); 673 if ($val!='') { 674 sql_insertq('spip_eva_habillage_images',array('type' => 'fichier_lang','nom_habillage' => 'Defaut','nom_div' => $cle,'nom_image' => $val,'attach' => $spip_lang)); 675 } 676 677 } 678 } 679 $couleur_table = 0; 680 echo '<br /><form method="POST" action="'.generer_url_ecrire("eva_habillage").'"><table align="center" class="spip">'; 681 echo '<tr align="center" class="row_even"><td align="center">'._T('evahabillage:titrebloc_tab1').'</td>'; 682 echo '<td align="center">'._T('evahabillage:titrebloc_tab2').'</td></tr>'; 683 $couleur_table++; 684 foreach ($langue_fichier_initial as $cle => $val) { 685 $test_langue=sql_select('nom_image','spip_eva_habillage_images',"type = 'fichier_lang' AND nom_habillage = 'Defaut' AND attach='".$spip_lang."' AND nom_div = '$cle'"); 686 $result_langue=sql_fetch($test_langue); 687 $resultat=$result_langue['nom_image']; 688 echo '<tr align="center" '; 689 if (($couleur_table%2)==0) {echo 'class="row_even"';} else {echo 'class="row_odd"';} 690 $couleur_table++; 691 echo '><td align="center">'.$val.'</td>'; 692 echo '<td align="center"><input type="text" name="'.$cle.'" value="'.htmlentities($resultat).'" size="25" /></td>'; 693 echo '</tr>'; 694 } 695 echo '</table><br />'; 696 echo '<input type="hidden" name="evalangtest" value="2" />'; 697 echo '<div style="text-align:center;"><input type="submit" value="'._T('evahabillage:EVA_valider').'"></div></form>'; 698 echo fin_block(); 699 } 700 else { 701 echo _T('evahabillage:eva_langue_absente1').traduire_nom_langue($spip_lang)._T('evahabillage:eva_langue_absente2'); 702 } 703 echo fin_cadre_trait_couleur(true); 704 705 echo fin_gauche(), fin_page(); 706 706 } 707 707 ?> -
_squelettes_/eva-web/4_2/eva_habillage/exec/eva_habillage_css.php
r29030 r96105 2 2 3 3 if (!defined("_ECRIRE_INC_VERSION")) return; 4 4 include_spip('inc/presentation'); 5 5 6 6 function exec_eva_habillage_css(){ 7 7 8 9 10 $path = _DIR_PLUGIN_EVASQUELETTES."images/vignettes_styles/";11 $path_evastyle = _DIR_PLUGIN_EVASQUELETTES."eva_styles/";8 $evaTable = "spip_eva_habillage"; 9 if (defined("_DIR_PLUGIN_EVASQUELETTES")) { 10 $path = _DIR_PLUGIN_EVASQUELETTES."images/vignettes_styles/"; 11 $path_evastyle = _DIR_PLUGIN_EVASQUELETTES."eva_styles/"; 12 12 } 13 14 15 16 17 18 19 20 21 22 13 else { 14 $path = "../squelettes/images/vignettes_styles/"; 15 $path_evastyle = "../squelettes/eva_styles/"; 16 } 17 $icone = _DIR_PLUGIN_EVA_HABILLAGE."img_pack/eva.gif"; 18 19 ?><SCRIPT LANGUAGE="JavaScript"> 20 function showColor(val) { 21 document.colorform.hexval.value = val; 22 } 23 23 function toggleCSSEdit(id, edit) { 24 24 var cssPerso = document.getElementById('css_perso_'+id); … … 32 32 } 33 33 } 34 34 </script><?php 35 35 $commencer_page = charger_fonction('commencer_page', 'inc'); 36 36 echo $commencer_page(_T('evahabillage:EVA_nom') , '', '', ''); 37 37 echo gros_titre(_T('evahabillage:EVA_nom'),'',false); 38 38 39 40 41 echo _T('avis_non_acces_page');42 echo fin_gauche(), fin_page();43 exit;44 39 global $connect_statut; 40 if ($GLOBALS['connect_statut'] != "0minirezo" OR !$GLOBALS["connect_toutes_rubriques"]) { 41 echo _T('avis_non_acces_page'); 42 echo fin_gauche(), fin_page(); 43 exit; 44 } 45 45 echo debut_gauche("",true); 46 46 echo debut_droite("",true); … … 48 48 echo eva_habillage_boutons('css'); 49 49 50 $css_defs =array(51 'css_supprime_titre' => "#entete h1 {display:none;}",52 'css_supprime_pied' => "ul#logo-pied, ul#pied {display:none;}",53 'css_supprime_mentions_pied' => "ul#pied .supprimer_le_pied {display:none;}",54 'css_supprime_bordure_tableau' => "table.spip tr.row_odd , table.spip tr.row_even , table.spip tr.row_odd td , table.spip tr.row_even td {border-width:0;}",55 'css_augmente_police_10' => "body {font-size: 110%;}",56 'css_augmente_police_20' => "body {font-size: 120%;}",57 'css_diminue_police_10' => "body {font-size: 90%;}",58 'css_diminue_police_20' => "body {font-size: 80%;}",59 'css_doubler_taille_titre_50' => "div#entete h1 {font-size:200%;}",60 'css_deplace_titre_50px_bas' => "div#entete h1 {top:50px;}",61 'css_deplace_titre_50px_gauche' => "div#entete h1 {left:50px;}",62 'css_augmente_titres_blocs_20' => "h3 , div#contenu h3 , legend , #forum .bouton a , .bloc .titre , .divers h4 , table.spip tr.row_first th , div#contenu div.ps h4 , div#menu h3.titre , div#menudroit h3.titre , table.spip tr.row_first , div#contenu div.lien , .contenu .lien , div#contenu div.notes h4 , div#contenu h4.titre , div#contenu h3.titre , #forum ul.forum div.titre h4{font-size: 120%;}",50 $css_defs =array( 51 'css_supprime_titre' => "#entete h1 {display:none;}", 52 'css_supprime_pied' => "ul#logo-pied, ul#pied {display:none;}", 53 'css_supprime_mentions_pied' => "ul#pied .supprimer_le_pied {display:none;}", 54 'css_supprime_bordure_tableau' => "table.spip tr.row_odd , table.spip tr.row_even , table.spip tr.row_odd td , table.spip tr.row_even td {border-width:0;}", 55 'css_augmente_police_10' => "body {font-size: 110%;}", 56 'css_augmente_police_20' => "body {font-size: 120%;}", 57 'css_diminue_police_10' => "body {font-size: 90%;}", 58 'css_diminue_police_20' => "body {font-size: 80%;}", 59 'css_doubler_taille_titre_50' => "div#entete h1 {font-size:200%;}", 60 'css_deplace_titre_50px_bas' => "div#entete h1 {top:50px;}", 61 'css_deplace_titre_50px_gauche' => "div#entete h1 {left:50px;}", 62 'css_augmente_titres_blocs_20' => "h3 , div#contenu h3 , legend , #forum .bouton a , .bloc .titre , .divers h4 , table.spip tr.row_first th , div#contenu div.ps h4 , div#menu h3.titre , div#menudroit h3.titre , table.spip tr.row_first , div#contenu div.lien , .contenu .lien , div#contenu div.notes h4 , div#contenu h4.titre , div#contenu h3.titre , #forum ul.forum div.titre h4{font-size: 120%;}", 63 63 ); 64 64 65 if (isset($_POST['injection_css'])) {sql_insertq('spip_eva_habillage_images',array("type" => "perso", "nom_habillage" => "Defaut", "nom_div" => $css_defs[$_POST['injection_css']]));}65 if (isset($_POST['injection_css'])) {sql_insertq('spip_eva_habillage_images',array("type" => "perso", "nom_habillage" => "Defaut", "nom_div" => $css_defs[$_POST['injection_css']]));} 66 66 67 67 //Module 4 - Ajout de propriétés CSS personnelles 68 69 70 71 68 echo '<br /> <br />'; 69 echo debut_cadre_trait_couleur(_DIR_PLUGIN_EVA_HABILLAGE."img_pack/css.png", true, '', _T('evahabillage:EVA_etape5')); 70 if (isset($_POST['nouvelle_regle'])) {sql_insertq('spip_eva_habillage_images',array("type" => "perso", "nom_habillage" => "Defaut", "nom_div" => mysql_escape_string($_POST['nouvelle_regle'])));} 71 if (isset($_POST['modifie_perso'])) {sql_updateq('spip_eva_habillage_images',array("type" => "perso", "nom_habillage" => "Defaut", "nom_div" => mysql_escape_string($_POST['regle'])),"id=".$_POST['modifie_perso']);} 72 72 if (isset($_POST['supprime_perso'])) {sql_delete('spip_eva_habillage_images',"id=".$_POST['supprime_perso']);} 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 echo '<strong>'.mysql_escape_string($tab['nom_div']).'</strong>';92 echo '</div>';93 94 echo '<form method="POST" action="'.generer_url_ecrire("eva_habillage_css").'">';95 echo '<input type="hidden" name="modifie_perso" value="'.$tab['id'].'" />';96 echo '<input type="text" name="regle" value="'.mysql_escape_string($tab['nom_div']).'" style="width: 100%" />';97 echo '<input type="reset" value="'._T('evahabillage:EVA_annuler').'" onclick="toggleCSSEdit('.$tab['id'].', false);" />';98 echo '<input type="submit" value="'._T('evahabillage:EVA_valider').'" />';99 echo '</form>';100 echo '</div>';101 echo '</td><td align="center">';102 103 echo '<form method="POST" action="'.generer_url_ecrire("eva_habillage_css").'">';104 echo '<input type="hidden" name="supprime_perso" value="'.$tab['id'].'" />';105 106 echo '</form>';107 108 109 110 73 74 echo '<div style="text-align:center;">'._T('evahabillage:EVA_etape5_detail').'<br />'; 75 echo '<form method="POST" action="'.generer_url_ecrire("eva_habillage_css").'">'; 76 echo '<br /><input type="text" name="nouvelle_regle" size="60" /> <input type="submit" value="'._T('evahabillage:EVA_valider').'" /></div></form><br />'; 77 echo fin_cadre_trait_couleur(true); 78 echo '<br /> <br />'; 79 echo debut_cadre_trait_couleur(_DIR_PLUGIN_EVA_HABILLAGE."img_pack/css.png", true, '', _T('evahabillage:EVA_etape5_defini')); 80 $recherche_perso_unique = sql_select('id','spip_eva_habillage_images',"type='perso' AND nom_habillage='Defaut'",'','','1'); 81 $tab_perso_unique = sql_fetch($recherche_perso_unique); 82 if (isset($tab_perso_unique['id'])) { 83 echo '<br /><table align="center" class="spip">'; 84 $recherche_perso = sql_select("id,nom_div","spip_eva_habillage_images","type='perso' AND nom_habillage='Defaut'"); 85 while ($tab = sql_fetch($recherche_perso)) { 86 echo '<tr align="center" '; 87 if (($couleur_table%2)==0) {echo 'class="row_even"';} else {echo 'class="row_odd"';} 88 $couleur_table++; 89 echo '><td align="center">'; 90 echo '<div id="css_perso_'.$tab['id'].'" style="display:block;">'; 91 echo '<strong>'.mysql_escape_string($tab['nom_div']).'</strong>'; 92 echo '</div>'; 93 echo '<div id="css_perso_'.$tab['id'].'_edition" style="display:none;">'; 94 echo '<form method="POST" action="'.generer_url_ecrire("eva_habillage_css").'">'; 95 echo '<input type="hidden" name="modifie_perso" value="'.$tab['id'].'" />'; 96 echo '<input type="text" name="regle" value="'.mysql_escape_string($tab['nom_div']).'" style="width: 100%" />'; 97 echo '<input type="reset" value="'._T('evahabillage:EVA_annuler').'" onclick="toggleCSSEdit('.$tab['id'].', false);" />'; 98 echo '<input type="submit" value="'._T('evahabillage:EVA_valider').'" />'; 99 echo '</form>'; 100 echo '</div>'; 101 echo '</td><td align="center">'; 102 echo '<input type="button" value="'._T('evahabillage:EVA_modifier').'" onclick="toggleCSSEdit('.$tab['id'].', true);" />'; 103 echo '<form method="POST" action="'.generer_url_ecrire("eva_habillage_css").'">'; 104 echo '<input type="hidden" name="supprime_perso" value="'.$tab['id'].'" />'; 105 echo '<input type="submit" value="'._T('evahabillage:EVA_supprimer').'" />'; 106 echo '</form>'; 107 echo '</td></tr>'; 108 } 109 echo '</table>'; 110 } 111 111 else { 112 113 114 115 112 echo '<br />'._T('evahabillage:EVA_etape5_rien_defini'); 113 } 114 echo fin_cadre_trait_couleur(true); 115 116 116 //Intégration de règles prédéfinies 117 117 … … 121 121 echo '<br /><table align="center" class="spip">'; 122 122 foreach ($css_defs as $css_cle => $css_val) { 123 echo '<tr align="center" ';124 125 126 echo '><td align="center">';127 echo '<strong>'._T('evahabillage:'.$css_cle)."</strong><br />";128 echo $css_val.'</td>';129 echo '<td align="center"><form method="POST" action="'.generer_url_ecrire("eva_habillage_css").'">';130 echo '<input type="hidden" name="injection_css" value="'.$css_cle.'" />';131 132 echo '</tr>';123 echo '<tr align="center" '; 124 if (($couleur_table%2)==0) {echo 'class="row_even"';} else {echo 'class="row_odd"';} 125 $couleur_table++; 126 echo '><td align="center">'; 127 echo '<strong>'._T('evahabillage:'.$css_cle)."</strong><br />"; 128 echo $css_val.'</td>'; 129 echo '<td align="center"><form method="POST" action="'.generer_url_ecrire("eva_habillage_css").'">'; 130 echo '<input type="hidden" name="injection_css" value="'.$css_cle.'" />'; 131 echo '<input type="submit" value="'._T('evahabillage:css_ajouter').'" /></form></td>'; 132 echo '</tr>'; 133 133 } 134 134 echo '</table>'; 135 135 echo fin_cadre_trait_couleur(true); 136 136 echo fin_gauche(), fin_page(); 137 137 } 138 138 ?> -
_squelettes_/eva-web/4_2/eva_habillage/exec/eva_habillage_graphisme.php
r33347 r96105 2 2 3 3 if (!defined("_ECRIRE_INC_VERSION")) return; 4 5 6 function exec_eva_habillage_graphisme() {7 8 9 10 $path = _DIR_PLUGIN_EVASQUELETTES."images/vignettes_styles/";11 $path_evastyle = _DIR_PLUGIN_EVASQUELETTES."eva_styles/";12 } 13 14 15 16 17 18 19 20 21 22 23 4 include_spip('inc/presentation'); 5 6 function exec_eva_habillage_graphisme() { 7 8 $evaTable = "spip_eva_habillage"; 9 if (defined("_DIR_PLUGIN_EVASQUELETTES")) { 10 $path = _DIR_PLUGIN_EVASQUELETTES."images/vignettes_styles/"; 11 $path_evastyle = _DIR_PLUGIN_EVASQUELETTES."eva_styles/"; 12 } 13 else { 14 $path = "../squelettes/images/vignettes_styles/"; 15 $path_evastyle = "../squelettes/eva_styles/"; 16 } 17 $icone = _DIR_PLUGIN_EVA_HABILLAGE."img_pack/eva.gif"; 18 19 ?><SCRIPT LANGUAGE="JavaScript"> 20 function showColor(val) { 21 document.colorform.hexval.value = val; 22 } 23 </script><?php 24 24 $commencer_page = charger_fonction('commencer_page', 'inc'); 25 25 echo $commencer_page(_T('evahabillage:EVA_nom') , '', '', ''); 26 26 echo gros_titre(_T('evahabillage:EVA_nom'),'',false); 27 27 28 29 30 echo _T('avis_non_acces_page');31 echo fin_gauche(), fin_page();32 exit;28 global $connect_statut; 29 if ($GLOBALS['connect_statut'] != "0minirezo" OR !$GLOBALS["connect_toutes_rubriques"]) { 30 echo _T('avis_non_acces_page'); 31 echo fin_gauche(), fin_page(); 32 exit; 33 33 } 34 34 … … 38 38 echo eva_habillage_boutons('graphisme'); 39 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 40 include_spip("inc/eva_habillage_definition_themes"); 41 $def_themes = EVA_def_themes_global(); 42 43 if ($_POST['modif_habillage']=='1') { 44 foreach ($def_themes as $habillage_modif_cles => $habillage_modif_inutile) { 45 $mes_modifs_tableau[$habillage_modif_cles] =$_POST[$habillage_modif_cles]; 46 } 47 sql_updateq('spip_eva_habillage_themes',$mes_modifs_tableau,"nom='Defaut'"); 48 } 49 50 if ($_POST['modif_habillage']=='2') { 51 foreach (EVA_def_textes() as $habillage_modif_cles => $habillage_modif_inutile) { 52 $mes_modifs_tableau[$habillage_modif_cles] =$_POST[$habillage_modif_cles]; 53 } 54 sql_updateq('spip_eva_habillage_themes',$mes_modifs_tableau,"nom='Defaut'"); 55 } 56 57 $test_fri=sql_select('id_habillage','spip_eva_habillage',"sauvegarde='Defaut'"); 58 $tab_fri=sql_fetch($test_fri); 59 if (!isset($tab_fri['id_habillage'])) {sql_insertq('spip_eva_habillage',array('habillage' => '0','sauvegarde' =>'Defaut'));} 60 61 $resultat1 = sql_select('habillage','spip_eva_habillage',"sauvegarde = 'Defaut'"); 62 $resultat1_tableau = sql_fetch($resultat1); 63 $mon_habillage = $resultat1_tableau['habillage']; 64 64 65 65 66 66 //Ajustement de la police 67 67 68 echo debut_cadre_trait_couleur(_DIR_PLUGIN_EVA_HABILLAGE."img_pack/text.png", true, '', _T('evahabillage:EVA_def_police'));68 echo debut_cadre_trait_couleur(_DIR_PLUGIN_EVA_HABILLAGE."img_pack/text.png", true, '', _T('evahabillage:EVA_def_police')); 69 69 $resultat_themes_defini = sql_select('*','spip_eva_habillage_themes',"nom='Defaut'"); 70 70 $tableau_themes_defini = sql_fetch($resultat_themes_defini); 71 71 echo '<form method="POST" action="'.generer_url_ecrire("eva_habillage_graphisme").'">'; 72 72 echo '<div style="text-align:center;">'; 73 74 echo _T('evahabillage:'.$habillage_cles);75 echo '<input type="text" name="'.$habillage_cles.'" value="'.htmlentities($tableau_themes_defini[$habillage_cles]).'" size="50">';76 73 foreach(EVA_def_textes() as $habillage_cles => $habillage_inutile) { 74 echo _T('evahabillage:'.$habillage_cles); 75 echo '<input type="text" name="'.$habillage_cles.'" value="'.htmlentities($tableau_themes_defini[$habillage_cles]).'" size="50">'; 76 } 77 77 echo '<input type="submit" value="'._T('evahabillage:EVA_valider').'"></div><input type="hidden" name="modif_habillage" value="2"></form>'; 78 78 79 echo fin_cadre_trait_couleur(true);79 echo fin_cadre_trait_couleur(true); 80 80 81 81 82 82 //Module 2 - Ajustements prédéfinis des paramètres d'habillage 83 83 echo debut_cadre_trait_couleur(_DIR_PLUGIN_EVA_HABILLAGE."img_pack/pinceau.png", true, '', _T('evahabillage:EVA_etape2')); 84 84 echo '<form method="POST" action="'.generer_url_ecrire("eva_habillage_graphisme").'">'; 85 echo '<div style="text-align:center;">'._T('evahabillage:EVA_etape2_detail').'</div>'; 86 $couleur_table = 0; 87 $themes_principaux = EVA_def_themes(); 88 foreach ($themes_principaux as $mon_theme) { 89 echo bouton_block_depliable(_T('evahabillage:'.$mon_theme),false,''); 90 echo debut_block_depliable(false); 91 echo '<br /><table align="center" class="spip">'; 92 foreach($def_themes as $habillage_cles => $habillage_inutile) { 93 if (strpos($habillage_cles,$mon_theme)!==FALSE) { 94 echo '<tr align="center" '; 95 if (($couleur_table%2)==0) {echo 'class="row_even"';} else {echo 'class="row_odd"';} 96 $couleur_table++; 97 echo '><td align="center">'; 98 if ((strpos($mon_habillage,'droite')!=FALSE) AND ($habillage_cles=='taille_largeur_menu')) {echo _T('evahabillage:taille_largeur_menudroite');} 99 elseif ((strpos($mon_habillage,'droite')!=FALSE) AND ($habillage_cles=='taille_largeur_menudroite')) {echo _T('evahabillage:taille_largeur_menu');} 100 else {echo _T('evahabillage:'.$habillage_cles);} 101 echo '</td><td align="center">'.'<input '; 102 if ((strpos($habillage_cles,'bordure_style')===FALSE) 103 AND (strpos($habillage_cles,'bordure_largeur')===FALSE) 104 AND (strpos($habillage_cles,'taille_')===FALSE) 105 AND (strpos($habillage_cles,'admin_deplacement')===FALSE) 106 ){echo 'class="palette" ';} 107 echo 'type="text" name="'.$habillage_cles.'" value="'.$tableau_themes_defini[$habillage_cles].'" size="25"></td></tr>'; 108 } 109 } 110 echo '</table><div style="text-align:center;"><input type="submit" value="'._T('evahabillage:EVA_valider').'"></div>'; 111 echo fin_block(); 85 echo '<div style="text-align:center;">'._T('evahabillage:EVA_etape2_detail').'</div>'; 86 $couleur_table = 0; 87 $themes_principaux = EVA_def_themes(); 88 foreach ($themes_principaux as $mon_theme) { 89 echo bouton_block_depliable(_T('evahabillage:'.$mon_theme),false,''); 90 echo debut_block_depliable(false); 91 echo '<br /><table align="center" class="spip">'; 92 foreach($def_themes as $habillage_cles => $habillage_inutile) { 93 if (strpos($habillage_cles,$mon_theme)!==FALSE) { 94 echo '<tr align="center" '; 95 if (($couleur_table%2)==0) {echo 'class="row_even"';} else {echo 'class="row_odd"';} 96 $couleur_table++; 97 echo '><td align="center">'; 98 if ((strpos($mon_habillage,'droite')!=FALSE) AND ($habillage_cles=='taille_largeur_menu')) {echo _T('evahabillage:taille_largeur_menudroite');} 99 elseif ((strpos($mon_habillage,'droite')!=FALSE) AND ($habillage_cles=='taille_largeur_menudroite')) {echo _T('evahabillage:taille_largeur_menu');} 100 else {echo _T('evahabillage:'.$habillage_cles);} 101 echo '</td><td align="center">'.'<input '; 102 if ((strpos($habillage_cles,'bordure_style')===FALSE) 103 AND (strpos($habillage_cles,'bordure_largeur')===FALSE) 104 AND (strpos($habillage_cles,'taille_')===FALSE) 105 AND (strpos($habillage_cles,'admin_deplacement')===FALSE) 106 ){echo 'class="palette" ';} 107 echo 'type="text" name="'.$habillage_cles.'" value="'.$tableau_themes_defini[$habillage_cles].'" size="25"></td></tr>'; 108 } 109 } 110 echo '</table><div style="text-align:center;"><input type="submit" value="'._T('evahabillage:EVA_valider').'"></div>'; 111 echo fin_block(); 112 } 113 echo'<input type="hidden" name="modif_habillage" value="1"></form>'; 114 115 echo fin_cadre_trait_couleur(true); 116 117 include_spip('inc/evabonus_menu_horizontal'); 118 119 include_spip('inc/eva_menu_langue_graphisme'); 120 121 //Module 3 - Ajout d'imges de fond dans les secteurs 122 echo debut_cadre_trait_couleur(_DIR_PLUGIN_EVA_HABILLAGE."img_pack/img_bloc.png", true, '', _T('evahabillage:EVA_etape3')); 123 if(!empty($_FILES['image_eva_habillage_envoi']['tmp_name']) AND is_uploaded_file($_FILES['image_eva_habillage_envoi']['tmp_name']) AND filesize($_FILES['image_eva_habillage_envoi']['tmp_name'])<2000000){ 124 list($largeur, $hauteur, $type, $attr)=getimagesize($_FILES['image_eva_habillage_envoi']['tmp_name']); 125 if (($type===1) OR ($type===2) OR ($type===3)){ 126 if(!move_uploaded_file($_FILES['image_eva_habillage_envoi']['tmp_name'], _DIR_IMG.'eva_habillage/'.$_FILES['image_eva_habillage_envoi']['name'])) 127 {echo 'Erreur lors de la copie du fichier';} 128 } 112 129 } 113 echo'<input type="hidden" name="modif_habillage" value="1"></form>'; 114 115 echo fin_cadre_trait_couleur(true); 116 117 include_spip('inc/evabonus_menu_horizontal'); 118 119 include_spip('inc/eva_menu_langue_graphisme'); 120 121 //Module 3 - Ajout d'imges de fond dans les secteurs 122 echo debut_cadre_trait_couleur(_DIR_PLUGIN_EVA_HABILLAGE."img_pack/img_bloc.png", true, '', _T('evahabillage:EVA_etape3')); 123 if(!empty($_FILES['image_eva_habillage_envoi']['tmp_name']) AND is_uploaded_file($_FILES['image_eva_habillage_envoi']['tmp_name']) AND filesize($_FILES['image_eva_habillage_envoi']['tmp_name'])<2000000){ 124 list($largeur, $hauteur, $type, $attr)=getimagesize($_FILES['image_eva_habillage_envoi']['tmp_name']); 125 if (($type===1) OR ($type===2) OR ($type===3)){ 126 if(!move_uploaded_file($_FILES['image_eva_habillage_envoi']['tmp_name'], _DIR_IMG.'eva_habillage/'.$_FILES['image_eva_habillage_envoi']['name'])) 127 {echo 'Erreur lors de la copie du fichier';} 128 } 129 } 130 131 if (isset($_POST['supprime_image'])) { 132 sql_delete('spip_eva_habillage_images',"id=".$_POST['supprime_image']); 133 } 134 if (isset($_POST['secteur_image'])) { 135 $recup_image_exists = sql_select('id','spip_eva_habillage_images',"nom_div = '".$_POST['secteur_image']."' AND nom_habillage = 'Defaut'"); 136 $tab_recup_image_exists = sql_fetch($recup_image_exists); 137 $repeat = $_POST['repeat_x']+$_POST['repeat_y']; 138 if ($repeat==0) {$rep='no-repeat';} 139 elseif ($repeat==1) {$rep='repeat-x';} 140 elseif ($repeat==2) {$rep='repeat-y';} 141 elseif ($repeat==3) {$rep='repeat';} 142 if ($_POST['pos_x']==4) {$Xpos=$_POST['position_x'];} else {$Xpos=$_POST['pos_x'];} 143 if ($_POST['pos_y']==4) {$Ypos=$_POST['position_y'];} else {$Ypos=$_POST['pos_y'];} 144 if (isset($tab_recup_image_exists['id'])) { 145 sql_updateq('spip_eva_habillage_images',array('nom_image' => $_POST['nom_image'], 'pos_x' => $Xpos, 'pos_y' => $Ypos , 'repetition' => $rep , 'attach' => $_POST['attach']),"id =".$tab_recup_image_exists['id']); 146 } 147 else { 148 sql_insertq('spip_eva_habillage_images',array('type' =>'image','nom_habillage' => 'Defaut','nom_div' => $_POST['secteur_image'],'nom_image' =>$_POST['nom_image'],'pos_x' => $Xpos,'pos_y' => $Ypos,'repetition' => $rep,'attach' =>$_POST['attach'])); 149 } 150 } 151 152 echo bouton_block_depliable(_T('evahabillage:EVA_etape3_image_fond'),false,''); 153 echo debut_block_depliable(false); 154 echo '<br /><form method="POST" action="'.generer_url_ecrire("eva_habillage_graphisme").'">'; 155 echo _T('evahabillage:EVA_etape3_pour_secteur').'<br />'; 156 echo '<div style="text-align:center;"><select name="secteur_image">'; 157 $def_div = EVA_div_images(); 158 foreach ($def_div as $cle => $val) { 159 if (strpos($cle,'image_')!==FALSE) {echo '<option value="'.$cle.'">'._T('evahabillage:'.$cle).'</option>';} 160 } 161 echo '</select></div><br /> <br />'; 162 echo _T('evahabillage:EVA_etape3_pos_x'); 163 echo '<div style="text-align:center;">'._T('evahabillage:EVA_gauche'); 164 echo '<input type="radio" name="pos_x" value="left" checked /> '; 165 echo _T('evahabillage:EVA_centre'); 166 echo '<input type="radio" name="pos_x" value="center" /> '; 167 echo _T('evahabillage:EVA_droite'); 168 echo '<input type="radio" name="pos_x" value="right" /></div>'; 169 echo '<input type="radio" name="pos_x" value=4 />'._T('evahabillage:EVA_etape3_pos_choix'); 170 echo '<br /><div style="text-align:center;"><input type="text" name="position_x" /></div>'; 171 echo '<div style="text-align:center;">'._T('evahabillage:EVA_etape3_repeat_x')._T('evahabillage:EVA_non'); 172 echo '<input type="radio" name="repeat_x" value=0 checked />'; 173 echo ' '._T('evahabillage:EVA_oui'); 174 echo '<input type="radio" name="repeat_x" value=1 /></div><br /> <br />'; 175 176 echo _T('evahabillage:EVA_etape3_pos_y'); 177 echo '<div style="text-align:center;">'._T('evahabillage:EVA_haut'); 178 echo '<input type="radio" name="pos_y" value="top" checked /> '; 179 echo _T('evahabillage:EVA_centre'); 180 echo '<input type="radio" name="pos_y" value="center" /> '; 181 echo _T('evahabillage:EVA_bas'); 182 echo '<input type="radio" name="pos_y" value="bottom" /></div>'; 183 echo '<input type="radio" name="pos_y" value=4 />'._T('evahabillage:EVA_etape3_pos_choix'); 184 echo '<br /><div style="text-align:center;"><input type="text" name="position_y" /></div>'; 185 echo '<div style="text-align:center;">'._T('evahabillage:EVA_etape3_repeat_y')._T('evahabillage:EVA_non'); 186 echo '<input type="radio" name="repeat_y" value=0 checked />'; 187 echo ' '._T('evahabillage:EVA_oui'); 188 echo '<input type="radio" name="repeat_y" value=2 /></div><br /> <br />'; 189 190 echo '<div style="text-align:center;">'._T('evahabillage:EVA_etape3_attach'); 191 echo _T('evahabillage:EVA_normal'); 192 echo '<input type="radio" name="attach" value="scroll" checked/> '; 193 echo _T('evahabillage:EVA_fixe'); 194 echo '<input type="radio" name="attach" value="fixed" /></div><br /> <br />'; 195 196 echo '<div style="text-align:center;">'._T('evahabillage:EVA_etape3_choix_image').'<strong>'._DIR_PLUGIN_EVA_HABILLAGE."mon_image</strong> ou, notamment dans le cas d'un site mutualisé, 197 dans le répertoire <strong>"._DIR_IMG."eva_habillage</strong>, ou utilisez le formulaire de chargement ci-dessous pour éviter le chargement par FTP<br />"; 198 echo '<select name="nom_image">'; 199 $dir = opendir(_DIR_PLUGIN_EVA_HABILLAGE."mon_image"); 200 while ($nom_fichier = readdir($dir)) { 201 if (($nom_fichier!='.') AND ($nom_fichier!='..') AND ((strpos($nom_fichier,'.gif')) OR (strpos($nom_fichier,'.jpg')) OR (strpos($nom_fichier,'.png')) OR (strpos($nom_fichier,'.GIF')) OR (strpos($nom_fichier,'.JPG')) OR (strpos($nom_fichier,'.PNG')))) { 202 echo '<option value="'.$nom_fichier.'">'.$nom_fichier.'</option>'; 203 } 204 } 205 closedir($dir); 206 $dir = opendir(_DIR_IMG."eva_habillage"); 207 while ($nom_fichier = readdir($dir)) { 208 if (($nom_fichier!='.') AND ($nom_fichier!='..') AND ((strpos($nom_fichier,'.gif')) OR (strpos($nom_fichier,'.jpg')) OR (strpos($nom_fichier,'.png')) OR (strpos($nom_fichier,'.GIF')) OR (strpos($nom_fichier,'.JPG')) OR (strpos($nom_fichier,'.PNG')))) { 209 echo '<option value="'.$nom_fichier.'">'.$nom_fichier.'</option>'; 210 } 211 } 212 closedir($dir); 213 echo '</select><br /> <br /><input type="submit" value="'._T('evahabillage:EVA_valider').'"></div></form>'; 214 echo fin_block(); 215 216 echo bouton_block_depliable("Chargement d'images",false,''); 217 echo debut_block_depliable(false); 218 echo "<center>L'image sera téléchargée dans le répertoire <strong>"._DIR_IMG."eva_habillage</strong><br />"; 219 echo "<span style='text-decoration:underline;'><strong>Attention :</strong></span> si une image portant le même nom est déjà présente dans ce répertoire, elle sera alors écrasée."; 220 echo '<br /> <br /><form action="'.generer_url_ecrire("eva_habillage_graphisme").'" method="post" enctype="multipart/form-data">'; 221 echo '<input type="file" name="image_eva_habillage_envoi" /><br /> <br /><input type="submit" value="Envoyer" /></form></center>'; 222 echo fin_block(); 223 224 echo bouton_block_depliable(_T('evahabillage:EVA_etape3_liste_images_definies'),false,''); 225 echo debut_block_depliable(false); 226 $recup_exist_image = sql_select('id , nom_div , nom_image','spip_eva_habillage_images',"type = 'image' AND nom_habillage = 'Defaut'"); 227 $test_exist_image = sql_select('id','spip_eva_habillage_images',"type = 'image' AND nom_habillage = 'Defaut' LIMIT 1"); 228 $tab_test_exist_image = sql_fetch($test_exist_image); 229 if ($tab_test_exist_image!='') { 230 echo '<br /><table align="center" class="spip">'; 231 echo '<tr align="center" '; 232 if (($couleur_table%2)==0) {echo 'class="row_even"';} else {echo 'class="row_odd"';} 233 $couleur_table++; 234 echo '>'; 235 echo '<td align="center"><div style="text-decoration:underline;">Secteur</div></td><td align="center"><div style="text-decoration:underline;">Image</div></td><td align="center"><div style="text-decoration:underline;">Supprimer ?</div></td></tr>'; 236 while ($tab_exist_image = sql_fetch($recup_exist_image)) { 237 echo '<tr align="center" '; 238 if (($couleur_table%2)==0) {echo 'class="row_even"';} else {echo 'class="row_odd"';} 239 $couleur_table++; 240 echo '><form method="POST" action="'.generer_url_ecrire("eva_habillage_graphisme").'"><td align="center">'._T('evahabillage:'.$tab_exist_image['nom_div']).' </td><td align="center"><strong>'.$tab_exist_image['nom_image'].'</strong></td><td align="center">'; 241 echo '<input type="hidden" name="supprime_image" value="'.$tab_exist_image['id'].'" />'; 242 echo '<input type="submit" value="'._T('evahabillage:EVA_supprimer').'" /></td></form></tr>'; 243 } 244 echo '</table>'; 245 } 246 else { 247 echo ' <br />'._T('evahabillage:EVA_aucune_image_fond'); 248 } 249 250 251 //Choix de la puce 252 if (isset($_POST['supprime_puce'])) { 253 sql_delete('spip_eva_habillage_images',"type='puce_spip' AND nom_habillage='Defaut'"); 254 } 255 if (isset($_POST['nom_puce'])) { 256 sql_delete('spip_eva_habillage_images',"type='puce_spip' AND nom_habillage='Defaut'"); 257 sql_insertq('spip_eva_habillage_images',array('type'=>'puce_spip','nom_habillage'=>'Defaut','nom_image'=>$_POST['nom_puce'])); 258 } 259 $test_puce=sql_select('nom_image','spip_eva_habillage_images',"type='puce_spip' AND nom_habillage='Defaut'"); 260 $tab_puce=sql_fetch($test_puce); 261 $puce=$tab_puce['nom_image']; 262 echo fin_block().'<br />'; 263 echo '<hr /><br />'; 264 echo bouton_block_depliable(_T('evahabillage:EVA_etape3_liste_puce'),false,''); 265 echo debut_block_depliable(false); 266 echo "<p>"._T('evahabillage:EVA_etape3_liste_puce_explication')."</p>"; 267 echo '<div style="text-align:center;"><form method="POST" action="'.generer_url_ecrire("eva_habillage_graphisme").'">'; 268 echo '<select name="nom_puce">'; 269 $dir = opendir(_DIR_PLUGIN_EVA_HABILLAGE."mon_image"); 270 while ($nom_fichier = readdir($dir)) { 271 if (($nom_fichier!='.') AND ($nom_fichier!='..') AND ((strpos($nom_fichier,'.gif')) OR (strpos($nom_fichier,'.jpg')) OR (strpos($nom_fichier,'.png')) OR (strpos($nom_fichier,'.GIF')) OR (strpos($nom_fichier,'.JPG')) OR (strpos($nom_fichier,'.PNG')))) { 272 echo '<option value="'.$nom_fichier.'">'.$nom_fichier.'</option>'; 273 } 274 } 275 closedir($dir); 276 $dir = opendir(_DIR_IMG."eva_habillage"); 277 while ($nom_fichier = readdir($dir)) { 278 if (($nom_fichier!='.') AND ($nom_fichier!='..') AND ((strpos($nom_fichier,'.gif')) OR (strpos($nom_fichier,'.jpg')) OR (strpos($nom_fichier,'.png')) OR (strpos($nom_fichier,'.GIF')) OR (strpos($nom_fichier,'.JPG')) OR (strpos($nom_fichier,'.PNG')))) { 279 echo '<option value="'.$nom_fichier.'">'.$nom_fichier.'</option>'; 280 } 281 } 282 closedir($dir); 283 echo '</select><br /> <br /><input type="submit" value="'._T('evahabillage:EVA_valider').'"></form></div>'; 284 echo fin_block(); 285 if ($puce) { 286 echo bouton_block_depliable(_T('evahabillage:EVA_etape3_definition_puce'),false,''); 287 echo debut_block_depliable(false); 288 echo "<div style='text-align:center;'>La puce actuelle est <img src='"._DIR_IMG."eva_habillage/".$puce."' />"; 289 echo "<br />La supprimer et revenir aux puces générées par SPIP ?<br />"; 290 echo '<form method="POST" action="'.generer_url_ecrire("eva_habillage_graphisme").'">'; 291 echo '<input type="hidden" name="supprime_puce" value="2" />'; 292 echo '<input type="submit" value="'._T('evahabillage:EVA_supprimer').'" /></td></form></tr>'; 293 echo "</form></div>"; 294 echo fin_block(); 295 } 296 echo '<br />'; 297 echo fin_cadre_trait_couleur(true); 298 299 300 301 302 303 //Aide graphiques (codes couleur et ColorSchemes) 304 echo debut_cadre_trait_couleur(_DIR_PLUGIN_EVA_HABILLAGE."img_pack/palette.png", true, '', _T('evahabillage:EVA_aide_graphisme')); 305 include_spip("inc/eva_habillage_choix_couleur"); 306 eva_habillage_choix_couleur(); 307 echo '<hr /><p><a href="'._DIR_PLUGIN_EVA_HABILLAGE.'colorschemes2/index.html" target="_blank" title="Cliquez ici pour utiliser ColorSchemes2 !">'._T('evahabillage:colorschemes2').'</a></p><br />'; 308 echo fin_cadre_trait_couleur(true); 309 310 //Taille des logos 311 if ($_POST['test_logo']==2) { 312 if (is_numeric($_POST['largeur_mini_logo'])) {$logo1l=$_POST['largeur_mini_logo'];} else {$logo1l='';} 313 if (is_numeric($_POST['hauteur_mini_logo'])) {$logo1h=$_POST['hauteur_mini_logo'];} else {$logo1h='';} 314 if (is_numeric($_POST['largeur_petit_logo'])) {$logo2l=$_POST['largeur_petit_logo'];} else {$logo2l='';}; 315 if (is_numeric($_POST['hauteur_petit_logo'])) {$logo2h=$_POST['hauteur_petit_logo'];} else {$logo2h='';} 316 if (is_numeric($_POST['largeur_logo_moyen'])) {$logo3l=$_POST['largeur_logo_moyen'];} else {$logo3l='';} 317 if (is_numeric($_POST['hauteur_logo_moyen'])) {$logo3h=$_POST['hauteur_logo_moyen'];} else {$logo3h='';} 318 sql_delete('spip_eva_habillage_images',"type='logos' AND nom_habillage='Defaut'"); 319 sql_insertq('spip_eva_habillage_images',array('type'=>'logos','nom_habillage'=>'Defaut','nom_div'=>'largeur_mini_logo','nom_image'=>$logo1l)); 320 sql_insertq('spip_eva_habillage_images',array('type'=>'logos','nom_habillage'=>'Defaut','nom_div'=>'hauteur_mini_logo','nom_image'=>$logo1h)); 321 sql_insertq('spip_eva_habillage_images',array('type'=>'logos','nom_habillage'=>'Defaut','nom_div'=>'largeur_petit_logo','nom_image'=>$logo2l)); 322 sql_insertq('spip_eva_habillage_images',array('type'=>'logos','nom_habillage'=>'Defaut','nom_div'=>'hauteur_petit_logo','nom_image'=>$logo2h)); 323 sql_insertq('spip_eva_habillage_images',array('type'=>'logos','nom_habillage'=>'Defaut','nom_div'=>'largeur_logo_moyen','nom_image'=>$logo3l)); 324 sql_insertq('spip_eva_habillage_images',array('type'=>'logos','nom_habillage'=>'Defaut','nom_div'=>'hauteur_logo_moyen','nom_image'=>$logo3h)); 325 } 326 $test_logo1l=sql_select('nom_image','spip_eva_habillage_images',"type='logos' AND nom_habillage='Defaut' AND nom_div='largeur_mini_logo'"); 327 $tab_logo1l=sql_fetch($test_logo1l); 328 $logo1l=$tab_logo1l['nom_image']; 329 $test_logo1h=sql_select('nom_image','spip_eva_habillage_images',"type='logos' AND nom_habillage='Defaut' AND nom_div='hauteur_mini_logo'"); 330 $tab_logo1h=sql_fetch($test_logo1h); 331 $logo1h=$tab_logo1h['nom_image']; 332 $test_logo2l=sql_select('nom_image','spip_eva_habillage_images',"type='logos' AND nom_habillage='Defaut' AND nom_div='largeur_petit_logo'"); 333 $tab_logo2l=sql_fetch($test_logo2l); 334 $logo2l=$tab_logo2l['nom_image']; 335 $test_logo2h=sql_select('nom_image','spip_eva_habillage_images',"type='logos' AND nom_habillage='Defaut' AND nom_div='hauteur_petit_logo'"); 336 $tab_logo2h=sql_fetch($test_logo2h); 337 $logo2h=$tab_logo2h['nom_image']; 338 $test_logo3l=sql_select('nom_image','spip_eva_habillage_images',"type='logos' AND nom_habillage='Defaut' AND nom_div='largeur_logo_moyen'"); 339 $tab_logo3l=sql_fetch($test_logo3l); 340 $logo3l=$tab_logo3l['nom_image']; 341 $test_logo3h=sql_select('nom_image','spip_eva_habillage_images',"type='logos' AND nom_habillage='Defaut' AND nom_div='hauteur_logo_moyen'"); 342 $tab_logo3h=sql_fetch($test_logo3h); 343 $logo3h=$tab_logo3h['nom_image']; 344 echo debut_cadre_trait_couleur(_DIR_PLUGIN_EVA_HABILLAGE."img_pack/eva.gif", true, '', _T('evahabillage:logos_taille_def')); 345 echo _T('evahabillage:logos_taille_detail'); 346 echo '<center><form method="POST" action="'.generer_url_ecrire("eva_habillage_graphisme").'">'; 347 echo '<br /><table align="center" class="spip">'; 348 echo '<tr align="center" class="row_even">'; 349 echo '<td align="center">Type de logo</td><td align="center">Largeur maximale</td><td align="center">Hauteur maximale</td></tr>'; 350 echo '<tr align="center" class="row_odd">'; 351 echo '<td align="center">Mini logos</td><td align="center"><center><input type="text" name="largeur_mini_logo" value="'.$logo1l.'" size="10"></center></td><td align="center"><center><input type="text" name="hauteur_mini_logo" value="'.$logo1h.'" size="10"></center></td></tr>'; 352 echo '<tr align="center" class="row_even">'; 353 echo '<td align="center">Petits logos</td><td align="center"><center><input type="text" name="largeur_petit_logo" value="'.$logo2l.'" size="10"></center></td><td align="center"><center><input type="text" name="hauteur_petit_logo" value="'.$logo2h.'" size="10"></center></td></tr>'; 354 echo '<tr align="center" class="row_odd">'; 355 echo '<td align="center">Logos moyens</td><td align="center"><center><input type="text" name="largeur_logo_moyen" value="'.$logo3l.'" size="10"></center></td><td align="center"><center><input type="text" name="hauteur_logo_moyen" value="'.$logo3h.'" size="10"></center></td></tr>'; 356 echo '</table><br /><input type="hidden" name="test_logo" value="2"><input type="submit" value="'._T('evahabillage:EVA_valider').'" /></form>'; 357 echo '<hr />'; 358 if ($_POST['test_image_article']==2) { 359 sql_delete('spip_eva_habillage_images',"type='logos' AND nom_habillage='Defaut' AND nom_div='largeur_image_article'"); 360 if (is_numeric($_POST['largeur_image_article'])) {$image_article=$_POST['largeur_image_article'];} else {$image_article='';} 361 sql_insertq('spip_eva_habillage_images',array('type'=>'logos','nom_habillage'=>'Defaut','nom_div'=>'largeur_image_article','nom_image'=>$image_article)); 362 } 363 $test_image_article=sql_select('nom_image','spip_eva_habillage_images',"type='logos' AND nom_habillage='Defaut' AND nom_div='largeur_image_article'"); 364 $tab_image_article=sql_fetch($test_image_article); 365 $image_article=$tab_image_article['nom_image']; 366 367 echo _T('evahabillage:logos_taille_image_article'); 368 echo '<p><center><form method="POST" action="'.generer_url_ecrire("eva_habillage_graphisme").'">'; 369 echo '<input type="text" name="largeur_image_article" value="'.$image_article.'" size="10">'; 370 echo ' <input type="submit" value="'._T('evahabillage:EVA_valider').'" />'; 371 echo '<input type="hidden" name="test_image_article" value="2">'; 372 echo '</form></center></p>'; 373 echo fin_cadre_trait_couleur(true); 374 375 //Insertion de banières Flash (format swf) 376 377 if(!empty($_FILES['flash_eva_habillage_envoi']['tmp_name']) AND is_uploaded_file($_FILES['flash_eva_habillage_envoi']['tmp_name']) AND (strpos($_FILES['flash_eva_habillage_envoi']['name'],'.swf'))){ 378 if(!move_uploaded_file($_FILES['flash_eva_habillage_envoi']['tmp_name'], _DIR_IMG.'eva_habillage/flash/'.$_FILES['flash_eva_habillage_envoi']['name'])) 130 131 if (isset($_POST['supprime_image'])) { 132 sql_delete('spip_eva_habillage_images',"id=".$_POST['supprime_image']); 133 } 134 if (isset($_POST['secteur_image'])) { 135 $recup_image_exists = sql_select('id','spip_eva_habillage_images',"nom_div = '".$_POST['secteur_image']."' AND nom_habillage = 'Defaut'"); 136 $tab_recup_image_exists = sql_fetch($recup_image_exists); 137 $repeat = $_POST['repeat_x']+$_POST['repeat_y']; 138 if ($repeat==0) {$rep='no-repeat';} 139 elseif ($repeat==1) {$rep='repeat-x';} 140 elseif ($repeat==2) {$rep='repeat-y';} 141 elseif ($repeat==3) {$rep='repeat';} 142 if ($_POST['pos_x']==4) {$Xpos=$_POST['position_x'];} else {$Xpos=$_POST['pos_x'];} 143 if ($_POST['pos_y']==4) {$Ypos=$_POST['position_y'];} else {$Ypos=$_POST['pos_y'];} 144 if (isset($tab_recup_image_exists['id'])) { 145 sql_updateq('spip_eva_habillage_images',array('nom_image' => $_POST['nom_image'], 'pos_x' => $Xpos, 'pos_y' => $Ypos , 'repetition' => $rep , 'attach' => $_POST['attach']),"id =".$tab_recup_image_exists['id']); 146 } 147 else { 148 sql_insertq('spip_eva_habillage_images',array('type' =>'image','nom_habillage' => 'Defaut','nom_div' => $_POST['secteur_image'],'nom_image' =>$_POST['nom_image'],'pos_x' => $Xpos,'pos_y' => $Ypos,'repetition' => $rep,'attach' =>$_POST['attach'])); 149 } 150 } 151 152 echo bouton_block_depliable(_T('evahabillage:EVA_etape3_image_fond'),false,''); 153 echo debut_block_depliable(false); 154 echo '<br /><form method="POST" action="'.generer_url_ecrire("eva_habillage_graphisme").'">'; 155 echo _T('evahabillage:EVA_etape3_pour_secteur').'<br />'; 156 echo '<div style="text-align:center;"><select name="secteur_image">'; 157 $def_div = EVA_div_images(); 158 foreach ($def_div as $cle => $val) { 159 if (strpos($cle,'image_')!==FALSE) {echo '<option value="'.$cle.'">'._T('evahabillage:'.$cle).'</option>';} 160 } 161 echo '</select></div><br /> <br />'; 162 echo _T('evahabillage:EVA_etape3_pos_x'); 163 echo '<div style="text-align:center;">'._T('evahabillage:EVA_gauche'); 164 echo '<input type="radio" name="pos_x" value="left" checked /> '; 165 echo _T('evahabillage:EVA_centre'); 166 echo '<input type="radio" name="pos_x" value="center" /> '; 167 echo _T('evahabillage:EVA_droite'); 168 echo '<input type="radio" name="pos_x" value="right" /></div>'; 169 echo '<input type="radio" name="pos_x" value=4 />'._T('evahabillage:EVA_etape3_pos_choix'); 170 echo '<br /><div style="text-align:center;"><input type="text" name="position_x" /></div>'; 171 echo '<div style="text-align:center;">'._T('evahabillage:EVA_etape3_repeat_x')._T('evahabillage:EVA_non'); 172 echo '<input type="radio" name="repeat_x" value=0 checked />'; 173 echo ' '._T('evahabillage:EVA_oui'); 174 echo '<input type="radio" name="repeat_x" value=1 /></div><br /> <br />'; 175 176 echo _T('evahabillage:EVA_etape3_pos_y'); 177 echo '<div style="text-align:center;">'._T('evahabillage:EVA_haut'); 178 echo '<input type="radio" name="pos_y" value="top" checked /> '; 179 echo _T('evahabillage:EVA_centre'); 180 echo '<input type="radio" name="pos_y" value="center" /> '; 181 echo _T('evahabillage:EVA_bas'); 182 echo '<input type="radio" name="pos_y" value="bottom" /></div>'; 183 echo '<input type="radio" name="pos_y" value=4 />'._T('evahabillage:EVA_etape3_pos_choix'); 184 echo '<br /><div style="text-align:center;"><input type="text" name="position_y" /></div>'; 185 echo '<div style="text-align:center;">'._T('evahabillage:EVA_etape3_repeat_y')._T('evahabillage:EVA_non'); 186 echo '<input type="radio" name="repeat_y" value=0 checked />'; 187 echo ' '._T('evahabillage:EVA_oui'); 188 echo '<input type="radio" name="repeat_y" value=2 /></div><br /> <br />'; 189 190 echo '<div style="text-align:center;">'._T('evahabillage:EVA_etape3_attach'); 191 echo _T('evahabillage:EVA_normal'); 192 echo '<input type="radio" name="attach" value="scroll" checked/> '; 193 echo _T('evahabillage:EVA_fixe'); 194 echo '<input type="radio" name="attach" value="fixed" /></div><br /> <br />'; 195 196 echo '<div style="text-align:center;">'._T('evahabillage:EVA_etape3_choix_image').'<strong>'._DIR_PLUGIN_EVA_HABILLAGE."mon_image</strong> ou, notamment dans le cas d'un site mutualisé, 197 dans le répertoire <strong>"._DIR_IMG."eva_habillage</strong>, ou utilisez le formulaire de chargement ci-dessous pour éviter le chargement par FTP<br />"; 198 echo '<select name="nom_image">'; 199 $dir = opendir(_DIR_PLUGIN_EVA_HABILLAGE."mon_image"); 200 while ($nom_fichier = readdir($dir)) { 201 if (($nom_fichier!='.') AND ($nom_fichier!='..') AND ((strpos($nom_fichier,'.gif')) OR (strpos($nom_fichier,'.jpg')) OR (strpos($nom_fichier,'.png')) OR (strpos($nom_fichier,'.GIF')) OR (strpos($nom_fichier,'.JPG')) OR (strpos($nom_fichier,'.PNG')))) { 202 echo '<option value="'.$nom_fichier.'">'.$nom_fichier.'</option>'; 203 } 204 } 205 closedir($dir); 206 $dir = opendir(_DIR_IMG."eva_habillage"); 207 while ($nom_fichier = readdir($dir)) { 208 if (($nom_fichier!='.') AND ($nom_fichier!='..') AND ((strpos($nom_fichier,'.gif')) OR (strpos($nom_fichier,'.jpg')) OR (strpos($nom_fichier,'.png')) OR (strpos($nom_fichier,'.GIF')) OR (strpos($nom_fichier,'.JPG')) OR (strpos($nom_fichier,'.PNG')))) { 209 echo '<option value="'.$nom_fichier.'">'.$nom_fichier.'</option>'; 210 } 211 } 212 closedir($dir); 213 echo '</select><br /> <br /><input type="submit" value="'._T('evahabillage:EVA_valider').'"></div></form>'; 214 echo fin_block(); 215 216 echo bouton_block_depliable("Chargement d'images",false,''); 217 echo debut_block_depliable(false); 218 echo "<center>L'image sera téléchargée dans le répertoire <strong>"._DIR_IMG."eva_habillage</strong><br />"; 219 echo "<span style='text-decoration:underline;'><strong>Attention :</strong></span> si une image portant le même nom est déjà présente dans ce répertoire, elle sera alors écrasée."; 220 echo '<br /> <br /><form action="'.generer_url_ecrire("eva_habillage_graphisme").'" method="post" enctype="multipart/form-data">'; 221 echo '<input type="file" name="image_eva_habillage_envoi" /><br /> <br /><input type="submit" value="Envoyer" /></form></center>'; 222 echo fin_block(); 223 224 echo bouton_block_depliable(_T('evahabillage:EVA_etape3_liste_images_definies'),false,''); 225 echo debut_block_depliable(false); 226 $recup_exist_image = sql_select('id , nom_div , nom_image','spip_eva_habillage_images',"type = 'image' AND nom_habillage = 'Defaut'"); 227 $test_exist_image = sql_select('id','spip_eva_habillage_images',"type = 'image' AND nom_habillage = 'Defaut' LIMIT 1"); 228 $tab_test_exist_image = sql_fetch($test_exist_image); 229 if ($tab_test_exist_image!='') { 230 echo '<br /><table align="center" class="spip">'; 231 echo '<tr align="center" '; 232 if (($couleur_table%2)==0) {echo 'class="row_even"';} else {echo 'class="row_odd"';} 233 $couleur_table++; 234 echo '>'; 235 echo '<td align="center"><div style="text-decoration:underline;">Secteur</div></td><td align="center"><div style="text-decoration:underline;">Image</div></td><td align="center"><div style="text-decoration:underline;">Supprimer ?</div></td></tr>'; 236 while ($tab_exist_image = sql_fetch($recup_exist_image)) { 237 echo '<tr align="center" '; 238 if (($couleur_table%2)==0) {echo 'class="row_even"';} else {echo 'class="row_odd"';} 239 $couleur_table++; 240 echo '><form method="POST" action="'.generer_url_ecrire("eva_habillage_graphisme").'"><td align="center">'._T('evahabillage:'.$tab_exist_image['nom_div']).' </td><td align="center"><strong>'.$tab_exist_image['nom_image'].'</strong></td><td align="center">'; 241 echo '<input type="hidden" name="supprime_image" value="'.$tab_exist_image['id'].'" />'; 242 echo '<input type="submit" value="'._T('evahabillage:EVA_supprimer').'" /></td></form></tr>'; 243 } 244 echo '</table>'; 245 } 246 else { 247 echo ' <br />'._T('evahabillage:EVA_aucune_image_fond'); 248 } 249 250 251 //Choix de la puce 252 if (isset($_POST['supprime_puce'])) { 253 sql_delete('spip_eva_habillage_images',"type='puce_spip' AND nom_habillage='Defaut'"); 254 } 255 if (isset($_POST['nom_puce'])) { 256 sql_delete('spip_eva_habillage_images',"type='puce_spip' AND nom_habillage='Defaut'"); 257 sql_insertq('spip_eva_habillage_images',array('type'=>'puce_spip','nom_habillage'=>'Defaut','nom_image'=>$_POST['nom_puce'])); 258 } 259 $test_puce=sql_select('nom_image','spip_eva_habillage_images',"type='puce_spip' AND nom_habillage='Defaut'"); 260 $tab_puce=sql_fetch($test_puce); 261 $puce=$tab_puce['nom_image']; 262 echo fin_block().'<br />'; 263 echo '<hr /><br />'; 264 echo bouton_block_depliable(_T('evahabillage:EVA_etape3_liste_puce'),false,''); 265 echo debut_block_depliable(false); 266 echo "<p>"._T('evahabillage:EVA_etape3_liste_puce_explication')."</p>"; 267 echo '<div style="text-align:center;"><form method="POST" action="'.generer_url_ecrire("eva_habillage_graphisme").'">'; 268 echo '<select name="nom_puce">'; 269 $dir = opendir(_DIR_PLUGIN_EVA_HABILLAGE."mon_image"); 270 while ($nom_fichier = readdir($dir)) { 271 if (($nom_fichier!='.') AND ($nom_fichier!='..') AND ((strpos($nom_fichier,'.gif')) OR (strpos($nom_fichier,'.jpg')) OR (strpos($nom_fichier,'.png')) OR (strpos($nom_fichier,'.GIF')) OR (strpos($nom_fichier,'.JPG')) OR (strpos($nom_fichier,'.PNG')))) { 272 echo '<option value="'.$nom_fichier.'">'.$nom_fichier.'</option>'; 273 } 274 } 275 closedir($dir); 276 $dir = opendir(_DIR_IMG."eva_habillage"); 277 while ($nom_fichier = readdir($dir)) { 278 if (($nom_fichier!='.') AND ($nom_fichier!='..') AND ((strpos($nom_fichier,'.gif')) OR (strpos($nom_fichier,'.jpg')) OR (strpos($nom_fichier,'.png')) OR (strpos($nom_fichier,'.GIF')) OR (strpos($nom_fichier,'.JPG')) OR (strpos($nom_fichier,'.PNG')))) { 279 echo '<option value="'.$nom_fichier.'">'.$nom_fichier.'</option>'; 280 } 281 } 282 closedir($dir); 283 echo '</select><br /> <br /><input type="submit" value="'._T('evahabillage:EVA_valider').'"></form></div>'; 284 echo fin_block(); 285 if ($puce) { 286 echo bouton_block_depliable(_T('evahabillage:EVA_etape3_definition_puce'),false,''); 287 echo debut_block_depliable(false); 288 echo "<div style='text-align:center;'>La puce actuelle est <img src='"._DIR_IMG."eva_habillage/".$puce."' />"; 289 echo "<br />La supprimer et revenir aux puces générées par SPIP ?<br />"; 290 echo '<form method="POST" action="'.generer_url_ecrire("eva_habillage_graphisme").'">'; 291 echo '<input type="hidden" name="supprime_puce" value="2" />'; 292 echo '<input type="submit" value="'._T('evahabillage:EVA_supprimer').'" /></td></form></tr>'; 293 echo "</form></div>"; 294 echo fin_block(); 295 } 296 echo '<br />'; 297 echo fin_cadre_trait_couleur(true); 298 299 //Aide graphiques (codes couleur et ColorSchemes) 300 echo debut_cadre_trait_couleur(_DIR_PLUGIN_EVA_HABILLAGE."img_pack/palette.png", true, '', _T('evahabillage:EVA_aide_graphisme')); 301 include_spip("inc/eva_habillage_choix_couleur"); 302 eva_habillage_choix_couleur(); 303 echo '<hr /><p><a href="'._DIR_PLUGIN_EVA_HABILLAGE.'colorschemes2/index.html" target="_blank" title="Cliquez ici pour utiliser ColorSchemes2 !">'._T('evahabillage:colorschemes2').'</a></p><br />'; 304 echo fin_cadre_trait_couleur(true); 305 306 //Taille des logos 307 if ($_POST['test_logo']==2) { 308 if (is_numeric($_POST['largeur_mini_logo'])) {$logo1l=$_POST['largeur_mini_logo'];} else {$logo1l='';} 309 if (is_numeric($_POST['hauteur_mini_logo'])) {$logo1h=$_POST['hauteur_mini_logo'];} else {$logo1h='';} 310 if (is_numeric($_POST['largeur_petit_logo'])) {$logo2l=$_POST['largeur_petit_logo'];} else {$logo2l='';}; 311 if (is_numeric($_POST['hauteur_petit_logo'])) {$logo2h=$_POST['hauteur_petit_logo'];} else {$logo2h='';} 312 if (is_numeric($_POST['largeur_logo_moyen'])) {$logo3l=$_POST['largeur_logo_moyen'];} else {$logo3l='';} 313 if (is_numeric($_POST['hauteur_logo_moyen'])) {$logo3h=$_POST['hauteur_logo_moyen'];} else {$logo3h='';} 314 sql_delete('spip_eva_habillage_images',"type='logos' AND nom_habillage='Defaut'"); 315 sql_insertq('spip_eva_habillage_images',array('type'=>'logos','nom_habillage'=>'Defaut','nom_div'=>'largeur_mini_logo','nom_image'=>$logo1l)); 316 sql_insertq('spip_eva_habillage_images',array('type'=>'logos','nom_habillage'=>'Defaut','nom_div'=>'hauteur_mini_logo','nom_image'=>$logo1h)); 317 sql_insertq('spip_eva_habillage_images',array('type'=>'logos','nom_habillage'=>'Defaut','nom_div'=>'largeur_petit_logo','nom_image'=>$logo2l)); 318 sql_insertq('spip_eva_habillage_images',array('type'=>'logos','nom_habillage'=>'Defaut','nom_div'=>'hauteur_petit_logo','nom_image'=>$logo2h)); 319 sql_insertq('spip_eva_habillage_images',array('type'=>'logos','nom_habillage'=>'Defaut','nom_div'=>'largeur_logo_moyen','nom_image'=>$logo3l)); 320 sql_insertq('spip_eva_habillage_images',array('type'=>'logos','nom_habillage'=>'Defaut','nom_div'=>'hauteur_logo_moyen','nom_image'=>$logo3h)); 321 } 322 $test_logo1l=sql_select('nom_image','spip_eva_habillage_images',"type='logos' AND nom_habillage='Defaut' AND nom_div='largeur_mini_logo'"); 323 $tab_logo1l=sql_fetch($test_logo1l); 324 $logo1l=$tab_logo1l['nom_image']; 325 $test_logo1h=sql_select('nom_image','spip_eva_habillage_images',"type='logos' AND nom_habillage='Defaut' AND nom_div='hauteur_mini_logo'"); 326 $tab_logo1h=sql_fetch($test_logo1h); 327 $logo1h=$tab_logo1h['nom_image']; 328 $test_logo2l=sql_select('nom_image','spip_eva_habillage_images',"type='logos' AND nom_habillage='Defaut' AND nom_div='largeur_petit_logo'"); 329 $tab_logo2l=sql_fetch($test_logo2l); 330 $logo2l=$tab_logo2l['nom_image']; 331 $test_logo2h=sql_select('nom_image','spip_eva_habillage_images',"type='logos' AND nom_habillage='Defaut' AND nom_div='hauteur_petit_logo'"); 332 $tab_logo2h=sql_fetch($test_logo2h); 333 $logo2h=$tab_logo2h['nom_image']; 334 $test_logo3l=sql_select('nom_image','spip_eva_habillage_images',"type='logos' AND nom_habillage='Defaut' AND nom_div='largeur_logo_moyen'"); 335 $tab_logo3l=sql_fetch($test_logo3l); 336 $logo3l=$tab_logo3l['nom_image']; 337 $test_logo3h=sql_select('nom_image','spip_eva_habillage_images',"type='logos' AND nom_habillage='Defaut' AND nom_div='hauteur_logo_moyen'"); 338 $tab_logo3h=sql_fetch($test_logo3h); 339 $logo3h=$tab_logo3h['nom_image']; 340 echo debut_cadre_trait_couleur(_DIR_PLUGIN_EVA_HABILLAGE."img_pack/eva.gif", true, '', _T('evahabillage:logos_taille_def')); 341 echo _T('evahabillage:logos_taille_detail'); 342 echo '<center><form method="POST" action="'.generer_url_ecrire("eva_habillage_graphisme").'">'; 343 echo '<br /><table align="center" class="spip">'; 344 echo '<tr align="center" class="row_even">'; 345 echo '<td align="center">Type de logo</td><td align="center">Largeur maximale</td><td align="center">Hauteur maximale</td></tr>'; 346 echo '<tr align="center" class="row_odd">'; 347 echo '<td align="center">Mini logos</td><td align="center"><center><input type="text" name="largeur_mini_logo" value="'.$logo1l.'" size="10"></center></td><td align="center"><center><input type="text" name="hauteur_mini_logo" value="'.$logo1h.'" size="10"></center></td></tr>'; 348 echo '<tr align="center" class="row_even">'; 349 echo '<td align="center">Petits logos</td><td align="center"><center><input type="text" name="largeur_petit_logo" value="'.$logo2l.'" size="10"></center></td><td align="center"><center><input type="text" name="hauteur_petit_logo" value="'.$logo2h.'" size="10"></center></td></tr>'; 350 echo '<tr align="center" class="row_odd">'; 351 echo '<td align="center">Logos moyens</td><td align="center"><center><input type="text" name="largeur_logo_moyen" value="'.$logo3l.'" size="10"></center></td><td align="center"><center><input type="text" name="hauteur_logo_moyen" value="'.$logo3h.'" size="10"></center></td></tr>'; 352 echo '</table><br /><input type="hidden" name="test_logo" value="2"><input type="submit" value="'._T('evahabillage:EVA_valider').'" /></form>'; 353 echo '<hr />'; 354 if ($_POST['test_image_article']==2) { 355 sql_delete('spip_eva_habillage_images',"type='logos' AND nom_habillage='Defaut' AND nom_div='largeur_image_article'"); 356 if (is_numeric($_POST['largeur_image_article'])) {$image_article=$_POST['largeur_image_article'];} else {$image_article='';} 357 sql_insertq('spip_eva_habillage_images',array('type'=>'logos','nom_habillage'=>'Defaut','nom_div'=>'largeur_image_article','nom_image'=>$image_article)); 358 } 359 $test_image_article=sql_select('nom_image','spip_eva_habillage_images',"type='logos' AND nom_habillage='Defaut' AND nom_div='largeur_image_article'"); 360 $tab_image_article=sql_fetch($test_image_article); 361 $image_article=$tab_image_article['nom_image']; 362 363 echo _T('evahabillage:logos_taille_image_article'); 364 echo '<p><center><form method="POST" action="'.generer_url_ecrire("eva_habillage_graphisme").'">'; 365 echo '<input type="text" name="largeur_image_article" value="'.$image_article.'" size="10">'; 366 echo ' <input type="submit" value="'._T('evahabillage:EVA_valider').'" />'; 367 echo '<input type="hidden" name="test_image_article" value="2">'; 368 echo '</form></center></p>'; 369 echo fin_cadre_trait_couleur(true); 370 371 //Insertion de banières Flash (format swf) 372 373 if(!empty($_FILES['flash_eva_habillage_envoi']['tmp_name']) AND is_uploaded_file($_FILES['flash_eva_habillage_envoi']['tmp_name']) AND (strpos($_FILES['flash_eva_habillage_envoi']['name'],'.swf'))){ 374 if(!move_uploaded_file($_FILES['flash_eva_habillage_envoi']['tmp_name'], _DIR_IMG.'eva_habillage/flash/'.$_FILES['flash_eva_habillage_envoi']['name'])) 379 375 {echo 'Erreur lors de la copie du fichier';} 380 } 381 382 if (isset($_POST['supprime_flash'])) { 383 sql_delete('spip_eva_habillage_images',"id=".$_POST['supprime_flash']); 384 } 385 386 if (isset($_POST['secteur_flash'])) { 387 $recup_flash_exists = sql_select('id','spip_eva_habillage_images',"nom_div = '".$_POST['secteur_flash']."' AND nom_habillage = 'Defaut'"); 388 $tab_recup_flash_exists = sql_fetch($recup_flash_exists); 389 if (($_POST['secteur_flash']=='flash_secteur_pied') OR ($_POST['secteur_flash']=='flash_secteur_titre')) { 390 if (isset($tab_recup_flash_exists['id'])) { 391 sql_updateq('spip_eva_habillage_images',array('nom_image' => $_POST['nom_flash'], 'pos_x' => $_POST['flash_horizontal'], 'pos_y' => $_POST['flash_vertical'],'repetition' => $_POST['flash_version']), "id =".$tab_recup_flash_exists['id']); 376 } 377 378 if (isset($_POST['supprime_flash'])) { 379 sql_delete('spip_eva_habillage_images',"id=".$_POST['supprime_flash']); 380 } 381 382 if (isset($_POST['secteur_flash'])) { 383 $recup_flash_exists = sql_select('id','spip_eva_habillage_images',"nom_div = '".$_POST['secteur_flash']."' AND nom_habillage = 'Defaut'"); 384 $tab_recup_flash_exists = sql_fetch($recup_flash_exists); 385 if (($_POST['secteur_flash']=='flash_secteur_pied') OR ($_POST['secteur_flash']=='flash_secteur_titre')) { 386 if (isset($tab_recup_flash_exists['id'])) { 387 sql_updateq('spip_eva_habillage_images',array('nom_image' => $_POST['nom_flash'], 'pos_x' => $_POST['flash_horizontal'], 'pos_y' => $_POST['flash_vertical'],'repetition' => $_POST['flash_version']), "id =".$tab_recup_flash_exists['id']); 388 } 389 else { 390 sql_insertq('spip_eva_habillage_images',array('type' =>'flash','nom_habillage' => 'Defaut','nom_div' => $_POST['secteur_flash'],'nom_image' =>$_POST['nom_flash'],'pos_x' => $_POST['flash_horizontal'], 'pos_y' => $_POST['flash_vertical'],'repetition' => $_POST['flash_version'])); 391 } 392 392 } 393 393 else { 394 sql_insertq('spip_eva_habillage_images',array('type' =>'flash','nom_habillage' => 'Defaut','nom_div' => $_POST['secteur_flash'],'nom_image' =>$_POST['nom_flash'],'pos_x' => $_POST['flash_horizontal'], 'pos_y' => $_POST['flash_vertical'],'repetition' => $_POST['flash_version'])); 395 } 394 sql_insertq('spip_eva_habillage_images',array('type' =>'flash','nom_habillage' => 'Defaut','nom_div' => $_POST['secteur_flash'],'nom_image' =>$_POST['nom_flash'],'pos_x' => $_POST['flash_horizontal'], 'pos_y' => $_POST['flash_vertical'],'repetition' => $_POST['flash_version'])); 395 } 396 } 397 398 echo debut_cadre_trait_couleur(_DIR_PLUGIN_EVA_HABILLAGE."img_pack/EVA_flash.png", true, '', _T('evahabillage:flash_titre')); 399 400 echo bouton_block_depliable(_T('evahabillage:flash_inserer'),false,''); 401 echo debut_block_depliable(false); 402 echo debut_boite_info(true); 403 echo '<br /><form method="POST" action="'.generer_url_ecrire("eva_habillage_graphisme").'">'; 404 echo _T('evahabillage:EVA_etape3_pour_secteur').'<br />'; 405 echo '<div style="text-align:center;"><select name="secteur_flash">'; 406 $def_div = EVA_secteurs_Flash(); 407 foreach ($def_div as $cle) { 408 echo '<option value="'.$cle.'">'._T('evahabillage:'.$cle).'</option>'; 409 } 410 echo '</select></div><br /> <br />'; 411 echo '<div style="text-align:center; text-decoration:underline;">'._T('evahabillage:flash_taille_horizontale').'</div>'; 412 echo '<br /><div style="text-align:center;"><input type="text" name="flash_horizontal" /></div>'; 413 echo '<br /> <br /><div style="text-align:center; text-decoration:underline;">'._T('evahabillage:flash_taille_verticale').'</div>'; 414 echo '<br /><div style="text-align:center;"><input type="text" name="flash_vertical" /></div>'; 415 416 echo '<div style="text-align:center;">'._T('evahabillage:flash_choisit_animation1').'<strong>'._DIR_IMG."eva_habillage/flash</strong>"._T('evahabillage:flash_choisit_animation2'); 417 echo '<br /><select name="nom_flash">'; 418 $dir_flash = opendir(_DIR_IMG."eva_habillage/flash"); 419 while ($nom_fichier = readdir($dir_flash)) { 420 if (($nom_fichier!='.') AND ($nom_fichier!='..') AND (strpos($nom_fichier,'.swf'))) { 421 echo '<option value="'.$nom_fichier.'">'.$nom_fichier.'</option>'; 422 } 423 } 424 closedir($dir_flash); 425 echo '</select><br /> <br />'; 426 echo '<hr />'; 427 echo _T('evahabillage:flash_facultatif1').'<br />'; 428 echo '<center><input type="text" name="flash_version" /></center><br />'; 429 echo '<hr /> <br />'; 430 echo '<input type="submit" value="'._T('evahabillage:EVA_valider').'"></div></form>'; 431 echo fin_boite_info(true); 432 echo fin_block(); 433 434 echo bouton_block_depliable(_T('evahabillage:flash_charger'),false,''); 435 echo debut_block_depliable(false); 436 echo "<center>L'animation au format SWF sera téléchargée dans le répertoire <strong>"._DIR_IMG."eva_habillage/flash</strong><br />"; 437 echo "<span style='text-decoration:underline;'><strong>Attention :</strong></span> si une animation portant le même nom est déjà présente dans ce répertoire, elle sera alors écrasée."; 438 echo '<br /> <br /><form action="'.generer_url_ecrire("eva_habillage_graphisme").'" method="post" enctype="multipart/form-data">'; 439 echo '<input type="file" name="flash_eva_habillage_envoi" /><br /> <br /><input type="submit" value="Envoyer" /></form></center>'; 440 echo fin_block(); 441 442 echo bouton_block_depliable(_T('evahabillage:flash_lister'),false,''); 443 echo debut_block_depliable(false); 444 445 $recup_exist_flash = sql_select('id , nom_div , nom_image , pos_x , pos_y , repetition','spip_eva_habillage_images',"type = 'flash' AND nom_habillage = 'Defaut'"); 446 $test_exist_flash = sql_select('id','spip_eva_habillage_images',"type = 'flash' AND nom_habillage = 'Defaut' LIMIT 1"); 447 $tab_test_exist_flash = sql_fetch($test_exist_flash); 448 if ($tab_test_exist_flash!='') { 449 echo '<br /><table align="center" class="spip">'; 450 echo '<tr align="center" '; 451 if (($couleur_table%2)==0) {echo 'class="row_even"';} else {echo 'class="row_odd"';} 452 $couleur_table++; 453 echo '>'; 454 echo '<td align="center"><div style="text-decoration:underline;">Secteur</div></td><td align="center"><div style="text-decoration:underline;">Fichier</div></td><td align="center"><div style="text-decoration:underline;">Largeur</div></td><td align="center"><div style="text-decoration:underline;">Hauteur</div></td><td align="center"><div style="text-decoration:underline;">Version</div></td><td align="center"><div style="text-decoration:underline;">Supprimer ?</div></td></tr>'; 455 while ($tab_exist_flash = sql_fetch($recup_exist_flash)) { 456 echo '<tr align="center" '; 457 if (($couleur_table%2)==0) {echo 'class="row_even"';} else {echo 'class="row_odd"';} 458 $couleur_table++; 459 echo '><form method="POST" action="'.generer_url_ecrire("eva_habillage_graphisme").'"><td align="center">'._T('evahabillage:'.$tab_exist_flash['nom_div']).' </td><td align="center"><strong>'.$tab_exist_flash['nom_image'].'</strong></td>'; 460 echo '<td align="center">'.$tab_exist_flash['pos_x'].'</td>'; 461 echo '<td align="center">'.$tab_exist_flash['pos_y'].'</td>'; 462 echo '<td align="center">'.$tab_exist_flash['repetition'].'</td>'; 463 echo '<td align="center"><input type="hidden" name="supprime_image" value="'.$tab_exist_flash['id'].'" />'; 464 echo '<input type="submit" value="'._T('evahabillage:EVA_supprimer').'" /></td></form></tr>'; 465 } 466 echo '</table>'; 396 467 } 397 468 else { 398 sql_insertq('spip_eva_habillage_images',array('type' =>'flash','nom_habillage' => 'Defaut','nom_div' => $_POST['secteur_flash'],'nom_image' =>$_POST['nom_flash'],'pos_x' => $_POST['flash_horizontal'], 'pos_y' => $_POST['flash_vertical'],'repetition' => $_POST['flash_version'])); 399 } 400 } 401 402 echo debut_cadre_trait_couleur(_DIR_PLUGIN_EVA_HABILLAGE."img_pack/EVA_flash.png", true, '', _T('evahabillage:flash_titre')); 403 404 echo bouton_block_depliable(_T('evahabillage:flash_inserer'),false,''); 405 echo debut_block_depliable(false); 406 echo debut_boite_info(true); 407 echo '<br /><form method="POST" action="'.generer_url_ecrire("eva_habillage_graphisme").'">'; 408 echo _T('evahabillage:EVA_etape3_pour_secteur').'<br />'; 409 echo '<div style="text-align:center;"><select name="secteur_flash">'; 410 $def_div = EVA_secteurs_Flash(); 411 foreach ($def_div as $cle) { 412 echo '<option value="'.$cle.'">'._T('evahabillage:'.$cle).'</option>'; 413 } 414 echo '</select></div><br /> <br />'; 415 echo '<div style="text-align:center; text-decoration:underline;">'._T('evahabillage:flash_taille_horizontale').'</div>'; 416 echo '<br /><div style="text-align:center;"><input type="text" name="flash_horizontal" /></div>'; 417 echo '<br /> <br /><div style="text-align:center; text-decoration:underline;">'._T('evahabillage:flash_taille_verticale').'</div>'; 418 echo '<br /><div style="text-align:center;"><input type="text" name="flash_vertical" /></div>'; 419 420 echo '<div style="text-align:center;">'._T('evahabillage:flash_choisit_animation1').'<strong>'._DIR_IMG."eva_habillage/flash</strong>"._T('evahabillage:flash_choisit_animation2'); 421 echo '<br /><select name="nom_flash">'; 422 $dir_flash = opendir(_DIR_IMG."eva_habillage/flash"); 423 while ($nom_fichier = readdir($dir_flash)) { 424 if (($nom_fichier!='.') AND ($nom_fichier!='..') AND (strpos($nom_fichier,'.swf'))) { 425 echo '<option value="'.$nom_fichier.'">'.$nom_fichier.'</option>'; 426 } 427 } 428 closedir($dir_flash); 429 echo '</select><br /> <br />'; 430 echo '<hr />'; 431 echo _T('evahabillage:flash_facultatif1').'<br />'; 432 echo '<center><input type="text" name="flash_version" /></center><br />'; 433 echo '<hr /> <br />'; 434 echo '<input type="submit" value="'._T('evahabillage:EVA_valider').'"></div></form>'; 435 echo fin_boite_info(true); 436 echo fin_block(); 437 438 echo bouton_block_depliable(_T('evahabillage:flash_charger'),false,''); 439 echo debut_block_depliable(false); 440 echo "<center>L'animation au format SWF sera téléchargée dans le répertoire <strong>"._DIR_IMG."eva_habillage/flash</strong><br />"; 441 echo "<span style='text-decoration:underline;'><strong>Attention :</strong></span> si une animation portant le même nom est déjà présente dans ce répertoire, elle sera alors écrasée."; 442 echo '<br /> <br /><form action="'.generer_url_ecrire("eva_habillage_graphisme").'" method="post" enctype="multipart/form-data">'; 443 echo '<input type="file" name="flash_eva_habillage_envoi" /><br /> <br /><input type="submit" value="Envoyer" /></form></center>'; 444 echo fin_block(); 445 446 echo bouton_block_depliable(_T('evahabillage:flash_lister'),false,''); 447 echo debut_block_depliable(false); 448 449 $recup_exist_flash = sql_select('id , nom_div , nom_image , pos_x , pos_y , repetition','spip_eva_habillage_images',"type = 'flash' AND nom_habillage = 'Defaut'"); 450 $test_exist_flash = sql_select('id','spip_eva_habillage_images',"type = 'flash' AND nom_habillage = 'Defaut' LIMIT 1"); 451 $tab_test_exist_flash = sql_fetch($test_exist_flash); 452 if ($tab_test_exist_flash!='') { 453 echo '<br /><table align="center" class="spip">'; 454 echo '<tr align="center" '; 455 if (($couleur_table%2)==0) {echo 'class="row_even"';} else {echo 'class="row_odd"';} 456 $couleur_table++; 457 echo '>'; 458 echo '<td align="center"><div style="text-decoration:underline;">Secteur</div></td><td align="center"><div style="text-decoration:underline;">Fichier</div></td><td align="center"><div style="text-decoration:underline;">Largeur</div></td><td align="center"><div style="text-decoration:underline;">Hauteur</div></td><td align="center"><div style="text-decoration:underline;">Version</div></td><td align="center"><div style="text-decoration:underline;">Supprimer ?</div></td></tr>'; 459 while ($tab_exist_flash = sql_fetch($recup_exist_flash)) { 460 echo '<tr align="center" '; 461 if (($couleur_table%2)==0) {echo 'class="row_even"';} else {echo 'class="row_odd"';} 462 $couleur_table++; 463 echo '><form method="POST" action="'.generer_url_ecrire("eva_habillage_graphisme").'"><td align="center">'._T('evahabillage:'.$tab_exist_flash['nom_div']).' </td><td align="center"><strong>'.$tab_exist_flash['nom_image'].'</strong></td>'; 464 echo '<td align="center">'.$tab_exist_flash['pos_x'].'</td>'; 465 echo '<td align="center">'.$tab_exist_flash['pos_y'].'</td>'; 466 echo '<td align="center">'.$tab_exist_flash['repetition'].'</td>'; 467 echo '<td align="center"><input type="hidden" name="supprime_image" value="'.$tab_exist_flash['id'].'" />'; 468 echo '<input type="submit" value="'._T('evahabillage:EVA_supprimer').'" /></td></form></tr>'; 469 } 470 echo '</table>'; 471 } 472 else { 473 echo ' <br />'._T('evahabillage:EVA_aucune_image_fond'); 474 } 475 476 echo fin_block().'<br />'; 477 echo fin_cadre_trait_couleur(true); 478 479 480 //Choix du favicon 481 if(!empty($_FILES['favicon_eva_habillage_envoi']['tmp_name']) AND is_uploaded_file($_FILES['favicon_eva_habillage_envoi']['tmp_name']) AND ((strpos($_FILES['favicon_eva_habillage_envoi']['name'],'.ico')) OR (strpos($_FILES['favicon_eva_habillage_envoi']['name'],'.png')) OR (strpos($_FILES['favicon_eva_habillage_envoi']['name'],'.gif')) OR (strpos($_FILES['favicon_eva_habillage_envoi']['name'],'.ICO')) OR (strpos($_FILES['favicon_eva_habillage_envoi']['name'],'.PNG')) OR (strpos($_FILES['favicon_eva_habillage_envoi']['name'],'.GIF')))){ 482 if(!move_uploaded_file($_FILES['favicon_eva_habillage_envoi']['tmp_name'], _DIR_IMG.'eva_habillage/favicon/'.$_FILES['favicon_eva_habillage_envoi']['name'])) 483 {echo 'Erreur lors de la copie du fichier';} 484 } 485 486 if (isset($_POST['nom_favicon'])) { 487 $test_favicon=sql_select('id','spip_eva_habillage_images',"type = 'favicon'"); 488 $result_favicon=sql_fetch($test_favicon); 489 if (isset($result_favicon['id'])) { 490 sql_updateq('spip_eva_habillage_images',array('nom_image' => $_POST['nom_favicon'],'nom_habillage' => 'Defaut'),'id = '.$result_favicon['id']); 469 echo ' <br />'._T('evahabillage:EVA_aucune_image_fond'); 470 } 471 472 echo fin_block().'<br />'; 473 echo fin_cadre_trait_couleur(true); 474 475 476 //Choix du favicon 477 if(!empty($_FILES['favicon_eva_habillage_envoi']['tmp_name']) AND is_uploaded_file($_FILES['favicon_eva_habillage_envoi']['tmp_name']) AND ((strpos($_FILES['favicon_eva_habillage_envoi']['name'],'.ico')) OR (strpos($_FILES['favicon_eva_habillage_envoi']['name'],'.png')) OR (strpos($_FILES['favicon_eva_habillage_envoi']['name'],'.gif')) OR (strpos($_FILES['favicon_eva_habillage_envoi']['name'],'.ICO')) OR (strpos($_FILES['favicon_eva_habillage_envoi']['name'],'.PNG')) OR (strpos($_FILES['favicon_eva_habillage_envoi']['name'],'.GIF')))){ 478 if(!move_uploaded_file($_FILES['favicon_eva_habillage_envoi']['tmp_name'], _DIR_IMG.'eva_habillage/favicon/'.$_FILES['favicon_eva_habillage_envoi']['name'])) 479 {echo 'Erreur lors de la copie du fichier';} 480 } 481 482 if (isset($_POST['nom_favicon'])) { 483 $test_favicon=sql_select('id','spip_eva_habillage_images',"type = 'favicon'"); 484 $result_favicon=sql_fetch($test_favicon); 485 if (isset($result_favicon['id'])) { 486 sql_updateq('spip_eva_habillage_images',array('nom_image' => $_POST['nom_favicon'],'nom_habillage' => 'Defaut'),'id = '.$result_favicon['id']); 487 } 488 else { 489 sql_insertq('spip_eva_habillage_images',array('type' => 'favicon','nom_image' => $_POST['nom_favicon'],'nom_habillage' => 'Defaut')); 490 } 491 } 492 493 if (isset($_POST['supprim_favicon'])) { 494 sql_delete('spip_eva_habillage_images',"id=".$_POST['supprim_favicon']); 495 } 496 497 echo debut_cadre_trait_couleur(_DIR_PLUGIN_EVA_HABILLAGE."img_pack/eva.gif", true, '', _T('evahabillage:favicon_titre')); 498 echo bouton_block_depliable(_T('evahabillage:favicon_choisir'),false,''); 499 echo debut_block_depliable(false); 500 $test_favicon=sql_select('id , nom_image','spip_eva_habillage_images',"type = 'favicon' AND nom_habillage = 'Defaut'"); 501 $test_fav=sql_fetch($test_favicon); 502 if (!isset($test_fav['id'])) { 503 echo _T('evahabillage:favicon_a_choisir').'<img src="'._DIR_PLUGIN_EVASQUELETTES.'images/eva3_favicon.png"><br /> <br />'; 504 echo _T('evahabillage:favicon_a_choisir2').'<br /> <br />'; 491 505 } 492 506 else { 493 sql_insertq('spip_eva_habillage_images',array('type' => 'favicon','nom_image' => $_POST['nom_favicon'],'nom_habillage' => 'Defaut')); 494 } 495 } 496 497 if (isset($_POST['supprim_favicon'])) { 498 sql_delete('spip_eva_habillage_images',"id=".$_POST['supprim_favicon']); 499 } 500 501 echo debut_cadre_trait_couleur(_DIR_PLUGIN_EVA_HABILLAGE."img_pack/eva.gif", true, '', _T('evahabillage:favicon_titre')); 502 echo bouton_block_depliable(_T('evahabillage:favicon_choisir'),false,''); 503 echo debut_block_depliable(false); 504 $test_favicon=sql_select('id , nom_image','spip_eva_habillage_images',"type = 'favicon' AND nom_habillage = 'Defaut'"); 505 $test_fav=sql_fetch($test_favicon); 506 if (!isset($test_fav['id'])) { 507 echo _T('evahabillage:favicon_a_choisir').'<img src="'._DIR_PLUGIN_EVASQUELETTES.'images/eva3_favicon.png"><br /> <br />'; 508 echo _T('evahabillage:favicon_a_choisir2').'<br /> <br />'; 509 } 510 else { 511 echo '<center>'._T('evahabillage:favicon_a_choisir3').'<img src="'._DIR_IMG.'eva_habillage/favicon/'.$test_fav['nom_image'].'"> nommé <strong>'._DIR_IMG.'eva_habillage/favicon/'.$test_fav['nom_image'].'</strong><br /> <br />'; 512 echo _T('evahabillage:favicon_a_supprimer'); 513 echo '<form method="POST" action="'.generer_url_ecrire("eva_habillage_graphisme").'">'; 514 echo '<input type="hidden" name="supprim_favicon" value="'.$test_fav['id'].'">'; 515 echo '<input type="submit" value="'._T('evahabillage:EVA_supprimer').'" /></form><br /></center>'; 516 } 517 518 echo debut_cadre_enfonce('', true, '', _T('evahabillage:favicon_choix1')); 519 echo _T('evahabillage:favicon_choisir3').'<strong>'._DIR_IMG.'eva_habillage/favicon </strong> '._T('evahabillage:flash_choisit_animation2'); 520 echo '<br /><form method="POST" action="'.generer_url_ecrire("eva_habillage_graphisme").'">'; 521 echo '<br /><center><select name="nom_favicon">'; 522 $dir_favicon = opendir(_DIR_IMG."eva_habillage/favicon"); 523 while ($nom_fichier = readdir($dir_favicon)) { 524 if (($nom_fichier!='.') AND ($nom_fichier!='..') AND ((strpos($nom_fichier,'.ico')) OR (strpos($nom_fichier,'.png')) OR (strpos($nom_fichier,'.gif')) OR (strpos($nom_fichier,'.ICO')) OR (strpos($nom_fichier,'.PNG')) OR (strpos($nom_fichier,'.GIF')))) { 525 echo '<option value="'.$nom_fichier.'">'.$nom_fichier.'</option>'; 526 } 527 } 528 closedir($dir_favicon); 529 echo '</select>'; 530 echo '<input type="submit" value="'._T('evahabillage:EVA_valider').'"></center></form>'; 531 echo fin_cadre_enfonce(true); 532 echo fin_block(); 533 534 echo bouton_block_depliable(_T('evahabillage:favicon_charger'),false,''); 535 echo debut_block_depliable(false); 536 echo "<center>Le favicon (au format ICO, PNG ou GIF) sera téléchargée dans le répertoire <strong>"._DIR_IMG."eva_habillage/favicon</strong><br />"; 537 echo "<span style='text-decoration:underline;'><strong>Attention :</strong></span> si un favicon portant le même nom est déjà présent dans ce répertoire, il sera alors écrasé."; 538 echo '<br /> <br /><form action="'.generer_url_ecrire("eva_habillage_graphisme").'" method="post" enctype="multipart/form-data">'; 539 echo '<input type="file" name="favicon_eva_habillage_envoi" /><br /> <br /><input type="submit" value="Envoyer" /></form></center>'; 540 echo fin_block().'<br />'; 541 542 echo fin_cadre_trait_couleur(true); 543 544 echo fin_gauche(), fin_page(); 507 echo '<center>'._T('evahabillage:favicon_a_choisir3').'<img src="'._DIR_IMG.'eva_habillage/favicon/'.$test_fav['nom_image'].'"> nommé <strong>'._DIR_IMG.'eva_habillage/favicon/'.$test_fav['nom_image'].'</strong><br /> <br />'; 508 echo _T('evahabillage:favicon_a_supprimer'); 509 echo '<form method="POST" action="'.generer_url_ecrire("eva_habillage_graphisme").'">'; 510 echo '<input type="hidden" name="supprim_favicon" value="'.$test_fav['id'].'">'; 511 echo '<input type="submit" value="'._T('evahabillage:EVA_supprimer').'" /></form><br /></center>'; 512 } 513 514 echo debut_cadre_enfonce('', true, '', _T('evahabillage:favicon_choix1')); 515 echo _T('evahabillage:favicon_choisir3').'<strong>'._DIR_IMG.'eva_habillage/favicon </strong> '._T('evahabillage:flash_choisit_animation2'); 516 echo '<br /><form method="POST" action="'.generer_url_ecrire("eva_habillage_graphisme").'">'; 517 echo '<br /><center><select name="nom_favicon">'; 518 $dir_favicon = opendir(_DIR_IMG."eva_habillage/favicon"); 519 while ($nom_fichier = readdir($dir_favicon)) { 520 if (($nom_fichier!='.') AND ($nom_fichier!='..') AND ((strpos($nom_fichier,'.ico')) OR (strpos($nom_fichier,'.png')) OR (strpos($nom_fichier,'.gif')) OR (strpos($nom_fichier,'.ICO')) OR (strpos($nom_fichier,'.PNG')) OR (strpos($nom_fichier,'.GIF')))) { 521 echo '<option value="'.$nom_fichier.'">'.$nom_fichier.'</option>'; 522 } 523 } 524 closedir($dir_favicon); 525 echo '</select>'; 526 echo '<input type="submit" value="'._T('evahabillage:EVA_valider').'"></center></form>'; 527 echo fin_cadre_enfonce(true); 528 echo fin_block(); 529 530 echo bouton_block_depliable(_T('evahabillage:favicon_charger'),false,''); 531 echo debut_block_depliable(false); 532 echo "<center>Le favicon (au format ICO, PNG ou GIF) sera téléchargée dans le répertoire <strong>"._DIR_IMG."eva_habillage/favicon</strong><br />"; 533 echo "<span style='text-decoration:underline;'><strong>Attention :</strong></span> si un favicon portant le même nom est déjà présent dans ce répertoire, il sera alors écrasé."; 534 echo '<br /> <br /><form action="'.generer_url_ecrire("eva_habillage_graphisme").'" method="post" enctype="multipart/form-data">'; 535 echo '<input type="file" name="favicon_eva_habillage_envoi" /><br /> <br /><input type="submit" value="Envoyer" /></form></center>'; 536 echo fin_block().'<br />'; 537 538 echo fin_cadre_trait_couleur(true); 539 540 echo fin_gauche(), fin_page(); 545 541 } 546 542 ?> -
_squelettes_/eva-web/4_2/eva_habillage/exec/eva_habillage_sauvegarde.php
r27480 r96105 2 2 3 3 if (!defined("_ECRIRE_INC_VERSION")) return; 4 4 include_spip('inc/presentation'); 5 5 6 function exec_eva_habillage_sauvegarde() {6 function exec_eva_habillage_sauvegarde() { 7 7 8 9 10 $path = _DIR_PLUGIN_EVASQUELETTES."images/vignettes_styles/";11 $path_evastyle = _DIR_PLUGIN_EVASQUELETTES."eva_styles/";8 $evaTable = "spip_eva_habillage"; 9 if (defined("_DIR_PLUGIN_EVASQUELETTES")) { 10 $path = _DIR_PLUGIN_EVASQUELETTES."images/vignettes_styles/"; 11 $path_evastyle = _DIR_PLUGIN_EVASQUELETTES."eva_styles/"; 12 12 } 13 14 15 16 17 18 19 20 21 22 23 13 else { 14 $path = "../squelettes/images/vignettes_styles/"; 15 $path_evastyle = "../squelettes/eva_styles/"; 16 } 17 $icone = _DIR_PLUGIN_EVA_HABILLAGE."img_pack/eva.gif"; 18 19 ?><SCRIPT LANGUAGE="JavaScript"> 20 function showColor(val) { 21 document.colorform.hexval.value = val; 22 } 23 </script><?php 24 24 $commencer_page = charger_fonction('commencer_page', 'inc'); 25 25 echo $commencer_page(_T('evahabillage:EVA_nom') , '', '', ''); 26 26 echo gros_titre(_T('evahabillage:EVA_nom'),'',false); 27 27 28 global $connect_statut; 29 if ($GLOBALS['connect_statut'] != "0minirezo" OR !$GLOBALS["connect_toutes_rubriques"]) { 30 echo _T('avis_non_acces_page'); 31 echo fin_gauche(), fin_page(); 32 exit; 33 } 34 35 36 28 global $connect_statut; 29 if ($GLOBALS['connect_statut'] != "0minirezo" OR !$GLOBALS["connect_toutes_rubriques"]) { 30 echo _T('avis_non_acces_page'); 31 echo fin_gauche(), fin_page(); 32 exit; 33 } 34 35 37 36 echo debut_gauche("",true); 38 37 echo debut_droite("",true); 39 38 include_spip('inc/eva_habillage_boutons'); 40 39 echo eva_habillage_boutons('sauvegarde'); 41 42 include_spip("inc/eva_habillage_definition_themes");43 $def_themes = eva_habillage_definition_themes ();44 45 if (isset($_POST['restauration_habillage'])) {46 $recherche_habillage_restaure = sql_select('habillage','spip_eva_habillage',"sauvegarde='".mysql_escape_string($_POST['restauration_habillage'])."'");47 $tab__habillage_restaure = sql_fetch($recherche_habillage_restaure);48 sql_updateq('spip_eva_habillage',array('habillage' => $tab__habillage_restaure['habillage']),"sauvegarde='Defaut'");49 50 sql_delete('spip_eva_habillage_images',"nom_habillage='Defaut'");51 $recherche_images_restaure=sql_select('type,nom_div,nom_image,pos_x,pos_y,repetition,attach','spip_eva_habillage_images',"nom_habillage='".mysql_escape_string($_POST['restauration_habillage'])."'");52 while ($tab=sql_fetch($recherche_images_restaure)) {53 sql_insertq('spip_eva_habillage_images',array('type' => $tab['type'],'nom_habillage' => 'Defaut','nom_div' => $tab['nom_div'],'nom_image' => $tab['nom_image'],'pos_x' => $tab['pos_x'],'pos_y' => $tab['pos_y'],'repetition' => $tab['repetition'],'attach' => $tab['attach']));54 }55 56 $result_restaure=sql_select('*','spip_eva_habillage_themes',"nom='".mysql_escape_string($_POST['restauration_habillage'])."'");57 $tab_restaure=sql_fetch($result_restaure);58 foreach($def_themes as $habillage_cles => $habillage_inutile) {59 if (isset($tab_restaure[$habillage_cles])) {sql_updateq('spip_eva_habillage_themes',array($habillage_cles => $tab_restaure[$habillage_cles]),"nom='Defaut'");}60 else {sql_updateq('spip_eva_habillage_themes',array($habillage_cles => ''),"nom='Defaut'");}61 }62 include_spip('inc/eva_habillage_transition_module');63 eva_habillage_transition_module();64 }65 66 if (isset($_POST['integrer_theme_externe'])) {67 68 include_spip('inc/eva_habillage_themes_externes');69 $tab_externe = eva_charger_themes();70 $theme_externe = $tab_externe[$_POST['integrer_theme_externe'.$_POST['integrer_theme_externe']]];71 sql_delete('spip_eva_habillage_themes',"nom = 'Defaut'");72 sql_delete('spip_eva_habillage_images',"nom_habillage = 'Defaut'");73 sql_updateq('spip_eva_habillage',array('habillage' => $theme_externe['habillage']),"sauvegarde = 'Defaut'");74 spip_query("INSERT INTO spip_eva_habillage_themes VALUES ".$theme_externe['theme']);75 $tab = $theme_externe['images'];76 sql_insertq('spip_eva_habillage_images',array('type'=>'theme','nom_habillage'=>'Defaut','nom_div'=>$_POST['integrer_theme_externe']));77 foreach ($tab as $val) {spip_query("INSERT INTO spip_eva_habillage_images VALUES ".$val);}78 include_spip('inc/eva_habillage_transition_module');79 eva_habillage_transition_module();80 }81 40 82 //Module 5 - Module de sauvegarde 41 include_spip("inc/eva_habillage_definition_themes"); 42 $def_themes = eva_habillage_definition_themes (); 43 44 if (isset($_POST['restauration_habillage'])) { 45 $recherche_habillage_restaure = sql_select('habillage','spip_eva_habillage',"sauvegarde='".mysql_escape_string($_POST['restauration_habillage'])."'"); 46 $tab__habillage_restaure = sql_fetch($recherche_habillage_restaure); 47 sql_updateq('spip_eva_habillage',array('habillage' => $tab__habillage_restaure['habillage']),"sauvegarde='Defaut'"); 48 49 sql_delete('spip_eva_habillage_images',"nom_habillage='Defaut'"); 50 $recherche_images_restaure=sql_select('type,nom_div,nom_image,pos_x,pos_y,repetition,attach','spip_eva_habillage_images',"nom_habillage='".mysql_escape_string($_POST['restauration_habillage'])."'"); 51 while ($tab=sql_fetch($recherche_images_restaure)) { 52 sql_insertq('spip_eva_habillage_images',array('type' => $tab['type'],'nom_habillage' => 'Defaut','nom_div' => $tab['nom_div'],'nom_image' => $tab['nom_image'],'pos_x' => $tab['pos_x'],'pos_y' => $tab['pos_y'],'repetition' => $tab['repetition'],'attach' => $tab['attach'])); 53 } 54 55 $result_restaure=sql_select('*','spip_eva_habillage_themes',"nom='".mysql_escape_string($_POST['restauration_habillage'])."'"); 56 $tab_restaure=sql_fetch($result_restaure); 57 foreach($def_themes as $habillage_cles => $habillage_inutile) { 58 if (isset($tab_restaure[$habillage_cles])) {sql_updateq('spip_eva_habillage_themes',array($habillage_cles => $tab_restaure[$habillage_cles]),"nom='Defaut'");} 59 else {sql_updateq('spip_eva_habillage_themes',array($habillage_cles => ''),"nom='Defaut'");} 60 } 61 include_spip('inc/eva_habillage_transition_module'); 62 eva_habillage_transition_module(); 63 } 64 65 if (isset($_POST['integrer_theme_externe'])) { 66 67 include_spip('inc/eva_habillage_themes_externes'); 68 $tab_externe = eva_charger_themes(); 69 $theme_externe = $tab_externe[$_POST['integrer_theme_externe'.$_POST['integrer_theme_externe']]]; 70 sql_delete('spip_eva_habillage_themes',"nom = 'Defaut'"); 71 sql_delete('spip_eva_habillage_images',"nom_habillage = 'Defaut'"); 72 sql_updateq('spip_eva_habillage',array('habillage' => $theme_externe['habillage']),"sauvegarde = 'Defaut'"); 73 spip_query("INSERT INTO spip_eva_habillage_themes VALUES ".$theme_externe['theme']); 74 $tab = $theme_externe['images']; 75 sql_insertq('spip_eva_habillage_images',array('type'=>'theme','nom_habillage'=>'Defaut','nom_div'=>$_POST['integrer_theme_externe'])); 76 foreach ($tab as $val) {spip_query("INSERT INTO spip_eva_habillage_images VALUES ".$val);} 77 include_spip('inc/eva_habillage_transition_module'); 78 eva_habillage_transition_module(); 79 } 80 81 //Module 5 - Module de sauvegarde 83 82 echo '<br /> <br />'; 84 83 echo debut_cadre_trait_couleur(_DIR_PLUGIN_EVA_HABILLAGE."img_pack/disk.png", true, '', _T('evahabillage:EVA_etape4')); 85 84 86 87 sql_delete("spip_eva_habillage","sauvegarde='".mysql_escape_string($_POST['supprimer_habillage'])."'");88 89 90 85 if (isset($_POST['supprimer_habillage'])) { 86 sql_delete("spip_eva_habillage","sauvegarde='".mysql_escape_string($_POST['supprimer_habillage'])."'"); 87 sql_delete("spip_eva_habillage_themes","nom='".mysql_escape_string($_POST['supprimer_habillage'])."'"); 88 sql_delete("spip_eva_habillage_images","nom_habillage='".mysql_escape_string($_POST['supprimer_habillage'])."'"); 89 } 91 90 92 93 94 95 96 97 98 99 $result_valeurs=sql_select("*","spip_eva_habillage_themes","nom='Defaut'");100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 if ($tab_presence!='') {123 124 125 126 127 128 129 130 131 132 }91 if ((isset($_POST['nouvelle_sauvegarde'])) AND ($_POST['nouvelle_sauvegarde']!='Defaut')) { 92 $nom_habillage_defaut=sql_select("habillage","spip_eva_habillage","sauvegarde = 'Defaut'"); 93 $tab_habillage_defaut=sql_fetch($nom_habillage_defaut); 94 sql_delete("spip_eva_habillage","sauvegarde='".mysql_escape_string($_POST['nouvelle_sauvegarde'])."'"); 95 sql_insertq("spip_eva_habillage",array('habillage' => $tab_habillage_defaut['habillage'],'sauvegarde' => mysql_escape_string($_POST['nouvelle_sauvegarde']))); 96 sql_delete("spip_eva_habillage_themes","nom='".mysql_escape_string($_POST['nouvelle_sauvegarde'])."'"); 97 sql_insertq("spip_eva_habillage_themes",array('nom' => mysql_escape_string($_POST['nouvelle_sauvegarde']))); 98 $result_valeurs=sql_select("*","spip_eva_habillage_themes","nom='Defaut'"); 99 $tab_valeurs=sql_fetch($result_valeurs); 100 foreach($def_themes as $habillage_cles => $habillage_inutile) {sql_updateq('spip_eva_habillage_themes',array($habillage_cles => $tab_valeurs[$habillage_cles]),"nom='".mysql_escape_string($_POST['nouvelle_sauvegarde'])."'");} 101 sql_delete("spip_eva_habillage_images","nom_habillage='".mysql_escape_string($_POST['nouvelle_sauvegarde'])."'"); 102 $result_images_sauve=sql_select('type,nom_div,nom_image,pos_x,pos_y,repetition,attach','spip_eva_habillage_images',"nom_habillage='Defaut'"); 103 while ($tab=sql_fetch($result_images_sauve)) { 104 sql_insertq("spip_eva_habillage_images",array('type' => $tab['type'],'nom_habillage' => mysql_escape_string($_POST['nouvelle_sauvegarde']),'nom_div' => $tab['nom_div'], 'nom_image' => $tab['nom_image'], 'pos_x' => $tab['pos_x'],'pos_y' => $tab['pos_y'],'repetition' => $tab['repetition'], 'attach' => $tab['attach'])); 105 } 106 } 107 elseif($_POST['nouvelle_sauvegarde']=='Defaut') { 108 debut_cadre_relief('', false, '', _T('evahabillage:EVA_erreur_sauvegarde')); 109 echo _T('evahabillage:EVA_erreur_sauvegarde2'); 110 fin_cadre_relief(); 111 } 112 113 $resultat_sauvegarde1 = sql_select('nom','spip_eva_habillage_themes',"nom != 'Defaut'",'','nom'); 114 $resultat_sauvegarde2 = sql_select('nom','spip_eva_habillage_themes',"nom != 'Defaut'",'','nom'); 115 $test_presence = sql_select('nom','spip_eva_habillage_themes',"nom != 'Defaut'",'','nom'); 116 $tab_presence = sql_fetch($test_presence); 117 118 echo '<div style="text-align:center;">'._T('evahabillage:EVA_etape4_sauvegarder').'<br /> <br /><form method="POST" action="'.generer_url_ecrire("eva_habillage_sauvegarde").'">'; 119 echo '<input type="text" name="nouvelle_sauvegarde" size="40"> <input type="submit" value="'._T('evahabillage:EVA_sauvegarder').'"></div></form>'; 120 121 if ($tab_presence!='') { 122 echo '<br /><hr /><div style="text-align:center;">'._T('evahabillage:EVA_etape4_restaurer').'<br /> <br /><form method="POST" action="'.generer_url_ecrire("eva_habillage_sauvegarde").'"><select name="restauration_habillage">'; 123 while ($tab = sql_fetch($resultat_sauvegarde1)) { 124 echo '<option value="'.$tab['nom'].'">'.$tab['nom'].'</option>'; } 125 echo '</select><br /> <br /><input type="submit" value="'._T('evahabillage:EVA_restaurer').'"></form></div><br /><hr />'; 126 127 echo '<div style="text-align:center;">'._T('evahabillage:EVA_etape4_supprimer').'<br /> <br /><form method="POST" action="'.generer_url_ecrire("eva_habillage_sauvegarde").'"><select name="supprimer_habillage">'; 128 while ($tab = sql_fetch($resultat_sauvegarde2)) { 129 echo '<option value="'.$tab['nom'].'">'.$tab['nom'].'</option>'; } 130 echo '</select><br /> <br /><input type="submit" value="'._T('evahabillage:EVA_suppression').'"></form></div>'; 131 } 133 132 echo fin_cadre_trait_couleur(true); 134 133 echo '<br /> <br />'; … … 136 135 $chemin_themes = _DIR_PLUGIN_EVA_HABILLAGE."inc/eva_habillage_themes_externes.php"; 137 136 if (file_exists($chemin_themes)) { 138 include_spip('inc/eva_habillage_themes_externes'); 139 $tab_externe = eva_charger_themes(); 140 if (isset($tab_externe)) { 141 echo _T('evahabillage:EVA_restauration_externe_choix').'<br /> <br />';?> 142 <script type="text/javascript"> 143 <!-- 144 if(document.images){ 145 newvign = new Array() 146 for(i=1;i<<?php echo count($tab_externe);?>;i++) 147 { 148 newvign[i] = new Image() 149 newvign[i].src = i + ".png" 150 } 151 } 137 include_spip('inc/eva_habillage_themes_externes'); 138 $tab_externe = eva_charger_themes(); 139 if (isset($tab_externe)) { 140 echo _T('evahabillage:EVA_restauration_externe_choix').'<br /> <br />';?> 141 <script type="text/javascript"> 142 <!-- 143 if(document.images){ 144 newvign = new Array() 145 for(i=1;i<<?php echo count($tab_externe);?>;i++){ 146 newvign[i] = new Image() 147 newvign[i].src = i + ".png" 148 } 149 } 152 150 153 function affvign(){ 154 chemin = "<?php echo _DIR_PLUGIN_EVA_HABILLAGE.'img_pack/vignettes/'; ?>" 155 if(document.images){ 156 validevign=document.formvignette.integrer_theme_externe.options[document.formvignette.integrer_theme_externe.selectedIndex].value 157 document.vignetteaff.src = chemin+validevign+".png" 158 } 159 } 160 window.onerror = null; 161 //--> 162 </script> 163 <?php 164 $test_theme_present=sql_select('nom_div','spip_eva_habillage_images',"nom_habillage='Defaut' AND type='theme'"); 165 $tab_theme_present=sql_fetch($test_theme_present); 166 $test_theme_actif=$tab_theme_present['nom_div']; 167 echo '<form method="POST" name ="formvignette" action="'.generer_url_ecrire("eva_habillage_sauvegarde").'"><table><tr><th><select name="integrer_theme_externe" onChange = "affvign()">'; 168 $i=1; 169 foreach ($tab_externe as $cle => $inutile) { 170 echo '<option value="'.$i.'" '; 171 if ($test_theme_actif==$i) {echo 'selected';} 172 echo '>'.$cle.'</option>'; $i++; 151 function affvign(){ 152 chemin = "<?php echo _DIR_PLUGIN_EVA_HABILLAGE.'img_pack/vignettes/'; ?>" 153 if(document.images){ 154 validevign=document.formvignette.integrer_theme_externe.options[document.formvignette.integrer_theme_externe.selectedIndex].value 155 document.vignetteaff.src = chemin+validevign+".png" 156 } 157 } 158 window.onerror = null; 159 //--> 160 </script> 161 <?php 162 $test_theme_present=sql_select('nom_div','spip_eva_habillage_images',"nom_habillage='Defaut' AND type='theme'"); 163 $tab_theme_present=sql_fetch($test_theme_present); 164 $test_theme_actif=$tab_theme_present['nom_div']; 165 echo '<form method="POST" name ="formvignette" action="'.generer_url_ecrire("eva_habillage_sauvegarde").'"><table><tr><th><select name="integrer_theme_externe" onChange = "affvign()">'; 166 $i=1; 167 foreach ($tab_externe as $cle => $inutile) { 168 echo '<option value="'.$i.'" '; 169 if ($test_theme_actif==$i) {echo 'selected';} 170 echo '>'.$cle.'</option>'; $i++; 171 } 172 echo '</select> <input type="submit" value="'._T('evahabillage:EVA_valider').'">'; 173 $i=1; 174 foreach ($tab_externe as $cle => $inutile) {echo '<input type="hidden" name ="integrer_theme_externe'.$i.'" value="'.$cle.'">'; $i++;} 175 if (!$test_theme_actif) {$test_theme_actif=1;} 176 echo '</th><th> <img name = "vignetteaff" src= "'._DIR_PLUGIN_EVA_HABILLAGE.'img_pack/vignettes/'.$test_theme_actif.'.png" style="border:#AAA solid 5px;"></th></tr></table></form>';} 177 else {echo _T('evahabillage:EVA_restauration_externe_aucun');} 173 178 } 174 echo '</select> <input type="submit" value="'._T('evahabillage:EVA_valider').'">'; 175 $i=1; 176 foreach ($tab_externe as $cle => $inutile) {echo '<input type="hidden" name ="integrer_theme_externe'.$i.'" value="'.$cle.'">'; $i++;} 177 if (!$test_theme_actif) {$test_theme_actif=1;} 178 echo '</th><th> <img name = "vignetteaff" src= "'._DIR_PLUGIN_EVA_HABILLAGE.'img_pack/vignettes/'.$test_theme_actif.'.png" style="border:#AAA solid 5px;"></th></tr></table></form>';} 179 else {echo _T('evahabillage:EVA_restauration_externe_aucun');} 180 } 181 else {echo _T('evahabillage:EVA_restauration_externe_aucun');} 182 echo '<hr />'._T('evahabillage:eva_habillage_CC'); 183 echo fin_cadre_trait_couleur(true); 184 echo fin_gauche(), fin_page(); 179 else {echo _T('evahabillage:EVA_restauration_externe_aucun');} 180 echo '<hr />'._T('evahabillage:eva_habillage_CC'); 181 echo fin_cadre_trait_couleur(true); 182 echo fin_gauche(), fin_page(); 185 183 } 186 184 ?> -
_squelettes_/eva-web/4_2/eva_habillage/formulaires/evahabillage_article.php
r61885 r96105 43 43 return $res; 44 44 } 45 -
_squelettes_/eva-web/4_2/eva_habillage/formulaires/evahabillage_article_nbre.html
r61920 r96105 5 5 6 6 <form method='post' action='#ENV{action}' name ="formvignette"> 7 [(#REM) declarer les hidden qui declencheront le service du formulaire 8 parametre : url d'action ] 9 #ACTION_FORMULAIRE{#ENV{action}} 10 <?php 11 include_spip("inc/eva_habillage_definition_themes"); 12 $les_blocs_array = EVA_mes_nbres(); 13 $val_nbre=$les_blocs_array['EVA_nbre_article']; 14 foreach ($val_nbre as $val) { 15 $test_pres=sql_select('nom_image','spip_eva_habillage_images',"nom_habillage='Defaut' AND nom_div='$val'"); 16 $test_tab=sql_fetch($test_pres); 17 $test=$test_tab['nom_image']; 18 echo '<br />'._T('evahabillage:'.strtolower($val)); 19 echo ' <select name="'.$val.'">'; 20 for ($i=0;$i<=20;$i++) { 21 echo '<option value="'.$i.'" '; 22 if ($i==$test) {echo 'selected';} 23 elseif (($i==5) AND (!isset($test))) {echo 'selected';} 24 echo '>'.$i.'</option>'; 7 [(#REM) declarer les hidden qui declencheront le service du formulaire 8 parametre : url d'action ] 9 #ACTION_FORMULAIRE{#ENV{action}} 10 <?php 11 include_spip("inc/eva_habillage_definition_themes"); 12 $les_blocs_array = EVA_mes_nbres(); 13 $val_nbre=$les_blocs_array['EVA_nbre_article']; 14 foreach ($val_nbre as $val) { 15 $test_pres=sql_select('nom_image','spip_eva_habillage_images',"nom_habillage='Defaut' AND nom_div='$val'"); 16 $test_tab=sql_fetch($test_pres); 17 $test=$test_tab['nom_image']; 18 echo '<br />'._T('evahabillage:'.strtolower($val)); 19 echo ' <select name="'.$val.'">'; 20 for ($i=0;$i<=20;$i++) { 21 echo '<option value="'.$i.'" '; 22 if ($i==$test) {echo 'selected';} 23 elseif (($i==5) AND (!isset($test))) {echo 'selected';} 24 echo '>'.$i.'</option>'; 25 } 26 echo '</select><br />'; 25 27 } 26 echo '</select><br />'; 27 } 28 echo '<div style="text-align:center;"><input type="submit" style="margin-bottom:6px;margin-top:6px;" name="submit_nbre_article" value="'._T('evahabillage:eva_valider').'"></div>'; 29 ?> 28 echo '<div style="text-align:center;"><input type="submit" style="margin-bottom:6px;margin-top:6px;" name="submit_nbre_article" value="'._T('evahabillage:eva_valider').'"></div>'; 29 ?> 30 30 </form> 31 31 </div> -
_squelettes_/eva-web/4_2/eva_habillage/formulaires/evahabillage_article_nbre.php
r61920 r96105 8 8 return $valeurs; 9 9 } 10 11 10 12 11 function formulaires_evahabillage_article_nbre_traiter_dist(){ … … 27 26 return $res; 28 27 } 29 -
_squelettes_/eva-web/4_2/eva_habillage/formulaires/evahabillage_auteur.html
r61889 r96105 38 38 <table style="margin-top:-30px; margin-bottom:-10px;"><tr valign="top"> 39 39 <?php 40 if ($eva_gauche) {40 if ($eva_gauche) { 41 41 echo "<th width=$eva_gauche>"; 42 42 echo '<div class="formulaire_spip formulaire_configurer formulaire_#FORM formulaire_#FORM-#ENV{id,nouveau}">'; … … 70 70 } 71 71 if ($eva_centre) { 72 echo "<th width=$eva_centre>";72 echo "<th width=$eva_centre>"; 73 73 echo '<div class="formulaire_spip formulaire_configurer formulaire_#FORM formulaire_#FORM-#ENV{id,nouveau}">'; 74 74 echo "<h3 class='titrem'>Colonne centrale</h3>"; … … 154 154 } 155 155 else { 156 $texte_eva.= _T('evahabillage:'.$tab_noisettes['nom_div']);156 $texte_eva.= _T('evahabillage:'.$tab_noisettes['nom_div']); 157 157 } 158 158 $texte_eva.= "</th><th><select name='".$tab_noisettes['nom_div']."'>"; … … 179 179 } 180 180 else { 181 $texte_eva.= _T('evahabillage:'.$tab_noisettes['nom_div']);181 $texte_eva.= _T('evahabillage:'.$tab_noisettes['nom_div']); 182 182 } 183 183 $texte_eva.= "</th><th><select name='".$tab_noisettes['nom_div']."'>"; … … 204 204 } 205 205 else { 206 $texte_eva.= _T('evahabillage:'.$tab_noisettes['nom_div']);206 $texte_eva.= _T('evahabillage:'.$tab_noisettes['nom_div']); 207 207 } 208 208 $texte_eva.= "</th><th><select name='".$tab_noisettes['nom_div']."'>"; -
_squelettes_/eva-web/4_2/eva_habillage/formulaires/evahabillage_auteur.php
r61888 r96105 33 33 'repetition' => 'perso', 34 34 'attach' => 'auteur' 35 35 )); 36 36 $res['message_ok'] = 'Le squelette personnel <b>'._request('eva_mon_bloc_perso_nom_auteur').'</b> a été inséré'; 37 37 } 38 //On traite enfin la suppression des noisettes perso pr éalablement insérées38 //On traite enfin la suppression des noisettes perso pr&alablement insérées 39 39 if (_request('submit_supprime_skel_perso_auteur')) { 40 40 sql_delete('spip_eva_habillage_images',"id='"._request('eva_suppr_skel_perso_auteur')."'"); … … 43 43 return $res; 44 44 } 45 -
_squelettes_/eva-web/4_2/eva_habillage/formulaires/evahabillage_auteur_nbre.php
r61922 r96105 27 27 return $res; 28 28 } 29 -
_squelettes_/eva-web/4_2/eva_habillage/formulaires/evahabillage_breve.html
r61889 r96105 38 38 <table style="margin-top:-30px; margin-bottom:-10px;"><tr valign="top"> 39 39 <?php 40 if ($eva_gauche) {40 if ($eva_gauche) { 41 41 echo "<th width=$eva_gauche>"; 42 42 echo '<div class="formulaire_spip formulaire_configurer formulaire_#FORM formulaire_#FORM-#ENV{id,nouveau}">'; -
_squelettes_/eva-web/4_2/eva_habillage/formulaires/evahabillage_breve.php
r61886 r96105 33 33 'repetition' => 'perso', 34 34 'attach' => 'breve' 35 35 )); 36 36 $res['message_ok'] = 'Le squelette personnel <b>'._request('eva_mon_bloc_perso_nom_breve').'</b> a été inséré'; 37 37 } … … 43 43 return $res; 44 44 } 45 -
_squelettes_/eva-web/4_2/eva_habillage/formulaires/evahabillage_breve_nbre.php
r61921 r96105 27 27 return $res; 28 28 } 29 -
_squelettes_/eva-web/4_2/eva_habillage/formulaires/evahabillage_css_configuration.html
r61846 r96105 11 11 <p><:evahabillage:eva_etape5_detail:></p> 12 12 <p> 13 <input type="text" name="nouvelle_regle_css" size="50" />14 15 <input type="submit" name="enregistrer_css" value="<:evahabillage:eva_valider_css:>" />13 <input type="text" name="nouvelle_regle_css" size="50" /> 14 15 <input type="submit" name="enregistrer_css" value="<:evahabillage:eva_valider_css:>" /> 16 16 </p> 17 17 </div> … … 38 38 $test='non'; 39 39 while ($tab1 = sql_fetch($recherche_perso1)) {$test='oui';} 40 if ($test=='oui') {41 ?>42 <div class="formulaire_spip formulaire_configurer formulaire_#FORM formulaire_#FORM-#ENV{id,nouveau}">43 <h3 class='titrem'><img src="#CHEMIN_IMAGE{css_mini.png}" class="cadre-icone" /><:evahabillage:EVA_etape5_defini:></h3>44 <table align="center" class="spip">45 <?php46 $recherche_perso = sql_select("id,nom_div","spip_eva_habillage_images","type='perso' AND nom_habillage='Defaut'");47 48 49 50 51 52 53 echo '<strong>'.mysql_escape_string($tab['nom_div']).'</strong>';54 echo '</div>';55 56 echo '<input type="text" name="regle'.$tab['id'].'" value="'.mysql_escape_string($tab['nom_div']).'" style="width: 100%" />';57 echo '<input type="reset" value="'._T('evahabillage:eva_annuler').'" onclick="toggleCSSEdit('.$tab['id'].', false);" />';58 echo '<input type="submit" name="submit_perso'.$tab['id'].'" value="'._T('evahabillage:eva_valider').'" />';59 echo '</div>';60 echo '</td><td align="center">';61 62 63 echo '</form>';64 65 66 ?>67 </table>68 </div>69 <?php70 }40 if ($test=='oui') { 41 ?> 42 <div class="formulaire_spip formulaire_configurer formulaire_#FORM formulaire_#FORM-#ENV{id,nouveau}"> 43 <h3 class='titrem'><img src="#CHEMIN_IMAGE{css_mini.png}" class="cadre-icone" /><:evahabillage:EVA_etape5_defini:></h3> 44 <table align="center" class="spip"> 45 <?php 46 $recherche_perso = sql_select("id,nom_div","spip_eva_habillage_images","type='perso' AND nom_habillage='Defaut'"); 47 while ($tab = sql_fetch($recherche_perso)) { 48 echo '<tr align="center" '; 49 if (($couleur_table%2)==0) {echo 'class="row_even"';} else {echo 'class="row_odd"';} 50 $couleur_table++; 51 echo '><td align="center">'; 52 echo '<div id="css_perso_'.$tab['id'].'" style="display:block;">'; 53 echo '<strong>'.mysql_escape_string($tab['nom_div']).'</strong>'; 54 echo '</div>'; 55 echo '<div id="css_perso_'.$tab['id'].'_edition" style="display:none;">'; 56 echo '<input type="text" name="regle'.$tab['id'].'" value="'.mysql_escape_string($tab['nom_div']).'" style="width: 100%" />'; 57 echo '<input type="reset" value="'._T('evahabillage:eva_annuler').'" onclick="toggleCSSEdit('.$tab['id'].', false);" />'; 58 echo '<input type="submit" name="submit_perso'.$tab['id'].'" value="'._T('evahabillage:eva_valider').'" />'; 59 echo '</div>'; 60 echo '</td><td align="center">'; 61 echo '<input type="button" value="'._T('evahabillage:eva_modifier').'" onclick="toggleCSSEdit('.$tab['id'].', true);" />'; 62 echo '<input type="submit" name="supprime_perso'.$tab['id'].'" value="'._T('evahabillage:eva_supprimer').'" />'; 63 echo '</form>'; 64 echo '</td></tr>'; 65 } 66 ?> 67 </table> 68 </div> 69 <?php 70 } 71 71 ?> 72 72 … … 74 74 <h3 class='titrem'><img src="#CHEMIN_IMAGE{css_mini.png}" class="cadre-icone" /><:evahabillage:css_inserer:></h3> 75 75 <?php 76 $css_defs =array(77 'css_supprime_titre' => "#entete h1 {display:none;}",78 'css_supprime_pied' => "ul#logo-pied, ul#pied {display:none;}",79 'css_supprime_mentions_pied' => "ul#pied .supprimer_le_pied {display:none;}",80 'css_supprime_bordure_tableau' => "table.spip tr.row_odd , table.spip tr.row_even , table.spip tr.row_odd td , table.spip tr.row_even td {border-width:0;}",81 'css_augmente_police_10' => "body {font-size: 110%;}",82 'css_augmente_police_20' => "body {font-size: 120%;}",83 'css_diminue_police_10' => "body {font-size: 90%;}",84 'css_diminue_police_20' => "body {font-size: 80%;}",85 'css_doubler_taille_titre_50' => "div#entete h1 {font-size:200%;}",86 'css_deplace_titre_50px_bas' => "div#entete h1 {top:50px;}",87 'css_deplace_titre_50px_gauche' => "div#entete h1 {left:50px;}",88 'css_augmente_titres_blocs_20' => "h3 , div#contenu h3 , legend , #forum .bouton a , .bloc .titre , .divers h4 , table.spip tr.row_first th , div#contenu div.ps h4 , div#menu h3.titre , div#menudroit h3.titre , table.spip tr.row_first , div#contenu div.lien , .contenu .lien , div#contenu div.notes h4 , div#contenu h4.titre , div#contenu h3.titre , #forum ul.forum div.titre h4{font-size: 120%;}",76 $css_defs =array( 77 'css_supprime_titre' => "#entete h1 {display:none;}", 78 'css_supprime_pied' => "ul#logo-pied, ul#pied {display:none;}", 79 'css_supprime_mentions_pied' => "ul#pied .supprimer_le_pied {display:none;}", 80 'css_supprime_bordure_tableau' => "table.spip tr.row_odd , table.spip tr.row_even , table.spip tr.row_odd td , table.spip tr.row_even td {border-width:0;}", 81 'css_augmente_police_10' => "body {font-size: 110%;}", 82 'css_augmente_police_20' => "body {font-size: 120%;}", 83 'css_diminue_police_10' => "body {font-size: 90%;}", 84 'css_diminue_police_20' => "body {font-size: 80%;}", 85 'css_doubler_taille_titre_50' => "div#entete h1 {font-size:200%;}", 86 'css_deplace_titre_50px_bas' => "div#entete h1 {top:50px;}", 87 'css_deplace_titre_50px_gauche' => "div#entete h1 {left:50px;}", 88 'css_augmente_titres_blocs_20' => "h3 , div#contenu h3 , legend , #forum .bouton a , .bloc .titre , .divers h4 , table.spip tr.row_first th , div#contenu div.ps h4 , div#menu h3.titre , div#menudroit h3.titre , table.spip tr.row_first , div#contenu div.lien , .contenu .lien , div#contenu div.notes h4 , div#contenu h4.titre , div#contenu h3.titre , #forum ul.forum div.titre h4{font-size: 120%;}", 89 89 ); 90 echo '<table align="center" class="spip">';90 echo '<table align="center" class="spip">'; 91 91 foreach ($css_defs as $css_cle => $css_val) { 92 echo '<tr align="center" ';93 94 95 echo '><td align="center">';96 echo '<strong>'._T('evahabillage:'.$css_cle)."</strong><br />";97 echo $css_val.'</td>';98 echo '<td align="center">';99 100 echo '</tr>';92 echo '<tr align="center" '; 93 if (($couleur_table%2)==0) {echo 'class="row_even"';} else {echo 'class="row_odd"';} 94 $couleur_table++; 95 echo '><td align="center">'; 96 echo '<strong>'._T('evahabillage:'.$css_cle)."</strong><br />"; 97 echo $css_val.'</td>'; 98 echo '<td align="center">'; 99 echo '<input type="submit" name="'.$css_cle.'" value="'._T('evahabillage:css_ajouter').'" /></td>'; 100 echo '</tr>'; 101 101 } 102 102 ?> -
_squelettes_/eva-web/4_2/eva_habillage/formulaires/evahabillage_css_configuration.php
r61845 r96105 18 18 //On traite le cas d'injection prédéfinie 19 19 $css_defs =array( 20 'css_supprime_titre' => "#entete h1 {display:none;}",21 'css_supprime_pied' => "ul#logo-pied, ul#pied {display:none;}",22 'css_supprime_mentions_pied' => "ul#pied .supprimer_le_pied {display:none;}",23 'css_supprime_bordure_tableau' => "table.spip tr.row_odd , table.spip tr.row_even , table.spip tr.row_odd td , table.spip tr.row_even td {border-width:0;}",24 'css_augmente_police_10' => "body {font-size: 110%;}",25 'css_augmente_police_20' => "body {font-size: 120%;}",26 'css_diminue_police_10' => "body {font-size: 90%;}",27 'css_diminue_police_20' => "body {font-size: 80%;}",28 'css_doubler_taille_titre_50' => "div#entete h1 {font-size:200%;}",29 'css_deplace_titre_50px_bas' => "div#entete h1 {top:50px;}",30 'css_deplace_titre_50px_gauche' => "div#entete h1 {left:50px;}",31 'css_augmente_titres_blocs_20' => "h3 , div#contenu h3 , legend , #forum .bouton a , .bloc .titre , .divers h4 , table.spip tr.row_first th , div#contenu div.ps h4 , div#menu h3.titre , div#menudroit h3.titre , table.spip tr.row_first , div#contenu div.lien , .contenu .lien , div#contenu div.notes h4 , div#contenu h4.titre , div#contenu h3.titre , #forum ul.forum div.titre h4{font-size: 120%;}",20 'css_supprime_titre' => "#entete h1 {display:none;}", 21 'css_supprime_pied' => "ul#logo-pied, ul#pied {display:none;}", 22 'css_supprime_mentions_pied' => "ul#pied .supprimer_le_pied {display:none;}", 23 'css_supprime_bordure_tableau' => "table.spip tr.row_odd , table.spip tr.row_even , table.spip tr.row_odd td , table.spip tr.row_even td {border-width:0;}", 24 'css_augmente_police_10' => "body {font-size: 110%;}", 25 'css_augmente_police_20' => "body {font-size: 120%;}", 26 'css_diminue_police_10' => "body {font-size: 90%;}", 27 'css_diminue_police_20' => "body {font-size: 80%;}", 28 'css_doubler_taille_titre_50' => "div#entete h1 {font-size:200%;}", 29 'css_deplace_titre_50px_bas' => "div#entete h1 {top:50px;}", 30 'css_deplace_titre_50px_gauche' => "div#entete h1 {left:50px;}", 31 'css_augmente_titres_blocs_20' => "h3 , div#contenu h3 , legend , #forum .bouton a , .bloc .titre , .divers h4 , table.spip tr.row_first th , div#contenu div.ps h4 , div#menu h3.titre , div#menudroit h3.titre , table.spip tr.row_first , div#contenu div.lien , .contenu .lien , div#contenu div.notes h4 , div#contenu h4.titre , div#contenu h3.titre , #forum ul.forum div.titre h4{font-size: 120%;}", 32 32 ); 33 33 foreach($css_defs as $css_cle => $css_val) { -
_squelettes_/eva-web/4_2/eva_habillage/formulaires/evahabillage_entete.php
r61926 r96105 33 33 'repetition' => 'perso', 34 34 'attach' => 'entete' 35 35 )); 36 36 $res['message_ok'] = 'Le squelette personnel <b>'._request('eva_mon_bloc_perso_entete').'</b> a été inséré'; 37 37 } … … 43 43 return $res; 44 44 } 45 -
_squelettes_/eva-web/4_2/eva_habillage/formulaires/evahabillage_graphisme_bordures.php
r62098 r96105 27 27 return $res; 28 28 } 29 -
_squelettes_/eva-web/4_2/eva_habillage/formulaires/evahabillage_graphisme_boutons.php
r62100 r96105 27 27 return $res; 28 28 } 29 -
_squelettes_/eva-web/4_2/eva_habillage/formulaires/evahabillage_graphisme_couleurs.php
r62083 r96105 27 27 return $res; 28 28 } 29 -
_squelettes_/eva-web/4_2/eva_habillage/formulaires/evahabillage_graphisme_couleurs_liens.php
r62091 r96105 27 27 return $res; 28 28 } 29 -
_squelettes_/eva-web/4_2/eva_habillage/formulaires/evahabillage_graphisme_couleurs_textes.php
r62087 r96105 27 27 return $res; 28 28 } 29 -
_squelettes_/eva-web/4_2/eva_habillage/formulaires/evahabillage_graphisme_favicon.html
r61957 r96105 10 10 <?php 11 11 $test_favicon=sql_select('id , nom_image','spip_eva_habillage_images',"type = 'favicon' AND nom_habillage = 'Defaut'"); 12 13 14 15 16 17 18 19 20 21 12 $test_fav=sql_fetch($test_favicon); 13 if (!isset($test_fav['id'])) { 14 echo _T('evahabillage:favicon_a_choisir').'<img src="'._DIR_PLUGIN_EVASQUELETTES.'images/eva3_favicon.png"><br /> <br />'; 15 echo _T('evahabillage:favicon_a_choisir2').'<br /> <br />'; 16 } 17 else { 18 echo '<center>'._T('evahabillage:favicon_a_choisir3').'<img src="'._DIR_IMG.'eva_habillage/favicon/'.$test_fav['nom_image'].'"> nommé <strong>'._DIR_IMG.'eva_habillage/favicon/'.$test_fav['nom_image'].'</strong><br /> <br />'; 19 echo _T('evahabillage:favicon_a_supprimer'); 20 echo '<input type="hidden" name="supprim_favicon" value="'.$test_fav['id'].'">'; 21 echo '<input type="submit" name="submit_supprim_favicon" value="'._T('evahabillage:eva_supprimer').'" />'; 22 22 } 23 23 ?> … … 26 26 echo _T('evahabillage:favicon_choisir3').'<strong>'._DIR_IMG.'eva_habillage/favicon </strong> '._T('evahabillage:flash_choisit_animation2').'<br />'; 27 27 echo '<br /><center><select name="nom_favicon">'; 28 29 30 31 32 33 34 28 $dir_favicon = opendir(_DIR_IMG."eva_habillage/favicon"); 29 while ($nom_fichier = readdir($dir_favicon)) { 30 if (($nom_fichier!='.') AND ($nom_fichier!='..') AND ((strpos($nom_fichier,'.ico')) OR (strpos($nom_fichier,'.png')) OR (strpos($nom_fichier,'.gif')) OR (strpos($nom_fichier,'.ICO')) OR (strpos($nom_fichier,'.PNG')) OR (strpos($nom_fichier,'.GIF')))) { 31 echo '<option value="'.$nom_fichier.'">'.$nom_fichier.'</option>'; 32 } 33 } 34 closedir($dir_favicon); 35 35 ?> 36 36 </select> -
_squelettes_/eva-web/4_2/eva_habillage/formulaires/evahabillage_graphisme_favicon.php
r61957 r96105 23 23 sql_insertq('spip_eva_habillage_images',array('type' => 'favicon','nom_image' => _request('nom_favicon'),'nom_habillage' => 'Defaut')); 24 24 } 25 $res['message_ok'] = 'Le nouveau favicon du site est <b>'._request('nom_favicon').'</b>';25 $res['message_ok'] = 'Le nouveau favicon du site est <b>'._request('nom_favicon').'</b>'; 26 26 } 27 27 // Téléchargement du favicon 28 28 if( !empty($_FILES['favicon_eva_habillage_envoi']['tmp_name']) 29 30 31 32 33 34 29 AND is_uploaded_file($_FILES['favicon_eva_habillage_envoi']['tmp_name']) 30 AND ((strpos($_FILES['favicon_eva_habillage_envoi']['name'],'.ico')) 31 OR (strpos($_FILES['favicon_eva_habillage_envoi']['name'],'.png')) 32 OR (strpos($_FILES['favicon_eva_habillage_envoi']['name'],'.gif')) 33 OR (strpos($_FILES['favicon_eva_habillage_envoi']['name'],'.ICO')) 34 OR (strpos($_FILES['favicon_eva_habillage_envoi']['name'],'.PNG')) 35 35 OR (strpos($_FILES['favicon_eva_habillage_envoi']['name'],'.GIF')))){ 36 37 38 $res['message_ok'] = "L'icône <b>".$_FILES['favicon_eva_habillage_envoi']['name']."</b> a été chargée sur le serveur";36 if(!move_uploaded_file($_FILES['favicon_eva_habillage_envoi']['tmp_name'], _DIR_IMG.'eva_habillage/favicon/'.$_FILES['favicon_eva_habillage_envoi']['name'])) 37 {echo 'Erreur lors de la copie du fichier';} 38 $res['message_ok'] = "L'icône <b>".$_FILES['favicon_eva_habillage_envoi']['name']."</b> a été chargée sur le serveur"; 39 39 } 40 40 //Suppression d'un favicon précédemment téléchargé … … 44 44 return $res; 45 45 } 46 -
_squelettes_/eva-web/4_2/eva_habillage/formulaires/evahabillage_graphisme_flash.html
r62002 r96105 30 30 <select name="nom_flash"> 31 31 <?php 32 33 34 32 $dir_flash = opendir(_DIR_IMG."eva_habillage/flash"); 33 while ($nom_fichier = readdir($dir_flash)) { 34 if (($nom_fichier!='.') AND ($nom_fichier!='..') AND (strpos($nom_fichier,'.swf'))) { 35 35 echo '<option value="'.$nom_fichier.'">'.$nom_fichier.'</option>'; 36 37 38 36 } 37 } 38 closedir($dir_flash); 39 39 ?> 40 40 </select></center> … … 55 55 <input type="submit" name="submit_fichier_flash" value="Envoyer" /> 56 56 </p> 57 57 58 58 <?php 59 $recup_exist_flash = sql_select('id , nom_div , nom_image , pos_x , pos_y , repetition','spip_eva_habillage_images',"type = 'flash' AND nom_habillage = 'Defaut'"); 60 $test_exist_flash = sql_select('id','spip_eva_habillage_images',"type = 'flash' AND nom_habillage = 'Defaut' LIMIT 1"); 61 $tab_test_exist_flash = sql_fetch($test_exist_flash); 62 if ($tab_test_exist_flash!='') { 63 $couleur_table=1; 64 $texte='<hr /><p><b><:evahabillage:flash_lister:></b><br /><table align="center" class="spip">'; 65 $texte.='<tr align="center" '; 66 if (($couleur_table%2)==0) {$texte.='class="row_even"';} else {$texte.='class="row_odd"';} 67 $couleur_table++; 68 $texte.='>'; 69 $texte.='<td align="center"><div style="text-decoration:underline;">Secteur</div></td><td align="center"><div style="text-decoration:underline;">Fichier</div></td><td align="center"><div style="text-decoration:underline;">Largeur</div></td><td align="center"><div style="text-decoration:underline;">Hauteur</div></td><td align="center"><div style="text-decoration:underline;">Version</div></td><td align="center"><div style="text-decoration:underline;">Supprimer ?</div></td></tr>'; 70 while ($tab_exist_flash = sql_fetch($recup_exist_flash)) { 59 $recup_exist_flash = sql_select('id , nom_div , nom_image , pos_x , pos_y , repetition','spip_eva_habillage_images',"type = 'flash' AND nom_habillage = 'Defaut'"); 60 $test_exist_flash = sql_select('id','spip_eva_habillage_images',"type = 'flash' AND nom_habillage = 'Defaut' LIMIT 1"); 61 $tab_test_exist_flash = sql_fetch($test_exist_flash); 62 if ($tab_test_exist_flash!='') { 63 $couleur_table=1; 64 $texte='<hr /><p><b><:evahabillage:flash_lister:></b><br /><table align="center" class="spip">'; 71 65 $texte.='<tr align="center" '; 72 66 if (($couleur_table%2)==0) {$texte.='class="row_even"';} else {$texte.='class="row_odd"';} 73 67 $couleur_table++; 74 $texte.='><td align="center">'._T('evahabillage:'.$tab_exist_flash['nom_div']).' </td><td align="center"><strong>'.$tab_exist_flash['nom_image'].'</strong></td>'; 75 $texte.='<td align="center">'.$tab_exist_flash['pos_x'].'</td>'; 76 $texte.='<td align="center">'.$tab_exist_flash['pos_y'].'</td>'; 77 $texte.='<td align="center">'.$tab_exist_flash['repetition'].'</td>'; 78 $texte.='<td align="center"><input type="submit" name="supprime_image'.$tab_exist_flash['id'].'" value="'._T('evahabillage:eva_supprimer').'" /></td></tr>'; 68 $texte.='>'; 69 $texte.='<td align="center"><div style="text-decoration:underline;">Secteur</div></td><td align="center"><div style="text-decoration:underline;">Fichier</div></td><td align="center"><div style="text-decoration:underline;">Largeur</div></td><td align="center"><div style="text-decoration:underline;">Hauteur</div></td><td align="center"><div style="text-decoration:underline;">Version</div></td><td align="center"><div style="text-decoration:underline;">Supprimer ?</div></td></tr>'; 70 while ($tab_exist_flash = sql_fetch($recup_exist_flash)) { 71 $texte.='<tr align="center" '; 72 if (($couleur_table%2)==0) {$texte.='class="row_even"';} else {$texte.='class="row_odd"';} 73 $couleur_table++; 74 $texte.='><td align="center">'._T('evahabillage:'.$tab_exist_flash['nom_div']).' </td><td align="center"><strong>'.$tab_exist_flash['nom_image'].'</strong></td>'; 75 $texte.='<td align="center">'.$tab_exist_flash['pos_x'].'</td>'; 76 $texte.='<td align="center">'.$tab_exist_flash['pos_y'].'</td>'; 77 $texte.='<td align="center">'.$tab_exist_flash['repetition'].'</td>'; 78 $texte.='<td align="center"><input type="submit" name="supprime_image'.$tab_exist_flash['id'].'" value="'._T('evahabillage:eva_supprimer').'" /></td></tr>'; 79 } 80 $texte.='</table></p>'; 81 echo $texte; 79 82 } 80 $texte.='</table></p>';81 echo $texte;82 }83 83 ?> 84 84 </form> -
_squelettes_/eva-web/4_2/eva_habillage/formulaires/evahabillage_graphisme_flash.php
r62002 r96105 19 19 AND (strpos($_FILES['flash_eva_habillage_envoi']['name'],'.swf'))){ 20 20 if(!move_uploaded_file($_FILES['flash_eva_habillage_envoi']['tmp_name'], _DIR_IMG.'eva_habillage/flash/'.$_FILES['flash_eva_habillage_envoi']['name'])) { 21 $res['message_erreur'] = 'Erreur dans le téléchargement du fichier !';21 $res['message_erreur'] = 'Erreur dans le téléchargement du fichier !'; 22 22 } 23 $res['message_ok'] = 'Le fichier <b>'.$_FILES['flash_eva_habillage_envoi']['name'].'</b> a été téléchargé sur le serveur';23 $res['message_ok'] = 'Le fichier <b>'.$_FILES['flash_eva_habillage_envoi']['name'].'</b> a été téléchargé sur le serveur'; 24 24 } 25 25 } 26 26 // Choix de l'incrustation d'une animation flash 27 27 if (_request('submit_insertion_flash')) { 28 29 28 $recup_flash_exists = sql_select('id','spip_eva_habillage_images',"nom_div = '"._request('secteur_flash')."' AND nom_habillage = 'Defaut'"); 29 $tab_recup_flash_exists = sql_fetch($recup_flash_exists); 30 30 if ((_request('secteur_flash')=='flash_secteur_pied') OR (_request('secteur_flash')=='flash_secteur_titre')) { 31 31 if (isset($tab_recup_flash_exists['id'])) { … … 33 33 } 34 34 else { 35 sql_insertq('spip_eva_habillage_images',array('type' =>'flash','nom_habillage' => 'Defaut','nom_div' => _request('secteur_flash'),'nom_image' =>_request('nom_flash'),'pos_x' => _request('flash_horizontal'), 'pos_y' => _request('flash_vertical'),'repetition' => _request('flash_version')));35 sql_insertq('spip_eva_habillage_images',array('type' =>'flash','nom_habillage' => 'Defaut','nom_div' => _request('secteur_flash'),'nom_image' =>_request('nom_flash'),'pos_x' => _request('flash_horizontal'), 'pos_y' => _request('flash_vertical'),'repetition' => _request('flash_version'))); 36 36 } 37 37 } … … 39 39 sql_insertq('spip_eva_habillage_images',array('type' =>'flash','nom_habillage' => 'Defaut','nom_div' => _request('secteur_flash'),'nom_image' =>_request('nom_flash'),'pos_x' => _request('flash_horizontal'), 'pos_y' => _request('flash_vertical'),'repetition' => _request('flash_version'))); 40 40 } 41 $res['message_ok'] = "L'animation flash a été insérée";42 41 $res['message_ok'] = "L'animation flash a été insérée"; 42 } 43 43 //Suppression d'une animation flash précédemment insérée 44 44 $recup_exist_flash = sql_select('id , nom_div , nom_image , pos_x , pos_y , repetition','spip_eva_habillage_images',"type = 'flash' AND nom_habillage = 'Defaut'"); … … 51 51 return $res; 52 52 } 53 -
_squelettes_/eva-web/4_2/eva_habillage/formulaires/evahabillage_graphisme_images.html
r62043 r96105 22 22 23 23 <div style="text-align:center;"> 24 <:evahabillage:eva_gauche:> 25 <input type="radio" name="pos_x" value="left" checked /> 26 <:evahabillage:eva_centre:> 27 <input type="radio" name="pos_x" value="center" /> 28 <:evahabillage:eva_droite:> 29 <input type="radio" name="pos_x" value="right" /></div> 24 <:evahabillage:eva_gauche:> 25 <input type="radio" name="pos_x" value="left" checked /> 26 <:evahabillage:eva_centre:> 27 <input type="radio" name="pos_x" value="center" /> 28 <:evahabillage:eva_droite:> 29 <input type="radio" name="pos_x" value="right" /> 30 </div> 30 31 <input type="radio" name="pos_x" value=4 /> 31 32 <:evahabillage:eva_etape3_pos_choix:> 32 33 <br /><div style="text-align:center;"><input type="text" name="position_x" /></div> 33 34 <div style="text-align:center;"> 34 <:evahabillage:eva_etape3_repeat_x:> 35 <:evahabillage:eva_non:> 36 <input type="radio" name="repeat_x" value=0 checked /> 37 <:evahabillage:eva_oui:> 38 <input type="radio" name="repeat_x" value=1 /></div><br /> <br /> 35 <:evahabillage:eva_etape3_repeat_x:> 36 <:evahabillage:eva_non:> 37 <input type="radio" name="repeat_x" value=0 checked /> 38 <:evahabillage:eva_oui:> 39 <input type="radio" name="repeat_x" value=1 /> 40 </div><br /> <br /> 39 41 <:evahabillage:eva_etape3_pos_y:> 40 42 <div style="text-align:center;"> 41 <:evahabillage:EVA_haut:> 42 <input type="radio" name="pos_y" value="top" checked /> 43 <:evahabillage:eva_centre:> 44 <input type="radio" name="pos_y" value="center" /> 45 <:evahabillage:eva_bas:> 46 <input type="radio" name="pos_y" value="bottom" /></div> 43 <:evahabillage:EVA_haut:> 44 <input type="radio" name="pos_y" value="top" checked /> 45 <:evahabillage:eva_centre:> 46 <input type="radio" name="pos_y" value="center" /> 47 <:evahabillage:eva_bas:> 48 <input type="radio" name="pos_y" value="bottom" /> 49 </div> 47 50 <input type="radio" name="pos_y" value=4 /> 48 51 <:evahabillage:eva_etape3_pos_choix:> 49 52 <br /><div style="text-align:center;"><input type="text" name="position_y" /></div> 50 53 <div style="text-align:center;"> 51 <:evahabillage:eva_etape3_repeat_y:><:evahabillage:eva_non:>52 <input type="radio" name="repeat_y" value=0 checked />53 54 <:evahabillage:eva_oui:>55 <input type="radio" name="repeat_y" value=2 /></div><br /> <br />54 <:evahabillage:eva_etape3_repeat_y:><:evahabillage:eva_non:> 55 <input type="radio" name="repeat_y" value=0 checked /> 56 57 <:evahabillage:eva_oui:> 58 <input type="radio" name="repeat_y" value=2 /></div><br /> <br /> 56 59 <div style="text-align:center;"> 57 <:evahabillage:eva_etape3_attach:>58 <:evahabillage:eva_normal:>59 <input type="radio" name="attach" value="scroll" checked/> 60 <:evahabillage:eva_fixe:>61 <input type="radio" name="attach" value="fixed" /></div><br /> <br />60 <:evahabillage:eva_etape3_attach:> 61 <:evahabillage:eva_normal:> 62 <input type="radio" name="attach" value="scroll" checked/> 63 <:evahabillage:eva_fixe:> 64 <input type="radio" name="attach" value="fixed" /></div><br /> <br /> 62 65 <div style="text-align:center;"> 63 <:evahabillage:eva_etape3_choix_image:>64 <strong>#EVAL{_DIR_IMG}eva_habillage</strong>, ou utilisez le formulaire de chargement ci-dessous pour éviter le chargement par FTP<br />65 <select name="nom_image">66 <:evahabillage:eva_etape3_choix_image:> 67 <strong>#EVAL{_DIR_IMG}eva_habillage</strong>, ou utilisez le formulaire de chargement ci-dessous pour éviter le chargement par FTP<br /> 68 <select name="nom_image"> 66 69 <?php 67 70 $dir = opendir(_DIR_PLUGIN_EVA_HABILLAGE."mon_image"); … … 132 135 while ($nom_fichier = readdir($dir)) { 133 136 if (($nom_fichier!='.') AND ($nom_fichier!='..') AND ((strpos($nom_fichier,'.gif')) OR (strpos($nom_fichier,'.jpg')) OR (strpos($nom_fichier,'.png')) OR (strpos($nom_fichier,'.GIF')) OR (strpos($nom_fichier,'.JPG')) OR (strpos($nom_fichier,'.PNG')))) { 134 137 echo '<option value="'.$nom_fichier.'">'.$nom_fichier.'</option>'; 135 138 } 136 139 } … … 150 153 $puce=$tab_puce['nom_image']; 151 154 if ($puce) { 152 153 154 155 echo '<hr /><p style="text-decoration:underline;">'._T('evahabillage:eva_etape3_definition_puce').'</p>'; 156 echo "<p>La puce actuelle est <img src='"._DIR_IMG."eva_habillage/".$puce."' /></p>"; 157 echo '<p>La supprimer et revenir aux puces générées par SPIP ? 155 158 <input type="submit" name="submit_supprime_puce" value="'._T('evahabillage:eva_supprimer').'" /></p>'; 156 159 } -
_squelettes_/eva-web/4_2/eva_habillage/formulaires/evahabillage_graphisme_images.php
r69531 r96105 15 15 //Enregistrement des images 16 16 if (!empty($_FILES['image_eva_habillage_envoi']['tmp_name']) 17 AND is_uploaded_file($_FILES['image_eva_habillage_envoi']['tmp_name']) 18 AND filesize($_FILES['image_eva_habillage_envoi']['tmp_name'])<2000000) 19 { 17 AND is_uploaded_file($_FILES['image_eva_habillage_envoi']['tmp_name']) 18 AND filesize($_FILES['image_eva_habillage_envoi']['tmp_name'])<2000000) { 20 19 list($largeur, $hauteur, $type, $attr)=getimagesize($_FILES['image_eva_habillage_envoi']['tmp_name']); 21 if (($type===1) OR ($type===2) OR ($type===3)) 22 { 23 if(!move_uploaded_file($_FILES['image_eva_habillage_envoi']['tmp_name'], _DIR_IMG.'eva_habillage/'.$_FILES['image_eva_habillage_envoi']['name'])) 24 { 20 if (($type===1) OR ($type===2) OR ($type===3)) { 21 if(!move_uploaded_file($_FILES['image_eva_habillage_envoi']['tmp_name'], _DIR_IMG.'eva_habillage/'.$_FILES['image_eva_habillage_envoi']['name'])) { 25 22 $res['message_erreur'] = 'Erreur lors de la copie du fichier'; 26 23 } … … 31 28 if((_request('submit_image_choix')) AND (_request('nom_image')!='')) { 32 29 $recup_image_exists = sql_select('id','spip_eva_habillage_images',"nom_div = '"._request('secteur_image')."' AND nom_habillage = 'Defaut'"); 33 34 30 $tab_recup_image_exists = sql_fetch($recup_image_exists); 31 $repeat = _request('repeat_x')+_request('repeat_y'); 35 32 if ($repeat==0) {$rep='no-repeat';} 36 37 38 39 40 33 elseif ($repeat==1) {$rep='repeat-x';} 34 elseif ($repeat==2) {$rep='repeat-y';} 35 elseif ($repeat==3) {$rep='repeat';} 36 if (_request('pos_x')==4) {$Xpos=_request('position_x');} else {$Xpos=_request('pos_x');} 37 if (_request('pos_y')==4) {$Ypos=_request('position_y');} else {$Ypos=_request('pos_y');} 41 38 if (isset($tab_recup_image_exists['id'])) { 42 43 44 45 46 39 sql_updateq('spip_eva_habillage_images',array('nom_image' => _request('nom_image'), 'pos_x' => $Xpos, 'pos_y' => $Ypos , 'repetition' => $rep , 'attach' => _request('attach')),"id =".$tab_recup_image_exists['id']); 40 } 41 else { 42 sql_insertq('spip_eva_habillage_images',array('type' =>'image','nom_habillage' => 'Defaut','nom_div' => _request('secteur_image'),'nom_image' =>_request('nom_image'),'pos_x' => $Xpos,'pos_y' => $Ypos,'repetition' => $rep,'attach' =>_request('attach'))); 43 } 47 44 $res['message_ok'] = 'L\'insertion de l\'image de fond <b>'._request('nom_image').'</b> dans le secteur "<b>'._T('evahabillage:'._request('secteur_image')).'</b>" a été enregistrée'; 48 45 } 49 46 50 47 // Suppression de l'enregistrement d'une image 51 48 $recup_exist_image = sql_select('id , nom_div , nom_image','spip_eva_habillage_images',"type = 'image' AND nom_habillage = 'Defaut'"); … … 56 53 } 57 54 } 58 55 59 56 // Sélection d'une image de puce 60 57 if (_request('submit_choix_puce')) { … … 62 59 sql_insertq('spip_eva_habillage_images',array('type'=>'puce_spip','nom_habillage'=>'Defaut','nom_image'=>_request('nom_puce'))); 63 60 $res['message_ok'] = 'La puce personnelle a été enregistrée'; 64 65 61 } 62 66 63 // Suppression de l'enregistrement d'une image de puce 67 64 if (_request('submit_supprime_puce')) { 68 65 sql_delete('spip_eva_habillage_images',"type='puce_spip' AND nom_habillage='Defaut'"); 69 66 $res['message_ok'] = 'L\'enregistrement de la puce personnelle a été supprimé'; 70 67 } 71 68 return $res; 72 69 } 73 -
_squelettes_/eva-web/4_2/eva_habillage/formulaires/evahabillage_graphisme_logos.html
r62022 r96105 41 41 </table> 42 42 <div style="text-align:center;"> 43 <input type="submit" name="test_logotaille" value="<:evahabillage:eva_valider:>" />43 <input type="submit" name="test_logotaille" value="<:evahabillage:eva_valider:>" /> 44 44 </div><br /> 45 45 </form> -
_squelettes_/eva-web/4_2/eva_habillage/formulaires/evahabillage_graphisme_logos.php
r62022 r96105 32 32 return $res; 33 33 } 34 -
_squelettes_/eva-web/4_2/eva_habillage/formulaires/evahabillage_graphisme_police.php
r61946 r96105 16 16 include_spip("inc/eva_habillage_definition_themes"); 17 17 foreach (EVA_def_textes() as $habillage_modif_cles => $habillage_modif_inutile) { 18 19 20 18 $mes_modifs_tableau[$habillage_modif_cles] =_request($habillage_modif_cles); 19 } 20 sql_updateq('spip_eva_habillage_themes',$mes_modifs_tableau,"nom='Defaut'"); 21 21 $res['message_ok'] = 'Modification de la police enregistrée'; 22 22 } 23 23 return $res; 24 24 } 25 -
_squelettes_/eva-web/4_2/eva_habillage/formulaires/evahabillage_graphisme_taille_images.php
r62022 r96105 22 22 return $res; 23 23 } 24 -
_squelettes_/eva-web/4_2/eva_habillage/formulaires/evahabillage_graphisme_tailles.php
r62099 r96105 27 27 return $res; 28 28 } 29 -
_squelettes_/eva-web/4_2/eva_habillage/formulaires/evahabillage_headers.php
r61928 r96105 33 33 'repetition' => 'perso', 34 34 'attach' => 'headers' 35 35 )); 36 36 $res['message_ok'] = 'Le squelette personnel <b>'._request('eva_mon_bloc_perso_headers').'</b> a été inséré'; 37 37 } … … 43 43 return $res; 44 44 } 45 -
_squelettes_/eva-web/4_2/eva_habillage/formulaires/evahabillage_langue.html
r61805 r96105 24 24 <td align="center"><:evahabillage:titrebloc_tab2:></td></tr> 25 25 <?php $couleur_table++; 26 27 $test_langue=sql_select('nom_image','spip_eva_habillage_images',"type = 'fichier_lang' AND nom_habillage = 'Defaut' AND attach='#ENV{#GET{langue}}' AND nom_div = '$cle'");28 $result_langue=sql_fetch($test_langue);29 $resultat=$result_langue['nom_image'];30 echo '<tr align="center" ';31 if (($couleur_table%2)==0) {echo 'class="row_even"';} else {echo 'class="row_odd"';}32 $couleur_table++;33 echo '><td align="center">'.$val.'</td>';34 echo "<td align=\"center\"><input type=\"text\" name=\"$cle\" value=\"".str_replace("\"",""",$resultat)."\" size=\"25\" /></td>";35 echo '</tr>';36 26 foreach ($langue_fichier_initial as $cle => $val) { 27 $test_langue=sql_select('nom_image','spip_eva_habillage_images',"type = 'fichier_lang' AND nom_habillage = 'Defaut' AND attach='#ENV{#GET{langue}}' AND nom_div = '$cle'"); 28 $result_langue=sql_fetch($test_langue); 29 $resultat=$result_langue['nom_image']; 30 echo '<tr align="center" '; 31 if (($couleur_table%2)==0) {echo 'class="row_even"';} else {echo 'class="row_odd"';} 32 $couleur_table++; 33 echo '><td align="center">'.$val.'</td>'; 34 echo "<td align=\"center\"><input type=\"text\" name=\"$cle\" value=\"".str_replace("\"",""",$resultat)."\" size=\"25\" /></td>"; 35 echo '</tr>'; 36 } 37 37 ?> 38 38 </table> -
_squelettes_/eva-web/4_2/eva_habillage/formulaires/evahabillage_langue.php
r69863 r96105 24 24 return $res; 25 25 } 26 -
_squelettes_/eva-web/4_2/eva_habillage/formulaires/evahabillage_menu_horizontal.html
r62858 r96105 1 1 <?php 2 2 $tab_evabonus_menu=array( 3 'evabonus_menu_horizontal_couleur_fond',4 'evabonus_menu_horizontal_couleur_fond_survol',5 'evabonus_menu_horizontal_couleur_fond_actif',6 'evabonus_menu_horizontal_couleur_texte',7 'evabonus_menu_horizontal_couleur_texte_survol',8 'evabonus_menu_horizontal_couleur_texte_actif',9 'evabonus_menu_horizontal_couleur_bordure_style',10 'evabonus_menu_horizontal_couleur_bordure_largeur',11 'evabonus_menu_horizontal_couleur_bordure_couleur'3 'evabonus_menu_horizontal_couleur_fond', 4 'evabonus_menu_horizontal_couleur_fond_survol', 5 'evabonus_menu_horizontal_couleur_fond_actif', 6 'evabonus_menu_horizontal_couleur_texte', 7 'evabonus_menu_horizontal_couleur_texte_survol', 8 'evabonus_menu_horizontal_couleur_texte_actif', 9 'evabonus_menu_horizontal_couleur_bordure_style', 10 'evabonus_menu_horizontal_couleur_bordure_largeur', 11 'evabonus_menu_horizontal_couleur_bordure_couleur' 12 12 ); 13 13 ?> … … 26 26 <table class="spip"> 27 27 <?php 28 foreach ($tab_evabonus_menu as $cle_evabonus_menu) 29 { 28 foreach ($tab_evabonus_menu as $cle_evabonus_menu) { 30 29 $req_menu_depliable=sql_select('nom_image','spip_eva_habillage_images',"type='menu_depliable_horizontal' AND nom_habillage='Defaut' AND nom_div='".$cle_evabonus_menu."'"); 31 30 $tab_menu_depliable=sql_fetch($req_menu_depliable); … … 35 34 echo '<td style="text-align:center;"><input '; 36 35 if (($cle_evabonus_menu!='evabonus_menu_horizontal_couleur_bordure_style') AND ($cle_evabonus_menu!='evabonus_menu_horizontal_couleur_bordure_largeur')) 37 36 {echo 'class="palette" ';} 38 37 echo 'type="text" name="'.$cle_evabonus_menu.'" value="'.$code_menu_depliable.'">'; 39 38 echo '</td></tr>'; -
_squelettes_/eva-web/4_2/eva_habillage/formulaires/evahabillage_menu_horizontal.php
r62858 r96105 14 14 $res['message_ok'] = 'Aucune modification n\'a été enregistrée'; 15 15 $tab_evabonus_menu=array( 16 'evabonus_menu_horizontal_couleur_fond',17 'evabonus_menu_horizontal_couleur_fond_survol',18 'evabonus_menu_horizontal_couleur_fond_actif',19 'evabonus_menu_horizontal_couleur_texte',20 'evabonus_menu_horizontal_couleur_texte_survol',21 'evabonus_menu_horizontal_couleur_texte_actif',22 'evabonus_menu_horizontal_couleur_bordure_style',23 'evabonus_menu_horizontal_couleur_bordure_largeur',24 'evabonus_menu_horizontal_couleur_bordure_couleur'16 'evabonus_menu_horizontal_couleur_fond', 17 'evabonus_menu_horizontal_couleur_fond_survol', 18 'evabonus_menu_horizontal_couleur_fond_actif', 19 'evabonus_menu_horizontal_couleur_texte', 20 'evabonus_menu_horizontal_couleur_texte_survol', 21 'evabonus_menu_horizontal_couleur_texte_actif', 22 'evabonus_menu_horizontal_couleur_bordure_style', 23 'evabonus_menu_horizontal_couleur_bordure_largeur', 24 'evabonus_menu_horizontal_couleur_bordure_couleur' 25 25 ); 26 26 // Tailles des logos 27 27 if (_request('test_menu_depliable_horizontal')=='Valider') { 28 28 $res['message_ok'] = 'Modifications graphiques enregistrées'; 29 foreach ($tab_evabonus_menu as $cle_evabonus_menu) 30 { 29 foreach ($tab_evabonus_menu as $cle_evabonus_menu) { 31 30 sql_delete('spip_eva_habillage_images',"nom_habillage = 'Defaut' AND type='menu_depliable_horizontal' AND nom_div='".$cle_evabonus_menu."'"); 32 31 sql_insertq('spip_eva_habillage_images',array('nom_habillage' => 'Defaut','type' => 'menu_depliable_horizontal','nom_div' => $cle_evabonus_menu,'nom_image' => _request($cle_evabonus_menu))); … … 35 34 return $res; 36 35 } 37 -
_squelettes_/eva-web/4_2/eva_habillage/formulaires/evahabillage_menu_langue_graphisme.html
r62820 r96105 15 15 <table class="spip"> 16 16 <?php 17 foreach ($tab_menu_lang as $cle => $value) 18 { 17 foreach ($tab_menu_lang as $cle => $value) { 19 18 $req=sql_select('nom_image','spip_eva_habillage_images',"type='multilinguisme' AND nom_habillage='Defaut' AND nom_div='".$cle."'"); 20 19 $tab=sql_fetch($req); … … 27 26 echo 'type="text" name="'.$cle.'" value="'.$code_menu_lang.'">'; 28 27 echo '</td></tr>'; 29 28 } 30 29 ?> 31 30 </table> -
_squelettes_/eva-web/4_2/eva_habillage/formulaires/evahabillage_menu_langue_graphisme.php
r62820 r96105 10 10 11 11 12 function formulaires_evahabillage_menu_langue_graphisme_traiter_dist() {12 function formulaires_evahabillage_menu_langue_graphisme_traiter_dist() { 13 13 $res = array('editable'=>true); 14 14 $res['message_ok'] = 'Aucune modification n\'a été enregistrée'; 15 15 //On traite ici la modification des positions des blocs 16 if (_request('test_menu_langue')=='Valider') 17 { 16 if (_request('test_menu_langue')=='Valider') { 18 17 include_spip('inc/eva_habillage_definition_themes'); 19 18 $tab_menu_lang=EVA_menu_langue(); 20 foreach ($tab_menu_lang as $cle => $value) 21 { 19 foreach ($tab_menu_lang as $cle => $value) { 22 20 sql_delete('spip_eva_habillage_images',"nom_habillage = 'Defaut' AND type='multilinguisme' AND nom_div='".$cle."'"); 23 21 sql_insertq('spip_eva_habillage_images',array('nom_habillage' => 'Defaut','type' => 'multilinguisme','nom_div' => $cle,'nom_image' => _request($cle))); 24 22 } 25 $res['message_ok'] = 'Choix graphiques pour le menu de langue enregistrés.';23 $res['message_ok'] = 'Choix graphiques pour le menu de langue enregistrés.'; 26 24 } 27 25 return $res; 28 26 } 29 -
_squelettes_/eva-web/4_2/eva_habillage/formulaires/evahabillage_pied.php
r61927 r96105 33 33 'repetition' => 'perso', 34 34 'attach' => 'pied' 35 35 )); 36 36 $res['message_ok'] = 'Le squelette personnel <b>'._request('eva_mon_bloc_perso_pied').'</b> a été inséré'; 37 37 } 38 //On traite enfin la suppression des noisettes perso préa lablement insérées38 //On traite enfin la suppression des noisettes perso préablement insérées 39 39 if (_request('submit_supprime_skel_perso_pied')) { 40 40 sql_delete('spip_eva_habillage_images',"id='"._request('eva_suppr_skel_perso_pied')."'"); … … 43 43 return $res; 44 44 } 45 -
_squelettes_/eva-web/4_2/eva_habillage/formulaires/evahabillage_rubrique.html
r61889 r96105 38 38 <table style="margin-top:-30px; margin-bottom:-10px;"><tr valign="top"> 39 39 <?php 40 if ($eva_gauche) {40 if ($eva_gauche) { 41 41 echo "<th width=$eva_gauche>"; 42 42 echo '<div class="formulaire_spip formulaire_configurer formulaire_#FORM formulaire_#FORM-#ENV{id,nouveau}">';