Ejemplo n.º 1
0
<?php

include_once $_SERVER["DOCUMENT_ROOT"] . "/222/inc/config.inc.php";
include_once $_SERVER["DOCUMENT_ROOT"] . "/222/inc/functions.inc.php";
include_once $_SERVER["DOCUMENT_ROOT"] . "/222/class/MulticastReceiver.class.php";
$receiver = $_GET["r"];
$tuner = $_GET["t"];
if (!verifyIPAddress($receiver)) {
    print "The ip address format is incorrect";
    exit;
}
if (!verifyTuner($tuner)) {
    print "Could not find the tuner for this receiver";
    exit;
}
$result = exec("\"" . $SOAP_DIR . "reboot.pl\" " . $receiver);
if (preg_match("/Receiver is rebooting/", $result)) {
    print "Receiver is rebooting.  Please allow 10 minutes for the receiver to come back online.";
} else {
    print "There was an error rebooting the receiver.";
}
$r1 = new MulticastReceiver();
$r2 = new MulticastReceiver();
if (($r1 = findMulticastReceiver($receiver, $tuner)) == null) {
    exit;
}
if ($r1->getTuner() == 1) {
    $r2 = findMulticastReceiver($receiver, 0);
} else {
    $r2 = findMulticastReceiver($receiver, 1);
}
Ejemplo n.º 2
0
<BODY ID="body" onLoad="setOption()">
<TABLE WIDTH="550px" ALIGN="CENTER"><TR><TD WIDTH="5%" VALIGN="MIDDLE" ALIGN="CENTER"><IMG SRC="images/arrow-left.png" onClick="goLeft()"></TD>
<TD WIDTH="90%" ALIGN="CENTER"><SPAN ID="info" STYLE="font-size:16px"><B>Average signal strength</B><BR><BR><IMG SRC="graphimage.php?r=all&g=0&t=0"></SPAN></TD>
<TD WIDTH="5%" VALIGN="MIDDLE" ALIGN="CENTER"><IMG SRC="images/arrow-right.png" onClick="goRight()"></TD>
</TR></TABLE></CENTER><BR>

<?php 
$cur = getAllReceivers();
$receivers = array();
$tuners = array();
$callLetters = array();
$i = 0;
do {
    $ip = $cur->getIP();
    $tuner = $cur->getTuner();
    if (verifyIPAddress($ip) && verifyTuner($tuner)) {
        $receivers[$i] = $ip;
        $tuners[$i] = $tuner;
        $callLetters[$i] = $cur->getChannelName();
    }
    $cur = $cur->getNextMulticastReceiver();
    $i++;
} while ($cur != null);
print "<CENTER>View info for a receiver (ip:tuner) ";
print "<SELECT NAME=\"receivers\" ID=\"receivers\" onChange=\"changeGraph('this','r')\"><OPTION SELECTED VALUE=\"Average\">Average</OPTION>";
for ($i = 0; $i < count($receivers); $i++) {
    print "<OPTION VALUE=\"" . $receivers[$i] . ":" . $tuners[$i] . " (" . $callLetters[$i] . ")\">" . $receivers[$i] . ":" . $tuners[$i] . " (" . $callLetters[$i] . ")</OPTION>";
}
print "</SELECT><BR>\n";
print "View info for this timeframe: ";
print "<SELECT NAME=\"timeFrame\" ID=\"timeFrame\" onChange=\"changeGraphTime()\"><OPTION SELECTED VALUE=\"12 hours\">12 hours</OPTION><OPTION VALUE=\"24 hours\">24 hours</OPTION><OPTION VALUE=\"7 days\">7 days</OPTION><OPTION VALUE=\"Month\">Month</OPTION><OPTION VALUE=\"Year\">Year</OPTION>\n";
Ejemplo n.º 3
0
<?php

include_once "inc/config.inc.php";
include_once "inc/functions.inc.php";
$ip = $_GET["r"];
$tuner = $_GET["t"];
$type = $_GET["g"];
$file = $SOAP_DIR . $ip . "-" . $tuner . "-" . $type . ".png";
if (file_exists($file) && verifyIPAddress($ip) && verifyTuner($tuner) && $type >= 0 && $type <= 4) {
    header("Content-Type: image/png");
    readfile($file);
} else {
    if ($ip == "all" && $tuner <= 4 && $tuner >= 0) {
        header("Content-Type: image/png");
        readfile($SOAP_DIR . "total-" . $type . ".png");
    } else {
        exit;
    }
}