'; return $output; } /******************************************************************************* * @title Checkbox * @autor Oliver Gueffroy * @email scripting *NOSPAM* AT freakstuff DOT de * @website http://freakstuff.de ******************************************************************************** * Diese Funktion gibt eine Checkbox zurück. Das versteckte Feld wird verwendet, * um zu unterscheiden, ob das Formular, welches diese Checkbox verwendet, * bereits abgeschickt wurde. *******************************************************************************/ function html_input_checkbox($name, $value, $cvalue = '', $params = '', $reinsert = true) { $output = '' . 'name = $name; $this->content = array(); } function add_checkbox($checkbox, $description) { $this->content[] = array( 'checkbox' => $checkbox, 'description' => $description ); } function get_output() { $output = "\n" . '' . "\n"; if(sizeof($this->content) > 0) { $output .= '' . "\n"; for($i = 0, $n = sizeof($this->content); $i < $n; $i++) { $output .= ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n"; } $output .= '
' . $this->content[$i]['checkbox'] . '
' . $this->content[$i]['description'] . '
' . "\n"; } $output .= '' . "\n"; return $output; } } /******************************************************************************* * @title Datei-Upload * @autor Oliver Gueffroy * @email scripting *NOSPAM* AT freakstuff DOT de * @website http://freakstuff.de ******************************************************************************** * Stellt ein Fileupload Formularfeld dar. *******************************************************************************/ function html_input_file($name, $params = '') { $output = 'action = $action; $this->name = $name; $this->method = $method; $this->params = $params; $this->content = array(); $this->buttons = array( 'left' => array(), 'right' => array() ); } function add_field($title, $field_data, $description = '') { if(is_array($this->content)) { $this->content[] = array( 'title' => $title, 'field_data' => $field_data, 'description' => $description ); } } function set_content($content) { $this->content = $content; } function add_button($align, $button_data) { if($align != 'left' && $align != 'right') $align = 'left'; $this->buttons[$align][] = $button_data; } function get_output() { $output = '' . "\n" . '
params)) > 0) $output .= ' ' . $this->params; $output .= '>' . "\n"; if(is_array($this->content)) { if(sizeof($this->content) > 0) { $output .= '
' . "\n" . ' ' . "\n"; for($i = 0, $n = sizeof($this->content); $i < $n; $i++) { $html_class = $i % 2 == 0 ? 'even' : 'odd'; $output .= ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n"; if(strlen(trim($this->content[$i]['description'])) > 0) { $output .= ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n"; } } $output .= '
' . $this->content[$i]['title'] . ':' . $this->content[$i]['field_data'] . '

' . $this->content[$i]['description'] . '
' . "\n" . '
' . "\n"; } } else $output .= $this->content . "\n"; /* I feel bad using a table to position this buttons, but the internet * explorer gave me strange results when using float: left and right. I * tried different things, but nothing worked as expected... */ $landr = sizeof($this->buttons['left']) > 0 && sizeof($this->buttons['right']) > 0; $tag = $landr ? 'td' : 'div'; $space = $landr ? ' ' : ' '; if($landr) $output .= ' ' . "\n" . ' ' . "\n" . ' ' . "\n"; for($i = 0, $n = sizeof($this->buttons['left']); $i < $n; $i++) { $output .= $space . '<' . $tag . ' class="align_left">' . $this->buttons['left'][$i] . '' . "\n"; } for($i = 0, $n = sizeof($this->buttons['right']); $i < $n; $i++) { $output .= $space . '<' . $tag . ' class="align_right">' . $this->buttons['right'][$i] . '' . "\n"; } if($landr) $output .= ' ' . "\n" . '
' . "\n"; $output .= '
' . "\n" . ''; return $output; } } /******************************************************************************* * @title Listenfeld * @autor Oliver Gueffroy * @email scripting *NOSPAM* AT freakstuff DOT de * @website http://freakstuff.de ******************************************************************************** * Diese Funktion stellt eine Listenbox dar. Je nach übergebenen Parametern hat * die Listenbox andere Eigenschaften. *******************************************************************************/ function html_select($name, $cvalues, $values = array(), $params = '', $size = 1, $reinsert = true, $multiple = false) { if(sizeof($values) == 0) $size = 1; else if($size > sizeof($values)) $size = sizeof($values); $output = ''; return $output; } /******************************************************************************* * @title Passwortfeld * @autor Oliver Gueffroy * @email scripting *NOSPAM* AT freakstuff DOT de * @website http://freakstuff.de ******************************************************************************** * Diese Funktion arbeitet genauso wie die des Textfeldes. *******************************************************************************/ function html_input_password($name, $value = '', $params = '', $reinsert = false) { $output = ''; return $output; } ?>