exit;
}
if (isset($_GET["firewall-popup"])) {
    firewall_popup();
    exit;
}
if (isset($_GET["mynet_ipfrom"])) {
    CalculCDR();
    exit;
}
if (isset($_GET["PostfixAddMyNetwork"])) {
    PostfixAddMyNetwork();
    exit;
}
if (isset($_GET["network-list"])) {
    network_list();
    exit;
}
if (isset($_GET["new-range"])) {
    new_range_popup();
    exit;
}
if (isset($_GET["new-address"])) {
    new_address_popup();
    exit;
}
if (isset($_POST["PostfixBannet"])) {
    PostfixBannet();
    exit;
}
if (isset($_POST["PostFixLimitToNets"])) {
Exemple #2
0
<?php

/*------------------------------------------------------------------------------
  BerryIO Email IP Command
------------------------------------------------------------------------------*/
$title = 'Email Control';
// Load the network functions
require_once FUNCTIONS . 'network.php';
// Get the network device details
if (($interfaces = network_list()) === FALSE) {
    $content .= message('ERROR: Unable retrieve networking information');
    return FALSE;
}
// Remove the loopback device and any disconnected devices or devices without IP's
unset($interfaces['lo']);
foreach ($interfaces as $interface => $details) {
    if (!isset($details['Connected']['bool']) || !$details['Connected']['bool'] || !isset($details['IP Address']['text'])) {
        unset($interfaces[$interface]);
    }
}
// Calculate the webserver port
$port = 80;
if (isset($_SERVER['SERVER_PORT'])) {
    // If this has been triggered by a web page
    $port = $_SERVER['SERVER_PORT'];
} else {
    // If this has been triggered by the CLI
    exec('/usr/sbin/apache2ctl -S 2>/dev/null', $output);
    foreach ($output as $line) {
        if (strpos($line, 'port') !== FALSE && strpos($line, 'berryio') !== FALSE) {
            $cols = get_columns($line);
Exemple #3
0
<?php

/*------------------------------------------------------------------------------
  BerryIO Network Status Command
------------------------------------------------------------------------------*/
$title = 'Network Status';
// Load the network functions
require_once FUNCTIONS . 'network.php';
// Get the network device details
if (($page['network_interfaces'] = network_list()) === FALSE) {
    $content .= message('ERROR: Unable retrieve networking information');
    return FALSE;
}
unset($page['network_interfaces']['lo']);
// Ignore the loopback device
// Display status page
require_once FUNCTIONS . 'graph.php';
$content .= view('pages/network_status', $page);