| @@ 3171-3189 (lines=19) @@ | ||
| 3168 | * @return string |
|
| 3169 | * Code HTML résultant |
|
| 3170 | **/ |
|
| 3171 | function env_to_params($env, $ignore_params = array()) { |
|
| 3172 | $ignore_params = array_merge( |
|
| 3173 | array('id', 'lang', 'id_document', 'date', 'date_redac', 'align', 'fond', '', 'recurs', 'emb', 'dir_racine'), |
|
| 3174 | $ignore_params |
|
| 3175 | ); |
|
| 3176 | if (!is_array($env)) { |
|
| 3177 | $env = unserialize($env); |
|
| 3178 | } |
|
| 3179 | $texte = ""; |
|
| 3180 | if ($env) { |
|
| 3181 | foreach ($env as $i => $j) { |
|
| 3182 | if (is_string($j) and !in_array($i, $ignore_params)) { |
|
| 3183 | $texte .= "<param name='" . $i . "'\n\tvalue='" . $j . "' />"; |
|
| 3184 | } |
|
| 3185 | } |
|
| 3186 | } |
|
| 3187 | ||
| 3188 | return $texte; |
|
| 3189 | } |
|
| 3190 | ||
| 3191 | /** |
|
| 3192 | * Écrit des attributs HTML à partir d'un tableau de données tel que `#ENV` |
|
| @@ 3210-3228 (lines=19) @@ | ||
| 3207 | * @return string |
|
| 3208 | * Code HTML résultant |
|
| 3209 | **/ |
|
| 3210 | function env_to_attributs($env, $ignore_params = array()) { |
|
| 3211 | $ignore_params = array_merge( |
|
| 3212 | array('id', 'lang', 'id_document', 'date', 'date_redac', 'align', 'fond', '', 'recurs', 'emb', 'dir_racine'), |
|
| 3213 | $ignore_params |
|
| 3214 | ); |
|
| 3215 | if (!is_array($env)) { |
|
| 3216 | $env = unserialize($env); |
|
| 3217 | } |
|
| 3218 | $texte = ""; |
|
| 3219 | if ($env) { |
|
| 3220 | foreach ($env as $i => $j) { |
|
| 3221 | if (is_string($j) and !in_array($i, $ignore_params)) { |
|
| 3222 | $texte .= $i . "='" . $j . "' "; |
|
| 3223 | } |
|
| 3224 | } |
|
| 3225 | } |
|
| 3226 | ||
| 3227 | return $texte; |
|
| 3228 | } |
|
| 3229 | ||
| 3230 | ||
| 3231 | /** |
|