<?php $errors = session::errors(); ?> <?php echo utility::form_errors($errors); ?> <h2>Create Subject</h2> <form action="create_subject.php" method="post"> <p>Menu name: <input type="text" name="menu_name" value="" /></p> <p>Position: <select name="position"> <?php echo subject::find_subject_position(true); //param true means edit subject ?> </select> </p> <p>Visible: <input type="radio" name="visible" value="0" /> No <input type="radio" name="visible" value="1" /> Yes </p> <input type="submit" name="submit" value="Create Subject" /> </form> <br /> <a href="manage_content.php">Cancel</a>
<p> <form action="edit_subject.php?subject=<?php echo urlencode($current_subject["id"]); ?> " method="post"> <p>Menu name: <input type="text" name="menu_name" value="<?php echo htmlentities($current_subject["menu_name"]); ?> " /> </p> <p>Position: <select name="position"> <?php echo subject::find_subject_position(false); // param false means edit subject ?> </select> </p> <p>Visible: <input type="radio" name="visible" value="0" <?php if ($current_subject["visible"] == 0) { echo "checked"; } ?> /> No <input type="radio" name="visible" value="1" <?php if ($current_subject["visible"] == 1) {