Added configurable style support in the ^r; macro.

This commit is contained in:
JT Smith 2002-05-22 05:01:45 +00:00
parent a9b81dc63f
commit 56d30226c4
2 changed files with 11 additions and 3 deletions

View file

@ -18,10 +18,11 @@ use WebGUI::SQL;
#-------------------------------------------------------------------
sub getStyle {
my ($header, $footer, @style, %style);
my ($header, $footer, @style, %style, $styleId);
tie %style, 'Tie::CPHash';
if ($session{form}{makePrintable}) {
%style = WebGUI::SQL->quickHash("select header,footer,styleSheet from style where styleId=3");
$styleId = $session{form}{style} || 3;
%style = WebGUI::SQL->quickHash("select header,footer,styleSheet from style where styleId=$styleId");
$header = '<html><!-- WebGUI '.$session{wg}{version}.' -->'."\n";
$header .= '<head><title>'.$session{page}{title}.' - '.$session{setting}{companyName}.'</title>';
$header .= $style{styleSheet}.'</head>'.$style{header};