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

  


class MenuEinstellTool28 extends MenuEinstell
{
  public $file = 'writecolumnstool28.php';
  
  
  protected function _getSights()
  {
    $result = array();

    $sightIds = array(
        346 => 'Übersicht'
        );

    foreach ($sightIds as $sightId => $description) {
      $result[] = $this->_createSightObj( $sightId, TOOL_MOB_AKTUELLES, $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>
        ";
      
      
      
      switch ($p_sightid)
      {
        case 346: 
          {
            
            
         
            $arycheck = array("","","","");
          	$objsettings = ToolSettingsAPI::getToolSettings(TOOL_MOB_AKTUELLES);
          	if($objsettings->sortnews == 'erstell_datetime')
          	 if($objsettings->sortnewsasc)
          	   $arycheck[0] = 'checked = "checked"';
          	 else
          	   $arycheck[1] = 'checked = "checked"';
          	else 
          	 if($objsettings->sortnewsasc)
          	   $arycheck[2] = 'checked = "checked"';
          	 else
          	   $arycheck[3] = 'checked = "checked"';
          	$showbengrp = ($objsettings->showbengrp)? 'checked = "checked"': '';
          	
          	echo " <font id='text_ueberschrift'><b><u>Newsübersicht:</u></font></b>";
            echo $this->getStandardEinstellFormHeader(TOOL_MOB_AKTUELLES, 'uebersicht_allg', $p_sightid);
            echo BR_WT."         
              <table border='0' width='100%'>
              <tr>
                <td width='85%' valign='top' height='19'>
                 <font class='text_main_menu'><b>angezeigte News pro Seite:</b></font>".
                 HTMLOperations::CreateInputTagPlusMinus('newsproseite', '', 'bigger-null', $objsettings->newsproseite, 'size="3"').
                 BR_WT.BR_WT."
               </td>
             </tr>
              <tr>
                <td width='85%' valign='top' height='19'><font class='text_main_menu'><b>Benutzergruppen zu den News anzeigen:</b><input type='checkbox' value='1' name='showbengrp' $showbengrp>".BR_WT.BR_WT.BR_WT."</font>
                </td>
              </tr>
              <tr>
                <td width='85%' valign='top' height='19'><font class='text_main_menu'><b>Sortierung der News:</b>".BR_WT.BR_WT."</font>
                  <table border='0' width='100%'>
                    <tr>
                      <td width='34%' valign='top'>
                        <font class='text_main_menu'>&nbsp; -&nbsp; nach Datum der Erstellung: </font>
                      </td>
                      <td width='33%' valign='top'>
                        <input type='radio' value='erstellauf' ".$arycheck[0]." name='sortnews'>
                        <font class='text_main_menu'>aufsteigend</font>
                      </td>
                      <td width='33%' valign='top'>
                        <input type='radio' name='sortnews' ".$arycheck[1]." value='erstellab'>
                        <font class='text_main_menu'>absteigend</font>
                      </td>
                    </tr>
                    <tr>
                      <td width='34%' valign='top'>
                        <font class='text_main_menu'>&nbsp; -&nbsp; nach Datum der letzten Bearbeitung:</font>
                      </td>
                      <td width='33%' valign='top'>
                        <input type='radio' value='bearbeitauf' ".$arycheck[2]." name='sortnews'>
                        <font class='text_main_menu'>aufsteigend</font>
                      </td>
                      <td width='33%' valign='top'>
                        <input type='radio' name='sortnews' ".$arycheck[3]." value='bearbeitab'>
                        <font class='text_main_menu'>absteigend</font>
                  ".BR_WT.BR_WT.BR_WT."
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
              <tr>
                <td width='85%' height='19' valign='top'>
                  <input type='hidden' value='".CleanOperations::cleanStringForHtml($this->gruppe)."' name='gruppe'>
                  <input type='image' title='Speichern' src='layout/button_save.gif' border='0'>    
                </td>
              </tr>
             </table>
        </form>";
            break;
          }
      }
    }
  }
}
?>