DRAFT1846 Server Side Programs

From BOARD18 Project WIKI
Jump to navigation Jump to search

This page documents the PHP AJAX called programs used by DRAFT1846.

emailConfirmation.php

This is the server side code for the AJAX emailConfirmation call.
It creates a confirmation email for a specific player. It then calls sendEmail.php and exits.
This leaves it to sendEmail to return the final 'success' status.

emailDone.php

This is the server side code for the AJAX emailDone call.
It creates a draft done email for a specific player. It then calls sendEmail.php and exits.
This leaves it to sendEmail to return the final 'success' status.

emailLast.php

This is the server side code for the AJAX emailLast call.
It creates a last player email for a specific player. It then calls sendEmail.php and exits.
This leaves it to sendEmail to return the final 'success' status.

emailNext.php

This is the server side code for the AJAX emailNext call.
It creates a next player email for a specific player. It then calls sendEmail.php and exits.
This leaves it to sendEmail to return the final 'success' status.

getDraft.php

This is the server side code for the AJAX getDraft call.
It returns the specified table row from the draft_table in the draft1846 database.

makeDraft.php

This is the server side code for the AJAX makeDraft call.
It creates a new table row for the draft_table in the draft1846 database.

sendEmail.php

The sendEmail() function uses SMTP to send emails.
It uses configMail.php to specify the server and server access information.
It uses the MAIL_SENDER field for the specification of reply direction.
You should use the SMTP server provided by your ISP or your hosting service for these Emails.

updtCfrm.php

This is the server side code for the AJAX updtCfrm call.
It updates the "confirmed" flag for a player, checks the confirmation status for the draft and then returns the json draft text in the table row for the draft being processed.

updtDraft.php

This is the server side code for the AJAX updtDraft call.
It updates the specified table row in the draft_table in the draft1846 database.
Before doing so, it tests and then increments the updtCount value in the "draft" json string.
It also increments the curPlayer value.

updtDraftNpi.php

This is the server side code for the AJAX updtDraft call.
It updates the specified table row in the draft_table in the draft1846 database.
Before doing so, it tests and then increments the updtCount value in the "draft" json string.
But, unlike updtDraft, it does not increment the curPlayer value.