<a name="confirmation-payment"></a>
	<h2>Confirmation and Payment</h2>

	<?php 
    if (isset($_POST['form'])) {
        ?>
		<div class="alert alert-danger">
			There was a problem processing your credit card. Please try again.
		</div>
	<?php 
    }
    ?>

	<?php 
    if ($entry->getId() !== NULL && $entry->getCreatedAt() == $timestamp) {
        ?>

		<?php 
        if ($entry->getPaidAt() !== NULL && $entry->getAmountDue() == 0) {
            ?>
			<div class="alert alert-success">
				Thank you for your payment!
			</div>
		<?php 
        }
        ?>

		<table class="table">
			<tr>
				<th>Order Date:</th>
    }
}
?>

<div class="wrap">

	<?php 
if ($action == 'view') {
    ?>

		<?php 
    $entry = new \OutSpokane\MurderMysteryEntry(isset($_GET['id']) ? $_GET['id'] : 0);
    ?>

		<?php 
    if ($entry->getCreatedAt() === NULL) {
        ?>

			<div class="alert alert-danger">
				Entry Not Found
			</div>

		<?php 
    } else {
        ?>

			<h1>
				View Murder Mystery Entry
				<a href="?page=<?php 
        echo $_REQUEST['page'];
        ?>