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