<?php /* Smarty version 2.6.18, created on 2007-05-04 18:37:12
         compiled from userDetails.tpl */ ?>
<h3>Informácie o užívateľovi</h3>
<?php if ($this->_tpl_vars['actionInfo'] != ""): ?>
  <div class="error_text">
    <?php echo $this->_tpl_vars['actionInfo']; ?>

  </div>
<?php endif; ?>
<b><?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']; ?>
</b><br />
<?php if ($this->_tpl_vars['user']['type'] == 'student'): ?>
študent, ISIC: <?php echo $this->_tpl_vars['user']['ISIC']; ?>
<br />
<?php elseif ($this->_tpl_vars['user']['type'] == 'teacher'): ?>
učiteľ, ITIC: <?php echo $this->_tpl_vars['user']['ISIC']; ?>
<br />
<?php endif; ?>
login: MartinRosko<br />
<br />
<a href="index.php?site=user&action=edit&id=<?php echo $this->_tpl_vars['user']['id']; ?>
">[editovať]</a>
<a href="index.php?site=user&action=change_p&id=<?php echo $this->_tpl_vars['user']['id']; ?>
">[zmeniť heslo]</a>
<a href="index.php?site=user&action=delete&id=<?php echo $this->_tpl_vars['user']['id']; ?>
">[vymazať]</a><br />
<br />
<?php if ($this->_tpl_vars['user']['type'] == 'student'): ?>
<b>Zoznam zapísaných predmetov:</b>
<?php else: ?>
<b>Zoznam predmetov učiteľa:</b>
<?php endif; ?>
<?php if ($this->_tpl_vars['userCourseCount'] > 0): ?>
<form action="index.php?site=user&action=change_course" method="post">
  <table>
  <?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><a href="index.php?site=course&action=info&id=<?php echo $this->_tpl_vars['course']['id']; ?>
"><?php echo $this->_tpl_vars['course']['name']; ?>
</a></td>
    <?php if ($this->_tpl_vars['user']['type'] == 'student'): ?>
      <td><input type="checkbox" name="<?php echo $this->_tpl_vars['course']['id']; ?>
"></td>
    <?php endif; ?>
    </tr>
    <?php endif; ?>
  <?php endforeach; endif; unset($_from); ?>
  </table>
</form>
<?php else: ?>
<br/>
  <?php if ($this->_tpl_vars['user']['type'] == 'student'): ?>
Študent nemá priradený žiaden predmet.
  <?php else: ?>
Učiteľ nemá priradený žiaden predmet.
  <?php endif; ?>
<br /><br />
<?php endif; ?>
<?php if ($this->_tpl_vars['user']['type'] == 'student'): ?>
<form action="index.php?site=user&action=add_course&id=<?php echo $this->_tpl_vars['user']['id']; ?>
" method="post">
  <b>Pridať nový predmet</b>
  <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; ?>
