mirror of
https://github.com/cytopia/devilbox.git
synced 2025-01-18 10:46:23 +00:00
REL-0.9 Intranet clean-up
This commit is contained in:
parent
1a6621475a
commit
b01777e22c
@ -122,6 +122,7 @@ class Helper
|
||||
}
|
||||
|
||||
// New request, generic check
|
||||
// Note the traiing dot to prevent recursive lookups
|
||||
$ip = $this->exec('ping -c 1 '.$hostname.'. 2>/dev/null | grep -Eo \'[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+\' | head -1');
|
||||
//$ip = gethostbyname($hostname.'');
|
||||
|
||||
|
@ -1,14 +0,0 @@
|
||||
<nav class="navbar navbar-toggleable-md navbar-inverse bg-inverse footer">
|
||||
<div class="container justify-content-end">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="nav-item nav-link">Render time: <?php echo round((microtime(true) - $TIME_START), 2); ?> sec</li>
|
||||
<li class="nav-item"><a class="nav-link" href="https://github.com/cytopia/devilbox"><code>Github</code></a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="/credits.php"><code>Credits</code></a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="/debug.php"><code>Debug</code></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<script src="/vendor/jquery/jquery-3.1.1.slim.min.js"></script>
|
||||
<script src="/vendor/tether/tether.min.js"></script>
|
||||
<script src="/vendor/bootstrap/bootstrap.min.js"></script>
|
@ -1,35 +0,0 @@
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
|
||||
<!-- Meta -->
|
||||
<meta name="description" content="The devilbox - your customizable LAMP/LEMP stack.">
|
||||
<meta name="author" content="cytopia">
|
||||
|
||||
<!-- Favicons -->
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="/assets/favicon/apple-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="/assets/favicon/apple-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="/assets/favicon/apple-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="/assets/favicon/apple-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="/assets/favicon/apple-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="/assets/favicon/apple-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="/assets/favicon/apple-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="/assets/favicon/apple-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/assets/favicon/apple-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="/assets/favicon/android-icon-192x192.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="96x96" href="/assets/favicon/favicon-96x96.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon/favicon-16x16.png">
|
||||
<link rel="manifest" href="/manifest.json">
|
||||
<meta name="msapplication-TileColor" content="#ffffff">
|
||||
<meta name="msapplication-TileImage" content="/assets/favicon/ms-icon-144x144.png">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<!-- CSS/JS -->
|
||||
<link href="/vendor/bootstrap/bootstrap.min.css" rel="stylesheet">
|
||||
<?php if (isset($FONT_AWESOME) && $FONT_AWESOME): ?>
|
||||
<link href="/vendor/font-awesome/font-awesome.min.css" rel="stylesheet">
|
||||
<?php endif; ?>
|
||||
<link href="/assets/css/custom.css" rel="stylesheet">
|
||||
|
||||
<title>The DevilBox</title>
|
@ -1,162 +0,0 @@
|
||||
<?php
|
||||
$menu = array(
|
||||
array(
|
||||
array(
|
||||
'name' => 'Home',
|
||||
'path' => '/index.php'
|
||||
),
|
||||
array(
|
||||
'name' => 'Virtual Hosts',
|
||||
'path' => '/vhosts.php'
|
||||
),
|
||||
array(
|
||||
'name' => 'Emails',
|
||||
'path' => '/mail.php'
|
||||
)
|
||||
),
|
||||
array(
|
||||
'name' => 'Databases',
|
||||
'menu' => array(
|
||||
array(
|
||||
'name' => 'MySQL DB',
|
||||
'path' => '/db_mysql.php'
|
||||
),
|
||||
array(
|
||||
'name' => 'PgSQL DB',
|
||||
'path' => '/db_pgsql.php'
|
||||
),
|
||||
array(
|
||||
'name' => 'Redis DB',
|
||||
'path' => '/db_redis.php'
|
||||
),
|
||||
array(
|
||||
'name' => 'Memcached DB',
|
||||
'path' => '/db_memcd.php'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'name' => 'Info',
|
||||
'menu' => array(
|
||||
array(
|
||||
'name' => 'PHP Info',
|
||||
'path' => '/info_php.php'
|
||||
),
|
||||
array(
|
||||
'name' => 'MySQL Info',
|
||||
'path' => '/info_mysql.php'
|
||||
),
|
||||
array(
|
||||
'name' => 'PgSQL Info',
|
||||
'path' => '/info_pgsql.php'
|
||||
),
|
||||
array(
|
||||
'name' => 'Redis Info',
|
||||
'path' => '/info_redis.php'
|
||||
),
|
||||
array(
|
||||
'name' => 'Memcached Info',
|
||||
'path' => '/info_memcd.php'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'name' => 'Tools',
|
||||
'menu' => array(
|
||||
array(
|
||||
'name' => 'phpMyAdmin',
|
||||
'path' => (strpos(loadClass('Php')->getVersion(), '5.4') !== false) ? '/vendor/phpmyadmin-4.0/index.php' : '/vendor/phpmyadmin-4.7/index.php',
|
||||
'target' => '_blank'
|
||||
),
|
||||
array(
|
||||
'name' => 'Adminer',
|
||||
'path' => '/vendor/adminer-4.3.1/adminer/index.php'
|
||||
),
|
||||
array(
|
||||
'name' => 'Opcache GUI',
|
||||
'path' => '/opcache.php'
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
/**
|
||||
* Get Navigation menu
|
||||
* @param mixed[] $menu Menu Array
|
||||
* @return string
|
||||
*/
|
||||
function get_menu($menu) {
|
||||
|
||||
$path = $_SERVER['PHP_SELF'];
|
||||
$html = '';
|
||||
|
||||
foreach ($menu as $type => $elements) {
|
||||
|
||||
if (!isset($elements['menu'])) {
|
||||
|
||||
foreach ($elements as $el) {
|
||||
if ($path == $el['path']) {
|
||||
$class = 'active';
|
||||
$span = '<span class="sr-only">(current)</span>';
|
||||
} else {
|
||||
$class = '';
|
||||
$span = '';
|
||||
}
|
||||
|
||||
$html .= '<li class="nav-item '.$class.'">';
|
||||
$html .= '<a class="nav-link" href="'.$el['path'].'">'.$el['name'].' '.$span.'</a>';
|
||||
$html .= '</li>';
|
||||
}
|
||||
|
||||
} else {
|
||||
$name = $elements['name'];
|
||||
$class = '';
|
||||
$id = md5($name);
|
||||
|
||||
|
||||
// Make submenu active
|
||||
foreach ($elements['menu'] as $el) {
|
||||
if (strpos($path, $el['path']) !== false) {
|
||||
$class = 'active';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$html .= '<li class="nav-item dropdown '.$class.'">';
|
||||
$html .= '<a class="nav-link dropdown-toggle" href="#" id="'.$id.'" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">';
|
||||
$html .= $name;
|
||||
$html .= '</a>';
|
||||
$html .= '<div class="dropdown-menu" aria-labelledby="'.$id.'">';
|
||||
|
||||
foreach ($elements['menu'] as $el) {
|
||||
$target = isset($el['target']) ? 'target="'.$el['target'].'"' : '';
|
||||
$html .= '<a class="dropdown-item" '.$target.' href="'.$el['path'].'">'.$el['name'].'</a>';
|
||||
}
|
||||
|
||||
$html .= '</div>';
|
||||
$html .= '</li>';
|
||||
}
|
||||
}
|
||||
|
||||
return $html;
|
||||
}
|
||||
?>
|
||||
<nav class="navbar navbar-toggleable-md navbar-inverse bg-inverse">
|
||||
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="/index.php">
|
||||
<img src="/assets/img/logo_30.png" width="30" height="30" class="d-inline-block align-top" alt="">devilbox
|
||||
</a>
|
||||
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav mr-auto">
|
||||
|
||||
<?php echo get_menu($menu);?>
|
||||
|
||||
</ul>
|
||||
<?php $errors = loadClass('Logger')->countErrors(); ?>
|
||||
<div class="form-inline my-2 my-lg-0">Errors: <?php echo $errors; ?></div>
|
||||
</div>
|
||||
</nav>
|
||||
<br/>
|
Loading…
Reference in New Issue
Block a user