<?php

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


class DataMenuDozentenGruppiert extends DataMenuMain
{
  
  public $dbworkdozenten;

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

    $this->dbworkdozenten = new DBWorkDozentenWB();
    $this->exportadapter = new ExpGruppiert();
  }

  public function _getClickPath($pName = 'Dozentenübersicht')
  {
    
    DataMenuMain::_getClickPath();
    
    if ($this->toolsettings->titleKursBereich != '') {
      $this->clickpfad = "<span class='clickadresse'>" . ' ' . CleanOperations::cleanStringForHtml(stripslashes($this->toolsettings->titleKursBereich)) . ' ' . "</span>\n";
      $this->clickpfad .= "<span class='trennzeichen'>" . ' ' . CleanOperations::cleanStringContainingHtml($this->toolsettings->trennzeichenKategorie) . ' ' . '</span>';
    }
    $tmp = $pName;
    if ($this->toolsettings->clickDozGruppiertText != '') {
      $tmp = $this->toolsettings->clickDozGruppiertText;
    }

    $this->clickpfad .= "<span class='clickadrbold'> " . CleanOperations::cleanStringForHtml($tmp) . "</span>\n";
    
    return $this->clickpfad;
  }

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

  public function getdataarraybody()
  {
    $initialLetter = array();
    
    if ($this->toolsettings->dozgruppiertNurS) {
      $initialLetter['Sch'] = 0;
      $initialLetter['St'] = 0;
    }
    
    $letterAry = $this->dbworkdozenten->getGetLetterList($initialLetter, $this->toolsettings->semlist);
    if ($this->urlparameter->letter != '') {
      $letter = '';
      foreach ($letterAry as $l) {
        if ($l->buchstabe == $this->urlparameter->letter) {
          $letter = $l;
          break;
        }
      }
      $letterAry = array($letter);
    }

    $this->dataarraybody = $letterAry;
  }
}