' . $data . ''; } function code($data,$class='markdown') { return '
'.$data.'
'; } function form($data,$submitvalue="Speichern",$action="",$submitname="submit") { return '
'.$data.'
'; } function number($z,$nachkommastellen=0) { return number_format($z, $nachkommastellen, ',', '.'); } function span($data,$id="",$class="",$zusatz="") { return ''.$data.''; } function textarea($name,$data='',$cols=50,$rows=10,$forcewysiwyg=false) { $cs = new CubeshopModel; if($_SESSION['user'] && ($cs->hasUserItem('bbcode') || $forcewysiwyg)) $textarea = $this->getWYSIWYGEditor($name,$data); else $textarea = ''; return $textarea; } function center($data) { return '
'.$data.'
'; } function displayError($e) { $text = addslashes($this->error($e)); return ''; } function displaySuccess($e) { $text = addslashes($this->success($e)); return ''; } function clear() { return '
'; } function menu($arr, $id = "", $class = "") { aasort($arr, 'priority'); $o = ''; return $o; } function strong($text,$id = "", $class = "") { return ''.$text.''; } function dfn($text,$desc,$id = "", $class = "") { return ''.$text.''; } function tip($text,$id = "", $class = "") { return ''.$text.''; } function submenu($arr, $id = "", $class = "") { if (!is_array($arr)) return false; $o = ''; return $o; } /** * $timestamp = zeitpunt des ablaufens in unix timestamp */ function countdown($timestamp,$prestring="",$id=0,$allownegative=false) { $a = new Algorithms(); if(!$id) $id = $a->getRandomHash(8); $seconds = $timestamp-time(); //return ''; return ''; } function sanitize($data) { return mysql_real_escape_string($data); } function specialchars($text,$utf8=0) { return htmlspecialchars($text); } /* * @param string $name * @param string $value * @param string $type * @param string $id * @param string $class * @param int $size */ function input($name, $value = '', $type = 'text', $id = '', $class = '', $size = '20',$onClick='',$extra='') { return ''; } function button($name,$value,$onclick="return true;",$id='',$class="button") { return ''; } function buttonGoTo($value,$link,$id='',$class='') { return ''.$value.''; } /* * @param array $data the multidimensional array * @param bool $header should the first line be a element instead of ? * @param string $width * @param string $id the ID of the table * @param string $class the class of the table * @param string $tdclass the class of every td element */ function table($data, $header = 1, $width = '100%', $id = '', $class = '', $tdclass = 'text_top', $evenwidth=1,$trclass='') { if (!is_array($data)) return false; $t = ''; foreach ($data as $key => $val) { if ($key == 0 && $header) $td = 'th'; else $td = 'td class="' . $tdclass . '"'; $t.=''; if($evenwidth) $w = floor(100/count($val)).'%'; foreach ($val as $j => $tdata) { if($evenwidth) $w = floor(100/count($val)).'%'; else $w = 'auto'; if(is_array($tdata)) { $text = $tdata['text']; if($tdata['header']) $td = 'th'; if($tdata['width']) $w=$tdata['width']; if($tdata['class']) $tdclass .= ' '.$tdata['class']; if($tdata['id']) $tid = $tdata['id']; if($tdata['colspan']) $colspan = 'colspan="'.$tdata['colspan'].'"'; $tdata = $text; } $t.='<' . $td . ' '.$colspan.' width="'.$w.'" class="'.$tclass.'" id="'.$tid.'">' . $tdata . ''; $class=''; $tid=''; $colspan=''; } $t.=''; } $t.='
'; return $t; } /* * @param $err is the error code equivalent of /config/errors.php * if $err is not numeric or not found in errors.php, its printed as text * @param $class is the html tag class */ function error($err, $class = 'error',$backbutton=false) { global $error; if (is_numeric($err) && $error[$err]) $err = $error[$err]; if($backbutton) $bb = '
Zurück..'; return '' . $err . ''.$bb; } function arrayToString($arr) { if(!is_array($arr)) return false; foreach($arr as $a) { $o.=$a.';'; } $o = substr($o,0,-1); return $o; } function success($msg, $class = 'success') { return '' . $msg . ''; } function goToLocation($location = '/', $force = true) { $script = ''; if ($force) exit($script); else return $script; } function link($text, $path, $prompt = null, $confirmMessage = "Bist du sicher?",$class="") { $path = str_replace(' ', '-', $path); if ($prompt) { $data = '' . $text . ''; } else { $data = '' . $text . ''; } return $data; } function liste($lines,$ulid='') { if(!is_array($lines)) return false; $o = ''; return $o; } function getArrowRight() { return ' '; } function includeJs($fileName) { $data = ''; return $data; } function includeCss($fileName) { $data = '