<tr><td valign="top" width="200"><b>%section_title_<?php 
        echo $section->id;
        ?>
%</b></td><td valign="top">Section Title</td></tr>
				<?php 
        $replacements['section_title_' . $section->id] = $section->attr('name');
        $questions = $section->getQuestions();
        foreach ($questions as $q_id => $question) {
            $q_asset = $GLOBALS['SQ_SYSTEM']->am->getAsset($section->id . ':q' . $q_id);
            $q_name = $section->attr('name') . ': ' . $q_asset->attr('name');
            ?>
						<tr><td valign="top" width="200"><b>%question_field_<?php 
            echo $section->id . '_q' . $q_id;
            ?>
%</b></td><td valign="top"><?php 
            echo get_asset_tag_line($section->id . ':q' . $q_id);
            ?>
</td></tr>
					<?php 
        }
        ?>
						</table>
					</fieldset>
				</p>
				<?php 
    }
    ?>


			</table>
		</fieldset>
                     }
                     // Cut it down to a certain number of characters anyway
                     $value = ellipsisize($value, 120);
                     $value = preg_replace('/(' . addslashes(implode('|', $words)) . ')/i', '<span class="sq-backend-search-results-highlight">$1</span>', $value);
                     // remove \r and replace \n with line breaks
                     $this_detail[] = $name_detail . '<br/><em>' . str_replace("\r", '', str_replace("\n", '<br/>', $value)) . '</em>';
                 }
                 //end foreach
             }
             //end foreach
             $asset_name = $GLOBALS['SQ_SYSTEM']->am->getAssetInfo(array($result_assetid), 'image', FALSE, 'name');
             $asset_title = $GLOBALS['SQ_SYSTEM']->am->getAttributeValuesByName('title', 'image', array($result_assetid));
             $asset_alt = $GLOBALS['SQ_SYSTEM']->am->getAttributeValuesByName('alt', 'image', array($result_assetid));
             $asset_width = $GLOBALS['SQ_SYSTEM']->am->getAttributeValuesByName('width', 'image', array($result_assetid));
             $asset_height = $GLOBALS['SQ_SYSTEM']->am->getAttributeValuesByName('height', 'image', array($result_assetid));
             $result_list[] = array('tag_line' => get_asset_tag_line($result_assetid, 'javascript:set_asset_finder_from_search(\'' . $result_assetid . '\', \'' . htmlspecialchars(array_get_index($asset_title, $result_assetid, ''), ENT_QUOTES) . '\', \'\', \'0\', \'' . array_get_index($asset_name, $result_assetid, '') . '\', \'' . addslashes(array_get_index($asset_alt, $result_assetid, '')) . '\', \'' . array_get_index($asset_width, $result_assetid, '') . '\', \'' . array_get_index($asset_height, $result_assetid, '') . '\');'), 'detail' => implode($this_detail, '<br/>'));
         }
         //end foreach
     }
     //end if
 }
 //end else
 // Are there any results? If not, put in a "search failed" box, otherwise
 // build the results box
 if (empty($results) && empty($found_asset_line)) {
     $box_title = translate('Search Failed');
     $html = sprintf(translate('Search for "%s" found nothing. Try Again'), addslashes($search_for));
     $style_base = 'search-failed';
 } else {
     $box_title = translate('Search Results');
     if (!empty($found_asset_line)) {
			}
		}

		</script>
	</head>

	<body>
	<?php 
    require_once dirname(__FILE__) . '/../../include/backend_outputter.inc';
    $o = new Backend_Outputter();
    $o->addOnLoad('checkTagsLeft()');
    $o->openSection(sprintf(translate('Suggested tags for %s'), get_asset_tag_line($asset->id)));
    $o->openField('');
    ?>
				<p><?php 
    echo sprintf(translate('Suggested tags for %s'), get_asset_tag_line($asset->id));
    ?>
</p>
				<p><?php 
    echo translate('Click \'Add Tag\' to tag this asset with the term');
    ?>
</p>

		<p>
		<fieldset>
			<legend><b><?php 
    echo translate('Suggested Tags');
    ?>
</b></legend>

                 }
                 // First match position
                 if ($matches[0][0][1] > 15) {
                     $value = substr_replace($value, '...', 0, $matches[0][0][1] - 15);
                 }
                 // Cut it down to a certain number of characters anyway
                 $value = ellipsisize($value, 120);
                 $value = preg_replace('/(' . addslashes(implode('|', $words)) . ')/i', '<span class="sq-backend-search-results-highlight">$1</span>', $value);
                 // remove \r and replace \n with line breaks
                 $this_detail[] = $name_detail . '<br/><em>' . str_replace("\r", '', str_replace("\n", '<br/>', $value)) . '</em>';
             }
             //end foreach
         }
         //end foreach
         $asset_name = $GLOBALS['SQ_SYSTEM']->am->getAssetInfo($result_assetid, 'asset', FALSE, 'name');
         $result_list[] = array('tag_line' => get_asset_tag_line($result_assetid, 'javascript:set_asset_finder_from_search(\'' . $result_assetid . '\', \'' . htmlspecialchars($asset_name[$result_assetid], ENT_QUOTES) . '\', \'\', \'0\');'), 'detail' => implode($this_detail, '<br/>'));
     }
     //end foreach
 }
 //end if
 // Are there any results? If not, put in a "search failed" box, otherwise
 // build the results box
 if (empty($results) && empty($found_asset_line)) {
     $box_title = translate('Search Failed');
     $html = sprintf(translate('Search for "%s" found nothing. Try Again'), addslashes($search_for));
     $style_base = 'search-failed';
 } else {
     $box_title = translate('Search Results');
     if (!empty($found_asset_line)) {
         $html .= '<div class="search-result">' . $found_asset_line . '</div>';
     }