From 5d11e1209ea7876c391075817d64ddf1a5cdde4c Mon Sep 17 00:00:00 2001 From: mcramer <m.cramer@pixcept.de> Date: Fri, 24 Aug 2012 13:51:45 -0400 Subject: [PATCH] VHost Subdomains added to traffic stats Links removed from sum rows in stats --- interface/web/sites/templates/web_sites_stats_list.htm | 20 ++++++++++---------- interface/web/sites/web_sites_stats.php | 2 +- server/cron_daily.php | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/interface/web/sites/templates/web_sites_stats_list.htm b/interface/web/sites/templates/web_sites_stats_list.htm index 475c9d1..3e06424 100644 --- a/interface/web/sites/templates/web_sites_stats_list.htm +++ b/interface/web/sites/templates/web_sites_stats_list.htm @@ -29,20 +29,20 @@ <tbody> <tmpl_loop name="records"> <tr class="tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>"> - <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> - <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> - <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> - <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> - <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> + <td class="tbl_col_domain"><a href="#" onClick="loadContent('sites/web_<tmpl_if name='type' op='==' value='vhostsubdomain'>vhost_sub</tmpl_if>domain_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="domain"}</a></td> + <td class="tbl_col_this_month"><a href="#" onClick="loadContent('sites/web_<tmpl_if name='type' op='==' value='vhostsubdomain'>vhost_sub</tmpl_if>domain_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="this_month"} MB</a></td> + <td class="tbl_col_last_month"><a href="#" onClick="loadContent('sites/web_<tmpl_if name='type' op='==' value='vhostsubdomain'>vhost_sub</tmpl_if>domain_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="last_month"} MB</a></td> + <td class="tbl_col_this_year"><a href="#" onClick="loadContent('sites/web_<tmpl_if name='type' op='==' value='vhostsubdomain'>vhost_sub</tmpl_if>domain_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="this_year"} MB</a></td> + <td class="tbl_col_last_year"><a href="#" onClick="loadContent('sites/web_<tmpl_if name='type' op='==' value='vhostsubdomain'>vhost_sub</tmpl_if>domain_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="last_year"} MB</a></td> <td class="tbl_col_buttons"></td> </tr> </tmpl_loop> <tr class="tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>"> - <td class="tbl_col_domain"><a href="#" onClick="loadContent('sites/web_domain_edit.php?id={tmpl_var name='id'}');" style="font-weight:bold;">{tmpl_var name="sum_txt"}</a></td> - <td class="tbl_col_this_month"><a href="#" onClick="loadContent('sites/web_domain_edit.php?id={tmpl_var name='id'}');" style="font-weight:bold;">{tmpl_var name="sum_this_month"} MB</a></td> - <td class="tbl_col_last_month"><a href="#" onClick="loadContent('sites/web_domain_edit.php?id={tmpl_var name='id'}');" style="font-weight:bold;">{tmpl_var name="sum_last_month"} MB</a></td> - <td class="tbl_col_this_year"><a href="#" onClick="loadContent('sites/web_domain_edit.php?id={tmpl_var name='id'}');" style="font-weight:bold;">{tmpl_var name="sum_this_year"} MB</a></td> - <td class="tbl_col_last_year"><a href="#" onClick="loadContent('sites/web_domain_edit.php?id={tmpl_var name='id'}');" style="font-weight:bold;">{tmpl_var name="sum_last_year"} MB</a></td> + <td class="tbl_col_domain"><a href="#" onClick="return false;" style="font-weight:bold;">{tmpl_var name="sum_txt"}</a></td> + <td class="tbl_col_this_month"><a href="#" onClick="return false;" style="font-weight:bold;">{tmpl_var name="sum_this_month"} MB</a></td> + <td class="tbl_col_last_month"><a href="#" onClick="return false;" style="font-weight:bold;">{tmpl_var name="sum_last_month"} MB</a></td> + <td class="tbl_col_this_year"><a href="#" onClick="return false;" style="font-weight:bold;">{tmpl_var name="sum_this_year"} MB</a></td> + <td class="tbl_col_last_year"><a href="#" onClick="return false;" style="font-weight:bold;">{tmpl_var name="sum_last_year"} MB</a></td> <td class="tbl_col_buttons"> <div class="buttons icons16"> </div> diff --git a/interface/web/sites/web_sites_stats.php b/interface/web/sites/web_sites_stats.php index 98c4865..bd7acb6 100644 --- a/interface/web/sites/web_sites_stats.php +++ b/interface/web/sites/web_sites_stats.php @@ -82,7 +82,7 @@ } $list = new list_action; -$list->SQLExtWhere = "type = 'vhost'"; +$list->SQLExtWhere = "(type = 'vhost' or type = 'vhostsubdomain')"; $list->SQLOrderBy = 'ORDER BY domain'; $list->onLoad(); diff --git a/server/cron_daily.php b/server/cron_daily.php index cd86c1c..066fa4d 100644 --- a/server/cron_daily.php +++ b/server/cron_daily.php @@ -452,7 +452,7 @@ $current_month = date('Y-m'); //* Check website traffic quota - $sql = "SELECT sys_groupid,domain_id,domain,traffic_quota,traffic_quota_lock FROM web_domain WHERE (traffic_quota > 0 or traffic_quota_lock = 'y') and type = 'vhost'"; + $sql = "SELECT sys_groupid,domain_id,domain,traffic_quota,traffic_quota_lock FROM web_domain WHERE (traffic_quota > 0 or traffic_quota_lock = 'y') and (type = 'vhost' OR type = 'vhostsubdomain')"; $records = $app->db->queryAllRecords($sql); if(is_array($records)) { foreach($records as $rec) { @@ -592,7 +592,7 @@ chmod(escapeshellcmd($backup_dir), $backup_dir_permissions); } - $sql = "SELECT * FROM web_domain WHERE server_id = '".$conf['server_id']."' AND type = 'vhost' AND backup_interval != 'none'"; + $sql = "SELECT * FROM web_domain WHERE server_id = '".$conf['server_id']."' AND (type = 'vhost' OR type = 'vhostsubdomain') AND backup_interval != 'none'"; $records = $app->db->queryAllRecords($sql); if(is_array($records)) { foreach($records as $rec) { -- Gitblit v1.9.1