1#!/usr/local/bin/perl 2# 3# LightSquid Project (c) 2004-2005 Sergey Erokhin aka ESL 4# 5# This program is free software; you can redistribute it and/or 6# modify it under the terms of the GNU General Public License 7# as published by the Free Software Foundation; either version 2 8# of the License, or (at your option) any later version. 9# 10# detail see in gnugpl.txt 11 12 13use File::Basename; 14push (@INC,(fileparse($0))[1]); 15 16use CGI; 17require "/usr/local/etc/lightsquid/lightsquid.cfg"; 18require "common.pl"; 19 20$co=new CGI; 21 22$content= "text/html"; 23 24$css=$co->param('css');if ($css ne "") {$content= "text/css"; $file="$css.css"; } 25$png=$co->param('png');if ($png ne "") {$content= "image/png"; $file="images/$png.png";} 26$gif=$co->param('gif');if ($gif ne "") {$content= "image/gif"; $file="images/$gif.gif";} 27$jpg=$co->param('jpg');if ($jpg ne "") {$content="image/jpeg"; $file="images/$jpg.jpg";} 28CheckNewTPL($co->param('tpl')); 29 30open F,"<","$tplpath/$templatename/$file" or MyDie("$!\n"); 31binmode F; 32local $/; 33$body=<F>; 34close F; 35 36binmode STDOUT; 37print "Content-Type: $content\n\n"; 38print $body; 39 40__END__ 412005-09-16 ADD : Inital release for v 1.6 422006-06-28 ADD : die -> MyDie 432006-06-28 ADD : &tpl= support 44