Skip to content

Commit 022d53c

Browse files
committed
Changed website traffic view from KB to MB.
1 parent 1275f48 commit 022d53c

File tree

2 files changed

+56
-56
lines changed

2 files changed

+56
-56
lines changed
Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,52 @@
1-
<h2><tmpl_var name="list_head_txt"></h2>
2-
<p><tmpl_var name="list_desc_txt"></p>
3-
4-
<div class="panel panel_list_web_sites_stats">
5-
6-
<div class="pnl_listarea">
7-
<fieldset><legend><tmpl_var name="list_head_txt"></legend>
8-
<table class="list">
9-
<thead>
10-
<tr>
11-
<th class="tbl_col_domain" scope="col"><tmpl_var name="domain_txt"></th>
12-
<th class="tbl_col_this_month" scope="col"><tmpl_var name="this_month_txt"></th>
13-
<th class="tbl_col_last_month" scope="col"><tmpl_var name="last_month_txt"></th>
14-
<th class="tbl_col_this_year" scope="col"><tmpl_var name="this_year_txt"></th>
15-
<th class="tbl_col_last_year" scope="col"><tmpl_var name="last_year_txt"></th>
16-
<th class="tbl_col_buttons" scope="col">&nbsp;</th>
17-
</tr>
18-
<tr>
19-
<td class="tbl_col_domain"><input type="text" name="search_domain" value="{tmpl_var name='search_domain'}" /></td>
20-
<td class="tbl_col_this_month"></td>
21-
<td class="tbl_col_last_month"></td>
22-
<td class="tbl_col_this_year"></td>
23-
<td class="tbl_col_last_year"></td>
24-
<td class="tbl_col_buttons"><div class="buttons"><button type="button" class="icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onClick="submitForm('pageForm','sites/web_sites_stats.php');"><span>{tmpl_var name="filter_txt"}</span></button></div></td>
25-
</tr>
26-
</thead>
27-
<tbody>
28-
<tmpl_loop name="records">
29-
<tr class="tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>">
30-
<td class="tbl_col_domain"><a href="#" onClick="loadContent('sites/web_domain_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="domain"}</a></td>
31-
<td class="tbl_col_this_month"><a href="#" onClick="loadContent('sites/web_domain_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="this_month"} kB</a></td>
32-
<td class="tbl_col_last_month"><a href="#" onClick="loadContent('sites/web_domain_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="last_month"} kB</a></td>
33-
<td class="tbl_col_this_year"><a href="#" onClick="loadContent('sites/web_domain_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="this_year"} kB</a></td>
34-
<td class="tbl_col_last_year"><a href="#" onClick="loadContent('sites/web_domain_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="last_year"} kB</a></td>
35-
<td class="tbl_col_buttons">
36-
<div class="buttons icons16">
37-
</div>
38-
</td>
39-
</tr>
40-
</tmpl_loop>
41-
</tbody>
42-
43-
<tfoot>
44-
<tr>
45-
<td class="tbl_footer tbl_paging" colspan="6"><tmpl_var name="paging"></td>
46-
</tr>
47-
</tfoot>
48-
</table>
49-
</fieldset>
50-
</div>
51-
52-
</div>
1+
<h2><tmpl_var name="list_head_txt"></h2>
2+
<p><tmpl_var name="list_desc_txt"></p>
3+
4+
<div class="panel panel_list_web_sites_stats">
5+
6+
<div class="pnl_listarea">
7+
<fieldset><legend><tmpl_var name="list_head_txt"></legend>
8+
<table class="list">
9+
<thead>
10+
<tr>
11+
<th class="tbl_col_domain" scope="col"><tmpl_var name="domain_txt"></th>
12+
<th class="tbl_col_this_month" scope="col"><tmpl_var name="this_month_txt"></th>
13+
<th class="tbl_col_last_month" scope="col"><tmpl_var name="last_month_txt"></th>
14+
<th class="tbl_col_this_year" scope="col"><tmpl_var name="this_year_txt"></th>
15+
<th class="tbl_col_last_year" scope="col"><tmpl_var name="last_year_txt"></th>
16+
<th class="tbl_col_buttons" scope="col">&nbsp;</th>
17+
</tr>
18+
<tr>
19+
<td class="tbl_col_domain"><input type="text" name="search_domain" value="{tmpl_var name='search_domain'}" /></td>
20+
<td class="tbl_col_this_month"></td>
21+
<td class="tbl_col_last_month"></td>
22+
<td class="tbl_col_this_year"></td>
23+
<td class="tbl_col_last_year"></td>
24+
<td class="tbl_col_buttons"><div class="buttons"><button type="button" class="icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onClick="submitForm('pageForm','sites/web_sites_stats.php');"><span>{tmpl_var name="filter_txt"}</span></button></div></td>
25+
</tr>
26+
</thead>
27+
<tbody>
28+
<tmpl_loop name="records">
29+
<tr class="tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>">
30+
<td class="tbl_col_domain"><a href="#" onClick="loadContent('sites/web_domain_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="domain"}</a></td>
31+
<td class="tbl_col_this_month"><a href="#" onClick="loadContent('sites/web_domain_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="this_month"} MB</a></td>
32+
<td class="tbl_col_last_month"><a href="#" onClick="loadContent('sites/web_domain_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="last_month"} MB</a></td>
33+
<td class="tbl_col_this_year"><a href="#" onClick="loadContent('sites/web_domain_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="this_year"} MB</a></td>
34+
<td class="tbl_col_last_year"><a href="#" onClick="loadContent('sites/web_domain_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="last_year"} MB</a></td>
35+
<td class="tbl_col_buttons">
36+
<div class="buttons icons16">
37+
</div>
38+
</td>
39+
</tr>
40+
</tmpl_loop>
41+
</tbody>
42+
43+
<tfoot>
44+
<tr>
45+
<td class="tbl_footer tbl_paging" colspan="6"><tmpl_var name="paging"></td>
46+
</tr>
47+
</tfoot>
48+
</table>
49+
</fieldset>
50+
</div>
51+
52+
</div>

interface/web/sites/web_sites_stats.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,22 +34,22 @@ function prepareDataRow($rec)
3434
$tmp_year = date('Y');
3535
$tmp_month = date('m');
3636
$tmp_rec = $app->db->queryOneRecord("SELECT SUM(traffic_bytes) as t FROM web_traffic WHERE hostname = '".$rec['domain']."' AND YEAR(traffic_date) = '$tmp_year' AND MONTH(traffic_date) = '$tmp_month'");
37-
$rec['this_month'] = number_format($tmp_rec['t']/1024, 0, '.', ' ');
37+
$rec['this_month'] = number_format($tmp_rec['t']/1024/1024, 0, '.', ' ');
3838

3939
//** Traffic of the current year
4040
$tmp_rec = $app->db->queryOneRecord("SELECT sum(traffic_bytes) as t FROM web_traffic WHERE hostname = '".$rec['domain']."' AND YEAR(traffic_date) = '$tmp_year'");
41-
$rec['this_year'] = number_format($tmp_rec['t']/1024, 0, '.', ' ');
41+
$rec['this_year'] = number_format($tmp_rec['t']/1024/1024, 0, '.', ' ');
4242

4343
//** Traffic of the last month
4444
$tmp_year = date('Y',mktime(0, 0, 0, date("m")-1, date("d"), date("Y")));
4545
$tmp_month = date('m',mktime(0, 0, 0, date("m")-1, date("d"), date("Y")));
4646
$tmp_rec = $app->db->queryOneRecord("SELECT sum(traffic_bytes) as t FROM web_traffic WHERE hostname = '".$rec['domain']."' AND YEAR(traffic_date) = '$tmp_year' AND MONTH(traffic_date) = '$tmp_month'");
47-
$rec['last_month'] = number_format($tmp_rec['t']/1024, 0, '.', ' ');
47+
$rec['last_month'] = number_format($tmp_rec['t']/1024/1024, 0, '.', ' ');
4848

4949
//** Traffic of the last year
5050
$tmp_year = date('Y',mktime(0, 0, 0, date("m"), date("d"), date("Y")-1));
5151
$tmp_rec = $app->db->queryOneRecord("SELECT sum(traffic_bytes) as t FROM web_traffic WHERE hostname = '".$rec['domain']."' AND YEAR(traffic_date) = '$tmp_year'");
52-
$rec['last_year'] = number_format($tmp_rec['t']/1024, 0, '.', ' ');
52+
$rec['last_year'] = number_format($tmp_rec['t']/1024/1024, 0, '.', ' ');
5353

5454
//* The variable "id" contains always the index variable
5555
$rec['id'] = $rec[$this->idx_key];

0 commit comments

Comments
 (0)