Skip to content

Commit 8320935

Browse files
rmj-sLupul
authored andcommitted
Add web domain button fix
1 parent 7e1bcd9 commit 8320935

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

web/templates/user/list_user.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
echo '<a href="/add/user/" id="btn-create" class="ui-button cancel" title="'.__('Add User').'"><i class="fas fa-plus-circle status-icon green"></i>'.__('Add User').'</a>&nbsp;';
77
echo '<a href="/list/package/" class="ui-button cancel" title="'.__('Packages').'"><i class="fas fa-box-open status-icon orange"></i>'.__('Packages').'</a>&nbsp;';
88
} else {
9-
echo '<a href="/add/web/" id="btn-create" class="ui-button cancel" title="'.__('Add Web Domain').'"><i class="fas fa-plus-circle status-icon green"></i>'.__('Add Web Domain').'</a>';
9+
if ((isset($_SESSION['WEB_SYSTEM'])) && (!empty($_SESSION['WEB_SYSTEM']))) {
10+
if (intval($panel[$user]['WEB_DOMAINS']) > 0 || $panel[$user]['WEB_DOMAINS'] == 'unlimited') {
11+
echo '<a href="/add/web/" id="btn-create" class="ui-button cancel" title="'.__('Add Web Domain').'"><i class="fas fa-plus-circle status-icon green"></i>'.__('Add Web Domain').'</a>';
12+
}
13+
}
1014
}
1115
?>
1216
</div>

web/templates/user/list_web.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
<div class="l-center">
22
<div class="l-sort clearfix noselect">
33
<div class="l-unit-toolbar__buttonstrip">
4-
<a href="/add/web/" id="btn-create" class="ui-button cancel" title="<?=__('Add Web Domain')?>"><i class="fas fa-plus-circle status-icon green"></i> <?=__('Add Web Domain')?></a>
4+
<?php
5+
if ((isset($_SESSION['WEB_SYSTEM'])) && (!empty($_SESSION['WEB_SYSTEM']))) {
6+
if (intval($panel[$user]['WEB_DOMAINS']) > 0 || $panel[$user]['WEB_DOMAINS'] == 'unlimited') {
7+
echo '<a href="/add/web/" id="btn-create" class="ui-button cancel" title="'.__('Add Web Domain').'"><i class="fas fa-plus-circle status-icon green"></i>'.__('Add Web Domain').'</a>';
8+
}
9+
}
10+
?>
511
</div>
612
<ul class="context-menu sort-order animated fadeIn" style="display:none;">
713
<li entity="sort-date" sort_as_int="1"><span class="name active"><?=__('Date')?> <i class="fas fa-sort-amount-down"></i></span><span class="up"><i class="fas fa-sort-amount-up"></i></span></li>

0 commit comments

Comments
 (0)