public static function orderCancelledDetail() { $rules = ["id" => ['filter' => FILTER_VALIDATE_INT, 'options' => ['min_range' => 1]]]; $data = filter_input_array(INPUT_POST, $rules); if ($data == null) { $data["id"] = $_SESSION["pid"]; } if (self::checkValues($data)) { $order = OrdersDB::get($data); echo ViewHelper::render("view/customer-order-detail-cancelled.php", ["order" => $order, "products" => OrdersDB::getOrderProducts(["narocilo_id" => $data["id"]]), "user" => UsersDB::get(["id" => $order["uporabnik_id"]])]); } else { ViewHelper::redirect(BASE_URL); } }