Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sub CSSParseia()
- {
- my($self) = @_;
- use Fcntl qw(:flock :seek);
- my $theme = "";
- my $corPrincipal = "";
- my $texturaPrincipal = "";# bg-zig.png
- my $dirTemplate="../css/ImovelManager.css";
- my $template = $self->pega_fullpath($dirTemplate);
- open(TEMPLATE, $template) or die "Nao foi possivel abrir o template $template para leitura: $!";
- $responder->{ContentType} = "text/css";
- my @tp = <TEMPLATE>;
- foreach my $linha (@tp)
- {
- $linha =~s/\n//;
- $linha =~s/ //;
- $linha =~s/ //;
- $linha =~s/\|theme\|/$theme/;
- if(length($theme)>0)
- {
- $linha =~s/theme1/$theme/;
- }
- if(length($texturaPrincipal)>0)
- {
- $linha =~s/bg\-zig\.png/$texturaPrincipal/;
- }
- if(length($corPrincipal)>0)
- {
- $linha =~s/\#3e80b7/$corPrincipal/;
- }
- print "$linha";
- }
- close TEMPLATE;
- }
Add Comment
Please, Sign In to add comment