Пример #1
0
     break;
 case "newmatch":
     _makenewmatch($event_id);
     break;
 case "purgematch":
     if (strlen($match_key) > 5) {
         _deleteMatchCascading($match_key, $event_id);
     }
     break;
 case "initmatch":
     $newmatchkey = _initialiseMatch($event_id, $r_num, $h_team, $a_team, $v_date, $m_loc);
     # check if exist - else create
     _showmatch($newmatchkey, $event_id);
     break;
 case "editgame":
     _savegame($match_key, $vgid, $event_id, $vpid, $vgpid);
     #// saves the game-player assignments
     _showgame($match_key, $vgid, $event_id);
     #// show game edit dialogue
     break;
 case "addleg":
     # // add 1 leg to specified player, than jump back to edit page
     _addleg($match_key, $vgid, $vpid);
     _showgame($match_key, $vgid, $event_id);
     break;
 case "removeleg":
     # // remove 1 leg and show match again
     _removeleg($match_key, $vgid, $vpid, $vlid);
     _showgame($match_key, $vgid, $event_id);
     break;
 case "savelegs":
Пример #2
0
            $p += _LS_InsUpdateLegRecord($eventID, $aLegValues);
        }
    }
    dsolog(1, $usertoken['uname'], 'Saved Legs: Match ' . $match_key . ' Data:' . $str_LData);
    return $p;
}
header('Content-Type: application/html; charset=ISO-8859-1');
switch ($myAction) {
    default:
        _blankGame();
        break;
    case 'get':
        echo _getGameTable($GameID, $eventID);
        break;
    case 'save':
        if (_savegame($match_key, $eventID, $aRes) > 0) {
            echo _getGameTable($GameID, $eventID);
        } else {
            die_red('E152:GameResultSave');
        }
        break;
    case 'addleg':
        if (_addLeg($GameID, $playerID, $match_key, $eventID) == 1) {
            echo _getGameDetailTable($GameID, $eventID, $match_key);
        } else {
            die_red('E157:LegAdd');
        }
        break;
    case 'delleg':
        if (_removeLeg($legID, $GameID, $match_key, $eventID) == 1) {
            echo _getGameDetailTable($GameID, $eventID, $match_key);