if_exists(iplog,iplogs,iplog->l>=total/4)\r
{\r
fprintf(f,"%s<td>Top 25%% of traffic</td>\n", tr_odd_even());\r
- fprintf(f,"<td style=\"text-align: right\">%d</td><td style=\"text-align: right\">%d %%</td><td style=\"text-align: right\">%ld G</td><td style=\"text-align: right\">%d %%</td></tr>\n",iplog->i,(100*iplog->i+50)/i,iplog->l,(int)((100*iplog->l+50)/total));\r
+ fprintf(f,"<td style=\"text-align: right\">%d</td>\n\\r
+<td style=\"text-align: right\">%d %%</td>\n\\r
+<td style=\"text-align: right\">%ld GB</td>\n\\r
+<td style=\"text-align: right\">%d %%</td></tr>\n",\r
+ iplog->i, (100*iplog->i+50)/i, iplog->l, (int)((100*iplog->l+50)/total));\r
}\r
\r
if_exists(iplog,iplogs,iplog->i==10)\r
fprintf(f,"%s<td>Top 10 downloaders</td>\n", tr_odd_even());\r
fprintf(f,"<td style=\"text-align: right\"><strong>10</strong></td>\n\\r
<td style=\"text-align: right\">%d %%</td>\n\\r
-<td style=\"text-align: right\">%ld G</td>\n\\r
+<td style=\"text-align: right\">%ld GB</td>\n\\r
<td style=\"text-align: right\">%d %%</td></tr>\n",\r
- (100*iplog->i+50)/i,iplog->l,(int)((100*iplog->l+50)/total));\r
+ (100*iplog->i+50)/i, iplog->l, (int)((100*iplog->l+50)/total));\r
}\r
\r
if_exists(iplog,iplogs,iplog->l>=total/2)\r
fprintf(f,"%s<td>Top 50%% of traffic</td>\n", tr_odd_even());\r
fprintf(f,"<td style=\"text-align: right\">%d</td>\n\\r
<td style=\"text-align: right\">%d %%</td>\n\\r
-<td style=\"text-align: right\">%ld G</td>\n\\r
+<td style=\"text-align: right\">%ld GB</td>\n\\r
<td style=\"text-align: right\"><strong>%d %%</strong></td></tr>\n",\r
iplog->i,(100*iplog->i+50)/i,iplog->l,(int)((100*iplog->l+50)/total));\r
}\r
fprintf(f,"%s<td>Top 80%% of traffic</td>\n",tr_odd_even());\r
fprintf(f,"<td style=\"text-align: right\">%d</td>\n\\r
<td style=\"text-align: right\">%d %%</td>\n\\r
-<td style=\"text-align: right\">%ld G</td>\n\\r
+<td style=\"text-align: right\">%ld GB</td>\n\\r
<td style=\"text-align: right\"><strong>%d %%</strong></td></tr>\n",\r
- iplog->i,(100*iplog->i+50)/i,iplog->l,(int)((100*iplog->l+50)/total));\r
+ iplog->i, (100*iplog->i+50)/i, iplog->l, (int)((100*iplog->l+50)/total));\r
}\r
\r
if_exists (iplog,iplogs,iplog->i>=i/5)\r
fprintf(f,"%s<td>Top 20%% downloaders</td>\n",tr_odd_even());\r
fprintf(f,"<td style=\"text-align: right\">%d</td>\n\\r
<td style=\"text-align: right\"><strong>%d %%</strong></td>\n\\r
-<td style=\"text-align: right\">%ld G</td>\n\\r
+<td style=\"text-align: right\">%ld GB</td>\n\\r
<td style=\"text-align: right\">%d %%</td></tr>\n",\r
- iplog->i,(100*iplog->i+50)/i,iplog->l,(int)((100*iplog->l+50)/total));\r
+ iplog->i, (100*iplog->i+50)/i, iplog->l, (int)((100*iplog->l+50)/total));\r
}\r
\r
if_exists(iplog,iplogs,iplog->i>=i/4)\r
{\r
fprintf(f,"%s<td>Top 25%% downloaders</td>\n", tr_odd_even());\r
- fprintf(f,"<td style=\"text-align: right\">%d</td><td style=\"text-align: right\">%d %%</td><td style=\"text-align: right\">%ld G</td><td style=\"text-align: right\">%d %%</td></tr>\n",iplog->i,(100*iplog->i+50)/i,iplog->l,(int)((100*iplog->l+50)/total));\r
+ fprintf(f,"<td style=\"text-align: right\">%d</td>\n\\r
+<td style=\"text-align: right\">%d %%</td>\n\\r
+<td style=\"text-align: right\">%ld GB</td>\n\\r
+<td style=\"text-align: right\">%d %%</td></tr>\n",\r
+ iplog->i, (100*iplog->i+50)/i, iplog->l, (int)((100*iplog->l+50)/total));\r
}\r
\r
if_exists(iplog,iplogs,iplog->i>=i/2)\r
fprintf(f,"%s<td>Top 50%% downloaders</td>\n",tr_odd_even());\r
fprintf(f,"<td style=\"text-align: right\">%d</td>\n\\r
<td style=\"text-align: right\"><strong>%d %%</strong></td>\n\\r
-<td style=\"text-align: right\">%ld G</td><td style=\"text-align: right\">%d %%</td></tr>\n",iplog->i,(100*iplog->i+50)/i,iplog->l,(int)((100*iplog->l+50)/total));\r
+<td style=\"text-align: right\">%ld GB</td>\n\\r
+<td style=\"text-align: right\">%d %%</td></tr>\n",\r
+ iplog->i, (100*iplog->i+50)/i, iplog->l, (int)((100*iplog->l+50)/total));\r
}\r
\r
if_exists(iplog,iplogs,iplog->i>=4*i/5)\r
{\r
fprintf(f,"%s<td>Top 80%% downloaders</td>\n",tr_odd_even());\r
- fprintf(f,"<td style=\"text-align: right\">%d</td><td style=\"text-align: right\">%d %%</td><td style=\"text-align: right\">%ld G</td><td style=\"text-align: right\">%d %%</td></tr>\n",iplog->i,(100*iplog->i+50)/i,iplog->l,(int)((100*iplog->l+50)/total));\r
+ fprintf(f,"<td style=\"text-align: right\">%d</td>\n\\r
+<td style=\"text-align: right\">%d %%</td>\n\\r
+<td style=\"text-align: right\">%ld GB</td>\n\\r
+<td style=\"text-align: right\">%d %%</td></tr>\n",\r
+ iplog->i, (100*iplog->i+50)/i, iplog->l, (int)((100*iplog->l+50)/total));\r
}\r
\r
fprintf(f,"</tbody><thead><tr><th><a class=\"blue\" target=\"_blank\" href=\"%sERP.log\">All users, all traffic</a></th>\n", log_url);\r
fprintf(f,"<th style=\"text-align: right\">%d</th>\n\\r
<th style=\"text-align: right\">100 %%</th>\n\\r
-<th style=\"text-align: right\">%ld G</th>\n\\r
+<th style=\"text-align: right\">%ld GB</th>\n\\r
<th style=\"text-align: right\">100 %%</th></tr>\n",i-1,total);\r
fputs("</thead></table>\n", f);\r
}\r
if_exists(sum,sums,sum->l>=total_traffic/4)\r
{\r
fprintf(f,"%s<td>Top 25%% of traffic</td>\n", tr_odd_even());\r
- fprintf(f,"<td style=\"text-align: right\">%d</td><td style=\"text-align: right\">%d %%</td><td style=\"text-align: right\">%Lu M</td><td style=\"text-align: right\">%Ld %%</td></tr>\n",sum->i,(100*sum->i+50)/active_classes,sum->l,(100*sum->l+50)/total_traffic);\r
+ fprintf(f,"<td style=\"text-align: right\">%d</td>\n\\r
+<td style=\"text-align: right\">%d %%</td>\n\\r
+<td style=\"text-align: right\">%Lu MB</td>\n\\r
+<td style=\"text-align: right\">%Ld %%</td></tr>\n",\r
+ sum->i, (100*sum->i+50)/active_classes, sum->l, (100*sum->l+50)/total_traffic);\r
}\r
\r
if_exists(sum,sums,sum->i==10)\r
<td style=\"text-align: right\">%d %%</td>\n\\r
<td style=\"text-align: right\">%Lu MB</td>\n\\r
<td style=\"text-align: right\">%Ld %%</td></tr>\n",\r
- (100*sum->i+50)/active_classes,sum->l,(100*sum->l+50)/total_traffic);\r
+ (100*sum->i+50)/active_classes, sum->l, (100*sum->l+50)/total_traffic);\r
}\r
\r
if_exists(sum,sums,sum->l>=total_traffic/2)\r
fprintf(f,"<thead><tr><th><a class=\"blue\" target=\"_blank\" href=\"%sERP.log\">All users, all traffic</a></th>\n", log_url);\r
fprintf(f,"<th style=\"text-align: right\">%d</th>\n\\r
<th style=\"text-align: right\">100 %%</th>\n\\r
-<th style=\"text-align: right\">%Lu M</th>\n\\r
+<th style=\"text-align: right\">%Lu MB</th>\n\\r
<th style=\"text-align: right\">100 %%</th></tr>\n",active_classes,total_traffic);\r
fputs("</thead></table>\n", f);\r
\r