コード例 #1
0
" />
         <input type="hidden" name="time" id="acceptTime" value="" />
      </form>
      <form action="includes/scripts/php/rejectChallenge.php" id="rejectForm" method="POST">
         <input type="hidden" name="challenger" id="rejectChallenger" value="" />
         <input type="hidden" name="challengee" id="rejectChallengee" value="<?php 
    echo $username;
    ?>
" />
         <input type="hidden" name="time" id="rejectTime" value="" />
      </form>
   
   <?php 
    # If there are active, unaccepted challenges for the user, show the information
    # for each challenge.
    if (hasChallenges($username, $connection)) {
        ?>
      <table>
         <thead>
            <tr>
               <td class="noStyleCell"></td>
               <td>Challenger</td>
               <td>Date Issued</td>
               <td>Date Scheduled</td>
            </tr>
         </thead>
         <tbody>
         <?php 
        # Get the information for each challenge.
        $challenges = getReceivedChallenges($username, $connection);
        # Display the information for each challenge.
コード例 #2
0
} else {
    $page = "home.php";
    $pageTitle = "- Home";
}
# If the user is logged into a valid account, get information needed to
# display the page.
if ($validUser) {
    # Get the account's username from the active session.
    session_start();
    $username = $_SESSION['user'][0];
    session_write_close();
    # Get the name associated with the user's account.
    $name = getName($username, $connection);
    # Determine if there are any active, unaccepted challenges for the
    # account.
    $hasChallenges = hasChallenges($username, $connection);
}
?>

<!DOCTYPE html>
<html>
<head>
   <title>Wrath of Titans <?php 
echo $pageTitle;
?>
</title>
   
   <!-- CSS Inclusion -->
      <link href="includes/styles/reset.css" rel="stylesheet" type="text/css" />
      <link href="includes/styles/main.css" rel="stylesheet" type="text/css" />
   <!-- /End CSS Inclusion -->