Example #1
0
function show_domains()
{
    ?>
        <table border="1">
            <tr>
                <th>Domain</th>
                <th>Edit</th>
                <th>Delete</th>
            </tr>
        <?php 
    foreach (Domain::get_all() as $domain) {
        ?>
                <tr>
                    <td><?php 
        echo $domain->domain;
        ?>
</td>
                    <td>
                        <form method="get" action="#">
                            <input type="hidden" name="id" value="<?php 
        echo $domain->id;
        ?>
">
                            <input type="hidden" name="action" value="edit">
                            <input type="submit" value="Edit">
                        </form>
                    </td>
                    <td>
                        <form method="post" action="#">
                            <input type="hidden" name="id" value="<?php 
        echo $domain->id;
        ?>
">
                            <input type="hidden" name="action" value="delete">
                            <input type="submit" value="Delete">
                        </form>
                    </td>
                </tr>
                <?php 
    }
    ?>
        </table>
        <?php 
}
Example #2
0
 function __construct($domain, $id, $name, $value, $ttl = 3600, $priority = 0)
 {
     Domain::$mysqli = new mysqli(Config_MySql::$host, Config_MySql::$user, Config_MySql::$pass, Config_MySql::$db);
     $this->id = $id;
     $this->domain = $domain;
     $this->name = $name;
     $this->value = $value;
     $this->ttl = $ttl;
     $this->priority = $priority;
 }