<?php
  # Only show header if user has been selected
  if (isset($userId)) {
      $user = new user(0,$userId);
      $moduletitles ['edit'] = "Stammdaten";
      $moduletitles ['fami'] = "Familie";
      if ($user->checkoverfive()) {
          $moduletitles ['addpoints'] = "Punkte vergeben";
          $moduletitles ['addbonus'] = "Pr&auml;mie vergeben";
      }
      $moduletitles ['account'] = "Konto";
      $moduletitles ['log'] = "Logeintr&auml;ge";
      $moduletitles ['delete'] = "L&ouml;schen";
      $modules = array_keys($moduletitles);

      $client = new user('',$userId);
      $client->konto = new konto($client->userId);
      $numBewegungen = count($client->konto->kontoBewegungen);
      $client->writeaddress($loggedIn->windowslogin,$loggedIn->name, $loggedIn->email);
      ?>
          <div id="usermenu">
          <ul>
          <?php  foreach ($modules as $mymodule) {
              $class="menutab";
              if ($mymodule == $action) $class="menutabactive"; ?>
                  <li class="<?=$class?>"><a href="<?=$_SERVER['PHP_SELF'] .
                      "?module=$module&action=$mymodule&userId=$userId"?>"><?=$moduletitles[$mymodule]?></a></li>
                      <?php  } ?>
                      </ul>
                      </div>
                      <div id="usercontent">
                      <br/>
                      Teilnehmer: <strong><?=$client->vorname?> <?=$client->name?></strong>
                      <?if (!$client->checklegalage()){ ?><img style="valign=top; float: right" src="/grafik/button_u18.gif" alt="U18" /><?php } ?>
                      <br/>
                      <hr>
<?php } 
