',"\n"; + print HTMLFIL '',\$self->translate('PSI Statistics'),'

',"\n"; + print HTMLFIL \$self->translate('Statistics have been generated at '),'"',sprintf('%02d.%02d.%d %02d:%02d:%02d', \$mday, \$mon, \$year, \$hour, \$min, \$sec),'"

',"\n"; + + # daily activity + print HTMLFIL '
',\$self->translate('Daily activity'),'
',"\n"; + print HTMLFIL '',"\n"; + \$i = \$self->{history}; + while(\$i > 0) { + \$i--; + \$sum = \$self->{days}[\$i][0] + \$self->{days}[\$i][1] + \$self->{days}[\$i][2] + \$self->{days}[\$i][3]; + print HTMLFIL '',"\n"; + } + print HTMLFIL '',"\n"; + \$i = \$self->{history}; + while(\$i > 0) { + \$i--; + print HTMLFIL '',"\n"; + } + print HTMLFIL '
 ',\$sum,'',"\n"; + print HTMLFIL '',"\n"; + print HTMLFIL '',"\n"; + print HTMLFIL '',"\n"; + print HTMLFIL '',"\n"; + print HTMLFIL ' ',\$i,'
',"\n"; + print HTMLFIL '',"\n"; + print HTMLFIL '',"\n"; + print HTMLFIL '',"\n"; + print HTMLFIL '',"\n"; + print HTMLFIL '',"\n"; + print HTMLFIL '
 = 0-5 = 6-11 = 12-17 = 18-23

',"\n"; + + # most active times + print HTMLFIL '
',\$self->translate('Most active times'),'
',"\n"; + print HTMLFIL '',"\n"; + \$i = 0; + while(\$i < 24) { + print HTMLFIL '',"\n"; + \$i++; + } + print HTMLFIL '',"\n"; + \$i = 0; + while(\$i < 24) { + print HTMLFIL '',"\n"; + \$i++; + } + print HTMLFIL '
 ',sprintf('%.1f', \$self->{hours}[\$i] * 100 / \$sum_h),'% ',\$i,'

',"\n"; + + # contacts + print HTMLFIL '
',\$self->translate('Contacts'),'
',"\n"; + print HTMLFIL '',"\n"; + print HTMLFIL '',"\n"; + \$i = 0; + foreach \$nick (@{\$self->{snicks}}) { + \$i++; + if(\$self->{nicks}{\$nick}{lines} > 0) { + \$sum = \$self->{nicks}{\$nick}{linest}[0] + \$self->{nicks}{\$nick}{linest}[1] + \$self->{nicks}{\$nick}{linest}[2] + \$self->{nicks}{\$nick}{linest}[3]; + \$sum = (\$sum > 0) ? \$sum : 1; + my (\$sec,\$min,\$hour,\$mday,\$mon,\$year) = (localtime(\$self->{nicks}{\$nick}{last})); + \$year += 1900; + \$mon++; + print HTMLFIL ''; + print HTMLFIL ''; + print HTMLFIL '',"\n"; + } + } + print HTMLFIL '
 ',\$self->translate('Nick'),' ',\$self->translate('Posts'),' ',\$self->translate('Time'),' ',\$self->translate('To'),' ',\$self->translate('From'),' ',\$self->translate('Last message'),' ',\$i,' {nickname} ',\$self->{nicks}{\$nick}{lines},' '; + print HTMLFIL ''; + print HTMLFIL ''; + print HTMLFIL ''; + print HTMLFIL ''; + print HTMLFIL ' ',sprintf('%.2f', \$self->{nicks}{\$nick}{to} * 100 / \$self->{nicks}{\$nick}{lines}),'% ',sprintf('%.2f', 100 - \$self->{nicks}{\$nick}{to} * 100 / \$self->{nicks}{\$nick}{lines}),'% ',sprintf('%02d.%02d.%d %02d:%02d:%02d', \$mday, \$mon, \$year, \$hour, \$min, \$sec),'

',"\n"; + + # footer + print HTMLFIL \$self->translate('Total number of lines'),': ',\$self->{lines},'

',"\n"; + print HTMLFIL '',"\n"; + print HTMLFIL \$self->translate('Stats generated by'),' psist v',\$self->{version},'
',"\n"; + print HTMLFIL 'psist by Michal Zbortek (zet)
',"\n"; + \$time = time - \$self->{start}; + print HTMLFIL \$self->translate('Stats generated in'),' ',sprintf('%02d:%02d:%02d', \$time / 3600, (\$time % 3600) / 60, (\$time % 3600) % 60),"\n"; + print HTMLFIL '
',"\n"; + + print HTMLFIL '