diff options
author | cvs2git <cvs2git> | 2010-11-05 19:05:57 +0000 |
---|---|---|
committer | cvs2git <cvs2git> | 2010-11-05 19:05:57 +0000 |
commit | aaf8baf3662e16e9414de236a39f8801a8c41b01 (patch) | |
tree | 2cda603e4311b3e80f79b93d9bcce3a7c7c2d053 /httemplate/view/image.cgi | |
parent | 995a145c931164347683071c95c6754379d36604 (diff) | |
parent | 9b2de4257b6a2877434008188e52b8ef71ff339d (diff) |
This commit was manufactured by cvs2svn to create branch
'FREESIDE_2_1_BRANCH'.
Diffstat (limited to 'httemplate/view/image.cgi')
-rw-r--r-- | httemplate/view/image.cgi | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/httemplate/view/image.cgi b/httemplate/view/image.cgi new file mode 100644 index 000000000..153ec858e --- /dev/null +++ b/httemplate/view/image.cgi @@ -0,0 +1,31 @@ +<% $data %>\ +<%init> + +#die "access denied" +# unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); + +my $conf = new FS::Conf; + +my $type; +if ( $cgi->param('type') eq 'png' ) { + $type = 'png'; +} elsif ( $cgi->param('type') eq 'eps' ) { + $type = 'eps'; +} else { + die "unknown image type ". $cgi->param('type'); +} + +my $data; +if ( $cgi->param('prefname') =~ /^(\w+)$/ ) { + + my $prefname = $1; + my $curuser = $FS::CurrentUser::CurrentUser; + $data = decode_base64( $curuser->option("$prefname") ); + +} else { + die "no preview_session specified"; +} + +http_header('Content-Type' => 'image/png' ); + +</%init> |