<?php /* Smarty version 2.6.18, created on 2007-05-28 12:25:40
         compiled from search.tpl */ ?>
<h3>Vyhľadávanie</h3>
<div class="indent">
  <form action="index.php" method="get">
    <input name="site" type="hidden" value="search" />
    <input name="action" type="hidden" value="search" />
    <input name="courseID" type="hidden" value="<?php echo $this->_tpl_vars['courseID']; ?>
" />
    Hľadaj 
    <input name="searchText" type="text" value="<?php echo $this->_tpl_vars['searchText']; ?>
" />
    v 
    <select name="searchWhere">
      <option value="answerSets"<?php if ($this->_tpl_vars['searchWhere'] === 'answerSets'): ?> selected="selected"<?php endif; ?>>sadách odpovedí</option>
      <option value="questions"<?php if ($this->_tpl_vars['searchWhere'] === 'questions'): ?> selected="selected"<?php endif; ?>>otázkach</option>
      <option value="domains"<?php if ($this->_tpl_vars['searchWhere'] === 'domains'): ?> selected="selected"<?php endif; ?>>okruhoch tém</option>
      <option value="students"<?php if ($this->_tpl_vars['searchWhere'] === 'students'): ?> selected="selected"<?php endif; ?>>študentoch</option>
    </select>
    trieď
    <select name="sortType">
      <option value="ascending"<?php if ($this->_tpl_vars['sortType'] === 'ascending'): ?> selected="selected"<?php endif; ?>>vzostupne</option>
      <option value="descending"<?php if ($this->_tpl_vars['sortType'] === 'descending'): ?> selected="selected"<?php endif; ?>>zostupne</option>
    </select>
    <input name="submit" type="submit" value="OK" />
  </form>
  <br />
  <?php if ($this->_tpl_vars['action'] === 'search'): ?>
    <?php if ($this->_tpl_vars['searchWhere'] === 'answerSets'): ?>
      <table>
        <tr>
          <td>&nbsp;</td>
        </tr>
        <?php $_from = $this->_tpl_vars['answerSetList']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['menuItem']):
?>
          <tr>
            <td><?php if ($this->_tpl_vars['menuItem']['obsolete']): ?><img src="images/deleted.jpg" /><?php endif; ?></td>
            <td><?php echo $this->_tpl_vars['menuItem']['text']; ?>
</td>
            <td><?php if (! $this->_tpl_vars['menuItem']['obsolete']): ?><a href="index.php?site=questionDB&amp;action=editAnswerSet&amp;courseID=<?php echo $this->_tpl_vars['courseID']; ?>
&amp;domainID=<?php echo $this->_tpl_vars['menuItem']['id_domain']; ?>
&amp;questionID=<?php echo $this->_tpl_vars['menuItem']['id_question']; ?>
&amp;answerSetID=<?php echo $this->_tpl_vars['menuItem']['id']; ?>
">[editovať]</a><?php endif; ?></td>
            <td><?php if (! $this->_tpl_vars['menuItem']['obsolete']): ?><a href="javascript: Ask('Naozaj chcete sadu odpovedí vymazať?', 'index.php?site=questionDB&amp;action=deleteAnswerSet&amp;courseID=<?php echo $this->_tpl_vars['courseID']; ?>
&amp;domainID=<?php echo $this->_tpl_vars['menuItem']['id_domain']; ?>
&amp;questionID=<?php echo $this->_tpl_vars['menuItem']['id_question']; ?>
&amp;answerSetID=<?php echo $this->_tpl_vars['menuItem']['id']; ?>
&amp;redirect=1&amp;redsite=search&amp;redaction=search&amp;redcourseID=<?php echo $this->_tpl_vars['courseID']; ?>
&amp;redsearchText=<?php echo $this->_tpl_vars['searchText']; ?>
&amp;redsearchWhere=<?php echo $this->_tpl_vars['searchWhere']; ?>
&amp;redsortType=<?php echo $this->_tpl_vars['sortType']; ?>
');">[odstrániť]</a><?php endif; ?></td>
          </tr>
        <?php endforeach; endif; unset($_from); ?>
      </table>
    <?php elseif ($this->_tpl_vars['searchWhere'] === 'questions'): ?>
      <table>
        <tr>
          <td>&nbsp;</td>
        </tr>
        <?php $_from = $this->_tpl_vars['questionList']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['menuItem']):
?>
          <tr>
            <td><?php if ($this->_tpl_vars['menuItem']['obsolete']): ?><img src="images/deleted.jpg" /><?php endif; ?></td>
            <td><a href="index.php?site=questionDB&amp;action=browseAnswerSets&amp;courseID=<?php echo $this->_tpl_vars['courseID']; ?>
&amp;domainID=<?php echo $this->_tpl_vars['menuItem']['id_domain']; ?>
&amp;questionID=<?php echo $this->_tpl_vars['menuItem']['id']; ?>
"><?php echo $this->_tpl_vars['menuItem']['question']; ?>
</a></td>
            <td><?php if (! $this->_tpl_vars['menuItem']['obsolete']): ?><a href="index.php?site=questionDB&amp;action=editQuestion&amp;courseID=<?php echo $this->_tpl_vars['courseID']; ?>
&amp;domainID=<?php echo $this->_tpl_vars['menuItem']['id_domain']; ?>
&amp;questionID=<?php echo $this->_tpl_vars['menuItem']['id']; ?>
">[editovať]</a><?php endif; ?></td>
            <td><?php if (! $this->_tpl_vars['menuItem']['obsolete']): ?><a href="javascript: Ask('Naozaj chcete otázku vymazať?', 'index.php?site=questionDB&amp;action=deleteQuestion&amp;courseID=<?php echo $this->_tpl_vars['courseID']; ?>
&amp;domainID=<?php echo $this->_tpl_vars['menuItem']['id_domain']; ?>
&amp;questionID=<?php echo $this->_tpl_vars['menuItem']['id']; ?>
&amp;redirect=1&amp;redsite=search&amp;redaction=search&amp;redcourseID=<?php echo $this->_tpl_vars['courseID']; ?>
&amp;redsearchText=<?php echo $this->_tpl_vars['searchText']; ?>
&amp;redsearchWhere=<?php echo $this->_tpl_vars['searchWhere']; ?>
&amp;redsortType=<?php echo $this->_tpl_vars['sortType']; ?>
');">[odstrániť]</a><?php endif; ?></td>
          </tr>
        <?php endforeach; endif; unset($_from); ?>
      </table>
    <?php elseif ($this->_tpl_vars['searchWhere'] === 'domains'): ?>
      <table>
        <tr>
          <td>&nbsp;</td>
        </tr>
        <?php $_from = $this->_tpl_vars['domainList']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['menuItem']):
?>
          <tr>
            <td><?php if ($this->_tpl_vars['menuItem']['obsolete']): ?><img src="images/deleted.jpg" /><?php endif; ?></td>
            <td><a href="index.php?site=questionDB&amp;action=browseDomain&amp;courseID=<?php echo $this->_tpl_vars['courseID']; ?>
&amp;domainID=<?php echo $this->_tpl_vars['menuItem']['id']; ?>
"><?php echo $this->_tpl_vars['menuItem']['subject']; ?>
</a></td>
            <td><?php if (! $this->_tpl_vars['menuItem']['obsolete']): ?><a href="index.php?site=questionDB&amp;action=editDomain&amp;courseID=<?php echo $this->_tpl_vars['courseID']; ?>
&amp;domainID=<?php echo $this->_tpl_vars['menuItem']['id']; ?>
">[editovať]</a><?php endif; ?></td>
            <td><?php if (! $this->_tpl_vars['menuItem']['obsolete']): ?><a href="javascript: Ask('Naozaj chcete okruh tém vymazať?', 'index.php?site=questionDB&amp;action=deleteDomain&amp;courseID=<?php echo $this->_tpl_vars['courseID']; ?>
&amp;domainID=<?php echo $this->_tpl_vars['menuItem']['id']; ?>
&amp;redirect=1&amp;redsite=search&amp;redaction=search&amp;redcourseID=<?php echo $this->_tpl_vars['courseID']; ?>
&amp;redsearchText=<?php echo $this->_tpl_vars['searchText']; ?>
&amp;redsearchWhere=<?php echo $this->_tpl_vars['searchWhere']; ?>
&amp;redsortType=<?php echo $this->_tpl_vars['sortType']; ?>
');">[odstrániť]</a><?php endif; ?></td>
          </tr>
        <?php endforeach; endif; unset($_from); ?>
      </table>
    <?php elseif ($this->_tpl_vars['searchWhere'] === 'students'): ?>
      <table>
        <tr>
          <td>&nbsp;</td>
        </tr>
        <?php $_from = $this->_tpl_vars['studentList']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['menuItem']):
?>
          <tr>
            <td><?php echo $this->_tpl_vars['menuItem']['name']; ?>
</td>
            <td><a href="index.php?site=userInformation&amp;action=showStudent&amp;courseID=<?php echo $this->_tpl_vars['courseID']; ?>
&amp;userID=<?php echo $this->_tpl_vars['menuItem']['id']; ?>
&amp;menuSet=2&amp;menuIndex=6">[detaily]</a></td>
          </tr>
        <?php endforeach; endif; unset($_from); ?>
      </table>
    <?php endif; ?>
  <?php endif; ?>
</div>
