Пример #1
0
function picknetidform($srvid)
{
    global $myc;
    print "<h1>Pick network on EPG server " . $srvid . "</h1>\n";
    print "<form name=network action=\"listtses.php\" method=post>\n";
    print "  <input type=\"hidden\" name=\"srvid\" value=\"" . $srvid . "\">\n";
    $netdb = sql_loadNetworks($myc, 'epgserver', $srvid);
    print "  <table>\n";
    print "    <tr>\n";
    print "      <td class=\"tableBody\">\n";
    print "        <div align=\"right\">Name</div>\n";
    print "      </td>\n";
    print "      <td class=\"tableBody\">\n";
    print "        <select name=\"netid\">\n";
    reset($netdb);
    while (list($nk, $nv) = each($netdb)) {
        print "          <option value=\"" . $nv['id'] . "\">" . $nv['name'] . "</option>\n";
    }
    print "        </select>\n";
    print "      </td>\n";
    print "    </tr>\n";
    print "  </table>\n";
    print "  <input name=\"Action\" value=\"Continue\" type=\"submit\" class=\"gumb\">\n";
    print "</form>\n";
}
Пример #2
0
if ($debug) {
    dbg("POST", $_POST);
}
if (isset($_POST['srvid'])) {
    $srvid = $_POST['srvid'];
}
if (!$srvid) {
    picksrvidform();
    sql_dodisconnect($myc);
    exit;
}
print "<h1>" . $lngstr['title'] . " " . $srvid . "</h1>\n";
print "<form name=\"new\">\n";
print "  <input type=\"button\" value=\"Add new network\" class=\"gumb\" onClick=\"javascript:window.location.href='editnetwork.php?action=new&srvid=" . $srvid . "'\">\n";
print "</form>\n";
$ndb = sql_loadNetworks($myc, 'epgserver', $srvid);
if ($debug) {
    dbg("networks", $ndb);
}
if ($ndb) {
    print "<table width=\"80%\" border=\"0\" cellpadding=\"4\" cellspacing=\"0\">\n";
    print "<tr class=\"tableTitle\">\n";
    print "  <td>" . $lngstr['name'] . "</td>\n";
    print "  <td>" . $lngstr['active'] . "</td>\n";
    print "  <td>" . $lngstr['description'] . "</td>\n";
    print "</tr>\n";
    $rowstyle = 0;
    reset($ndb);
    while (list($sk, $sv) = each($ndb)) {
        print "<tr class=\"tableBody\">\n";
        print "  <td><a href=\"editnetwork.php?id=" . $sv['id'] . "\">" . $sv['name'] . "</a></td>\n";
Пример #3
0
    dbg("epgservers", $edb);
}
if ($edb) {
    print "<table width=\"80%\" border=\"0\" cellpadding=\"4\" cellspacing=\"0\">\n";
    print "<tr class=\"tableTitle\">\n";
    print "  <td>" . $lngstr['name'] . "</td>\n";
    print "  <td>" . $lngstr['description'] . "</td>\n";
    print "</tr>\n";
    $rowstyle = 0;
    reset($edb);
    while (list($ek, $ev) = each($edb)) {
        print "<tr class=\"tableEPGServer\">\n";
        print "  <td>" . $ev['name'] . "</td>\n";
        print "  <td>" . $ev['description'] . "</td>\n";
        print "</tr>\n";
        $ndb = sql_loadNetworks($myc, 'epgserver', $ev['id']);
        reset($ndb);
        while (list($nk, $nv) = each($ndb)) {
            print "<tr class=\"tableNetwork\">\n";
            print "  <td>&nbsp;&nbsp;" . $nv['nid'] . " - " . $nv['name'] . "</td>\n";
            print "  <td>" . $nv['description'] . "</td>\n";
            print "</tr>\n";
            $tdb = sql_loadTSs($myc, 'network', $nv['id']);
            if (!$tdb) {
                continue;
            }
            reset($tdb);
            while (list($tk, $tv) = each($tdb)) {
                print "<tr class=\"tableTS\">\n";
                print "  <td>&nbsp;&nbsp;&nbsp;&nbsp;" . $tv['tsid'] . "</td>\n";
                print "  <td>" . $tv['description'] . "</td>\n";