[freeside-commits] freeside/httemplate/view image.cgi,NONE,1.1
Ivan,,,
ivan at wavetail.420.am
Wed Oct 13 18:14:29 PDT 2010
Update of /home/cvs/cvsroot/freeside/httemplate/view
In directory wavetail.420.am:/tmp/cvs-serv4104/httemplate/view
Added Files:
image.cgi
Log Message:
more contact work and preliminary business card upload
--- NEW FILE: image.cgi ---
<% $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>
More information about the freeside-commits
mailing list