Exemple #1
0
function category_display_edit()
{
    if (login_check_logged_in_mini() < 1) {
        message_print_error(_("You need to be logged in to edit categories."));
        return false;
    }
    if (isset($_REQUEST['id'])) {
        echo "<h1>" . _("Editing category") . "</h2>";
        category_display_form();
    }
}
Exemple #2
0
function message_try_mysql($sql, $error_code, $success_message = NULL, $print_now = FALSE, $generate_warning_on_fail = FALSE)
{
    if (mysql_query($sql)) {
        if ($success_message != NULL) {
            if ($print_now) {
                message_print_message($success_message);
            } else {
                add_message($success_message);
            }
        }
        return TRUE;
    } else {
        if ($print_now) {
            message_print_error(sprintf(_("Error code %s<br />SQL: %s<br />ERROR: %s"), $error_code, $sql, mysql_error()));
        } else {
            add_error_mysql($error_code, $sql, mysql_error());
        }
        if ($generate_warning_on_fail) {
            message_trigger_warning($error_code, $sql, mysql_error());
        }
        // trigger_error (sprintf(_("Error code %s	SQL: %s	ERROR: %s"),$error_code, $sql, mysql_error()));
        return FALSE;
    }
}
Exemple #3
0
function task_display_edit_single()
{
    if (login_check_logged_in_mini() < 1) {
        message_print_error(_("You need to be logged in to edit tasks."));
        return false;
    }
    if (isset($_REQUEST['id'])) {
        echo "<h1>" . _("Editing task") . "</h2>";
        task_display_form();
    }
}