'Name,text', 'short' => 'Kürzel,text', 'x' => 'Breite,int', 'y' => 'Höhe,int', 'cost' => 'Kosten in DP,int', 'max' => 'maximale Anzahl,int' ); $sl = $str_self.'?op=save'; addnav('',$sl); $str_out .= '
'.generateform( $form, $p ).'
'; break; case 'new': addnav('Zurück', $str_self ); $form = array( 'Neuen Bildtyp anlegen,title', 'name' => 'Name,text', 'short' => 'Kürzel,text', 'x' => 'Breite,int', 'y' => 'Höhe,int', 'cost' => 'Kosten in DP,int', 'max' => 'maximale Anzahl,int' ); $sl = $str_self.'?op=save'; addnav('',$sl); $str_out .= '
'.generateform( $form, array() ).'
'; break; default: switch( $_GET['op'] ){ case 'save': $pics = unserialize(getsetting('pictypes','a:0:{}')); if( !isset($_GET['id']) ){ $pics[ $_POST['short'] ] = $_POST; } else{ $pics[ $_GET['id'] ] = $_POST; } savesetting('pictypes',serialize($pics)); $str_out .= 'Bild gespeichert!`n'; break; case 'delete': $pics = unserialize(getsetting('pictypes','a:0:{}')); unset($pics[$_GET['id']]); savesetting('pictypes',serialize($pics)); $str_out .= 'Bild gelöscht!`n'; break; } $str_out .= ''; $pics = unserialize(getsetting('pictypes','a:0:{}')); addpregnav('/'.$str_self.'\?op=edit&id=\w{1,}/'); addpregnav('/'.$str_self.'\?op=delete&id=\w{1,}/'); foreach( $pics as $k => $p ){ $dl = $str_self.'?op=delete&id='.$k; $el = $str_self.'?op=edit&id='.$k; $str_out .= ''; } $str_out .= '
NameKürzelDPBreiteHöhemaxAnzAktionen
'.$p['name'].''.$k.''.$p['cost'].''.$p['x'].''.$p['y'].''.$p['max'].'[edit] [delete]
'; break; } output( $str_out ); page_footer(); ?>