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

  
  class FormVarCheck extends FormVarBasic
  {
    
    
    public $formcheck;
    public $formgrptxt; 

    
    public function __construct($formvarna, $formname, $formtext, $formgrptxt = '')
    {
      
      parent::__construct($formvarna, $formname, $formtext);
      
      $this->formgrptxt = $formgrptxt;
    }

    
    public function ausgabeFormElem()
    {
      
      FormVarBasic::ausgabeFormElem();
      if ($this->formvarna == true) {
        $this->formcheck = 'checked=\'checked\'';
      } else {
        $this->formcheck = '';
      }
      echo "<tr><th class='form'></th>";
      echo 		"<td class='formelemtext'>"
                  . "<input type='checkbox' name='" . CleanOperations::cleanStringForHtml($this->formname) . "' " . CleanOperations::cleanStringForHtml($this->formcheck) . '>'
                  . "<span class='text_main_menu'><b>" . CleanOperations::cleanStringForHtml($this->formtext) . '</b></span>'
                . '</td>'
             . '</tr>';
    }
  }