Esempio n. 1
0
        print "\t\t<button class='btn btn-default btn-xs editRecord' data-action='delete' data-id='{$r->id}' data-domain_id='{$r->domain_id}'><i class='fa fa-remove'></i></button>";
        print "\t</div>";
        print "\t</td>";
        // content
        print "\t<td>{$r->name}</td>";
        print "\t<td><span class='badge badge1'>{$r->type}</span></td>";
        print "\t<td>{$r->content}</td>";
        print "\t<td>{$r->ttl}</td>";
        print "\t<td>{$r->prio}</td>";
        print "\t<td>{$r->change_date}</td>";
        print "</tr>";
    }
    // host records
    print "<tr>";
    print "\t<th colspan='7' style='padding-top:20px;'>" . _("Domain records") . "</th>";
    print "</tr>";
    // defaults
    if (sizeof($out) > 0) {
        foreach ($out as $k => $r) {
            print "<tr><th colspan='7' style='padding-top:40px;'>" . 'DNS records resolving to IP address' . " " . $r[0]->content . "</th></tr>";
            // records
            foreach ($r as $re) {
                print_record($re);
            }
        }
    }
    ?>

</table>
<?php 
}
Esempio n. 2
0
        }
        // default records
        if (isset($records_default)) {
            print "<tr>";
            print "\t<th colspan='7'  style='padding-top:20px;'>" . _("SOA, NS records") . "</th>";
            print "</tr>";
            // defaults
            foreach ($records_default as $r) {
                print_record($r);
            }
        }
        // host records
        print "<tr>";
        print "\t<th colspan='7' style='padding-top:20px;'>" . _("Domain records") . "</th>";
        print "</tr>";
        // defaults
        if (sizeof($records) > 0) {
            foreach ($records as $r) {
                print_record($r);
            }
        } else {
            print "<tr>";
            print "\t<td colspan='7'><div class='alert alert-info'>" . _("No records") . "</div></td>";
            print "</tr>";
        }
        ?>

</table>
<?php 
    }
}
Esempio n. 3
0
function print_records($sql, $name)
{
    $resu = mysql_query($sql);
    if (mysql_error() != "") {
        echo mysql_error();
    }
    if (mysql_num_rows($resu) != 0) {
        while ($r = mysql_fetch_array($resu)) {
            print_record($r, $name);
        }
    }
}