method = $method; $this->sent = $this->getReq("sent"); // $this->sentOK = ($this->sent)?$this->name:""; // echo $this->sentOK; $this->sentOK = $this->sent; } // // D A R S T E L L U N G S F U N K T I O N E N // function start($name="form", $action="", $js = 0, $target = '') { $this->aktformname = $name; $this->setDefault("sent", "1"); $this->name = $name; $temp=''; $temp .= '
input("sent", "", "hidden"); return $temp; } function ende() { $temp = ''; $temp .= ''; $temp .= '
'; return $temp; } function input($name, $class="", $type="text", $js=0, $tabindex=0, $events=0, $size=0) { $value = $this->defaults[$name]; if(!$this->defaults[$name."overwrite"]) { $valuerq = $this->getReq($name); if($this->sent && !empty($valuerq)) $value = $valuerq; } $temp=''; $temp .= 'defaults[$name] != "" && $js) { $temp .= 'onfocus="if(this.value==\''.$this->defaults[$name].'\') this.value=\'\';"'; $temp .= ' onblur="if(this.value==\'\') this.value=\''.$this->defaults[$name].'\';"'; }*/ $temp .= ' />'; return $temp; } function textarea($name, $cols, $rows, $class="", $js=0, $readonly=0) { $value = $this->defaults[$name]; if(!$this->defaults[$name."overwrite"]) { $valuerq = $this->getReq($name); if($this->sent && !empty($valuerq)) $value = $valuerq; } $temp=''; $temp .= ''; return $temp; } //gibt den n�tigen HTML- und Javascript Code zum Erzeugen des WYSIWYG-Editors Xinha zur�ck //notwendige Anpassungen: Zeile 157f: Pfad function xinha($name, $newsdir, $plugins, $buttons, $statusbar, $width, $height, $fontname, $fontsize, $formatblock, $flowToolbars) { $value = $this->defaults[$name]; if(!$this->defaults[$name."overwrite"]) { $valuerq = $this->getReq($name); if($this->sent && !empty($valuerq)) $value = $valuerq; } $temp = ''; $temp .= ''; $temp .= ''; $temp .= ''; $temp .= ''; return $temp; } function checkbox($name, $checked=0, $class="", $value = 1) { $valuerq = $checked; if($this->sentOK) { if( !isset($this->defaults[$name."overwrite"]) || !$this->defaults[$name."overwrite"] ) { $valuerq = (isset($this->defaults[$name]))?$this->defaults[$name]:''; } } elseif($this->sent) { $valuerq = $this->getReq($name); //echo "-".$name.': '.$valuerq.'
'; //print_r( $_POST[$name] ); } $temp=''; $temp .= 'defaults[$name]; if(!$this->defaults[$name."overwrite"]) { $valuerq = $this->getReq($name); if($this->sent && !empty($valuerq)) $checked = $valuerq; } $ok = 1; if($this->sent && $this->getReq($name)=="" && in_array($name, (array)$this->pflichtfeld)) $ok=0; $temp=''; $temp .= '$value; $temp2["text"] = $val->$text; array_push($temp, $temp2); } return $temp; } function select($name, $values, $class="", $multi=0, $size=1, $js=0) { $selected = $this->defaults[$name]; if(!$this->defaults[$name."overwrite"]) { $selectedrq = $this->getReq($name); if($this->sent && !empty($selectedrq)) $selected = $selectedrq; } // $selected = $this->getReq($name); // if(!$selected) $selected = $this->defaults[$name]; $temp = ''; $temp .= ''; if($echo) echo ''; else return $temp; } function submit($value, $name="submit", $class="", $js=0, $tabindex=0, $type="submit") { $temp=''; $temp .= 'method=="post") $valuerq = (isset($_POST[$name]))?$_POST[$name]:''; elseif($this->method=="get") $valuerq = (isset($_GET[$name]))?$_GET[$name]:''; if(empty($valuerq)) { $valuerq = (isset($_FILES[$name]))?$_FILES[$name]:''; } if(!empty($offset)) $valuerq = $valuerq[$offset]; return $valuerq; } function checkReq($name) // Ermittelt, ob Pflichtfeld ausgef�llt wurde // Setzt "sentOK" auf Falsch wenn dem nicht so ist { if($this->getReq($name) == "" || $this->getReq($name) == $this->defaults[$name] ) { $this->sentOK = 0; return 0; } return 1; } function setDefault($name,$value,$overwrite=0) { $temp = array($name=>$value,$name."overwrite"=>$overwrite); $this->defaults = $this->defaults + $temp; } function resetDefaults() { $temp = array(); $this->defaults = $temp; } function resetFields() { foreach($this->labels as $name=>$value) { $this->setDefault($name, "", 1); } } // // P F L I C H T F E L D E R // function setPflichtfeld($name) // Setzt ein Formularfeld als Pflichtfeld { array_push($this->pflichtfeld, $name); $this->checkReq($name); } function getFehlendePflichtfelder() // String mit fehlenden Pflichtangaben { $temp = ""; $x = 0; foreach($this->pflichtfeld as $value) { if(!$this->checkReq($value)) { $temp.=$this->labels[$value].", "; $x++; } } if($x > 0) $temp=substr($temp, 0, strlen($temp)-2); return $temp; } // // L A B E L // function setLabel($name, $label) // Zuordnung Labelname zu Formularfeld { $temp = array($name=>$label); $this->labels = $this->labels + $temp; } function groupLabels( $labelname, $labels ) { $this->grouplabels[] = array($labelname, $labels); } function hideLabel( $label ) { $this->hideLabels[] = $label; } function label($name) // Anzeige von Labelname (und Markierung von Pflichtfeldern) { $ok=1; if($this->sent && $this->getReq($name)=="" && in_array($name, (array)$this->pflichtfeld)) $ok=0; $temp=''; if(!$ok) $temp .= '
'; $temp .= ''; if(!$ok) $temp .= '
'; return $temp; } // // E-Mail // function generateEmail() // Generiert eine E-Mail mit den Formulardaten { $temp=""; $max=0; foreach($this->labels as $value=>$text) { if(in_array($value, $this->hideLabels)) continue; $text = strip_tags( $text ); if(strlen($text) > $max) $max = strlen($text); } $max += 5; $aktgroup = 0; $nextgroup = 1; $groupaktiv = 0; foreach($this->labels as $value=>$text) { //echo "-".$value."-"; print_r($this->hideLabels); if(in_array($value, $this->hideLabels)) { continue; } if( is_array($this->grouplabels[$aktgroup])) { if( is_array( $this->grouplabels[ $nextgroup ] ) && in_array( $value, $this->grouplabels[ $nextgroup ][ 1 ]) ) { $aktgroup++; $nextgroup++; for($x=0; $x<50; $x++) $temp .= "-"; $temp .= "\r\n".$this->grouplabels[$aktgroup][0].":\r\n\r\n"; } elseif( in_array($value, $this->grouplabels[$aktgroup][1]) ) { if(!$groupaktiv) { $groupaktiv = 1; for($x=0; $x<50; $x++) $temp .= "-"; $temp .= "\r\n".$this->grouplabels[$aktgroup][0].":\r\n\r\n"; } } elseif(!in_array($value, $this->grouplabels[$aktgroup][1]) ) { if($groupaktiv) { $aktgroup++; for($x=0; $x<50; $x++) $temp .= "-"; $groupaktiv = 0; } } else { for($x=0; $x<50; $x++) $temp .= "-"; } } else { for($x=0; $x<50; $x++) $temp .= "-"; } // echo $value.' - '.$text.' - '.$aktgroup.'
'; $text = strip_tags( $text ); if(1 || !$groupaktiv) { $temp .= "\r\n"; $temp .= $text; } $zeile = 0; $valarray = explode("\n", $this->getReq($value)); foreach($valarray as $val) { if(1 || !$groupaktiv) { if(!$zeile) $anfang = strlen($text); else $anfang = 0; for($x = $anfang; $x<=$max; $x++) $temp .= ' '; } $temp .= trim( $val ); $temp .= "\r\n"; $zeile++; } } return $temp; } function submitImage( $src, $name, $class="", $value = 'Absenden') { $temp = ''; $temp.= '
Fatal error: Class 'msForm' not found in /var/www/vhosts/m1-factoring.de/httpdocs/fileadmin/factoring/php/user_luk.php on line 20