Update for sb-admin-2 4.0.7

This commit is contained in:
billz 2019-10-11 20:37:59 +01:00
parent 78c10a5425
commit 5b8f7056dc
4 changed files with 107 additions and 108 deletions

131
index.php
View file

@ -61,22 +61,16 @@ $theme_url = 'app/css/'.htmlspecialchars($theme, ENT_QUOTES);
<title><?php echo _("RaspAP WiFi Configuration Portal"); ?></title>
<!-- Bootstrap Core CSS -->
<link href="dist/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="dist/bootstrap/css/bootstrap.css" rel="stylesheet">
<!-- Bootstrap Toggle CSS -->
<link href="dist/bootstrap-toggle/css/bootstrap-toggle.min.css" rel="stylesheet">
<!-- MetisMenu CSS -->
<link href="dist/metisMenu/metisMenu.min.css" rel="stylesheet">
<!-- SB-Admin-2 CSS -->
<link href="dist/sb-admin-2/css/sb-admin-2.min.css" rel="stylesheet">
<!-- Morris Charts CSS -->
<link href="dist/morrisjs/morris.css" rel="stylesheet">
<!-- Custom Fonts -->
<link href="dist/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href="dist/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
<!-- Custom CSS -->
<link href="<?php echo $theme_url; ?>" title="main" rel="stylesheet">
@ -98,95 +92,100 @@ $theme_url = 'app/css/'.htmlspecialchars($theme, ENT_QUOTES);
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<body id="page-top">
<div id="wrapper">
<!-- Navigation -->
<nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.php"><?php echo _("RaspAP Wifi Portal"); ?> v<?php echo RASPI_VERSION; ?></a>
</div>
<!-- /.navbar-header -->
<!-- Sidebar -->
<ul class="navbar-nav bg-gray-100 sidebar sidebar-light accordion" id="accordionSidebar">
<!-- Sidebar - Brand -->
<a class="sidebar-brand d-flex align-items-center justify-content-center" href="index.php">
<div class="sidebar-brand-icon">
<img src="app/img/raspAP-logo64px.png" width="32" height="32">
</div>
<div class="sidebar-brand-text ml-1">RaspAP <?php echo RASPI_VERSION; ?></div>
</a>
<!-- Divider -->
<hr class="sidebar-divider my-0">
<!-- Navigation -->
<div class="navbar-default sidebar" role="navigation">
<div class="sidebar-nav navbar-collapse">
<ul class="nav" id="side-menu">
<li>
<a href="index.php?page=wlan0_info"><i class="fa fa-dashboard fa-fw"></i> <?php echo _("Dashboard"); ?></a>
<!-- Nav Item - Dashboard -->
<li class="nav-item">
<a class="nav-link" href="index.php?page=wlan0_info"><i class="fas fa-tachometer-alt fa-fw"></i> <?php echo _("Dashboard"); ?></a>
</li>
<?php if (RASPI_WIFICLIENT_ENABLED) : ?>
<li class="nav-item">
<a class="nav-link" href="index.php?page=wpa_conf"><i class="fas fa-wifi fa-fw"></i> <?php echo _("Configure WiFi client"); ?></a>
</li>
<?php if (RASPI_WIFICLIENT_ENABLED) : ?>
<li>
<a href="index.php?page=wpa_conf"><i class="fa fa-wifi fa-fw"></i> <?php echo _("Configure WiFi client"); ?></a>
</li>
<?php endif; ?>
<?php if (RASPI_HOTSPOT_ENABLED) : ?>
<li>
<a href="index.php?page=hostapd_conf"><i class="fa fa-dot-circle-o fa-fw"></i> <?php echo _("Configure hotspot"); ?></a>
<li class="nav-item">
<a class="nav-link" href="index.php?page=hostapd_conf"><i class="far fa-dot-circle fa-fw"></i> <?php echo _("Configure hotspot"); ?></a>
</li>
<?php endif; ?>
<?php if (RASPI_NETWORK_ENABLED) : ?>
<li>
<a href="index.php?page=network_conf"><i class="fa fa-sitemap fa-fw"></i> <?php echo _("Configure networking"); ?></a>
<li class="nav-item">
<a class="nav-link" href="index.php?page=network_conf"><i class="fas fa-sitemap fa-fw"></i> <?php echo _("Configure networking"); ?></a>
</li>
<?php endif; ?>
<?php if (RASPI_DHCP_ENABLED) : ?>
<li>
<a href="index.php?page=dhcpd_conf"><i class="fa fa-exchange fa-fw"></i> <?php echo _("Configure DHCP Server"); ?></a>
<li class="nav-item">
<a class="nav-link" href="index.php?page=dhcpd_conf"><i class="fas fa-exchange-alt fa-fw"></i> <?php echo _("Configure DHCP Server"); ?></a>
</li>
<?php endif; ?>
<?php if (RASPI_OPENVPN_ENABLED) : ?>
<li>
<a href="index.php?page=openvpn_conf"><i class="fa fa-lock fa-fw"></i> <?php echo _("Configure OpenVPN"); ?></a>
<li class="nav-item">
<a class="nav-link" href="index.php?page=openvpn_conf"><i class="fas fa-lock fa-fw"></i> <?php echo _("Configure OpenVPN"); ?></a>
</li>
<?php endif; ?>
<?php if (RASPI_TORPROXY_ENABLED) : ?>
<li>
<a href="index.php?page=torproxy_conf"><i class="fa fa-eye-slash fa-fw"></i> <?php echo _("Configure TOR proxy"); ?></a>
<li class="nav-item">
<a class="nav-link" href="index.php?page=torproxy_conf"><i class="fas fa-eye-slash fa-fw"></i> <?php echo _("Configure TOR proxy"); ?></a>
</li>
<?php endif; ?>
<?php if (RASPI_CONFAUTH_ENABLED) : ?>
<li>
<a href="index.php?page=auth_conf"><i class="fa fa-lock fa-fw"></i> <?php echo _("Configure Auth"); ?></a>
<li class="nav-item">
<a class="nav-link" href="index.php?page=auth_conf"><i class="fas fa-lock fa-fw"></i> <?php echo _("Configure Auth"); ?></a>
</li>
<?php endif; ?>
<?php if (RASPI_CHANGETHEME_ENABLED) : ?>
<li>
<a href="index.php?page=theme_conf"><i class="fa fa-wrench fa-fw"></i> <?php echo _("Change Theme"); ?></a>
<li class="nav-item">
<a class="nav-link" href="index.php?page=theme_conf"><i class="fas fa-wrench fa-fw"></i> <?php echo _("Change Theme"); ?></a>
</li>
<?php endif; ?>
<?php if (RASPI_VNSTAT_ENABLED) : ?>
<li>
<a href="index.php?page=data_use"><i class="fa fa-bar-chart fa-fw"></i> <?php echo _("Data usage"); ?></a>
<li class="nav-item">
<a class="nav-link" href="index.php?page=data_use"><i class="fas fa-chart-bar fa-fw"></i> <?php echo _("Data usage"); ?></a>
</li>
<?php endif; ?>
<li>
<a href="index.php?page=system_info"><i class="fa fa-cube fa-fw"></i> <?php echo _("System"); ?></a>
<li class="nav-item">
<a class="nav-link" href="index.php?page=system_info"><i class="fas fa-cube fa-fw"></i> <?php echo _("System"); ?></a>
</li>
<li>
<a href="index.php?page=about"><i class="fa fa-info-circle fa-fw"></i> <?php echo _("About RaspAP"); ?></a>
</li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.navbar-default -->
</nav>
<li class="nav-item">
<a class="nav-link" href="index.php?page=about"><i class="fas fa-info-circle fa-fw"></i> <?php echo _("About RaspAP"); ?></a>
</li>
<hr class="sidebar-divider d-none d-md-block">
<!-- Sidebar Toggler (Sidebar) -->
<div class="text-center d-none d-md-inline">
<button class="rounded-circle border-0" id="sidebarToggle"></button>
</div>
</ul>
<!-- End of Sidebar -->
<div id="page-wrapper">
<!-- Begin Page Content -->
<div class="container-fluid">
<!-- Content Row
<div class="row">
<div class="col-sm-12">
<h2 class="page-header">
<img class="logo" src="app/img/raspAP-logo.png" width="45" height="45">RaspAP
</h2>
</div>
</div>< /.row -->
<!-- Page Heading -->
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">
<img class="logo" src="app/img/raspAP-logo.png" width="45" height="45">RaspAP
</h1>
</div>
</div><!-- /.row -->
<div class="d-sm-flex align-items-center justify-content-between mb-4">
<!-- todo -->
</div>
<?php
$extraFooterScripts = array();
@ -248,8 +247,8 @@ $theme_url = 'app/css/'.htmlspecialchars($theme, ENT_QUOTES);
<!-- Bootstrap Toggle JavaScript -->
<script src="dist/bootstrap-toggle/js/bootstrap-toggle.min.js"></script>
<!-- Metis Menu Plugin JavaScript -->
<script src="dist/metisMenu/metisMenu.min.js"></script>
<!-- Chart.js JavaScript -->
<script src="dist/chart.js/Chart.min.js"></script>
<!-- SB-Admin-2 JavaScript -->
<script src="dist/sb-admin-2/js/sb-admin-2.js"></script>

View file

@ -1,18 +1,18 @@
<div class="row">
<div class="col-lg-12">
<div class="panel panel-primary">
<div class="panel-heading"><i class="fa fa-info-circle fa-fw"></i> <?php echo _("About RaspAP"); ?></div>
<div class="panel-body text-center">
<div class="col-xl-12">
<div class="card">
<div class="card card-header"><i class="fas fa-info-circle"></i> <?php echo _("About RaspAP"); ?></div>
<div class="card-body text-center">
<h3><?php echo _("RaspAP") . " v" . RASPI_VERSION; ?></h3>
<h5><a href="https://github.com/billz/raspap-webgui/blob/master/LICENSE">GNU General Public License v3.0</a></h5>
<p><img src="app/img/authors-8bit-200px.png"></p>
<p>RaspAP is a co-creation of <a href="https://github.com/billz">@billz</a> and <a href="https://github.com/sirlagz">@SirLagz</a><br />
with the contributions of our <a href="https://github.com/billz/raspap-webgui/graphs/contributors">community</a>.</p>
<p><i class="fa fa-github fa-fw"></i> <a href="https://github.com/billz/raspap-webgui">https://github.com/billz/raspap-webgui</a></p>
<p><i class="fab fa-github"></i> <a href="https://github.com/billz/raspap-webgui">https://github.com/billz/raspap-webgui</a></p>
</div><!-- /.panel-body -->
<div class="panel-footer"></div>
<div class="card-footer"></div>
</div><!-- /.panel-primary -->
</div><!-- /.col-lg-12 -->
</div><!-- /.row -->

View file

@ -9,35 +9,35 @@ exec('cat '.RASPI_DNSMASQ_LEASES.'| grep -E $(arp -i '.$client_iface.' -n | grep
?>
<div class="row">
<div class="col-lg-12">
<div class="panel panel-primary">
<div class="panel-heading"><i class="fa fa-dashboard fa-fw"></i> <?php echo _("Dashboard"); ?></div>
<div class="panel-body">
<div class="card">
<div class="card-header"><i class="fas fa-tachometer-alt fa-fw"></i> <?php echo _("Dashboard"); ?></div>
<div class="card-body">
<?php $status->showMessages(); ?>
<div class="row">
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-body">
<div class="card mb-3">
<div class="card-body">
<h4><?php echo _("Interface Information"); ?></h4>
<div class="info-item"><?php echo _("Interface Name"); ?></div> <?php echo RASPI_WIFI_CLIENT_INTERFACE; ?><br />
<div class="info-item"><?php echo _("IPv4 Address"); ?></div> <?php echo htmlspecialchars($ipv4Addrs, ENT_QUOTES); ?><br />
<div class="info-item"><?php echo _("Subnet Mask"); ?></div> <?php echo htmlspecialchars($ipv4Netmasks, ENT_QUOTES); ?><br />
<div class="info-item"><?php echo _("IPv6 Address"); ?></div> <?php echo htmlspecialchars($ipv6Addrs, ENT_QUOTES); ?><br />
<div class="info-item"><?php echo _("Mac Address"); ?></div> <?php echo htmlspecialchars($macAddr, ENT_QUOTES); ?><br /><br />
</div><!-- /.panel-body -->
</div><!-- /.panel-default -->
<div class="panel panel-default">
<div class="panel-body">
</div><!-- /.card-body -->
</div><!-- /.card-->
<div class="card mb-3">
<div class="card-body">
<h4><?php echo _("Interface Statistics"); ?></h4>
<div class="info-item"><?php echo _("Received Packets"); ?></div> <?php echo htmlspecialchars($strRxPackets, ENT_QUOTES); ?><br />
<div class="info-item"><?php echo _("Received Bytes"); ?></div> <?php echo htmlspecialchars($strRxBytes, ENT_QUOTES); ?><br /><br />
<div class="info-item"><?php echo _("Transferred Packets"); ?></div> <?php echo htmlspecialchars($strTxPackets, ENT_QUOTES); ?><br />
<div class="info-item"><?php echo _("Transferred Bytes"); ?></div> <?php echo htmlspecialchars($strTxBytes, ENT_QUOTES); ?><br />
</div><!-- /.panel-body -->
</div><!-- /.panel-default -->
</div><!-- /.card-body -->
</div><!-- /.card -->
</div><!-- /.col-md-6 -->
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-body wireless">
<div class="card mb-3">
<div class="card-body wireless">
<h4><?php echo _("Wireless Information"); ?></h4>
<div class="info-item"><?php echo _("Connected To"); ?></div> <?php echo htmlspecialchars($connectedSSID, ENT_QUOTES); ?><br />
<div class="info-item"><?php echo _("AP Mac Address"); ?></div> <?php echo htmlspecialchars($connectedBSSID, ENT_QUOTES); ?><br />
@ -49,10 +49,10 @@ exec('cat '.RASPI_DNSMASQ_LEASES.'| grep -E $(arp -i '.$client_iface.' -n | grep
<div class="progress">
<div class="progress-bar progress-bar-info progress-bar-striped active" role="progressbar" aria-valuenow="<?php echo htmlspecialchars($strLinkQuality, ENT_QUOTES); ?>" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo htmlspecialchars($strLinkQuality, ENT_QUOTES); ?>%;"><?php echo htmlspecialchars($strLinkQuality, ENT_QUOTES); ?>%</div>
</div>
</div><!-- /.panel-body -->
</div><!-- /.panel-default -->
<div class="panel panel-default">
<div class="panel-body wireless">
</div><!-- /.card-body -->
</div><!-- /.card -->
<div class="card mb-3">
<div class="card-body wireless">
<h4><?php echo _("Connected Devices"); ?></h4>
<div class="table-responsive">
<table class="table table-hover">
@ -75,8 +75,8 @@ exec('cat '.RASPI_DNSMASQ_LEASES.'| grep -E $(arp -i '.$client_iface.' -n | grep
</tbody>
</table>
</div><!-- /.table-responsive -->
</div><!-- /.panel-body -->
</div><!-- /.panel-default -->
</div><!-- /.card-body -->
</div><!-- /.card -->
</div><!-- /.col-md-6 -->
</div><!-- /.row -->
@ -91,13 +91,13 @@ exec('cat '.RASPI_DNSMASQ_LEASES.'| grep -E $(arp -i '.$client_iface.' -n | grep
<input type="submit" class="btn btn-warning" value="<?php echo _("Stop ").RASPI_WIFI_CLIENT_INTERFACE ?>" name="ifdown_wlan0" />
<?php endif ?>
<?php endif ?>
<a href="?page=<?php echo $_GET['page'] ?>" class="btn btn-outline btn-primary"><i class="fa fa-refresh"></i> <?php echo _("Refresh") ?></a>
<a href="?page=<?php echo $_GET['page'] ?>" class="btn btn-outline btn-primary"><i class="fas fa-sync-alt"></i> <?php echo _("Refresh") ?></a>
</form>
</div>
</div>
</div><!-- /.panel-body -->
<div class="panel-footer"><?php echo _("Information provided by ip and iw and from system."); ?></div>
</div><!-- /.panel-default -->
</div><!-- /.card-body -->
<div class="card-footer"><?php echo _("Information provided by ip and iw and from system."); ?></div>
</div><!-- /.card -->
</div><!-- /.col-lg-12 -->
</div><!-- /.row -->

View file

@ -28,16 +28,16 @@ if ($cpuload > 90) {
?>
<div class="row">
<div class="col-lg-12">
<div class="panel panel-primary">
<div class="panel-heading"><i class="fa fa-cube fa-fw"></i> <?php echo _("System"); ?></div>
<div class="panel-body">
<div class="card">
<div class="card-header"><i class="fas fa-cube"></i> <?php echo _("System"); ?></div>
<div class="card-body">
<?php $status->showMessages(); ?>
<form role="form" action="?page=system_info" method="POST">
<?php echo CSRFTokenFieldTag() ?>
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active systemtab"><a href="#system" aria-controls="system" role="tab" data-toggle="tab"><?php echo _("System"); ?></a></li>
<li role="presentation" class="languagetab"><a href="#language" aria-controls="language" role="tab" data-toggle="tab"><?php echo _("Language"); ?></a></li>
<li role="presentation" class="consoletab"><a href="#console" aria-controls="console" role="tab" data-toggle="tab"><?php echo _("Console"); ?></a></li>
<li role="presentation" class="nav-item"><a class="nav-link active" id="systemtab" href="#system" aria-controls="system" role="tab" data-toggle="tab"><?php echo _("System"); ?></a></li>
<li role="presentation" class="nav-item"><a class="nav-link" id="languagetab" href="#language" aria-controls="language" role="tab" data-toggle="tab"><?php echo _("Language"); ?></a></li>
<li role="presentation" class="nav-item"><a class="nav-link" id="consoletab" href="#console" aria-controls="console" role="tab" data-toggle="tab"><?php echo _("Console"); ?></a></li>
</ul>
<div class="systemtabcontent tab-content">
@ -50,19 +50,19 @@ if ($cpuload > 90) {
<div class="info-item"><?php echo _("Uptime"); ?></div> <?php echo htmlspecialchars($uptime, ENT_QUOTES); ?></br></br>
<div class="info-item"><?php echo _("Memory Used"); ?></div>
<div class="progress">
<div class="progress-bar progress-bar-<?php echo htmlspecialchars($memused_status, ENT_QUOTES); ?> progress-bar-striped active"
<div class="progress-bar progress-bar-<?php echo htmlspecialchars($memused_status, ENT_QUOTES); ?> progress-bar-striped active"
role="progressbar"
aria-valuenow="<?php echo htmlspecialchars($memused, ENT_QUOTES); ?>" aria-valuemin="0" aria-valuemax="100"
style="width: <?php echo htmlspecialchars($memused, ENT_QUOTES); ?>%;"><?php echo htmlspecialchars($memused, ENT_QUOTES); ?>%
</div>
</div>
</div>
<div class="info-item"><?php echo _("CPU Load"); ?></div>
<div class="progress">
<div class="progress-bar progress-bar-<?php echo htmlspecialchars($cpuload_status, ENT_QUOTES); ?> progress-bar-striped active"
<div class="progress-bar progress-bar-<?php echo htmlspecialchars($cpuload_status, ENT_QUOTES); ?> progress-bar-striped active"
role="progressbar"
aria-valuenow="<?php echo htmlspecialchars($cpuload, ENT_QUOTES); ?>" aria-valuemin="0" aria-valuemax="100"
style="width: <?php echo htmlspecialchars($cpuload, ENT_QUOTES); ?>%;"><?php echo htmlspecialchars($cpuload, ENT_QUOTES); ?>%
</div>
</div>
</div>
<form action="?page=system_info" method="POST">
@ -100,8 +100,8 @@ if ($cpuload > 90) {
</div><!-- /.systemtabcontent -->
</form>
</div><!-- /.panel-body -->
<div class="panel-footer"></div>
</div><!-- /.panel-primary -->
</div><!-- /.card-body -->
<div class="card-footer"></div>
</div><!-- /.card -->
</div><!-- /.col-lg-12 -->
</div><!-- /.row -->