This commit is contained in:
2023-03-28 10:34:44 +02:00
parent f803effbbd
commit f7e0f37528
428 changed files with 9982 additions and 100 deletions

View File

@@ -0,0 +1,103 @@
<?php if (!defined('PICONTROL')) exit(); ?>
<link rel="stylesheet" type="text/css" href="<?php echo PLUGIN_PUBLIC_PATH; ?>public_html/css/style.css" />
<script type="text/javascript" src="<?php echo PLUGIN_PUBLIC_PATH; ?>public_html/js/status_refresh.js"></script>
<div class="sidebar">
<div class="box">
<div class="inner-header">
<span><?php _e('Benutzeroberfl&auml;che'); ?></span>
</div>
<div class="inner">
<a href="<?php echo $data['address']; ?>" target="_blank" class="button" style="width: 100%; box-sizing: border-box; text-align: center;"><?php _e('Zur Benutzeroberfl&auml;che'); ?></a>
</div>
</div>
</div>
<div class="container-600">
<div class="box">
<div class="inner-header">
<span><?php _e('Fritz!Box'); ?></span>
<?php showSettingsIcon('?s=plugins&amp;id=fritzbox&amp;settings'); ?>
</div>
<?php if ($data['connectionFritzbox'] == true) { ?>
<div class="inner-table">
<div>
<div class="refresh">
<div>
<div class="refresh-bar background-color-7"></div>
</div>
<a href="#refresh"><img src="public_html/img/refresh-icon.svg" title="<?php _e('Aktualisieren'); ?>" /></a>
</div>
</div>
<table class="table table-borderless table-form">
<tr>
<td style="width: 40%;"><?php _e('Modell'); ?></td>
<td><?php echo $data['model']; ?></td>
</tr>
<tr>
<td><?php _e('Status'); ?></td>
<td><?php echo $data['connection']; ?></td>
</tr>
<tr>
<td><?php _e('Verbunden seit'); ?></td>
<td><?php echo $data['uptime']; ?></td>
</tr>
<tr>
<td><?php _e('&Ouml;ffentliche IP-Adresse'); ?></td>
<td><a href="http://<?php echo $data['publicIP']; ?>" target="_blank"><?php echo $data['publicIP']; ?></a></td>
</tr>
<tr>
<td><?php _e('Datenvolumen empfangen'); ?></td>
<td><?php echo sizeUnit($data['totalReceived']); ?></td>
</tr>
<tr>
<td><?php _e('Datenvolumen gesendet'); ?></td>
<td><?php echo sizeUnit($data['totalSent']); ?></td>
</tr>
<tr>
<td><?php _e('Auslastung Download'); ?></td>
<td><div class="custom-progressbar" data-text="<?php echo $data['currentBandwidthDown']; ?> / <?php echo $data['maxBandwidthDown']; ?>">
<div class="background-color-3" style="width: <?php echo $data['percentageBandwidthDown']; ?>%;"></div>
</div></td>
</tr>
<tr>
<td><?php _e('Auslastung Upload'); ?></td>
<td><div class="custom-progressbar" data-text="<?php echo $data['currentBandwidthUp']; ?> / <?php echo $data['maxBandwidthUp']; ?>">
<div class="background-color-3" style="width: <?php echo $data['percentageBandwidthUp']; ?>%;"></div>
</div></td>
</tr>
</table>
</div>
<?php } else { ?>
<div class="inner-info">
<div><?php _e('Momentan besteht keine Verbindung zu einer Fritz!Box!'); ?></div>
</div>
<?php } ?>
</div>
</div>
<div class="clear-both"></div>
<div>
<?php foreach ($data['statistics'] as $statistic) { ?>
<div class="box google-controls" id="dashboard_log_<?php echo $statistic['array']['id']; ?>">
<div class="inner-header">
<span><?php _e($statistic['array']['title']); ?></span>
</div>
<div class="inner text-center padding-0" id="chart_log_<?php echo $statistic['array']['id']; ?>">
<img src="public_html/img/loader.svg" style="margin: 20px;" />
</div>
<div class="inner text-center" id="chart_control_log_<?php echo $statistic['array']['id']; ?>">
</div>
</div>
<?php } ?>
</div>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript" src="public_html/js/statistic_builder.js"></script>
<script type="text/javascript">
google.load('visualization', '1', {packages:['controls']});
google.setOnLoadCallback(createTable);
function createTable()
{
<?php foreach ($data['statistics'] as $statistic) { ?>
statisticBuilder(<?php echo $statistic['json']; ?>, 'fritzbox');
<?php } ?>
}
</script>

View File

@@ -0,0 +1,68 @@
<?php if (!defined('PICONTROL')) exit(); ?>
<div>
<div class="box">
<div class="inner-header">
<span><?php _e('Einstellungen zu Fritz!Box'); ?></span>
<?php showGoBackIcon('?s=plugins&amp;id=fritzbox'); ?>
</div>
<form action="?s=plugins&amp;id=fritzbox&amp;settings" method="post">
<div class="inner-table">
<table class="table table-borderless table-form">
<tr>
<td><?php _e('Adresse zur Fritz!Box'); ?></td>
<td><input type="text" name="address" value="<?php echo $data['address']; ?>" /></td>
</tr>
<tr>
<td><?php _e('Fritz!OS'); ?></td>
<td><input type="radio" name="version" value="5" id="rb-5"<?php if ($data['version'] == '5') echo ' checked="checked"'; ?> /><label for="rb-5" class="radio"><?php _e('5 und niedriger'); ?></label><br />
<input type="radio" name="version" value="6" id="rb-6"<?php if ($data['version'] == '6') echo ' checked="checked"'; ?> /><label for="rb-6" class="radio"><?php _e('6 und h&ouml;her'); ?></label></td>
</tr>
<tr>
<td><?php _e('Geschwindigkeitsangaben'); ?></td>
<td><select name="unit">
<option value="mbit"<?php if ($data['unit'] == 'mbit') echo ' selected="selected"'; ?>>MBit/s</option>
<option value="mbyte"<?php if ($data['unit'] == 'mbyte') echo ' selected="selected"'; ?>>MByte/s</option>
</select></td>
</tr>
</table>
</div>
<div class="inner-end">
<input type="submit" name="submit-main" value="<?php _e('Speichern'); ?>" />
</div>
</form>
</div>
<div class="box">
<div class="inner-header">
<span><?php _e('Statistik'); ?></span>
</div>
<form action="?s=plugins&amp;id=fritzbox&amp;settings" method="post">
<div class="inner-table">
<table class="table table-borderless table-form">
<tr>
<td><?php _e('Aktivieren'); ?></td>
<td><input type="checkbox" name="activation" value="checked" id="cb-activiation"<?php if ($data['activation'] == true) echo ' checked="checked"'; ?>><label for="cb-activiation" class="checkbox only-checkbox">&nbsp;</label></td>
</tr>
</table>
</div>
<div class="inner-table">
<table class="table table-borderless">
<tr>
<th style="width: 80%;"><?php _e('Name'); ?></th>
<th style="width: 10%;" class="table-center"><?php _e('Download'); ?></th>
<th style="width: 10%;"></th>
</tr>
<?php foreach ($data['statistics'] as $id => $statistic) { ?>
<tr>
<td><?php echo $statistic['array']['title'] ?></td>
<td class="table-center"><a href="api/v1/statistic_download.php?id=<?php echo $id; ?>&amp;plugin=fritzbox" class="text-decoration-none"><span class="button button-small">CSV</span></a></td>
<td class="table-right"><a href="?s=plugins&amp;id=fritzbox&amp;settings&amp;reset=<?php echo $id; ?>" class="text-decoration-none"><span class="button button-small"><?php _e('Zur&uuml;cksetzen'); ?></span></a></td>
</tr>
<?php } ?>
</table>
</div>
<div class="inner-end">
<input type="submit" name="submit-statistic" value="<?php _e('Speichern'); ?>" />
</div>
</form>
</div>
</div>

View File

@@ -0,0 +1,17 @@
<?php if (!defined('PICONTROL')) exit(); ?>
<div>
<div class="box">
<div class="inner-header">
<span><?php _e('Einstellungen zu Fritz!Box - Verlauf zur&uuml;cksetzen'); ?></span>
<?php showGoBackIcon('?s=plugins&amp;id=fritzbox&amp;settings'); ?>
</div>
<form action="?s=plugins&amp;id=fritzbox&amp;settings&amp;reset=<?php echo $data['log']; ?>&amp;confirm" method="post">
<div class="inner">
<?php _e('M&ouml;chtest du den Verlauf von %s wirklich zur&uuml;cksetzen?', '<strong>'.$data['label'].'</strong>'); ?>
</div>
<div class="inner-end">
<input type="submit" name="submit" value="<?php _e('Zur&uuml;cksetzen'); ?>" />
</div>
</form>
</div>
</div>