<?php

/**
 * @copyright (c) Kufer Software GmbH, Loisachstrasse 4, D-84453 Mühldorf
 */

class DataMenuLogin extends DataMenuMain
{
  public function _getClickPath($pName = 'Teilnehmer-Login')
  {
    if ($this->toolsettings->clickKundenLogin != '') {
      $pName = $this->toolsettings->clickKundenLogin;
    }

    return $pName;
  }

  public function __construct($urlParam)
  {
    parent::__construct($urlParam);
    $this->exportadapter = new ExpDblOptin();
    $this->setSichtvariablenPwVoraussetzungen();
  }

  public function getsight($sightid = 285)
  {
    parent::getsight($sightid);
  }
}



class DataMenuLoginFormular extends DataMenuMain
{
  public $state = WBL_DEFAULT;

  public function __construct($urlParam)
  {
    parent::__construct($urlParam);
  }

  public function _getClickPath($pName = 'Teilnehmer-Login - Passwort ändern')
  {
    $this->_setStdClickPath($pName, 'clickKundenLoginPasswd');

    return $this->clickpfad;
  }

  public function getsight($sightid = 241)
  {
    parent::getsight($sightid);
  }

  public function mainmenu()
  {
    $this->state = LoginApi::updatePassword();
    $this->prepareMainmenu();
    if ($this->toolsettings->showClickpfad) {
      echo $this->getClickPath();
    }
    echo "<div class='hauptseite'>\n";
    $this->statusmenu();
    echo $this->getContentAnker();
    if ($this->state == WBL_PW_GEAENDERT) {
      $this->shownocolumn();
    } elseif ($this->state == WBL_PW_NICHTGEAENDERT) {
      $this->shownodata();
    } else {
      $this->showheader();
      $this->showbody();
      $this->showfooter();
    }
    echo '</div>';
  }
}