<?php require_once('../../../private/initialize.php'); ?>

<?php require_login(); ?>

<?php

// If no parameter, set to 1
$id = $_GET['id'] ?? '1';

// Get page
$admin = find_admin_by_id($id);

?>

<?php $pageTitle = "Show Admin"; ?>

<?php require(SHARED_PATH . "/staff-header.php"); ?>
      
<div id="content">
    
    <a class="back-link" href="<?php echo url_for('/staff/admins/index.php'); ?>">&laquo; Back to List</a>
    
    <div class="admin show">
        <h1>Admin: <?php echo h($admin['username']); ?></h1>
        
        <div class="attributes">
            <dl>
                <dt>First Name</dt>
                <dd><?php echo h($admin['first_name']); ?></dd>
            </dl>
            <dl>
                <dt>Last Name</dt>
                <dd><?php echo h($admin['last_name']); ?></dd>
            </dl>
            <dl>
                <dt>Email</dt>
                <dd><?php echo h($admin['email']); ?></dd>
            </dl>
            <dl>
                <dt>Username</dt>
                <dd><?php echo h($admin['username']); ?></dd>
            </dl>
        </div>
    </div>
</div>
      
<?php require(SHARED_PATH . "/staff-footer.php"); ?>
