Exemplo n.º 1
0
<?php

$res = mysql_query("SELECT ...", sqlcon());
?>
  
Exemplo n.º 2
0
function adminOther()
{
    global $con;
    global $db_prefix;
    sqlcon();
    ?>
        <h2>Links</h2>
        <?php 
    $types = array('links');
    for ($j = 0; $j < count($types); $j++) {
        $type = $types[$j];
        echo "<ul id=\"oth{$type}" . "list\">";
        $result = mysql_query("SELECT * FROM " . $db_prefix . "other WHERE type='{$type}'", $con);
        while ($row = mysql_fetch_array($result)) {
            echo "<li id=\"oth" . $row['id'] . "\">";
            formatOther($row);
            echo "</li>\n";
        }
        echo "</ul>";
        echo "<div id=\"oth{$type}\"><button type=\"button\" onClick=\"editOth('{$type}')\">Add New Item</button></div>";
        echo "<br/>";
    }
}