Пример #1
0
function options_screen3()
{
    if ($_GET["upgrade"] == "check") {
        return check_for_updates();
    } else {
        if ($_GET["upgrade"] == "doupgrade") {
            return do_updates();
        }
    }
    return;
}
Пример #2
0
            $v = ' CHECKED ';
        }
        echo "  <TD align='center'>\n            <input name='beta' type='checkbox' {$v}></TD>\n        ";
        $v = '';
        if ($app->fraction_done_exact) {
            $v = ' CHECKED ';
        }
        echo "  <TD align='center'>\n            <input name='fraction_done_exact' type='checkbox' {$v}></TD>\n        ";
        echo "<td><input class=\"btn btn-default\" type=submit name=submit value=Update>";
        echo "</tr></form>";
    }
    end_table();
    // Entry form to create a new application
    //
    echo "<P>\n        <h2>Add an application</h2>\n        To add an application enter the short name and description\n        ('user friendly name') below.  You can then edit the\n        application when it appears in the table above.\n        <p>\n        <form action=manage_apps.php method=POST>\n    ";
    start_table("align='center' ");
    table_header("Name", "Description", "&nbsp;");
    echo "<TR>\n            <TD> <input type='text' size='12' name='add_name' value=''></TD>\n            <TD> <input type='text' size='35' name='add_user_friendly_name' value=''></TD>\n            <TD align='center' >\n                 <input type='submit' name='add_app' value='Add Application'></TD>\n            </TR>\n";
    end_table();
    echo "</form><p>\n";
}
admin_page_head("Manage applications");
if (post_str('add_app', true)) {
    add_app();
} else {
    if (post_str('submit', true)) {
        do_updates();
    }
}
show_form(false);
admin_page_tail();