[% SET CPANEL.CPVAR.dprefix = "../" %] [% WRAPPER '_assets/master.html.tt' page_title = locale.maketext("Bandwidth") app_key = 'bandwidth' -%] [% USE CPDate; SET months = 'Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec'; SET month_index = {}; FOR m = months.split(' '); month_index.$m = loop.index; END; SET form_month = RAW_FORM('mon'); SET timezone = CPANEL.cookies.timezone; SET starttime = CPDate.timezone_timelocal( timezone, 0, 0, 0, 1, month_index.$form_month, RAW_FORM('year') ); SET endtime = CPDate.add_local_interval( starttime, 1, 'month', timezone, ) - 1; SET PROTOCOLS = execute_or_die( 'Bandwidth', 'get_enabled_protocols' ).data; SET bwdata = execute( 'Bandwidth', 'query', { timezone => timezone, grouping => 'protocol|year_month_day_hour', interval => 'hourly', start => starttime, end => endtime, }, ); SET month_name = CPDate.month_stand_alone_wide.${month_index.$form_month}; PROCESS '_bandwidth_graph_include.tmpl'; -%]

[% locale.maketext("Bandwidth Transfer Detail") %]

[% your_timezone_is() %]

[% month_name.html() %] [% RAW_FORM('year').html() %]

[% locale.maketext("Bandwidth by Day") %] [% FOR protocol IN PROTOCOLS %] [% END %] [% Api1.pre_exec("Bandwidth", "displaybw") ; Api1.exec( "Bandwidth", "displaybw", [ FORM.item('domain'), FORM.item('target'), FORM.item('mon'), FORM.item('year'), 0, CPANEL.cookies.timezone, ] ); Api1.post_exec("Bandwidth", "displaybw"); %]
[% locale.maketext("Day") %] [% locale.maketext("All Traffic") %][% locale.maketext("[_1][comment,A protocol like HTTP or SMTP] Traffic", protocol.upper()) %]
[% locale.maketext("[output,strong,Note:] Click a number to view more bandwidth information for that day. This only covers bandwidth information for the past 30 days.") %]
[% INCLUDE _assets/return_link.html.tt return_location="javascript:history.go(-1)" return_link_text=locale.maketext("Go Back") %]
[% END #wrapper -%]