811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
|
}
}
/*
** WEBPAGE: style.css
*/
void page_style_css(void){
const char *zCSS = 0;
int i;
cgi_set_content_type("text/css");
zCSS = db_get("css",(char*)zDefaultCSS);
/* append user defined css */
cgi_append_content(zCSS, -1);
/* add special missing definitions */
for (i=1;cssDefaultList[i].elementClass;i++)
if (!strstr(zCSS,cssDefaultList[i].elementClass)) {
cgi_append_content("/* ", -1);
cgi_append_content(cssDefaultList[i].comment, -1);
cgi_append_content(" */\n", -1);
cgi_append_content(cssDefaultList[i].elementClass, -1);
cgi_append_content(" {\n", -1);
cgi_append_content(cssDefaultList[i].value, -1);
cgi_append_content("}\n\n", -1);
}
g.isConst = 1;
}
/*
** WEBPAGE: test_env
*/
void page_test_env(void){
|
|
|
|
<
|
|
|
|
<
|
<
|
>
>
|
>
>
>
>
>
>
|
>
|
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
|
}
}
/*
** WEBPAGE: style.css
*/
void page_style_css(void){
Blob css;
int i;
cgi_set_content_type("text/css");
blob_init(&css, db_get("css",(char*)zDefaultCSS), -1);
/* add special missing definitions */
for(i=1; cssDefaultList[i].elementClass; i++){
if( strstr(blob_str(&css), cssDefaultList[i].elementClass)==0 ){
blob_appendf(&css, "/* %s */\n%s {\n%s}\n",
cssDefaultList[i].comment,
cssDefaultList[i].elementClass,
cssDefaultList[i].value);
}
}
/* Process through TH1 in order to give an opportunity to substitute
** variables such as $baseurl.
*/
Th_Store("baseurl", g.zBaseURL);
Th_Store("home", g.zTop);
Th_Render(blob_str(&css));
/* Tell CGI that the content returned by this page is considered cacheable */
g.isConst = 1;
}
/*
** WEBPAGE: test_env
*/
void page_test_env(void){
|