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

  session_start();
  
  define('ISKUFERTOOLS', true);
  

  if (!defined('BASEDIR')) {
    include_once '..' . DIRECTORY_SEPARATOR . 'classes' . DIRECTORY_SEPARATOR . 'constants.php';
  }


  

  $tool_id = PostOperations::getVarValue('tool');
  $sight_id = PostOperations::getVarValue('sightid');
  $gruppe = PostOperations::getVarValue('gruppe', '');
  $art = PostOperations::getVarValue('art');
  $column_id = PostOperations::getVarValue('column_id');
  $anchor = PostOperations::getVarValue('anchor');
  $writecolumns = new writeColumns();

  switch ($art) {
    case 'vertrag':
      $objsettings = ToolSettingsAPI::getToolSettings($tool_id);
      $objsettings->vhsEmailTool39Section494 = PostOperations::getVarValue('vhsEmailTool39Section494');
      $objsettings->vertragsDruckDatumVon = PostOperations::getVarValue('vertragsDruckDatumVon');
      $objsettings->sendInfoMailBeiReklamation = PostOperations::isDefined('sendInfoMailBeiReklamation');

      ToolSettingsAPI::setToolSettings($objsettings);
      echo $writecolumns->getLink($tool_id, $sight_id, $gruppe);
      break;
  }