{\r
int i;\r
char *str;\r
- FILE *f=fopen(html,"w");\r
+ FILE *f=fopen(html, "w");\r
\r
string(str,STRLEN); \r
if(f > 0)\r
int count=1;\r
i=0;\r
\r
- /*-----------------------------------------------------------------*/\r
- printf("Writing statistics summary into HTML page %s ...\n", html);\r
- /*-----------------------------------------------------------------*/\r
-\r
if(use_jquery_popups)\r
{\r
fprintf(f,"<script type=\"text/javascript\" src=\"%s\"></script>\n", jquery_url);\r
{\r
int jsoncount=0;\r
fprintf(f, "{\n");\r
+\r
for_each(ip, ips)\r
{\r
if( ip->lmsid > 0 \r
{\r
fprintf(f, ",\n");\r
}\r
- fprintf(f, " \"%s\":{ \"lms\": %d, \"ip\":\"%s\", \"total\":%Lu, \"down\":%Lu, \"proxy\":%Lu, \"up\":%Lu,\\r
- \"min\":%d, \"max\":%d, \"limit\":%d, \"realquota\":%Lu, \"credit\":%Lu, \"dailyquota\":%ld }",\r
- ip->name, ip->lmsid, ip->addr, ip->traffic, ip->direct, ip->proxy, ip->upload, \r
- ip->min, ip->desired, ip->max, ip->realquota, ip->credit, \r
- (ip->min*ip->keyword->data_limit+(ip->keyword->fixed_limit<<20)));\r
+ fprintf(f, \r
+ " \"%s\":{ \"lms\": %d, \"ip\":\"%s\", \"total\":%Lu, \"down\":%Lu, \"proxy\":%Lu, \"up\":%Lu, \\r
+\"min\":%d, \"max\":%d, \"limit\":%d, \"realquota\":%Lu, \"credit\":%Lu, \"dailyquota\":%ld }",\r
+ ip->name, ip->lmsid, ip->addr, ip->traffic, ip->direct, ip->proxy, ip->upload, \r
+ ip->min, ip->desired, ip->max, ip->realquota, ip->credit, \r
+ (ip->min*ip->keyword->data_limit+(ip->keyword->fixed_limit<<20)));\r
jsoncount++;\r
}\r
}\r
/*-----------------------------------------------------------------*/\r
printf("Writing statistics into HTML page %s ...\n", html);\r
/*-----------------------------------------------------------------*/\r
- write_htmlandlogs(json_traffic,d,total, just_preview);\r
+ write_htmlandlogs(html, d,total, just_preview);\r
\r
if(just_preview)\r
{\r