| @@ 3234-3252 (lines=19) @@ | ||
| 3231 | * @return string |
|
| 3232 | * Code HTML résultant |
|
| 3233 | **/ |
|
| 3234 | function env_to_params($env, $ignore_params = array()) { |
|
| 3235 | $ignore_params = array_merge( |
|
| 3236 | array('id', 'lang', 'id_document', 'date', 'date_redac', 'align', 'fond', '', 'recurs', 'emb', 'dir_racine'), |
|
| 3237 | $ignore_params |
|
| 3238 | ); |
|
| 3239 | if (!is_array($env)) { |
|
| 3240 | $env = unserialize($env); |
|
| 3241 | } |
|
| 3242 | $texte = ""; |
|
| 3243 | if ($env) { |
|
| 3244 | foreach ($env as $i => $j) { |
|
| 3245 | if (is_string($j) and !in_array($i, $ignore_params)) { |
|
| 3246 | $texte .= "<param name='" . $i . "'\n\tvalue='" . $j . "' />"; |
|
| 3247 | } |
|
| 3248 | } |
|
| 3249 | } |
|
| 3250 | ||
| 3251 | return $texte; |
|
| 3252 | } |
|
| 3253 | ||
| 3254 | /** |
|
| 3255 | * Écrit des attributs HTML à partir d'un tableau de données tel que `#ENV` |
|
| @@ 3273-3291 (lines=19) @@ | ||
| 3270 | * @return string |
|
| 3271 | * Code HTML résultant |
|
| 3272 | **/ |
|
| 3273 | function env_to_attributs($env, $ignore_params = array()) { |
|
| 3274 | $ignore_params = array_merge( |
|
| 3275 | array('id', 'lang', 'id_document', 'date', 'date_redac', 'align', 'fond', '', 'recurs', 'emb', 'dir_racine'), |
|
| 3276 | $ignore_params |
|
| 3277 | ); |
|
| 3278 | if (!is_array($env)) { |
|
| 3279 | $env = unserialize($env); |
|
| 3280 | } |
|
| 3281 | $texte = ""; |
|
| 3282 | if ($env) { |
|
| 3283 | foreach ($env as $i => $j) { |
|
| 3284 | if (is_string($j) and !in_array($i, $ignore_params)) { |
|
| 3285 | $texte .= $i . "='" . $j . "' "; |
|
| 3286 | } |
|
| 3287 | } |
|
| 3288 | } |
|
| 3289 | ||
| 3290 | return $texte; |
|
| 3291 | } |
|
| 3292 | ||
| 3293 | ||
| 3294 | /** |
|