11 '#eeeeec',
'#d3d7cf',
'#babdb6',
12 '#888a85',
'#555753',
'#2e3436',
13 '#fce94f',
'#edd400',
'#c4a000',
14 '#fcaf3e',
'#f57900',
'#ce5c00',
15 '#e9b96e',
'#c17d11',
'#8f5902',
16 '#8ae234',
'#73d216',
'#4e9a06',
17 '#729fcf',
'#3465a4',
'#204a87',
18 '#ad7fa8',
'#75507b',
'#5c3566',
19 '#ef2929',
'#cc0000',
'#a40000' );
31 if( substr(
$value,0,1) ==
"#" ){
32 if( is_numeric(
"0x".substr(
$value,1) ) ){
33 $this->
value =
"color:$value;background-color:$value";
36 return "Ungültige html Notation";
39 return "Bitte Eingabe mit # beginnen";
42 return "Ungültige html Notation";
45 return "Bitte Farbwert eingeben";
47 }
else if ($type ==
"space"){
52 $this->
value =
"height:{$value}em";
55 return "Wert muss zwischen 0 und 10 liegen.";
58 return "Bitte numerischen Wert für die Höhenangabe eingeben.";
65 $attr_list = explode(
";",$this->
value);
69 if(
sizeof($attr_list) > 0){
70 foreach($attr_list as $attr){
71 $v = explode(
":",$attr);
74 }
else if($v[0] ==
"height"){
83 }
else if (
$name ==
"height"){
95 echo
"<select name='line_style'>";
97 echo
"<option value='hr' selected='selected'> Horizontale Linie </option>";
98 echo
"<option value='space' > Abstand </option>";
100 echo
"<option value='hr'> Horizontale Linie </option>";
101 echo
"<option value='space' selected='selected' > Abstand </option>";
107 if (isset($_POST[
"line_style"])){
108 if( $_POST[
"line_style"] ==
"hr" ){
110 }
else if($_POST[
"line_style"] ==
"space"){
119 $default_vals = array(
"klein" =>
"0.5" ,
"mittel" =>
"1",
"groß" =>
"2");
121 echo
"Höhe auswählen:";
122 echo
"<select name='space_sel'>";
124 foreach( array_keys($default_vals) as $val ){
125 if(
$height == $default_vals[$val] ){
126 echo
"<option value='{$default_vals[$val]}' selected='selected'>{$val}</option>";
129 echo
"<option value='{$default_vals[$val]}' >{$val}</option>";
134 echo
"<span style='margin-left:3em;margin-right:3em'> oder </span>";
135 echo
"eigene Höhe eingeben:";
136 if($is_def_si ==
false){
137 echo
"<input type='text' name='line_size' value='$height' size='4' />";
139 echo
"<input type='text' name='line_size' value='' size='4' />";
145 if( (isset($_POST[
"line_size"])) AND ($_POST[
"line_size"] !=
"") ){
151 }
else if( isset($_POST[
"space_sel"]) ){
157 return "Bitte Größe angeben.";
175 echo
"Farbe auswählen";
176 echo
"<select name='color_sel'>";
178 foreach($this->colors as
$color){
181 echo
"<option value='$color' style='background-color:$color' selected='selected'>$color</option>";
183 echo
"<option value='$color' style='background-color:$color' >$color</option>";
187 echo
"<span style='margin-left:3em;margin-right:3em'> oder </span>";
189 echo
"Farbe eingeben:";
190 if($is_def_col ==
false){
191 echo
"<input type='text' name='line_color' value='$col' size='10' />";
193 echo
"<input type='text' name='line_color' value='' size='10' />";
200 if( (isset($_POST[
"line_color"])) AND ($_POST[
"line_color"] !=
"") ){
206 }
else if( (isset($_POST[
"color_sel"])) AND (in_array($_POST[
"color_sel"],$this->colors)) ){
212 return "Bitte Farbwert angeben.";
219 return $db->update_widget_field($this,
"value",$this->
value);
226 if( (isset($_SESSION[
"last_widget_edit"])) AND ($_SESSION[
"last_widget_edit"] == $this->ID) ){
227 $lasted =
" widget_last_edit";
228 unset( $_SESSION[
"last_widget_edit"] );
233 echo
"<div style='padding-top:2em;padding-bottom:1.5em;margin:0px;'><hr style='width:70%;{$this->value}'/></div>";
235 echo
"<div style='{$this->value}'> </div>";
243 echo
"<hr style='width:70%;margin-top:2em;margin-bottom:1.5em;{$this->value}'/>";
245 echo
"<div style='{$this->value}'></div>";