//su_picconf.php require_once 'common.php'; $str_out = '`c`&`bBildereinstellungen`b`n`n'; $str_self = 'su_picconf.php'; page_header('Bildereinstellungen'); grotto_nav(); addnav('Optionen'); addnav('Neu', $str_self.'?op=new' ); switch( $_GET['op'] ){ case 'edit': $pics = unserialize(getsetting('pictypes','a:0:{}')); $p = $pics[ $_GET['id'] ]; 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 .= '
'; 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 .= ''; 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 .= '| Name | Kürzel | DP | Breite | Höhe | maxAnz | Aktionen |
| '.$p['name'].' | '.$k.' | '.$p['cost'].' | '.$p['x'].' | '.$p['y'].' | '.$p['max'].' | [edit] [delete] |