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


class DataMenuAussenstellenUebersicht extends DataMenuOhneStatus
{
  
  public function __construct($urlparameter)
  {
    parent::__construct($urlparameter);
    $this->exportadapter = new ExpAussenstellen();
  }

  public function getsight($pSigthID = 171)
  {
    parent::getsight($pSigthID);
  }

  
  public function mainmenu()
  {
    $this->prepareMainmenu();
    if ($this->toolsettings->showClickpfad) {
      echo $this->getClickPath();
    }

    if (count($this->dataarraybody) > 0) {
      $this->showheader();
      $this->showbody();
      $this->showfooter();
    } else {
      $this->shownodata();
    }
  }

  public function _getClickPath($pName = 'Au&szlig;enstellen&uuml;bersicht')
  {
    if ($this->toolsettings->clickAussenstUebersichtText != '') {
      $pName = $this->toolsettings->clickAussenstUebersichtText;
    }

    return CleanOperations::cleanStringForHtml($pName);
  }

  
  public function getdataarrayheader()
  {
    $dbwas = new DBWorkHLAussenstellen();
    $this->dataarrayheader = $dbwas->getAussenstellen(false, true);
  }

  
  public function getdataarraybody()
  {
    $dbwas = new DBWorkHLAussenstellen();
    $this->dataarraybody = $dbwas->getAussenstellen(false, true);
    $this->nrOfMainBodyElements = count($this->dataarraybody);
  }

  public function get2ndColumn()
  {
    $tmp = $this->sight;
    $this->getsight();
    $this->getdataarraynocolumn();
    $retour = $this->getnocolumn();
    $this->sight = $tmp;

    return $retour;
  }
}