Esempio n. 1
0
function get_navigation1($table1, $table2)
{
    $output = "<ul class=\"menu\">";
    $result = get_content_menu();
    while ($row = mysql_fetch_array($result)) {
        $output .= "<li> <a ";
        if ($row['id'] == $table1['id']) {
            $output .= "class=\"selected\"";
        }
        $output .= "href=\"edit_info.php?info=" . urlencode($row['id']) . "\"> {$row['menu']}</a></li>";
        $result2 = get_content_submenu($row[2]);
        while ($row2 = mysql_fetch_array($result2)) {
            $output .= "<ul class=\"submenu\">";
            $output .= "<li><a ";
            if ($row2['id'] == $table2['id']) {
                $output .= "class=\"selected\"";
            }
            $output .= " href=\"content.php?page=" . urlencode($row2['id']) . "\">{$row2['menu']}</a></li>";
            $output .= "</ul>";
        }
    }
    $output .= "</ul>";
    return $output;
}
Esempio n. 2
0
                </td>

                <td id="main">
                    <div id="form-content">
                        <form action="create_info.php" method="post" id="form">
                            <h2>Add Info</h2>
                            <p>
                                Info Title :
                                <input type="text" name="info" maxlength="30" required><br>
                            </p>

                            <p>
                                Position:<select name="position" required>
                                    <?php 
$info_set = get_content_menu();
$count = mysql_num_rows($info_set);
for ($i = $count + 1; $i <= $count + 3; $i++) {
    echo " <option value=\"{$i}\">{$i}</option>";
}
?>
                                    </select>
                            </p>

                            <P>
                                Visible:

                                <input type="radio" name="visible" value="0" required>No
                                <input type="radio" name="visible" value="1" required>Yes
                            </P>