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

  
  class MenuEinstellTool23 extends MenuEinstell
  {
    public $file = 'writecolumnstool23.php';

    
    protected function _getSights()
    {
      $result = array();

      $sightIds = array(
          315 => 'Nachricht an Einrichtung'
          );

      foreach ($sightIds as $sightId => $description) {
        $result[] = $this->_createSightObj($sightId, \ToolsAPI::TOOL_NACHRICHT_AN_EINRICHTUNG, $description);
      }

      return $result;
    }

    public function mainmenu($pEinstieg, $editid, $p_sightid)
    {
      
      if ($pEinstieg == 1) {
        $this->getUebersichtEinstell(SessionOperations::getVarValueIntern('menutext'));
      } else { 

        echo"
        <table border='0' cellpadding='0' cellspacing='5' height='100%' width='100%'>
          <tr>
            <td valign='top' width='100%' height='5%'>
              <p align='right'><font id='text_basys_webtools'>" . KUFERTOOLS . '</font></p>
            </td>
          </tr>
        </table>
        ';

        switch ($p_sightid) {
          case 315:
            $objsettings = ToolSettingsAPI::getToolSettings(\ToolsAPI::TOOL_NACHRICHT_AN_EINRICHTUNG);
            echo '<h2>Einstellungen zum Tool Nachricht an Einrichtung</h2>' . BR_WT;
            echo $this->getStandardEinstellFormHeader(\ToolsAPI::TOOL_NACHRICHT_AN_EINRICHTUNG, 'nachrichtAnVhs', $p_sightid) . BR_WT
              . $this->createTextFieldForEmailAddress('vhsEmailTool23Section315', $objsettings->vhsEmailTool23Section315, true, '', 'Ziel-E-Mail-Adresse:') . BR_WT
              . '<input type="image" title="Speichern" src="layout/button_save.gif" border="0">'
              . '</form>';
            break;
        }
      }
    }
  }