<?php
/**
 * @package menueinstelltool
 * @copyright (c) Kufer Software GmbH, Loisachstrasse 4, D-84453 Mühldorf
 */
if (!defined('BASEDIR'))
include_once(BASEDIR . 'webtools' . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'menu.inc.php');



class MenuEinstellTool26 extends MenuEinstell
{
  public $file = 'writecolumnstool26.php';
  
  
  protected function _getSights()
  {
    $result = array();
    
    $sightIds = array(
        344 => 'Kursübersicht'
        );
    
    foreach ($sightIds as $sightId => $description) {
      $result[] = $this->_createSightObj( $sightId, TOOL_MOB_BEGINNKURSE, $description );
    }
    
    return $result;
  }
  
  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>
        ";
      
      $curr_caption = $this->_getSightDescription($p_sightid);
      
      switch ($p_sightid) {
        case 344: 
          {
            $this->mainmenuTop($curr_caption, TOOL_MOB_BEGINNKURSE, $p_sightid, $this->file, true); 
            $this->mainmenuCenter(TOOL_MOB_BEGINNKURSE, $editid, $p_sightid, $this->file, true);    
                       
            $objsettings = ToolSettingsAPI::getToolSettings(TOOL_MOB_BEGINNKURSE);
            
            $arycheck = array("","","","","","");
            if ($objsettings->colorkurseausf == '#FF0000')
              $arycheck[0] = 'checked';
  		    else if ($objsettings->colorkurseausf == '#663300')
              $arycheck[1] = 'checked';
  		    else if ($objsettings->colorkurseausf == '#CC00CC')
              $arycheck[2] = 'checked';
  		    else if ($objsettings->colorkurseausf == '#0000CC')
              $arycheck[3] = 'checked';
  		    else if ($objsettings->colorkurseausf == '#FFFF00')
              $arycheck[4] = 'checked';
  		    else if ($objsettings->colorkurseausf == '#blind')
              $arycheck[5] = 'checked';
              
            
            $arycheck2 = $this->getArrayCheck4Kurse($objsettings);
            
              
            echo BR_WT.BR_WT;
            echo $this->getStandardEinstellFormHeader(TOOL_MOB_BEGINNKURSE, 'uebersicht_allg', $p_sightid);
            echo "  
             <table border='0' cellpadding='0' cellspacing='0' width='100%'>
              <tr>
                <td width='85%' valign='top' height='19'>
                  <font class='text_main_menu'><b>angezeigte Kurse pro Seite:</b></font>".
                  HTMLOperations::CreateInputTagPlusMinus('kurseproseite', '', 'bigger-null', $objsettings->kurseproseite, 'size="3"').
                  BR_WT.BR_WT.BR_WT."
                </td>
              </tr>
              <tr>
                <td width='85%' valign='top' height='19'>
                  <font class='text_main_menu'><b>Farbe für ausgefallene Kurse:</b>".BR_WT.BR_WT."</font>
                  <table border='0' width='100%'>
                    <tr>
                      <td width='34%' valign='top'>
                        &nbsp;<input type='radio' value='rot' ".$arycheck[0]." name='kurs_ausgef'>
                        <font class='text_main_menu'>rot&nbsp;&nbsp;</font>
                        &nbsp;<input type='radio' value='braun' ".$arycheck[1]." name='kurs_ausgef'>
                        <font class='text_main_menu'>braun&nbsp;&nbsp;</font>
                        &nbsp;<input type='radio' value='lila' ".$arycheck[2]." name='kurs_ausgef'>
                        <font class='text_main_menu'>lila&nbsp;&nbsp;</font>
                        &nbsp;<input type='radio' value='blau' ".$arycheck[3]." name='kurs_ausgef'>
                        <font class='text_main_menu'>blau&nbsp;&nbsp;</font>
                        &nbsp;<input type='radio' value='gelb' ".$arycheck[4]." name='kurs_ausgef'>
                        <font class='text_main_menu'>gelb&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font>
                        &nbsp;<input type='radio' value='blind' ".$arycheck[5]." name='kurs_ausgef'>
                        <font class='text_main_menu'>Kurs nicht anzeigen&nbsp;&nbsp;</font>
                        ".BR_WT.BR_WT.BR_WT."
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>";
            echo $this->getKursSortierungSubMenu($arycheck2);
            echo "
              <tr>
             	  <td width='85%' height='19' valign='top'>
                  <font class='text_main_menu'><b>Kurse folgender Semester anzeigen:</b> (es können auch mehrere Semester gewählt werden)</font>".BR_WT;
            $tool0Settings = ToolSettingsAPI::getToolSettings(0);
            $preFilterKurs = $this->getPrefilters4Kurs(false, $tool0Settings, $objsettings);
            $allgPreFilterKurs = $this->getPrefilters4Kurs(true, $tool0Settings, $objsettings);  
            echo $this->getSemester4SingleTool($objsettings->semlist, $tool0Settings->semlist, $objsettings->useAbweichendeSemester, true, $objsettings->keineAusgefallenenKurse, true, $preFilterKurs, $allgPreFilterKurs).
                "</td>
              </tr>                          
              <tr>
                <td>                  
                  ".BR_WT."
                  <input type='image' title='Speichern' src='layout/button_save.gif' border='0'>
                </td>
              </tr>
             </table>
            </form>".BR_WT;                          
            break;
            
          }
      }
    }
  }
}
?>