PHP Classes

File: SmallServerAdmin/dbadmin/menu.php

Recommend this page to a friend!
  Classes of Aleksey Nemiro   PHP Small Server Administrator   SmallServerAdmin/dbadmin/menu.php   Download  
File: SmallServerAdmin/dbadmin/menu.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: PHP Small Server Administrator
Web panel for small Debian and Ubuntu servers
Author: By
Last change: Small fixes.

$config['dbadmin_list'][*]['file_name'] => $config['dbadmin_list'][*]['url']
Date: 8 years ago
Size: 1,133 bytes
 

Contents

Class file image Download
<li class="dropdown <?=(stripos($_SERVER['REQUEST_URI'], 'dbadmin') !== FALSE ? 'open' : '')?>">
  <a href="/svn" class="dropdown-toggle" data-toggle="dropdown">
    <span class="fa fa-database"></span> ${Menu_DBAdmin}
    <b class="caret"></b>
  </a>
  <?php if (isset($config['dbadmin_list']) && count($config['dbadmin_list']) > 0) {?>
<ul class="dropdown-menu navmenu-nav" role="menu">
    <?php
     
foreach($config['dbadmin_list'] as $item)
      {
        if (!isset(
$item['url']))
        {
         
$item['url'] = $item['file_name'];
        }

        if (!\
Nemiro\Text::StartsWith($item['url'], '/') && !\Nemiro\Text::StartsWith($item['url'], 'http'))
        {
         
$item['url'] = '/'.$item['url'];
        }
        else if (\
Nemiro\Text::StartsWith($item['url'], '\\'))
        {
         
$item['url'] = '/'.substr($item['url'], 1);
        }
   
?>
<li><a href="<?=$item['url']?>" target="_blank"><span class="fa fa-database"></span> <?=(!isset($item['title']) || $item['title'] == '' ? basename($item['url'], '.php') : $item['title'])?></a></li>
    <?php
     
}
   
?>
</ul>
  <?php
 
}
 
?>
</li>