"Fossies" - the Fresh Open Source Software Archive

Member "sarg-2.4.0/css.c" (24 Dec 2019, 5878 Bytes) of package /linux/privat/sarg-2.4.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "css.c" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 2.3.11_vs_2.4.0.

    1 /*
    2  * SARG Squid Analysis Report Generator      http://sarg.sourceforge.net
    3  *                                                            1998, 2015
    4  *
    5  * SARG donations:
    6  *      please look at http://sarg.sourceforge.net/donations.php
    7  * Support:
    8  *     http://sourceforge.net/projects/sarg/forums/forum/363374
    9  * ---------------------------------------------------------------------
   10  *
   11  *  This program is free software; you can redistribute it and/or modify
   12  *  it under the terms of the GNU General Public License as published by
   13  *  the Free Software Foundation; either version 2 of the License, or
   14  *  (at your option) any later version.
   15  *
   16  *  This program is distributed in the hope that it will be useful,
   17  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
   18  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   19  *  GNU General Public License for more details.
   20  *
   21  *  You should have received a copy of the GNU General Public License
   22  *  along with this program; if not, write to the Free Software
   23  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
   24  *
   25  */
   26 
   27 #include "include/conf.h"
   28 #include "include/defs.h"
   29 
   30 void css_content(FILE *fp_css)
   31 {
   32     fprintf(fp_css,".logo {font-family:Verdana,Tahoma,Arial;font-size:11px;color:%s;text-align:center;vertical-align:middle;border:none;padding:0px;margin-bottom:5px;}\n",LogoTextColor);
   33     fprintf(fp_css,".logo th {padding:0px;}\n");
   34     fprintf(fp_css,".logo img {vertical-align:middle;padding:0px;border:0px none;}\n");
   35     fprintf(fp_css,".body {font-family:%s;font-size:%s;color:%s;background-color:%s;background-image:url(%s);}\n",FontFace,TitleFontSize,TxColor,BgColor,BgImage);
   36     fprintf(fp_css,".info {font-family:%s;font-size:10px;text-align:center;margin-top:1em;margin-bottom:1em;}\n", FontFace);
   37     fprintf(fp_css,".info a:link,a:visited {font-family:%s;color:#0000FF;font-size:10px;text-decoration:none;}\n", FontFace);
   38 
   39     fprintf(fp_css,".title {width:100%%;text-align:center;margin-bottom:1em;}\n");
   40     fprintf(fp_css,"div.title > table {margin:auto;}\n");
   41     fprintf(fp_css,".title_c {font-family:%s;font-size:%s;color:%s;background-color:%s;text-align:center;}\n",FontFace,TitleFontSize,TiColor,BgColor);
   42     fprintf(fp_css,".title_l {font-family:%s;font-size:%s;color:%s;background-color:%s;text-align:left;}\n",FontFace,TitleFontSize,TiColor,BgColor);
   43     fprintf(fp_css,".title_r {font-family:%s;font-size:%s;color:%s;background-color:%s;text-align:right;}\n",FontFace,TitleFontSize,TiColor,BgColor);
   44 
   45     fprintf(fp_css,".index {width:100%%;text-align:center;}\n");
   46     fprintf(fp_css,"div.index > table {margin:auto;}\n");
   47     fprintf(fp_css,".report {width:100%%;text-align:center;}\n");
   48     fprintf(fp_css,"div.report > table {margin:auto;}\n");
   49 
   50     fprintf(fp_css,".header_l {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);
   51     fprintf(fp_css,".header_r {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);
   52     fprintf(fp_css,".header_c {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);
   53 
   54     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);
   55     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);
   56 
   57     fprintf(fp_css,".data2 {font-family:%s;color:%s;font-size:%s;background-color:%s;text-align:left;border-right:1px solid #6A5ACD;border-bottom:1px solid #6A5ACD;}\n", FontFace, TxColor, FontSize, TxBgColor);
   58     fprintf(fp_css,".data2 a:link,a:visited {font-family:%s;color:#0000FF;font-size:%s;text-align:left;background-color:%s;text-decoration:none;}\n", FontFace, FontSize, TxBgColor);
   59 
   60     fprintf(fp_css,".data3 {font-family:%s;color:%s;font-size:%s;background-color:%s;text-align:center;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 
   63     fprintf(fp_css,".text {font-family:%s;color:%s;font-size:%s;background-color:%s;text-align:right;}\n", FontFace, TxColor, FontSize, TxBgColor);
   64     fprintf(fp_css,".more {font-style: italic;color:#777;}\n");
   65 
   66     fprintf(fp_css,".link {font-family:%s;font-size:%s;color:#0000FF;}\n", FontFace, FontSize);
   67     fprintf(fp_css,".link a:link,a:visited {font-family:%s;font-size:%s;color:#0000FF;text-decoration:none;}\n", FontFace, FontSize);
   68 
   69     fprintf(fp_css,"a > img {border:none;}\n");
   70 
   71     fputs(".warn {margin:0.5em;}\n",fp_css);
   72     fprintf(fp_css,".warn > span {padding:0.5em;border:2px solid black;background-color:orange;font-family:%s;font-size:%s;}\n",FontFace,FontSize);
   73 
   74     fprintf(fp_css,"tr.tt > td {font-family:%s;color:%s;font-size:%s;text-align:left;border-right:1px solid #6A5ACD;border-bottom:1px solid #6A5ACD;padding-top:0.5em;border:none;}\n", FontFace, TxColor, FontSize);
   75 
   76     if (SortTableJs[0]) {
   77         fprintf(fp_css,".sorttable_nosort {cursor:default !important;}\n");
   78         fprintf(fp_css,".sortable thead th {cursor:pointer;}\n");
   79     }
   80 }
   81 
   82 void css(FILE *fp_css)
   83 {
   84     if (ExternalCSSFile[0] != '\0') {
   85         fprintf(fp_css,"<link rel=\"stylesheet\" href=\"%s\" type=\"text/css\">\n",ExternalCSSFile);
   86         return;
   87     }
   88 
   89     fprintf(fp_css,"<style type=\"text/css\">\n");
   90     css_content(fp_css);
   91     fputs("</style>\n",fp_css);
   92 }