<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<title>Lifebox | Search</title>
		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
		<link rel="stylesheet" type="text/css" href="/templates/css/all.css" />
		<!--[if lte IE 6]><link rel="stylesheet" type="text/css" media="screen" href="/templates/css/ie.css" /><![endif]-->
		<link rel="icon" href="templates/img/favicon.ico" type="image/x-icon" />
	</head>
	<body>
		<div id="pagebody">
			<div id="content_container">
			{include file="$TEMPLATES/includes/header.tpl"}
				<div id="content">
					<div class="main">
						{if !$search_results AND !$album_results}
						<div class="search_page">
							<div class="resize">
                                                                <div class="search_result">
                                                                        <span class="add_title">Photo &amp; Video matches for: {$_GET.query|stripslashes}</span>
                                                                        <span class="add_info">{$total_items} Results</span>
                                                                </div>
                                                        </div>
							<div class="result">
							{if $ERROR}
								{foreach from=$ERROR item=message}
	                       					<div class="error">
	                       					{$message}
	                       					</div>
	                       					{/foreach}
							{else}
							No items could be found
							{/if}
							</div>
						</div>
						{elseif $search_results}
						<div class="search_page">
							<div class="resize">
								<div class="search_result">
									<span class="add_title">Photo &amp; Video Results for: {$_GET.query|stripslashes}</span>
									<span class="add_info">{$total_items} Results</span>
								</div>
								{if $search_results}
								{include file="$TEMPLATES/includes/controlbar.tpl"}
								{/if}
							</div>
							{if $search_results}
							{section name=row loop=$search_results}
							<div class="result">
								<div class="photo">
									<a href="{$search_results[row].url}"><img src="{$search_results[row].recent_url}" alt="" /></a>
									<div class="label_photo">
										<p>{$search_results[row].title|truncate:30:"..."|upper}</p>
										<div class="comments">
											<a href="{$search_results[row].url}">{$search_results[row].comments}</a>
										</div>
									</div>
								</div>
							</div>
							{/section}
							{/if}
							{if !$search_results}
							<div class="result">
								No items could be found.
							</div>
							{/if}
							{if $search_results}
							<div class="resize">
                                                                {include file="$TEMPLATES/includes/controlbar.tpl"}
                                                        </div>
							{/if}
						</div>
						{/if}
						{if $album_results}
						<div class="album_page">
                                                        <div class="resize">
                                                                <div class="search_result">
                                                                        <span class="add_title">{if !$search_results}No photos found; but, I{else}Also{/if} found some albums matching: {$_GET.query|stripslashes}</span>
                                                                        <span class="add_info">{$album_rows} Albums</span>
                                                                </div>
                                                        </div>
                                                        {if $album_results}
                                                        {section name=row loop=$album_results}
                                                        <div class="result">
                                                                <div class="photo">
                                                                        <a href="{$album_results[row].url}"><img src="{$album_results[row].album_url}" alt="" /></a>
                                                                        <div class="label_photo">
                                                                                <p>{$album_results[row].title|truncate:30:"..."|upper}</p>
                                                                        </div>
                                                                </div>
                                                        </div>
                                                        {/section}
                                                        {/if}
							{if !$album_results}
                                                        <div class="result">
                                                                <p>No albums could be found.</p>
                                                        </div>
                                                        {/if}
                                                </div>
					{/if}
					</div>
				</div>
		{include file="$TEMPLATES/includes/footer.tpl"}
		</div>
	</body>
</html>
