|
46 | 46 | <button type="submit" class="l-sort-toolbar__filter-apply" onclick="return doSearch('/search/')" value=""><i class="fas fa-search"></i></button> |
47 | 47 | </form> |
48 | 48 | </td> |
49 | | - <td> |
50 | | - <form action="/bulk/db/" method="post" id="objects"> |
51 | | - <input type="hidden" name="token" value="<?=$_SESSION['token']?>" /> |
52 | | - <div class="l-select"> |
53 | | - <select name="action" id=""> |
54 | | - <option value=""><?=_('apply to selected')?></option> |
55 | | - <option value="rebuild"><?=_('rebuild')?></option> |
56 | | - <option value="suspend"><?=_('suspend')?></option> |
57 | | - <option value="unsuspend"><?=_('unsuspend')?></option> |
58 | | - <option value="delete"><?=_('delete')?></option> |
59 | | - </select> |
60 | | - </div> |
61 | | - <button type="submit" class="l-sort-toolbar__filter-apply" value=""><i class="fas fa-arrow-right"></i></button> |
62 | | - </td> |
| 49 | + <? if (($_SESSION['userContext'] === 'admin') && ($_SESSION['look'] === 'admin')) {?> |
| 50 | + <!-- Hide bulk actions for domain items when impersonating 'admin' account--> |
| 51 | + <? } else { ?> |
| 52 | + <td> |
| 53 | + <form action="/bulk/db/" method="post" id="objects"> |
| 54 | + <input type="hidden" name="token" value="<?=$_SESSION['token']?>" /> |
| 55 | + <div class="l-select"> |
| 56 | + <select name="action" id=""> |
| 57 | + <option value=""><?=_('apply to selected')?></option> |
| 58 | + <option value="rebuild"><?=_('rebuild')?></option> |
| 59 | + <option value="suspend"><?=_('suspend')?></option> |
| 60 | + <option value="unsuspend"><?=_('unsuspend')?></option> |
| 61 | + <option value="delete"><?=_('delete')?></option> |
| 62 | + </select> |
| 63 | + </div> |
| 64 | + <button type="submit" class="l-sort-toolbar__filter-apply" value=""><i class="fas fa-arrow-right"></i></button> |
| 65 | + </td> |
| 66 | + <? } ?> |
63 | 67 | </tr> |
64 | 68 | </table> |
65 | 69 | </div> |
|
117 | 121 | <div class="clearfix l-unit__stat-col--left super-compact"> |
118 | 122 | <input id="check<?php echo $i ?>" class="ch-toggle" type="checkbox" name="database[]" value="<?php echo $key ?>"> |
119 | 123 | </div> |
120 | | - <div class="clearfix l-unit__stat-col--left wide-3 truncate"><b><a href="/edit/db/?database=<?=$key?>&token=<?=$_SESSION['token']?>" title="<?=_('Editing Database')?>"><?=$key?></a></b></div> |
| 124 | + <div class="clearfix l-unit__stat-col--left wide-3 truncate"> |
| 125 | + <? if (($_SESSION['userContext'] === 'admin') && ($_SESSION['look'] === 'admin')) {?> |
| 126 | + <b><?=$key?></b> |
| 127 | + <? } else { ?> |
| 128 | + <b><a href="/edit/db/?database=<?=$key?>&token=<?=$_SESSION['token']?>" title="<?=_('Editing Database')?>"><?=$key?></a></b> |
| 129 | + <? } ?> |
| 130 | + </div> |
121 | 131 | <!-- START QUICK ACTION TOOLBAR AREA --> |
122 | 132 | <div class="clearfix l-unit__stat-col--left text-right compact-3"> |
123 | | - <div class="l-unit-toolbar__col l-unit-toolbar__col--right noselect"> |
124 | | - <div class="actions-panel clearfix"> |
125 | | - <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> |
126 | | - <div class="actions-panel__col actions-panel__suspend shortcut-s" key-action="js"> |
127 | | - <a id="<?=$spnd_action ?>_link_<?=$i?>" class="data-controls do_<?=$spnd_action?>" title="<?=_($spnd_action)?>"> |
128 | | - <i class="fas <?=$spnd_icon?> status-icon highlight status-icon dim do_<?=$spnd_action?>"></i> |
129 | | - <input type="hidden" name="<?=$spnd_action?>_url" value="/<?=$spnd_action?>/db/?database=<?=$key?>&token=<?=$_SESSION['token']?>" /> |
130 | | - <div id="<?=$spnd_action?>_dialog_<?=$i?>" class="confirmation-text-suspention hidden" title="<?=_('Confirmation')?>"> |
131 | | - <p class="confirmation"><?=sprintf($spnd_confirmation,$key)?></p> |
132 | | - </div> |
133 | | - </a> |
134 | | - </div> |
135 | | - <div class="actions-panel__col actions-panel__delete shortcut-delete" key-action="js"> |
136 | | - <a id="delete_link_<?=$i?>" class="data-controls do_delete" title="<?=_('delete')?>"> |
137 | | - <i class="fas fa-trash status-icon red status-icon dim do_delete"></i> |
138 | | - <input type="hidden" name="delete_url" value="/delete/db/?database=<?=$key?>&token=<?=$_SESSION['token']?>" /> |
139 | | - <div id="delete_dialog_<?=$i?>" class="confirmation-text-delete hidden" title="<?=_('Confirmation')?>"> |
140 | | - <p class="confirmation"><?=sprintf(_('DELETE_DATABASE_CONFIRMATION'),$key)?></p> |
141 | | - </div> |
142 | | - </a> |
143 | | - </div> |
144 | | - <?php if ($data[$key]['TYPE'] == 'mysql' && isset($_SESSION['PHPMYADMIN_KEY']) && $_SESSION['PHPMYADMIN_KEY'] != '') { |
145 | | - $time = time(); |
146 | | - ?> |
147 | | - <div class="actions-panel__col actions-panel__logs shortcut-enter" key-action="href"><a href="<?=$db_myadmin_link;?>/hestia-sso.php?database=<?=$key;?>&user=<?=$user;?>&exp=<?=$time;?>&hestia_token=<?=password_hash($key.$user.$_SESSION['user_combined_ip'].$time.$_SESSION['PHPMYADMIN_KEY'], PASSWORD_DEFAULT)?>" title="<?=_('Editing Database')?>"><i class="fas fa-sign-in-alt status-icon orange status-icon dim"></i></a></div> |
148 | | - <?php |
149 | | - } |
150 | | - ?> |
| 133 | + <div class="l-unit-toolbar__col l-unit-toolbar__col--right noselect"> |
| 134 | + <div class="actions-panel clearfix"> |
| 135 | + <? if (($_SESSION['userContext'] === 'admin') && ($_SESSION['look'] === 'admin')) {?> |
| 136 | + <!-- Restrict the ability to edit, delete, or suspend domain items when impersonating 'admin' user --> |
| 137 | + |
| 138 | + <? } else { ?> |
| 139 | + <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> |
| 140 | + <?php if ($data[$key]['TYPE'] == 'mysql' && isset($_SESSION['PHPMYADMIN_KEY']) && $_SESSION['PHPMYADMIN_KEY'] != '') { $time = time(); ?> |
| 141 | + <div class="actions-panel__col actions-panel__logs shortcut-enter" key-action="href"><a href="<?=$db_myadmin_link;?>/hestia-sso.php?database=<?=$key;?>&user=<?=$user;?>&exp=<?=$time;?>&hestia_token=<?=password_hash($key.$user.$_SESSION['user_combined_ip'].$time.$_SESSION['PHPMYADMIN_KEY'], PASSWORD_DEFAULT)?>" title="<?=_('Editing Database')?>"><i class="fas fa-sign-in-alt status-icon orange status-icon dim"></i></a></div> |
| 142 | + <? } ?> |
| 143 | + <div class="actions-panel__col actions-panel__suspend shortcut-s" key-action="js"> |
| 144 | + <a id="<?=$spnd_action ?>_link_<?=$i?>" class="data-controls do_<?=$spnd_action?>" title="<?=_($spnd_action)?>"> |
| 145 | + <i class="fas <?=$spnd_icon?> status-icon highlight status-icon dim do_<?=$spnd_action?>"></i> |
| 146 | + <input type="hidden" name="<?=$spnd_action?>_url" value="/<?=$spnd_action?>/db/?database=<?=$key?>&token=<?=$_SESSION['token']?>" /> |
| 147 | + <div id="<?=$spnd_action?>_dialog_<?=$i?>" class="confirmation-text-suspention hidden" title="<?=_('Confirmation')?>"> |
| 148 | + <p class="confirmation"><?=sprintf($spnd_confirmation,$key)?></p> |
| 149 | + </div> |
| 150 | + </a> |
| 151 | + </div> |
| 152 | + <div class="actions-panel__col actions-panel__delete shortcut-delete" key-action="js"> |
| 153 | + <a id="delete_link_<?=$i?>" class="data-controls do_delete" title="<?=_('delete')?>"> |
| 154 | + <i class="fas fa-trash status-icon red status-icon dim do_delete"></i> |
| 155 | + <input type="hidden" name="delete_url" value="/delete/db/?database=<?=$key?>&token=<?=$_SESSION['token']?>" /> |
| 156 | + <div id="delete_dialog_<?=$i?>" class="confirmation-text-delete hidden" title="<?=_('Confirmation')?>"> |
| 157 | + <p class="confirmation"><?=sprintf(_('DELETE_DATABASE_CONFIRMATION'),$key)?></p> |
| 158 | + </div> |
| 159 | + </a> |
151 | 160 | </div> |
152 | | - </div> |
| 161 | + <? } ?> |
| 162 | + </div> |
| 163 | + </div> |
153 | 164 | </div> |
154 | 165 | <!-- END QUICK ACTION TOOLBAR AREA --> |
155 | 166 | <div class="clearfix l-unit__stat-col--left text-center compact"><?=$data[$key]['TYPE']?></div> |
|
0 commit comments