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