hall of fame formatting
authorxchaos <xchaos@251d49ef-1d17-4917-a970-b30cf55b089b>
Fri, 11 May 2012 18:14:54 +0000 (18:14 +0000)
committerxchaos <xchaos@251d49ef-1d17-4917-a970-b30cf55b089b>
Fri, 11 May 2012 18:14:54 +0000 (18:14 +0000)
git-svn-id: https://dev.arachne.cz/repos/prometheus/trunk@164 251d49ef-1d17-4917-a970-b30cf55b089b

prometheus.c

index ba52a1a..26d6b08 100644 (file)
@@ -925,9 +925,9 @@ void parse_ip_log(int argc, char **argv)
     {\r
      fputs("-------",f);\r
     }    \r
-    fprintf(f, "<td style=\"text-align: right\">%ld&nbsp;M</td>\n\\r
-    <td style=\"text-align: right\"><strong>%ld G</strong></td>\n\\r
-    <td style=\"text-align: right\">%ld kbps</th></tr>\n",\r
+    fprintf(f, "<td style=\"text-align: right\">%ld&nbsp;MB</td>\n\\r
+    <td style=\"text-align: right\"><strong>%ld&nbsp;GB</strong></td>\n\\r
+    <td style=\"text-align: right\">%ld&nbsp;kb/s</th></tr>\n",\r
                iplog->traffic, iplog->traffic>>10, iplog->guaranted);\r
     total+=iplog->traffic>>10;\r
     iplog->i=i;\r
@@ -936,18 +936,20 @@ void parse_ip_log(int argc, char **argv)
   }\r
   fprintf(f,"<tr>\\r
   <td colspan=\"4\" style=\"text-align: left\">Total:</td>\\r
-  <td style=\"text-align: right\"><strong>%ld GB</strong></td>\\r
-  <td style=\"text-align: right\"><strong>%Ld kbps</strong></td></tr>\n", total, line);\r
+  <td style=\"text-align: right\"><strong>%ld&nbsp;GB</strong></td>\\r
+  <td style=\"text-align: right\"><strong>%Ld&nbsp;kb/s</strong></td></tr>\n", total, line);\r
   fputs("</tbody></table>\n", f);\r
 \r
   row_odd_even = 0;\r
   if(i>10)\r
   {\r
-   fputs("<a name=\"erp\"></a><p><table class=\"decorated last\"><thead>\n\\r
-<caption>Enterprise Resource Planning (ERP)</caption></tr>\n\\r
-<tr><td>Analytic category</td>\n\\r
-<td colspan=\"2\" style=\"text-align: center\">Active Classes</td>\n\\r
-<td colspan=\"2\" style=\"text-align: center\">Data transfers</td></tr>\n</thead><tbody>\n",f);\r
+   fputs("<a name=\"erp\"></a><p><table class=\"decorated last\">\n\\r
+<caption>Enterprise Resource Planning (ERP)</caption>\n\\r
+<thead><tr>\n\\r
+<th>Analytic category</th>\n\\r
+<th colspan=\"2\" style=\"text-align: center\">Active Classes</th>\n\\r
+<th colspan=\"2\" style=\"text-align: center\">Data transfers</th>\n\\r
+</tr></thead><tbody>\n",f);\r
 \r
    if_exists(iplog,iplogs,iplog->l>=total/4)\r
    {\r
@@ -958,25 +960,41 @@ void parse_ip_log(int argc, char **argv)
    if_exists(iplog,iplogs,iplog->i==10)\r
    {\r
     fprintf(f,"%s<td>Top 10 downloaders</td>\n", tr_odd_even());\r
-    fprintf(f,"<th style=\"text-align: right\">10</th><td style=\"text-align: right\">%d %%</td><td style=\"text-align: right\">%ld G</td><td style=\"text-align: right\">%d %%</td></tr>\n",(100*iplog->i+50)/i,iplog->l,(int)((100*iplog->l+50)/total));\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\">%d %%</td></tr>\n",\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
    {\r
     fprintf(f,"%s<td>Top 50%% 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><th style=\"text-align: right\">%d %%</th></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 G</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
 \r
    if_exists(iplog,iplogs,iplog->l>=4*total/5)\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><td style=\"text-align: right\">%d %%</td><td style=\"text-align: right\">%ld G</td><th style=\"text-align: right\">%d %%</th></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 G</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
 \r
    if_exists (iplog,iplogs,iplog->i>=i/5)\r
    {\r
     fprintf(f,"%s<td>Top 20%% downloaders</td>\n",tr_odd_even());\r
-    fprintf(f,"<td style=\"text-align: right\">%d</td><th style=\"text-align: right\">%d %%</th><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\"><strong>%d %%</strong></td>\n\\r
+<td style=\"text-align: right\">%ld G</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/4)\r
@@ -988,7 +1006,9 @@ void parse_ip_log(int argc, char **argv)
    if_exists(iplog,iplogs,iplog->i>=i/2)\r
    {\r
     fprintf(f,"%s<td>Top 50%% downloaders</td>\n",tr_odd_even());\r
-    fprintf(f,"<td style=\"text-align: right\">%d</td><th style=\"text-align: right\">%d %%</th><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\"><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
    }\r
 \r
    if_exists(iplog,iplogs,iplog->i>=4*i/5)\r
@@ -997,9 +1017,13 @@ void parse_ip_log(int argc, char **argv)
     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
    }\r
 \r
-   fprintf(f,"<tr><td>All users, all traffic</td>\n");\r
-   fprintf(f,"<th style=\"text-align: right\">%d</th><th style=\"text-align: right\">100 %%</th><th style=\"text-align: right\">%ld G</th><th style=\"text-align: right\">100 %%</th></tr>\n",i-1,total);\r
-   fputs("</tbody></table>\n", f);\r
+   fprintf(f,"</tbody><thead><tr>\n\\r
+<th>All users, all traffic</th>\n\\r
+<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\">100 %%</th></tr>\n",i-1,total);\r
+   fputs("</thead></table>\n", f);\r
   }\r
 \r
   fprintf(f, stats_html_signature, version);\r
@@ -1147,7 +1171,7 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version);
     ip->min = atoi(substring);\r
     if(ip->min <= 0)\r
     {\r
-     printf(" %s: Illegal value of minimum bandwidth 0 kbps, using %d kbps\n",\r
+     printf(" %s: Illegal value of minimum bandwidth 0 kbps, using %d kb/s\n",\r
             str, free_min);\r
      ip->min = free_min;\r
     }\r
@@ -1584,7 +1608,6 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version);
    }\r
    fclose(f);\r
   }\r
-\r
   f=fopen(html,"w");\r
   ptr=html;\r
  }\r
@@ -1602,8 +1625,10 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version);
   {\r
    fprintf(f,"<script type=\"text/javascript\" src=\"%s\"></script>\n", jquery_url);\r
   }\r
-  fputs("<table class=\"decorated last\">\n<thead>\n\\r
-<tr><th style=\"text-align: right\">#</th>\n\\r
+  fputs("<table class=\"decorated last\">\n\\r
+<caption>Bandwidth classes</caption>\n\\r
+<thead><tr>\n\\r
+<th style=\"text-align: right\">#</th>\n\\r
 <th style=\"text-align: right\">group</th>\n\\r
 <th style=\"text-align: right\">IPs</th>\n\\r
 <th style=\"text-align: right\">requested</th>\n",f);\r
@@ -1614,16 +1639,16 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version);
   for_each(group, groups) \r
   { \r
 #ifdef DEBUG\r
-   printf("%d k group: %d bandwidth requested: %d k\n",group->min,group->count,group->desired);\r
+   printf("%d kb/s group: %d bandwidth requested: %d kb/s\n",group->min,group->count,group->desired);\r
 #endif\r
-   fprintf(f, "%s<td style=\"text-align: right\">%d</td><td style=\"text-align: right\">%d&nbsp;k</td>",\r
+   fprintf(f, "%s<td style=\"text-align: right\">%d</td><td style=\"text-align: right\">%d&nbsp;kb/s</td>",\r
               tr_odd_even(), count, group->min);\r
-   fprintf(f, "<td style=\"text-align: right\">%d</td><td style=\"text-align: right\">%d&nbsp;k</td>",\r
+   fprintf(f, "<td style=\"text-align: right\">%d</td><td style=\"text-align: right\">%d&nbsp;kb/s</td>",\r
               group->count, group->desired);\r
 \r
    for_each(keyword, keywords)\r
    {\r
-    fprintf(f,"<td style=\"text-align: right\"><span style=\"color:#%s\">%d&nbsp;M</span></td>",\r
+    fprintf(f,"<td style=\"text-align: right\"><span style=\"color:#%s\">%d&nbsp;Mb/s</span></td>",\r
               keyword->html_color, group->min*keyword->data_limit);\r
    }   \r
    i += group->desired; \r
@@ -1631,11 +1656,11 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version);
    count++; \r
   }\r
 #ifdef DEBUG\r
-   printf("Total groups: %d Total bandwidth requested: %d k\nAGGREGATION: 1/%d\n",\r
+   printf("Total groups: %d Total bandwidth requested: %d kb/s\nAGGREGATION: 1/%d\n",\r
           count, i, i/line);\r
 #endif\r
-   fprintf(f,"<tr><th colspan=\"2\" style=\"text-align: left\">Line %Ld k</td>",line);\r
-   fprintf(f,"<th style=\"text-align: right\">%d</td><th style=\"text-align: right\">%d k</td>",total,i);\r
+   fprintf(f,"<tr><th colspan=\"2\" style=\"text-align: left\">Line %Ld kb/s</td>",line);\r
+   fprintf(f,"<th style=\"text-align: right\">%d</td><th style=\"text-align: right\">%d kb/s</td>",total,i);\r
 \r
    for_each(keyword, keywords)\r
    {\r
@@ -1656,7 +1681,7 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version);
  {\r
   unsigned long long total_traffic=0, total_direct=0, total_proxy=0, total_upload=0, tmp_sum=0;\r
   int active_classes=0;\r
-  int colspan=11;\r
+  int colspan=12;\r
   FILE *iplog;\r
   struct Sum {unsigned long long l; int i; list(Sum);} *sum,*sums=NULL;\r
   int limit_count=0, prio_count=0;\r
@@ -1666,32 +1691,37 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version);
   {\r
    colspan++;\r
   }\r
-  if(found_lmsid)\r
-  {\r
-   colspan++;\r
-  }\r
   \r
-  fprintf(f,"<p><table class=\"decorated last\">\n<thead><caption>%s",title);\r
+  fprintf(f,"<p><table class=\"decorated last\">\n<caption>%s",title);\r
   fprintf(f," (%s)</caption>\n", d);\r
-  fputs("<tr><th style=\"text-align: right\">#</th><th>hostname</th>",f);\r
-  if(found_lmsid)\r
-  {\r
-   fputs("<th style=\"text-align: right\">lms</th>\n",f);\r
-  }\r
-  fputs("<th style=\"text-align: right\">credit</th>\\r
-<th style=\"text-align: right\">limit</th>\\r
-<th style=\"text-align: right\">total</th>\\r
-<th style=\"text-align: right\">direct</th>\n",f);\r
+  fputs("<thead><tr>\n<th colspan=\"3\">&nbsp;</th>\n",f);\r
+  fputs("<th style=\"text-align: right\">credit</th>\n\\r
+<th style=\"text-align: right\">FUP</th>\n\\r
+<th style=\"text-align: right\">total</th>\n\\r
+<th style=\"text-align: right\">down</th>\n",f);\r
   if(qos_proxy)\r
   {\r
    fputs("<th style=\"text-align: right\">proxy</th>\n",f);\r
   }\r
-  fputs("<th style=\"text-align: right\">upload</th>\\r
-<th style=\"text-align: right\">minimum</th>\\r
-<th style=\"text-align: right\">desired</th>\\r
-<th style=\"text-align: right\">maximum</th>\\r
+  fputs("<th style=\"text-align: right\">up</th>\n\\r
+<th style=\"text-align: right\">min</th>\n\\r
+<th style=\"text-align: right\">max</th>\n\\r
+<th style=\"text-align: right\">limit</th>\n\\r
 <th>prio</th></tr>\n\\r
-</thead><tbody>\n",f); \r
+<tr>\n\\r
+<th style=\"text-align: right\">#</th>\n\\r
+<th>hostname [+sharing]</th>\n\\r
+<th style=\"text-align: right\">LMS</th>\n\\r
+<th style=\"text-align: right\">MB</th>\n\\r
+<th style=\"text-align: right\">MB</th>\n\\r
+<th style=\"text-align: right\">MB</th>\n\\r
+<th style=\"text-align: right\">MB</th>\n\\r
+<th style=\"text-align: right\">MB</th>\n\\r
+<th style=\"text-align: right\">kb/s</th>\n\\r
+<th style=\"text-align: right\">kb/s</th>\n\\r
+<th style=\"text-align: right\">kb/s</th>\n\\r
+<th>&nbsp;</th>\n\\r
+</tr></thead><tbody>\n",f);    \r
 \r
   row_odd_even = 0;\r
   for_each(ip,ips) if(!use_jquery_popups || !ip->sharing)\r
@@ -1718,6 +1748,7 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version);
    /* hostnames -------------------------------------- */\r
    fprintf(f,"%s<td style=\"text-align: right\"><a name=\"%s\"></a>%d</td><td><a class=\"blue\" href=\"%s%s.log\">%s</a>\n", \r
               tr_odd_even(), ip->name, i, log_url, ip->name, ip->name);\r
+\r
    if(use_jquery_popups)\r
    {\r
      fprintf(f,"<span id=\"sharing_%d\" style=\"display:none\">",i);\r
@@ -1742,7 +1773,6 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version);
     fputs("<td style=\"text-align: right\">",f);\r
     if(ip->lmsid > 0)\r
     {\r
-     /*base URL will be configurable soon ... */\r
      fprintf(f,"<a class=\"blue\" href=\"%s%d\">%04d</a>\n", lms_url, ip->lmsid, ip->lmsid);\r
     }\r
     else if(ip->lmsid == 0)\r
@@ -1751,20 +1781,20 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version);
     }\r
     fputs("</td>\n",f);\r
    }\r
-   fprintf(f,"<td style=\"text-align: right\">%Lu&nbsp;M</td>\n", ip->credit);\r
-   fprintf(f,"<td style=\"text-align: right\"><span style=\"color:#%s\">%Lu&nbsp;M</span></td>",\r
+   fprintf(f,"<td style=\"text-align: right\">%Lu</td>\n", ip->credit);\r
+   fprintf(f,"<td style=\"text-align: right\"><span style=\"color:#%s\">%Lu</span></td>",\r
              ip->keyword->html_color,\r
              ip->credit+(ip->min*ip->keyword->data_limit+(ip->keyword->fixed_limit<<20)));\r
-   fprintf(f,"<td style=\"text-align: right\">%s%Lu&nbsp;M%s", f1, ip->traffic, f2);\r
+   fprintf(f,"<td style=\"text-align: right\">%s%Lu%s", f1, ip->traffic, f2);\r
 \r
    /* download --------------------------------------- */\r
-   fprintf(f,"</td><td style=\"text-align: right\">%Lu&nbsp;M", ip->direct);\r
+   fprintf(f,"</td><td style=\"text-align: right\">%Lu", ip->direct);\r
    if(use_jquery_popups)\r
    {\r
      fprintf(f,"<span id=\"download_%d\" style=\"display:none\">",i);\r
      for_each(sharedip, ips) if(eq(ip->name, sharedip->sharing))\r
      {\r
-      fprintf(f,"<br />%Lu&nbsp;M", sharedip->direct);\r
+      fprintf(f,"<br />%Lu", sharedip->direct);\r
      }\r
      fputs("</span>\n",f);\r
    }\r
@@ -1773,24 +1803,29 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version);
 \r
    if(qos_proxy)\r
    {\r
-    fprintf(f,"<td style=\"text-align: right\">%Lu&nbsp;M</td>\n", ip->proxy);\r
+    fprintf(f,"<td style=\"text-align: right\">%Lu</td>\n", ip->proxy);\r
    }\r
    /* upload ---------------------------------------- */\r
-   fprintf(f,"<td style=\"text-align: right\">%Lu&nbsp;M", ip->upload);\r
+   fprintf(f,"<td style=\"text-align: right\">%Lu", ip->upload);\r
    if(use_jquery_popups)\r
    {\r
      fprintf(f,"<span id=\"upload_%d\" style=\"display:none\">",i);\r
      for_each(sharedip,ips) if(eq(ip->name, sharedip->sharing))\r
      {\r
-      fprintf(f,"<br />%Lu&nbsp;M", sharedip->upload);\r
+      fprintf(f,"<br />%Lu", sharedip->upload);\r
      }\r
      fputs("</span>\n",f);\r
    }\r
    fputs("</td>\n",f);\r
    /* ----------------------------------------------- */\r
 \r
-   fprintf(f,"<td style=\"text-align: right\">%d&nbsp;k</td><td style=\"text-align: right\">%d&nbsp;k</td><td style=\"text-align: right\">%s%d&nbsp;k%s</td><td>%s%d%s</td></tr>\n",\r
-             ip->min,ip->desired,f1,ip->max,f2,f1,ip->prio,f2);\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\">%s%d%s</td>\n\\r
+<td>%s%d%s</td></tr>\n",\r
+             ip->min, ip->desired, \r
+             f1, ip->max, f2, \r
+             f1, ip->prio, f2);\r
 \r
    total_traffic+=ip->traffic;\r
    total_direct+=ip->direct;\r
@@ -1820,12 +1855,12 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version);
    }\r
   }\r
   fprintf(f,"<tr><th colspan=\"%d\" style=\"text-align: left\">%d CLASSES</th>", colspan-7, i);\r
-  fprintf(f,"<th style=\"text-align: right\">%Lu&nbsp;M</th><th style=\"text-align: right\">%Lu&nbsp;M</th>\n", total_traffic, total_direct);\r
+  fprintf(f,"<th style=\"text-align: right\">%Lu</th><th style=\"text-align: right\">%Lu</th>\n", total_traffic, total_direct);\r
   if(qos_proxy)\r
   {\r
-   fprintf(f,"<th style=\"text-align: right\">%Lu&nbsp;M</th>\n", total_proxy);\r
+   fprintf(f,"<th style=\"text-align: right\">%Lu</th>\n", total_proxy);\r
   }\r
-  fprintf(f,"<th style=\"text-align: right\">%Lu&nbsp;M</th>", total_upload);\r
+  fprintf(f,"<th style=\"text-align: right\">%Lu</th>", total_upload);\r
   fprintf(f,"<th colspan=\"4\"><span style=\"color:red\">FUP-LIMIT %dx</span> <span style=\"color:brown\">LOW-PRIO %dx</span></th></tr>\n</tbody></table>\n",limit_count,prio_count);\r
 \r
   row_odd_even = 0;\r
@@ -1835,9 +1870,12 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version);
    long long top20_perc2=0;\r
    unsigned long long top20_sum=0l;\r
   \r
-   fputs("<a name=\"erp\"></a><p><table class=\"decorated last\"><thead><caption>Enterprise Resource Planning (ERP)</caption>\n",f);\r
-   fputs("<tr><td>Analytic category</td>\n",f);\r
-   fputs("<td colspan=\"2\" style=\"text-align: center\">Active Classes</td><td colspan=\"2\" style=\"text-align: center\">Data transfers</td></tr></thead><tbody>\n",f);\r
+   fputs("<a name=\"erp\"></a><p><table class=\"decorated last\"><caption>Enterprise Resource Planning (ERP)</caption>\n",f);\r
+   fputs("<thead><tr>\n\\r
+<th>Analytic category</th>\n\\r
+<th colspan=\"2\" style=\"text-align: center\">Active Classes</th>\n\\r
+<th colspan=\"2\" style=\"text-align: center\">Data transfers</th>\n\\r
+</tr></thead><tbody>\n",f);\r
 \r
    if_exists(sum,sums,sum->l>=total_traffic/4)\r
    {\r
@@ -1848,19 +1886,31 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version);
    if_exists(sum,sums,sum->i==10)\r
    {\r
     fprintf(f,"%s<td>Top 10 downloaders</td>\n", tr_odd_even());\r
-    fprintf(f,"<th style=\"text-align: right\">10</th><td style=\"text-align: right\">%d %%</td><td style=\"text-align: right\">%Lu M</td><td style=\"text-align: right\">%Ld %%</td></tr>\n",(100*sum->i+50)/active_classes,sum->l,(100*sum->l+50)/total_traffic);\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\">%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
    }\r
 \r
    if_exists(sum,sums,sum->l>=total_traffic/2)\r
    {\r
     fprintf(f,"%s<td>Top 50%% 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><th style=\"text-align: right\">%Ld %%</th></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\"><strong>%Ld %%</strong></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->l>=4*total_traffic/5)\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><td style=\"text-align: right\">%d %%</td><td style=\"text-align: right\">%Lu M</td><th style=\"text-align: right\">%Ld %%</th></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\"><strong>%Ld %%</strong></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>=(active_classes+1)/5)\r
@@ -1870,33 +1920,49 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version);
     top20_perc1=(100*sum->i+50)/active_classes;\r
     top20_sum=sum->l;\r
     top20_perc2=(100*sum->l+50)/total_traffic;\r
-    fprintf(f,"<td style=\"text-align: right\">%d</td><th style=\"text-align: right\">%d %%</th><td style=\"text-align: right\">%Lu M</td><td style=\"text-align: right\">%Ld %%</td></tr>\n",top20_count,top20_perc1,top20_sum,top20_perc2);\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\">%Lu MB</td>\n\\r
+<td style=\"text-align: right\">%Ld %%</td></tr>\n",\r
+              top20_count,top20_perc1,top20_sum,top20_perc2);\r
    }\r
 \r
    if_exists(sum,sums,sum->i>=(active_classes+1)/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\">%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>=(active_classes+1)/2)\r
    {\r
     fprintf(f,"%s<td>Top 50%% downloaders</td>\n", tr_odd_even());\r
-    fprintf(f,"<td style=\"text-align: right\">%d</td><th style=\"text-align: right\">%d %%</th><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\"><strong>%d %%</strong></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>=4*(active_classes+1)/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\">%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></tbody>\n",\r
+              sum->i,(100*sum->i+50)/active_classes,sum->l,(100*sum->l+50)/total_traffic);\r
    }\r
 \r
-   fprintf(f,"<tr><td><a class=\"blue\" href=\"%sERP.log\">All users, all traffic</a></td>\n", log_url);\r
+   fprintf(f,"<tr><thead><th><a class=\"blue\" 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\">100 %%</th></tr>\n",active_classes,total_traffic);\r
-   fputs("</tbody></table>\n", f);\r
+   fputs("</thead></table>\n", f);\r
 \r
    /* write basic ERP data to log directory */\r
    if(!just_preview)\r
This page took 0.2853 seconds and 4 git commands to generate.