summaryrefslogtreecommitdiff
path: root/httemplate/view/logo.cgi
diff options
context:
space:
mode:
authorcvs2git <cvs2git>2010-12-27 00:04:45 +0000
committercvs2git <cvs2git>2010-12-27 00:04:45 +0000
commitc82d349f864e6bd9f96fd1156903bc1f7193a203 (patch)
treee117a87533656110b6acd56fc0ca64289892a9f5 /httemplate/view/logo.cgi
parent74e058c8a010ef6feb539248a550d0bb169c1e94 (diff)
This commit was manufactured by cvs2svn to create tag 'TORRUS_1_0_9'.TORRUS_1_0_9
Diffstat (limited to 'httemplate/view/logo.cgi')
-rw-r--r--httemplate/view/logo.cgi47
1 files changed, 0 insertions, 47 deletions
diff --git a/httemplate/view/logo.cgi b/httemplate/view/logo.cgi
deleted file mode 100644
index aeca0f3b3..000000000
--- a/httemplate/view/logo.cgi
+++ /dev/null
@@ -1,47 +0,0 @@
-<% $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 logo type ". $cgi->param('type');
-}
-
-my $data;
-if ( $cgi->param('preview_session') =~ /^(\w+)$/ ) {
-
- my $session = $1;
- my $curuser = $FS::CurrentUser::CurrentUser;
- $data = decode_base64( $curuser->option("logo_preview$session") );
-
-} elsif ( $cgi->param('name') =~ /^([^\.\/]*)$/ ) {
-
- my $templatename = $1;
- if ( $templatename && $conf->exists("logo_$templatename.$type") ) {
- $templatename = "_$templatename";
- } else {
- $templatename = '';
- }
-
- if ( $type eq 'png' ) {
- $data = $conf->config_binary("logo$templatename.png");
- } elsif ( $type eq 'eps' ) {
- #convert EPS to a png... punting on that for now
- }
-
-} else {
- die "neither a valid name nor a valid preview_session specified";
-}
-
-http_header('Content-Type' => 'image/png' );
-
-</%init>
-