]>
Commit | Line | Data |
---|---|---|
25697a35 | 1 | /* |
c37945ed FM |
2 | * AUTHOR: Pedro Lineu Orso pedro.orso@gmail.com |
3 | * 1998, 2008 | |
94ff9470 | 4 | * SARG Squid Analysis Report Generator http://sarg.sourceforge.net |
25697a35 GS |
5 | * |
6 | * SARG donations: | |
7 | * please look at http://sarg.sourceforge.net/donations.php | |
8 | * --------------------------------------------------------------------- | |
9 | * | |
10 | * This program is free software; you can redistribute it and/or modify | |
11 | * it under the terms of the GNU General Public License as published by | |
12 | * the Free Software Foundation; either version 2 of the License, or | |
13 | * (at your option) any later version. | |
14 | * | |
15 | * This program is distributed in the hope that it will be useful, | |
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 | * GNU General Public License for more details. | |
19 | * | |
20 | * You should have received a copy of the GNU General Public License | |
21 | * along with this program; if not, write to the Free Software | |
22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. | |
23 | * | |
24 | */ | |
25 | ||
26 | #include "include/conf.h" | |
27 | ||
d6e703cc | 28 | void css(FILE *fp_css) |
25697a35 | 29 | { |
d6e703cc | 30 | FILE *fp_in; |
25697a35 | 31 | |
25697a35 GS |
32 | if(strlen(ExternalCSSFile) > 0) { |
33 | if((fp_in=fopen(ExternalCSSFile,"r"))==NULL) { | |
34 | fprintf(stderr, "SARG: (css) %s: %s\n",text[45],ExternalCSSFile); | |
35 | exit(1); | |
36 | } | |
d6e703cc FM |
37 | fputs("<style>\n",fp_css); |
38 | while(fgets(buf,MAXLEN,fp_in)!=NULL) | |
39 | fputs(buf,fp_css); | |
40 | fclose(fp_in); | |
41 | fputs("</style>\n",fp_css); | |
25697a35 GS |
42 | return; |
43 | } | |
44 | ||
d6e703cc FM |
45 | fprintf(fp_css,"<style>\n.logo {font-family:Verdana,Tahoma,Arial;font-size:11px;color:%s;}\n",LogoTextColor); |
46 | fprintf(fp_css,".body {font-family:%s;color:%s;background-color:%s;}\n",FontFace,TxColor,BgColor); | |
47 | fprintf(fp_css,".info {font-family:%s;font-size:10px;}\n", FontFace); | |
48 | fprintf(fp_css,".info a:link,a:visited {font-family:%s;color:#0000FF;font-size:10px;text-decoration:none;}\n", FontFace); | |
49 | fprintf(fp_css,".title {font-family:%s;font-size:%s;color:%s;background-color:%s;}\n",FontFace,TitleFontSize,TiColor,BgColor); | |
50 | fprintf(fp_css,".title2 {font-family:%s;font-size:%s;color:%s;background-color:%s;text-align:left;}\n",FontFace,TitleFontSize,TiColor,BgColor); | |
51 | fprintf(fp_css,".title3 {font-family:%s;font-size:%s;color:%s;background-color:%s;text-align:right;}\n",FontFace,TitleFontSize,TiColor,BgColor); | |
52 | fprintf(fp_css,".header {font-family:%s;font-size:%s;color:%s;background-color:%s;text-align:left;border-right:1px solid #666666;border-bottom:1px solid #666666;}\n",FontFace,HeaderFontSize,HeaderColor,HeaderBgColor); | |
53 | fprintf(fp_css,".header2 {font-family:%s;font-size:%s;color:%s;background-color:%s;text-align:right;border-right:1px solid #666666;border-bottom:1px solid #666666;}\n",FontFace,HeaderFontSize,HeaderColor,HeaderBgColor); | |
54 | fprintf(fp_css,".header3 {font-family:%s;font-size:%s;color:%s;background-color:%s;text-align:center;border-right:1px solid #666666;border-bottom:1px solid #666666;}\n",FontFace,HeaderFontSize,HeaderColor,HeaderBgColor); | |
55 | fprintf(fp_css,".text {font-family:%s;color:%s;font-size:%s;}\n", FontFace, TxColor, FontSize); | |
56 | fprintf(fp_css,".data {font-family:%s;color:%s;font-size:%s;background-color:%s;text-align:right;border-right:1px solid #6A5ACD;border-bottom:1px solid #6A5ACD;}\n", FontFace, TxColor, FontSize, TxBgColor); | |
57 | fprintf(fp_css,".data a:link,a:visited {font-family:%s;color:#0000FF;font-size:%s;background-color:%s;text-align:right;text-decoration:none;}\n", FontFace, FontSize, TxBgColor); | |
58 | fprintf(fp_css,".data2 {font-family:%s;color:%s;font-size:%s;background-color:%s;border-right:1px solid #6A5ACD;border-bottom:1px solid #6A5ACD;}\n", FontFace, TxColor, FontSize, TxBgColor); | |
59 | fprintf(fp_css,".data2 a:link,a:visited {font-family:%s;color:#0000FF;font-size:%s;background-color:%s;text-decoration:none;}\n", FontFace, FontSize, TxBgColor); | |
60 | fprintf(fp_css,".data3 {font-family:%s;color:%s;font-size:%s;text-align:center;background-color:%s;border-right:1px solid #6A5ACD;border-bottom:1px solid #6A5ACD;}\n", FontFace, TxColor, FontSize, TxBgColor); | |
61 | fprintf(fp_css,".data3 a:link,a:visited {font-family:%s;color:#0000FF;font-size:%s;text-align:center;background-color:%s;text-decoration:none;}\n", FontFace, FontSize, TxBgColor); | |
62 | fprintf(fp_css,".text {font-family:%s;color:%s;font-size:%s;text-align:right;}\n", FontFace, TxColor, FontSize, TxBgColor); | |
63 | fprintf(fp_css,".link {font-family:%s;font-size:%s;color:#0000FF;}\n", FontFace, FontSize); | |
64 | fprintf(fp_css,".link a:link,a:visited {font-family:%s;font-size:%s;color:#0000FF;text-decoration:none;}\n</style>\n", FontFace, FontSize); | |
65 | } |