The DRAFT1846Cfrm Page

From BOARD18 Project WIKI
Jump to navigation Jump to search
DRAFT1846 Design edit


The draft1846Start page sends an email to each player as part of the email address confirmation process. Each such email contains a URL link to the draft1846Cfrm page.
The draft1846Cfrm page uses these emails to mark each player as having a confirmed email address via an ajax call to updateCfrm.php.

function updateCfrmResult(result)

The updateCfrmResult function is the call back function for the ajax call to updateCfrm.php. It sets up the rest of the draft1846Cfrm page and checks the status of the draft.

Output from updateCfrm.php is a json encoded array. The "return" value in this array will be either "success" or "fail". If it is "fail" then it will be the only item in the array. If the "return" value is "success", then the rest of the array will be the json string from the updated table row.

If this player was the last to confirm, then the returned json string will have a "status" of "Confirmed" but the json string in the database will have a "status" of "Active". In this case the the updateCfrmResult function will use emailNext.php to send the first player a nextEmail. See draft1846Next below for more information about this nextEmail.

function nextEmailResult(response)

Function nextEmailsResult is the call back function for the ajax call to emailNext.php. It only needs to check for errors.

Output from emailNext.php is an echo return status:

  • "success" - Email sent.
  • "fail" - Uexpected error - This email not sent.