header("HTTP/1.0 500 Internal Server Error"); echo 'Caught exception: ', $e->getMessage(), "\n"; } catch (ATCExceptionDBConn $e) { header("HTTP/1.0 500 Internal Server Error"); echo 'Caught exception: ', $e->getMessage(), "\n"; } catch (ATCException $e) { header("HTTP/1.0 400 Bad Request"); echo 'Caught exception: ', $e->getMessage(), "\n"; } catch (Exception $e) { header("HTTP/1.0 500 Internal Server Error"); echo 'Caught exception: ', $e->getMessage(), "\n"; } exit; } $promotions = $ATC->get_promotion_history($_GET['id']); $ranks = $ATC->get_ranks(); ?> <table> <thead> <tr> <th> Rank </th> <th> Date </th> <?php echo $ATC->user_has_permission(ATC_PERMISSION_PERSONNEL_EDIT) ? '<td><a href="personal.php?id=' . $_GET['id'] . '&action=promotion" class="button new">New</a></td>' : ''; ?> </tr> </thead> <tbody> <?php foreach ($promotions as $promotion) { echo '<tr>';