- if($GLOBALS['opt_listing'] == 'Yes') {
- if($GLOBALS['opt_display'] != 'Yes') {
- $tem->show('opt_display_a_else');
- }
- if(show_in_listing($type, $input, $format, $sql)) {
- if($format == 'bool' || $format == 'yesno') {
- $tem->set('listing_enc', 'yesno');
- $tem->show('listing_value_enc');
- } elseif($input == 'date') {
- $tem->set('listing_enc', 'mmddyyyy');
- $tem->show('listing_value_enc');
- } elseif($type == 'thumb') {
- $tem->show('listing_value_thumb');
- } else {
- $tem->set('listing_enc', 'html');
- $tem->show('listing_value_enc');
- }
- $tem->show('listing_head_col');
- $tem->show('listing_row_col');
+ if(show_in_listing($type, $input, $format, $sql)) {
+ $listing_headers[] = array('caption' => format_caption($name));
+ $listing_field = array('name' => $name);
+ if($format == 'bool' || $format == 'yesno') {
+ $listing_field['enc'] = 'yesno';
+ } elseif($input == 'date') {
+ $listing_field['enc'] = 'mmddyyyy';
+ } elseif($type == 'thumb') {
+ $listing_field['thumb'] = true;
+ } else {
+ $listing_field['enc'] = 'html';