Пример #1
0
    }
    // make sure we don't choose a chart code number that is already in use
    if (!$obj_chart->verify_code_chart()) {
        log_write("error", "process", "This account code has already been used by another account - please enter a unique code.");
        $_SESSION["error"]["name_chart-error"] = 1;
    }
    // return to the input page in the event of an error
    if ($_SESSION["error"]["message"]) {
        if ($obj_chart->id) {
            $_SESSION["error"]["form"]["chart_view"] = "failed";
            header("Location: ../../index.php?page=accounts/charts/view.php&id=" . $obj_chart->id);
            exit(0);
        } else {
            $_SESSION["error"]["form"]["chart_add"] = "failed";
            header("Location: ../../index.php?page=accounts/charts/add.php");
            exit(0);
        }
    }
    /*
    	Process Data
    */
    $obj_chart->action_update();
    // display updated details
    header("Location: ../../index.php?page=accounts/charts/view.php&id=" . $obj_chart->id);
    exit(0);
} else {
    // user does not have perms to view this page/isn't logged on
    error_render_noperms();
    header("Location: ../index.php?page=message.php");
    exit(0);
}