Enlever un "nom" provenant d'une liste déroulante
Donc , si vous voulez m'aider je vous envoie vers cette discussion : https://www.developpez.net/forums/d1.../#post11010743
J'ai réussis à faire afficher l'icon grâce au code suivant :
Code:
1 2 3 4 5 6 7 8 9 10 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 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174
|
<?php // PERMET DE LIRE LE FICHIER TXT
$tableau = unserialize(file_get_contents('recupmess2.txt'));
if( !empty($tableau['Message']) ) // si le message n'est pas vide
{
?>
<span id="menu">
<span style="color: red;float: left;font-weight: bold;font-size: xx-large;" >
<?php echo $tableau['Message'];} ?>
<script>
var icon = '<?php echo $tableau["LOGO"]; ?>';
</script>
<script>document.write(icon);</script>
</span>
</span>
<?php
$tableau = unserialize(file_get_contents('recupmess2.txt'));
if( !empty($tableau['Message2']) ) // si le message2 n'est pas vide
{
?>
<span id="menu2">
<span style="color: red;float: left;font-weight: bold;font-size: x-large;" >
<?php echo $tableau['Message2']; }?>
<script>
var icon2 = '<?php echo $tableau["LOGO2"]; ?>';
</script>
</span>
</span>
<script>
if( icon == 'attention' || icon2 == 'attention') // LOGO ATTENTION
{
var resultaticon = '⚠';
var numPart = entite.match(/\d+/)[0];
var sign = String.fromCharCode(numPart);
}
else if( icon == 'euro' || icon2 == 'euro') // LOGO EURO
{
var resultaticon = "";
var numPart = entite.match(/\d+/)[0];
var sign = String.fromCharCode(numPart);
}
else if( icon == 'heure' || icon2 == 'heure') // LOGO HEURE
{
var resultaticon = "⌚";
var numPart = entite.match(/\d+/)[0];
var sign = String.fromCharCode(numPart);
}
else if( icon == 'temps' || icon2 == 'temps') // LOGO TEMPS
{
var resultaticon = "⌛";
var numPart = entite.match(/\d+/)[0];
var sign = String.fromCharCode(numPart);
}
else if( icon == 'danger' || icon2 == 'danger') // LOGO DANGER
{
var resultaticon = "☠";
var numPart = entite.match(/\d+/)[0];
var sign = String.fromCharCode(numPart);
}
else if( icon == 'triste' || icon2 == 'triste') // LOGO TRISTE
{
var resultaticon = "☹";
var numPart = entite.match(/\d+/)[0];
var sign = String.fromCharCode(numPart);
}
else if( icon == 'content' || icon2 == 'content') // LOGO CONTENT
{
var resultaticon = "☺";
var numPart = entite.match(/\d+/)[0];
var sign = String.fromCharCode(numPart);
}
else if( icon == 'valide' || icon2 == 'valide') // LOGO VALIDE
{
var resultaticon = "✔";
var numPart = entite.match(/\d+/)[0];
var sign = String.fromCharCode(numPart);
}
else if( icon == 'pasvalide' || icon2 == 'pasvalide') // LOGO PASVALIDE
{
var resultaticon = "✖";
var numPart = entite.match(/\d+/)[0];
var sign = String.fromCharCode(numPart);
}
else if( icon == 'telephone' || icon2 == 'telephone') // LOGO TELEPHONE
{
var resultaticon = "✆";
var numPart = entite.match(/\d+/)[0];
var sign = String.fromCharCode(numPart);
}
else if( icon == 'recherche' || icon2 == 'recherche') // LOGO RECHERCHE
{
var resultaticon = "🔍";
var numPart = entite.match(/\d+/)[0];
var sign = String.fromCharCode(numPart);
}
else if( icon == 'calendrier' || icon2 == 'calendrier') // LOGO CALENDRIER
{
var resultaticon = "📅";
var numPart = entite.match(/\d+/)[0];
var sign = String.fromCharCode(numPart);
}
else if( icon == 'sac' || icon2 == 'sac') // LOGO SAC
{
var resultaticon = "💼";
var numPart = entite.match(/\d+/)[0];
var sign = String.fromCharCode(numPart);
}
</script>
<span style="color: red;float: left;font-weight: bold;font-size: x-large;" >
<script>document.write(resultaticon);</script> |
Le symbole s'affiche mais il y a également son nom , j'aimerais faire en sorte qu'il disparaisse .
Pièce jointe 486326