| @@ 1459-1478 (lines=20) @@ | ||
| 1456 | <input type="hidden" name="', $key, '" value="0"><input type="checkbox" name="', $key, '" id="', $key, '"', !empty($field['value']) ? ' checked' : '', ' value="1" class="input_check" ', $field['input_attr'], '>'; |
|
| 1457 | ||
| 1458 | // Always fun - select boxes! |
|
| 1459 | elseif ($field['type'] == 'select') |
|
| 1460 | { |
|
| 1461 | echo ' |
|
| 1462 | <select name="', $key, '" id="', $key, '">'; |
|
| 1463 | ||
| 1464 | if (isset($field['options'])) |
|
| 1465 | { |
|
| 1466 | // Is this some code to generate the options? |
|
| 1467 | if (!is_array($field['options'])) |
|
| 1468 | $field['options'] = $field['options'](); |
|
| 1469 | // Assuming we now have some! |
|
| 1470 | if (is_array($field['options'])) |
|
| 1471 | foreach ($field['options'] as $value => $name) |
|
| 1472 | echo ' |
|
| 1473 | <option value="', $value, '"', $value == $field['value'] ? ' selected' : '', '>', $name, '</option>'; |
|
| 1474 | } |
|
| 1475 | ||
| 1476 | echo ' |
|
| 1477 | </select>'; |
|
| 1478 | } |
|
| 1479 | ||
| 1480 | // Something to end with? |
|
| 1481 | if (!empty($field['postinput'])) |
|
| @@ 224-243 (lines=20) @@ | ||
| 221 | <input type="hidden" name="', $key, '" value="0"><input type="checkbox" name="', $key, '" id="', $key, '"', !empty($field['value']) ? ' checked' : '', ' value="1" tabindex="', $context['tabindex']++, '" class="input_check" ', $field['input_attr'], '>'; |
|
| 222 | ||
| 223 | // Always fun - select boxes! |
|
| 224 | elseif ($field['type'] == 'select') |
|
| 225 | { |
|
| 226 | echo ' |
|
| 227 | <select name="', $key, '" id="', $key, '" tabindex="', $context['tabindex']++, '">'; |
|
| 228 | ||
| 229 | if (isset($field['options'])) |
|
| 230 | { |
|
| 231 | // Is this some code to generate the options? |
|
| 232 | if (!is_array($field['options'])) |
|
| 233 | $field['options'] = eval($field['options']); |
|
| 234 | // Assuming we now have some! |
|
| 235 | if (is_array($field['options'])) |
|
| 236 | foreach ($field['options'] as $value => $name) |
|
| 237 | echo ' |
|
| 238 | <option value="', $value, '"', $value == $field['value'] ? ' selected' : '', '>', $name, '</option>'; |
|
| 239 | } |
|
| 240 | ||
| 241 | echo ' |
|
| 242 | </select>'; |
|
| 243 | } |
|
| 244 | ||
| 245 | // Something to end with? |
|
| 246 | if (!empty($field['postinput'])) |
|