Пример #1
0
?>
" />
        <h2  style="display: inline">Active?</h2>
        <input type="checkbox" class="form-control" name="active" <?php 
if ($form->active == 1) {
    echo 'checked';
}
?>
 /><br />
        <?php 
$fTool = new FormTools();
//
// If we are viewing an existing form, show the form's questions (if any).
//
if ($form->id != "") {
    $fTool->showFormQuestions($form->id, "question.php");
}
//
// If this is a new form (that isn't in the db yet), just show the Add button.
// Otherwise, show Modify, Delete and New buttons.
//
if ($mode == "insert") {
    echo '<button type="submit" class="btn btn-lg btn-primary btn-block" value="add" name="add-submit" />Add</button>';
} else {
    echo '<button type="submit" class="btn btn-lg btn-primary btn-block" value="modify" name="modify-submit" />Modify</button>';
    echo '<button data-toggle="modal" href="#myModal" class="btn btn-lg btn-primary btn-block" value="delete">Delete</button>';
    echo '<button type="submit" class="btn btn-lg btn-primary btn-block" value="new" name="new-submit" />New</button>';
}
//
// Code for a modal dialog shown on delete requests.
//