5 # unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
7 my $conf = new FS::Conf;
10 if ( $cgi->param('type') eq 'png' ) {
12 } elsif ( $cgi->param('type') eq 'eps' ) {
15 die "unknown image type ". $cgi->param('type');
19 if ( $cgi->param('prefname') =~ /^(\w+)$/ ) {
22 my $curuser = $FS::CurrentUser::CurrentUser;
23 $data = decode_base64( $curuser->option("$prefname") );
26 die "no preview_session specified";
29 http_header('Content-Type' => 'image/png' );