more self-service skinning config options, and start taking a stab at reorganizing...
[freeside.git] / fs_selfservice / FS-SelfService / cgi / image.cgi
diff --git a/fs_selfservice/FS-SelfService/cgi/image.cgi b/fs_selfservice/FS-SelfService/cgi/image.cgi
new file mode 100755 (executable)
index 0000000..e951dcd
--- /dev/null
@@ -0,0 +1,20 @@
+#!/usr/bin/perl -T
+#!/usr/bin/perl -Tw
+
+use strict;
+use CGI;
+use FS::SelfService qw( skin_info );
+
+my $cgi = new CGI;
+
+my($query) = $cgi->keywords;
+$query =~ /^(\w+)$/ or '' =~ /^()$/;
+my $name = $1;
+
+my $info = skin_info();
+
+print $cgi->header( '-type'    => 'image/png', #for now
+                    #'-expires' => 'now',
+                  ).
+      $info->{$name};
+