<?php /* Smarty version 2.6.16, created on 2007-07-30 18:44:14
         compiled from gallery:modules/search/templates/SearchShowAll.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'default', 'gallery:modules/search/templates/SearchShowAll.tpl', 120, false),array('modifier', 'markup', 'gallery:modules/search/templates/SearchShowAll.tpl', 120, false),)), $this); ?>
<form id="SearchShowAll" action="<?php echo $this->_reg_objects['g'][0]->url(array(), $this);?>
" method="post">
<div id="gsContent" class="gcBorder1">
<div class="gbBlock gcBackground1">
<h2>
<?php echo $this->_reg_objects['g'][0]->text(array('text' => "%s Search Results for ",'arg1' => $this->_tpl_vars['SearchShowAll']['moduleInfo']['name']), $this);?>

'<?php echo $this->_tpl_vars['form']['searchCriteria']; ?>
'
</h2>
</div>
<?php echo $this->_reg_objects['g'][0]->hiddenFormVars(array(), $this);?>

<input type="hidden"
name="<?php echo $this->_reg_objects['g'][0]->formVar(array('var' => 'controller'), $this);?>
" value="<?php echo $this->_tpl_vars['SearchShowAll']['controller']; ?>
"/>
<input type="hidden" name="<?php echo $this->_reg_objects['g'][0]->formVar(array('var' => "form[formName]"), $this);?>
" value="SearchShowAll"/>
<input type="hidden" name="<?php echo $this->_reg_objects['g'][0]->formVar(array('var' => "form[moduleId]"), $this);?>
" value="<?php echo $this->_tpl_vars['form']['moduleId']; ?>
"/>
<input type="hidden" name="<?php echo $this->_reg_objects['g'][0]->formVar(array('var' => "form[page]"), $this);?>
" value="<?php echo $this->_tpl_vars['form']['page']; ?>
"/>
<script type="text/javascript">
// <![CDATA[
function setCheck(val) {
<?php $_from = $this->_tpl_vars['SearchShowAll']['moduleInfo']['options']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['optionId'] => $this->_tpl_vars['optionInfo']):
?>
document.getElementById('cb_<?php echo $this->_tpl_vars['optionId']; ?>
').checked = val;
<?php endforeach; endif; unset($_from); ?>
}
function invertCheck() {
var o;
<?php $_from = $this->_tpl_vars['SearchShowAll']['moduleInfo']['options']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['optionId'] => $this->_tpl_vars['optionInfo']):
?>
o = document.getElementById('cb_<?php echo $this->_tpl_vars['optionId']; ?>
'); o.checked = !o.checked;
<?php endforeach; endif; unset($_from); ?>
}
// ]]>
</script>
<div class="gbBlock">
<input type="text" size="50"
name="<?php echo $this->_reg_objects['g'][0]->formVar(array('var' => "form[searchCriteria]"), $this);?>
" value="<?php echo $this->_tpl_vars['form']['searchCriteria']; ?>
"/>
<script type="text/javascript">
document.getElementById('SearchShowAll')['<?php echo $this->_reg_objects['g'][0]->formVar(array('var' => "form[searchCriteria]"), $this);?>
'].focus();
</script>
<input type="hidden"
name="<?php echo $this->_reg_objects['g'][0]->formVar(array('var' => "form[lastSearchCriteria]"), $this);?>
" value="<?php echo $this->_tpl_vars['form']['searchCriteria']; ?>
"/>
<input type="submit" class="inputTypeSubmit"
name="<?php echo $this->_reg_objects['g'][0]->formVar(array('var' => "form[action][search]"), $this);?>
" value="<?php echo $this->_reg_objects['g'][0]->text(array('text' => 'Search'), $this);?>
"/>
<?php if (isset ( $this->_tpl_vars['form']['error']['searchCriteria']['missing'] )): ?>
<div class="giError">
<?php echo $this->_reg_objects['g'][0]->text(array('text' => "You must enter some text to search for!"), $this);?>

</div>
<?php endif; ?>
<div style="margin: 0.5em 0">
<?php $_from = $this->_tpl_vars['SearchShowAll']['moduleInfo']['options']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['optionId'] => $this->_tpl_vars['optionInfo']):
?>
<input id="cb_<?php echo $this->_tpl_vars['optionId']; ?>
" type="checkbox"
name="<?php echo $this->_reg_objects['g'][0]->formVar(array('var' => "form[options][".($this->_tpl_vars['SearchShowAll']['moduleId'])."][".($this->_tpl_vars['optionId'])."]"), $this);?>
"
<?php if (isset ( $this->_tpl_vars['form']['options'][$this->_tpl_vars['SearchShowAll']['moduleId']][$this->_tpl_vars['optionId']] )): ?>checked="checked"<?php endif; ?>/>
<label for="cb_<?php echo $this->_tpl_vars['optionId']; ?>
">
<?php echo $this->_tpl_vars['optionInfo']['description']; ?>

</label>
<?php endforeach; endif; unset($_from); ?>
</div>
<div>
<a href="javascript:setCheck(1)"><?php echo $this->_reg_objects['g'][0]->text(array('text' => 'Check All'), $this);?>
</a>
&nbsp;
<a href="javascript:setCheck(0)"><?php echo $this->_reg_objects['g'][0]->text(array('text' => 'Uncheck All'), $this);?>
</a>
&nbsp;
<a href="javascript:invertCheck()"><?php echo $this->_reg_objects['g'][0]->text(array('text' => 'Invert'), $this);?>
</a
</div>
</div>
<?php if (! empty ( $this->_tpl_vars['SearchShowAll']['results'] )): ?>
<div class="gbBlock">
<div>
<input type="submit" class="inputTypeSubmit"
name="<?php echo $this->_reg_objects['g'][0]->formVar(array('var' => "form[action][scan]"), $this);?>
"
value="<?php echo $this->_reg_objects['g'][0]->text(array('text' => 'Search All Modules'), $this);?>
"/>
</div>
<h4>
<?php echo $this->_tpl_vars['SearchShowAll']['moduleInfo']['name']; ?>

<?php if (( $this->_tpl_vars['SearchShowAll']['results']['count'] > 0 )):  echo $this->_reg_objects['g'][0]->text(array('text' => "Results %d - %d of %d, Page %d of %d",'arg1' => $this->_tpl_vars['SearchShowAll']['results']['start'],'arg2' => $this->_tpl_vars['SearchShowAll']['results']['end'],'arg3' => $this->_tpl_vars['SearchShowAll']['results']['count'],'arg4' => $this->_tpl_vars['form']['page'],'arg5' => $this->_tpl_vars['SearchShowAll']['maxPages']), $this);?>

<?php endif;  if (( $this->_tpl_vars['form']['page'] > 1 )): ?>
<input type="submit" class="inputTypeSubmit"
name="<?php echo $this->_reg_objects['g'][0]->formVar(array('var' => "form[action][previousPage]"), $this);?>
"
value="<?php echo $this->_reg_objects['g'][0]->text(array('text' => "&laquo; Back"), $this);?>
"/>
<?php endif;  if (( $this->_tpl_vars['form']['page'] < $this->_tpl_vars['SearchShowAll']['maxPages'] )): ?>
<input type="submit" class="inputTypeSubmit"
name="<?php echo $this->_reg_objects['g'][0]->formVar(array('var' => "form[action][nextPage]"), $this);?>
"
value="<?php echo $this->_reg_objects['g'][0]->text(array('text' => "Next &raquo;"), $this);?>
"/>
<?php endif; ?>
</h4>
<?php if (( sizeof ( $this->_tpl_vars['SearchShowAll']['results']['results'] ) > 0 )):  $this->assign('childrenInColumnCount', 0); ?>
<table><tr>
<?php $_from = $this->_tpl_vars['SearchShowAll']['results']['results']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['result']):
 if (( $this->_tpl_vars['childrenInColumnCount'] == 4 )): ?>
</tr><tr>
<?php $this->assign('childrenInColumnCount', 0);  endif;  $this->assign('childrenInColumnCount', ($this->_tpl_vars['childrenInColumnCount']+1));  $this->assign('itemId', $this->_tpl_vars['result']['itemId']); ?>
<td class="<?php if ($this->_tpl_vars['SearchShowAll']['items'][$this->_tpl_vars['itemId']]['canContainChildren']): ?>gbItemAlbum<?php else: ?>gbItemImage<?php endif; ?>"
style="width: 10%">
<a href="<?php echo $this->_reg_objects['g'][0]->url(array('arg1' => "view=core.ShowItem",'arg2' => "itemId=".($this->_tpl_vars['itemId'])), $this);?>
">
<?php if (isset ( $this->_tpl_vars['SearchShowAll']['thumbnails'][$this->_tpl_vars['itemId']] )):  echo $this->_reg_objects['g'][0]->image(array('item' => $this->_tpl_vars['SearchShowAll']['items'][$this->_tpl_vars['itemId']],'image' => $this->_tpl_vars['SearchShowAll']['thumbnails'][$this->_tpl_vars['itemId']],'class' => 'giThumbnail'), $this);?>

<?php else:  echo $this->_reg_objects['g'][0]->text(array('text' => 'No thumbnail'), $this);?>

<?php endif; ?>
</a>
<ul class="giInfo">
<?php $_from = $this->_tpl_vars['result']['fields']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['field']):
?>
<li>
<span class="ResultKey"><?php echo $this->_tpl_vars['field']['key']; ?>
:</span>
<span class="ResultData"><?php echo ((is_array($_tmp=((is_array($_tmp=@$this->_tpl_vars['field']['value'])) ? $this->_run_mod_handler('default', true, $_tmp, "&nbsp;") : smarty_modifier_default($_tmp, "&nbsp;")))) ? $this->_run_mod_handler('markup', true, $_tmp) : smarty_modifier_markup($_tmp)); ?>
</span>
</li>
<?php endforeach; endif; unset($_from); ?>
</ul>
</td>
<?php endforeach; endif; unset($_from);  unset($this->_sections['flush']);
$this->_sections['flush']['name'] = 'flush';
$this->_sections['flush']['start'] = (int)$this->_tpl_vars['childrenInColumnCount'];
$this->_sections['flush']['loop'] = is_array($_loop=4) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['flush']['show'] = true;
$this->_sections['flush']['max'] = $this->_sections['flush']['loop'];
$this->_sections['flush']['step'] = 1;
if ($this->_sections['flush']['start'] < 0)
    $this->_sections['flush']['start'] = max($this->_sections['flush']['step'] > 0 ? 0 : -1, $this->_sections['flush']['loop'] + $this->_sections['flush']['start']);
else
    $this->_sections['flush']['start'] = min($this->_sections['flush']['start'], $this->_sections['flush']['step'] > 0 ? $this->_sections['flush']['loop'] : $this->_sections['flush']['loop']-1);
if ($this->_sections['flush']['show']) {
    $this->_sections['flush']['total'] = min(ceil(($this->_sections['flush']['step'] > 0 ? $this->_sections['flush']['loop'] - $this->_sections['flush']['start'] : $this->_sections['flush']['start']+1)/abs($this->_sections['flush']['step'])), $this->_sections['flush']['max']);
    if ($this->_sections['flush']['total'] == 0)
        $this->_sections['flush']['show'] = false;
} else
    $this->_sections['flush']['total'] = 0;
if ($this->_sections['flush']['show']):

            for ($this->_sections['flush']['index'] = $this->_sections['flush']['start'], $this->_sections['flush']['iteration'] = 1;
                 $this->_sections['flush']['iteration'] <= $this->_sections['flush']['total'];
                 $this->_sections['flush']['index'] += $this->_sections['flush']['step'], $this->_sections['flush']['iteration']++):
$this->_sections['flush']['rownum'] = $this->_sections['flush']['iteration'];
$this->_sections['flush']['index_prev'] = $this->_sections['flush']['index'] - $this->_sections['flush']['step'];
$this->_sections['flush']['index_next'] = $this->_sections['flush']['index'] + $this->_sections['flush']['step'];
$this->_sections['flush']['first']      = ($this->_sections['flush']['iteration'] == 1);
$this->_sections['flush']['last']       = ($this->_sections['flush']['iteration'] == $this->_sections['flush']['total']);
?>
<td>&nbsp;</td>
<?php endfor; endif; ?>
</tr></table>
<script type="text/javascript">
search_HighlightResults('<?php echo $this->_tpl_vars['form']['searchCriteria']; ?>
');
</script>
<?php else: ?>
<p class="giDescription">
<?php echo $this->_reg_objects['g'][0]->text(array('text' => 'No results found for'), $this);?>
 '<?php echo $this->_tpl_vars['form']['searchCriteria']; ?>
'
</p>
<?php endif; ?>
</div>
<?php endif; ?>
</div>
</form>