<?php
    session_start();
?>
<div id="accountPanel">
    <h2>Account</h2>

    <table class="accountSection">
        <tr>
            <td>
            <h3>Username:</h3>
            </td><td class="midTD">
            
            </td><td>
            <?php
                echo $_SESSION['username'];
            ?>
            </td>
        </tr>
        <tr>
            <td>
            <h3>Email:</h3>
            </td><td class="midTD">
            
            </td><td>
            <?php
                echo $_SESSION['email'];
            ?>
            </td>
        </tr>
        <tr>
            <td>
            <h3>Rights:</h3>
            </td><td class="midTD">
            
            </td><td>
            <?php
                if($_SESSION['privilege_id'] == 1) {
                    echo "You are an admin.";
                }
                elseif ($_SESSION['privilege_id'] == 2) {
                    echo "You are a moderator.";
                }
                else
                {
                    echo "You are a standard user.";
                }
            ?>
            </td>
        </tr>
    </table>
</div>
