<?php /* Smarty version 2.6.18, created on 2007-06-05 10:38:50
         compiled from studentDetails.tpl */ ?>
<?php if ($this->_tpl_vars['actionInfo'] != ""): ?>
  <div class="note">
    <?php echo $this->_tpl_vars['actionInfo']; ?>

  </div>
<?php endif; ?>
<table>
<tr>
<td>
<h2><?php echo $this->_tpl_vars['user']['namePrefix']; ?>
 <?php echo $this->_tpl_vars['user']['surname']; ?>
 <?php echo $this->_tpl_vars['user']['name']; ?>
 <?php echo $this->_tpl_vars['user']['nameSuffix']; ?>
</h2>
<table border="0">
<tr>
  <td width="110"><b>ISIC:</b></td><td><?php echo $this->_tpl_vars['user']['ISIC']; ?>
</td>
</tr>
<tr>
  <td><b>Login:</b></td><td><?php echo $this->_tpl_vars['user']['login']; ?>
</td>
</tr>
<tr>
  <td><b>Odbor:</b></td>
  <td>
    <?php if ($this->_tpl_vars['specialization']): ?>
    <a href="index.php?site=spec&amp;action=info&amp;id=<?php echo $this->_tpl_vars['specialization']['id']; ?>
"><?php echo $this->_tpl_vars['specialization']['name']; ?>
</a>
    <?php else: ?>
    Študent nie je pridelený pod žiaden štúdijný odbor.
    <?php endif; ?>
  </td>
</tr>
<tr>
  <td><b>Rok štúdia:</b></td><td><?php echo $this->_tpl_vars['user']['year']; ?>
.</td>
</tr>
</table>
<br />
<a href="index.php?site=student&amp;action=edit&amp;id=<?php echo $this->_tpl_vars['user']['id']; ?>
">[editovať]</a> |
<a href="index.php?site=student&amp;action=change_p&amp;id=<?php echo $this->_tpl_vars['user']['id']; ?>
">[zmeniť heslo]</a> |
<a href="index.php?site=student&amp;action=delete&amp;id=<?php echo $this->_tpl_vars['user']['id']; ?>
">[vymazať]</a><br />
<br /><br />
<b>Zoznam zapísaných predmetov:</b><br />
<?php if ($this->_tpl_vars['userCourseCount'] > 0): ?>
<form action="index.php?site=student&amp;action=remove_course&amp;id=<?php echo $this->_tpl_vars['user']['id']; ?>
" method="post">
  <br />
  <table class="default spacy">
  <tr class="head">
    <td colspan="2" align="left">Názov</td>
  </tr>
  <?php $_from = $this->_tpl_vars['courses']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['course']):
?>
    <?php if ($this->_tpl_vars['course']['signed']): ?>
    <tr>
      <td style="width: 400px"><a href="index.php?site=course&amp;action=info&amp;id=<?php echo $this->_tpl_vars['course']['id']; ?>
"><?php echo $this->_tpl_vars['course']['name']; ?>
</a></td>
      <td align="center"><input type="checkbox" name="<?php echo $this->_tpl_vars['course']['id']; ?>
" /></td>
    </tr>
    <?php endif; ?>
  <?php endforeach; endif; unset($_from); ?>
    <tr class="head">
      <td colspan="2" align="right"><input type="submit" name="remove" value="Odobrať" /></td>
    </tr>
  </table>
</form>
<?php else: ?>
<br/>
Študent nemá priradený žiaden predmet.<br />
<?php endif; ?>
<?php if ($this->_tpl_vars['userCourseCount'] < $this->_tpl_vars['courseCount']): ?>
<br /><br />
<b>Pridať nový predmet:</b>
<br />
<form action="index.php?site=student&amp;action=add_course&amp;id=<?php echo $this->_tpl_vars['user']['id']; ?>
" method="post">
  <table>
  	<tr>
  	  <td><select name="newCourse">
  	     <?php $_from = $this->_tpl_vars['courses']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['course']):
?>
  	       <?php if ($this->_tpl_vars['course']['signed'] == false): ?>
      	   <option value="<?php echo $this->_tpl_vars['course']['id']; ?>
"><?php echo $this->_tpl_vars['course']['name']; ?>
</option>
      	   <?php endif; ?>
      	 <?php endforeach; endif; unset($_from); ?>
          </select>
      </td>
      <td><input type="submit" name="add" value="Pridať" /></td>
  	</tr>
  </table>
</form>
<?php endif; ?>
</td>
</tr>
</table>
