Board18Misc

From BOARD18 Project WIKI
Jump to: navigation, search
This page has been updated to comply with Release 2.1.x of BOARD18. Go Back

The following functions are used by board18Misc.php

Function emailPlayerResult(response)

Function emailPlayerResult is the call back function for the ajax calls to emailPlayerAdd.php and emailPlayerRem.php.

Output from either program is an echo return status:

 "success" - Email sent.
 "fail"    - Uexpected error - No email sent.

Function changePlayerResult(response)

Function changePlayerResult is the call back function for the ajax changePlayers.php call.

Output from changePlayers.php is an echo return status:

 "success" - All changes have been made.
 "fail"    - Uexpected error - No changes have been made.
 "dupadd"  - Add ID is duplicate - No changes have been made.

Function changePlayer(login, game)

Function changePlayer is called by the on- click method of the players submit button.
It sets BD18.mode based on missing fields and does an ajax call to changePlayers.php.

Function linkReturn(response)

Function linkReturn is the call back function for the ajax linkGet.php call. It creates and displays the game_link update division for the current game session. The response is the following stringified JSON data structure.

 {
   "stat":"success||none||fail",
   "links":
   [
     {
       "link_name":"aaaaaa",
       "link_url":"bbbbbbb",
       "act_date":"mm/dd/yyyy"
     },
     . . . . more links . . . . . 
   ]
 }

Function delReturn(response)

The delReturn function is the call back function for the ajax linkDel.php call. It processes the response. On success, it calls the linkGet function. The response is the echo return status:

 "success", "fail" or "missing".

Function deleteLink(gameid,linkname)

The deleteLink function is called by the on-click method of the "Yes" button on the delpop form. It performs an AJAX call to the linkDel.php function.

Function deleteCheck(linkname)

The deleteCheck function is called by the on-click method of the Link Name. It queries to make sure that the delete request is real.

Function addReturn(response)

The addReturn function is the call back function for the ajax linkAdd.php call. It processes the response. On success, it calls the linkGet function. The response is the echo return status:

 "success", "fail" or "duplicate".

Function addLink()

The addLink function is called by the on-click method of the Add button in the link form. It checks the input parameters for validity and then performs an AJAX call to the linkAdd.php function.