Commit 5d11e120 authored by mcramer's avatar mcramer

VHost Subdomains added to traffic stats

Links removed from sum rows in stats
parent b5986543
...@@ -29,20 +29,20 @@ ...@@ -29,20 +29,20 @@
<tbody> <tbody>
<tmpl_loop name="records"> <tmpl_loop name="records">
<tr class="tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>"> <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_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_domain_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="this_month"} MB</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_domain_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="last_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_domain_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="this_year"} 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_domain_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="last_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> <td class="tbl_col_buttons"></td>
</tr> </tr>
</tmpl_loop> </tmpl_loop>
<tr class="tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>"> <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_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="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_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="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_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="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_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="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_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"> <td class="tbl_col_buttons">
<div class="buttons icons16"> <div class="buttons icons16">
</div> </div>
......
...@@ -82,7 +82,7 @@ class list_action extends listform_actions { ...@@ -82,7 +82,7 @@ class list_action extends listform_actions {
} }
$list = new list_action; $list = new list_action;
$list->SQLExtWhere = "type = 'vhost'"; $list->SQLExtWhere = "(type = 'vhost' or type = 'vhostsubdomain')";
$list->SQLOrderBy = 'ORDER BY domain'; $list->SQLOrderBy = 'ORDER BY domain';
$list->onLoad(); $list->onLoad();
......
...@@ -452,7 +452,7 @@ if ($app->dbmaster == $app->db) { ...@@ -452,7 +452,7 @@ if ($app->dbmaster == $app->db) {
$current_month = date('Y-m'); $current_month = date('Y-m');
//* Check website traffic quota //* 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); $records = $app->db->queryAllRecords($sql);
if(is_array($records)) { if(is_array($records)) {
foreach($records as $rec) { foreach($records as $rec) {
...@@ -592,7 +592,7 @@ if($backup_dir != '') { ...@@ -592,7 +592,7 @@ if($backup_dir != '') {
chmod(escapeshellcmd($backup_dir), $backup_dir_permissions); 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); $records = $app->db->queryAllRecords($sql);
if(is_array($records)) { if(is_array($records)) {
foreach($records as $rec) { foreach($records as $rec) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment