2019-08-19 01:38:41 +02:00
|
|
|
<div class="row">
|
2019-08-19 01:51:26 +02:00
|
|
|
<div class="col-lg-12">
|
2019-10-13 00:04:27 +02:00
|
|
|
<div class="card">
|
2019-11-01 10:08:49 +01:00
|
|
|
<div class="card-header">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col">
|
2020-02-29 00:00:35 +01:00
|
|
|
<i class="fas fa-network-wired mr-2"></i><?php echo _("Networking"); ?>
|
2019-11-01 10:08:49 +01:00
|
|
|
</div>
|
|
|
|
</div><!-- ./row -->
|
|
|
|
</div><!-- ./card-header -->
|
2019-10-13 00:04:27 +02:00
|
|
|
<div class="card-body">
|
2019-08-19 01:38:41 +02:00
|
|
|
<div id="msgNetworking"></div>
|
2019-08-19 01:51:26 +02:00
|
|
|
<ul class="nav nav-tabs">
|
2019-10-14 22:57:29 +02:00
|
|
|
<li role="presentation" class="nav-item"><a class="nav-link active" href="#summary" aria-controls="summary" role="tab" data-toggle="tab"><?php echo _("Summary"); ?></a></li>
|
2020-03-12 22:02:26 +01:00
|
|
|
<?php
|
|
|
|
// Get Bridged AP mode status
|
|
|
|
$arrHostapdConf = parse_ini_file('/etc/raspap/hostapd.ini');
|
|
|
|
// defaults to false
|
|
|
|
$bridgedEnabled = $arrHostapdConf['BridgedEnable'];
|
|
|
|
?>
|
|
|
|
<?php if (!$bridgedEnabled): // no interface details when bridged ?>
|
2019-08-19 01:51:26 +02:00
|
|
|
<?php foreach ($interfaces as $if): ?>
|
|
|
|
<?php $if_quoted = htmlspecialchars($if, ENT_QUOTES) ?>
|
2019-10-14 22:57:29 +02:00
|
|
|
<li role="presentation" class="nav-item"><a class="nav-link" href="#<?php echo $if_quoted ?>" aria-controls="<?php echo $if_quoted ?>" role="tab" data-toggle="tab"><?php echo $if_quoted ?></a></li>
|
2019-08-19 01:51:26 +02:00
|
|
|
<?php endforeach ?>
|
2020-03-12 22:02:26 +01:00
|
|
|
<?php endif ?>
|
2019-08-19 01:51:26 +02:00
|
|
|
</ul>
|
|
|
|
<div class="tab-content">
|
|
|
|
|
2020-06-25 16:56:53 +02:00
|
|
|
<div role="tabpanel" class="tab-pane active" id="summary">
|
2020-06-25 16:00:41 +02:00
|
|
|
<h4 class="mt-3"><?php echo _("Internet connection"); ?></h4>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-12"">
|
|
|
|
<div class="card ">
|
|
|
|
<div class="card-body">
|
|
|
|
<div class="table-responsive">
|
|
|
|
<table class="table table-hover">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th><?php echo _("Interface"); ?></th>
|
|
|
|
<th><?php echo _("IP Address"); ?></th>
|
|
|
|
<th><?php echo _("Gateway"); ?></th>
|
|
|
|
<th colspan="2"><?php echo _("Internet Access"); ?></th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<?php
|
|
|
|
$checkAccess=True;
|
|
|
|
include("includes/internetRoute.php");
|
|
|
|
if (isset($rInfo["error"]) || empty($rInfo)) {
|
|
|
|
echo "<tr><td colspan=5>No route to the internet found</td></tr>";
|
|
|
|
} else {
|
|
|
|
foreach($rInfo as $route) {
|
|
|
|
echo "<tr>";
|
|
|
|
echo "<td>".$route["interface"]."</td>";
|
|
|
|
echo "<td>".$route["ip-address"]."</td>";
|
|
|
|
echo "<td>".$route["gateway"]."<br>".$route["gw-name"]."</td>";
|
|
|
|
echo "<td>".$route["access-ip"]."<br>".ACCESS_CHECK_IP."</td>";
|
|
|
|
echo "<td>".$route["access-dns"]."<br>".ACCESS_CHECK_DNS."</td>";
|
|
|
|
echo "</tr>";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2019-10-14 22:57:29 +02:00
|
|
|
<h4 class="mt-3"><?php echo _("Current settings") ?></h4>
|
2019-08-19 01:51:26 +02:00
|
|
|
<div class="row">
|
|
|
|
<?php foreach ($interfaces as $if): ?>
|
|
|
|
<?php $if_quoted = htmlspecialchars($if, ENT_QUOTES) ?>
|
2019-10-14 22:57:29 +02:00
|
|
|
<div class="col-md-6 mb-3">
|
2019-10-13 00:04:27 +02:00
|
|
|
<div class="card">
|
|
|
|
<div class="card-header"><?php echo $if_quoted ?></div>
|
|
|
|
<div class="card-body">
|
2019-08-19 01:51:26 +02:00
|
|
|
<pre class="unstyled" id="<?php echo $if_quoted ?>-summary"></pre>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<?php endforeach ?>
|
|
|
|
</div><!-- /.row -->
|
|
|
|
<div class="col-lg-12">
|
|
|
|
<div class="row">
|
2019-10-14 22:57:29 +02:00
|
|
|
<a href="#" class="btn btn-outline btn-primary" id="btnSummaryRefresh"><i class="fas fa-sync-alt"></i> <?php echo _("Refresh"); ?></a>
|
2019-08-19 01:51:26 +02:00
|
|
|
</div><!-- /.row -->
|
|
|
|
</div><!-- /.col-lg-12 -->
|
|
|
|
</div><!-- /.tab-pane -->
|
|
|
|
|
|
|
|
<?php foreach ($interfaces as $if): ?>
|
|
|
|
<?php $if_quoted = htmlspecialchars($if, ENT_QUOTES) ?>
|
|
|
|
<div role="tabpanel" class="tab-pane fade in" id="<?php echo $if_quoted ?>">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-6">
|
|
|
|
|
|
|
|
<form id="frm-<?php echo $if_quoted ?>">
|
|
|
|
<?php echo CSRFTokenFieldTag() ?>
|
|
|
|
<div class="form-group">
|
2019-10-14 22:57:29 +02:00
|
|
|
<h4 class="mt-3"><?php echo _("Adapter IP Address Settings") ?></h4>
|
|
|
|
<div class="btn-group" role="group" data-toggle="buttons">
|
2019-08-19 01:51:26 +02:00
|
|
|
<label class="btn btn-primary">
|
2019-10-14 22:57:29 +02:00
|
|
|
<input class="mr-2" type="radio" name="<?php echo $if_quoted ?>-addresstype" id="<?php echo $if_quoted ?>-dhcp" autocomplete="off"><?php echo _("DHCP") ?>
|
2019-08-19 01:51:26 +02:00
|
|
|
</label>
|
|
|
|
<label class="btn btn-primary">
|
2019-10-14 22:57:29 +02:00
|
|
|
<input class="mr-2" type="radio" name="<?php echo $if_quoted ?>-addresstype" id="<?php echo $if_quoted ?>-static" autocomplete="off"><?php echo _("Static IP") ?>
|
2019-08-19 01:51:26 +02:00
|
|
|
</label>
|
|
|
|
</div><!-- /.btn-group -->
|
2019-10-14 22:57:29 +02:00
|
|
|
<h4 class="mt-3"><?php echo _("Enable Fallback to Static Option") ?></h4>
|
|
|
|
<div class="btn-group" role="group" data-toggle="buttons">
|
2019-08-19 01:51:26 +02:00
|
|
|
<label class="btn btn-primary">
|
2019-10-14 22:57:29 +02:00
|
|
|
<input class="mr-2" type="radio" name="<?php echo $if_quoted ?>-dhcpfailover" id="<?php echo $if_quoted ?>-failover" autocomplete="off"><?php echo _("Enabled") ?>
|
2019-08-19 01:51:26 +02:00
|
|
|
</label>
|
|
|
|
<label class="btn btn-warning">
|
2019-10-14 22:57:29 +02:00
|
|
|
<input class="mr-2" type="radio" name="<?php echo $if_quoted ?>-dhcpfailover" id="<?php echo $if_quoted ?>-nofailover" autocomplete="off"><?php echo _("Disabled") ?>
|
2019-08-19 01:51:26 +02:00
|
|
|
</label>
|
|
|
|
</div><!-- /.btn-group -->
|
|
|
|
</div><!-- /.form-group -->
|
|
|
|
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
<h4><?php echo _("Static IP Options") ?></h4>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="<?php echo $if_quoted ?>-ipaddress"><?php echo _("IP Address") ?></label>
|
|
|
|
<input type="text" class="form-control" id="<?php echo $if_quoted ?>-ipaddress" placeholder="0.0.0.0">
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="<?php echo $if_quoted ?>-netmask"><?php echo _("Subnet Mask") ?></label>
|
|
|
|
<input type="text" class="form-control" id="<?php echo $if_quoted ?>-netmask" placeholder="255.255.255.0">
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="<?php echo $if_quoted ?>-gateway"><?php echo _("Default Gateway") ?></label>
|
|
|
|
<input type="text" class="form-control" id="<?php echo $if_quoted ?>-gateway" placeholder="0.0.0.0">
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="<?php echo $if_quoted ?>-dnssvr"><?php echo _("DNS Server") ?></label>
|
|
|
|
<input type="text" class="form-control" id="<?php echo $if_quoted ?>-dnssvr" placeholder="0.0.0.0">
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="<?php echo $if_quoted ?>-dnssvralt"><?php echo _("Alternate DNS Server") ?></label>
|
|
|
|
<input type="text" class="form-control" id="<?php echo $if_quoted ?>-dnssvralt" placeholder="0.0.0.0">
|
2019-09-07 10:55:42 +02:00
|
|
|
</div>
|
|
|
|
<?php if (!RASPI_MONITOR_ENABLED): ?>
|
|
|
|
<a href="#" class="btn btn-outline btn-primary intsave" data-int="<?php echo $if_quoted ?>"><?php echo _("Save settings") ?></a>
|
|
|
|
<a href="#" class="btn btn-warning intapply" data-int="<?php echo $if_quoted ?>"><?php echo _("Apply settings") ?></a>
|
|
|
|
<?php endif ?>
|
2019-08-19 01:51:26 +02:00
|
|
|
</form>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div><!-- /.tab-panel -->
|
|
|
|
</div>
|
|
|
|
<?php endforeach ?>
|
|
|
|
|
|
|
|
</div><!-- /.tab-content -->
|
2019-10-13 00:04:27 +02:00
|
|
|
</div><!-- /.card-body -->
|
|
|
|
<div class="card-footer"><?php echo _("Information provided by /sys/class/net"); ?></div>
|
|
|
|
</div><!-- /.card -->
|
2019-08-19 01:38:41 +02:00
|
|
|
</div><!-- /.col-lg-12 -->
|
2019-08-19 01:51:26 +02:00
|
|
|
</div>
|