|
|
@@ -1,6 +1,5 @@
|
|
|
<?php
|
|
|
list($http_host, $port) = explode(':', $_SERVER["HTTP_HOST"].":");
|
|
|
-
|
|
|
$db_myadmin_link = "//".$http_host."/phpmyadmin/";
|
|
|
$db_pgadmin_link = "//".$http_host."/phppgadmin/";
|
|
|
|
|
|
@@ -19,11 +18,16 @@
|
|
|
<?php if ($read_only !== 'true') {?>
|
|
|
<a href="/add/db/" id="btn-create" class="ui-button cancel" dir="ltr"><i class="fas fa-plus-circle status-icon green"></i><?=_('Add Database');?></a>
|
|
|
<?php if (($_SESSION['DB_SYSTEM'] === 'mysql') || ($_SESSION['DB_SYSTEM'] === 'mysql,pgsql') || ($_SESSION['DB_SYSTEM'] === 'pgsql,mysql')) {?>
|
|
|
- <a class="ui-button cancel" dir="ltr" href="<?=$db_myadmin_link; ?>" target="_blank"><i class="fas fa-database status-icon orange"></i>phpMyAdmin</a>
|
|
|
+ <a class="ui-button cancel <?=(ipUsed() ? 'button-suspended':'');?>" dir="ltr" href="<?=$db_myadmin_link; ?>" target="_blank"><i class="fas fa-database status-icon orange"></i>phpMyAdmin</a>
|
|
|
<?php } ?>
|
|
|
<?php if (($_SESSION['DB_SYSTEM'] === 'pgsql') || ($_SESSION['DB_SYSTEM'] === 'mysql,pgsql') || ($_SESSION['DB_SYSTEM'] === 'pgsql,mysql')) {?>
|
|
|
- <a class="ui-button cancel" dir="ltr" href="<?=$db_pgadmin_link; ?>" target="_blank"><i class="fas fa-database status-icon orange"></i>phpPgAdmin</a>
|
|
|
+ <a class="ui-button cancel <?=(ipUsed() ? 'button-suspended':'');?>" dir="ltr" href="<?=$db_pgadmin_link; ?>" target="_blank"><i class="fas fa-database status-icon orange"></i>phpPgAdmin</a>
|
|
|
<?php } ?>
|
|
|
+ <?php if(ipUsed()){
|
|
|
+ ?>
|
|
|
+ <a target="_blank" href="https://docs.hestiacp.com/admin_docs/database.html#why-i-can-t-use-http-ip-phpmyadmin"><i class="fas fa-question-circle"></i></a>
|
|
|
+ <?
|
|
|
+ }?>
|
|
|
<?php } ?>
|
|
|
</div>
|
|
|
<ul class="context-menu sort-order animated fadeIn" style="display:none;">
|
|
|
@@ -146,7 +150,7 @@
|
|
|
<?php if ($data[$key]['SUSPENDED'] == 'no') {?>
|
|
|
<div class="actions-panel__col actions-panel__logs shortcut-enter" key-action="href"><a href="/edit/db/?database=<?=$key?>&token=<?=$_SESSION['token']?>" title="<?=_('Editing Database');?>"><i class="fas fa-pencil-alt status-icon orange status-icon dim"></i></a></div>
|
|
|
<?php } ?>
|
|
|
- <?php if ($data[$key]['TYPE'] == 'mysql' && isset($_SESSION['PHPMYADMIN_KEY']) && $_SESSION['PHPMYADMIN_KEY'] != '') { $time = time(); ?>
|
|
|
+ <?php if ($data[$key]['TYPE'] == 'mysql' && isset($_SESSION['PHPMYADMIN_KEY']) && $_SESSION['PHPMYADMIN_KEY'] != '' && !ipUsed()) { $time = time(); ?>
|
|
|
<div class="actions-panel__col actions-panel__logs shortcut-enter" key-action="href"><a target="_blank" href="<?=$db_myadmin_link;?>/hestia-sso.php?database=<?=$key;?>&user=<?=$user_plain;?>&exp=<?=$time;?>&hestia_token=<?=password_hash($key.$user_plain.$_SESSION['user_combined_ip'].$time.$_SESSION['PHPMYADMIN_KEY'], PASSWORD_DEFAULT)?>" title="<?=_('phpMyAdmin');?>"><i class="fas fa-sign-in-alt status-icon orange status-icon dim"></i></a></div>
|
|
|
<?php } ?>
|
|
|
<div class="actions-panel__col actions-panel__suspend shortcut-s" key-action="js">
|