<?
if(!$this->startup->group_config->can_search)
{
	?>
	<h2 style="vertical-align:middle"><img src="<?=base_url().'img/icons/search_32.png'?>" class="nb" alt="" /><?php echo $this->lang->line('files_search_new_search_heading'); ?></h2>
	<span class="alert"><?php echo $this->lang->line('files_search_new_search_1'); ?><a href="<?=site_url('user/login')?>"><?php echo $this->lang->line('files_search_new_search_1_1'); ?></a><?php echo $this->lang->line('files_search_new_search_1_2'); ?></span>
	<?
}
else
{
	?>
	<h2 style="vertical-align:middle"><img src="<?=base_url().'img/icons/search_32.png'?>" class="nb" alt="" /><?php echo $this->lang->line('files_search_new_files_heading'); ?></h2>
	<?=$flashMessage?>
	
	<form action="<?=site_url('files/search')?>" onsubmit="submitSearch(); return false;"  method="get">
		<p>
			<label><?php echo $this->lang->line('files_search_new_files_1'); ?></label>
			<input type="text" name="query" id="search" value="" /><br /><br />
			
			<?=generateLinkButton('Search Files', 'javascript:;', base_url().'img/icons/search_16.png', NULL, array('onclick' => 'submitSearch();'))?><br />
		</p>
	</form>
	<script>
	function submitSearch()
	{
		if($('#search').val() != '')
		{
			window.location = '<?=site_url('files/search')?>/'+escape($('#search').val());
		}
	}
	</script>
	<?
}