-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathSetup_D3.php
More file actions
executable file
·79 lines (64 loc) · 1.91 KB
/
Setup_D3.php
File metadata and controls
executable file
·79 lines (64 loc) · 1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<?php
/*
11 3D (1 distance)
$TourId is the ID of the tournament!
$SubRule is the eventual subrule (see sets.php for the order)
$TourType is the Tour Type (11)
*/
require_once(dirname(__FILE__).'/lib.php');
require_once(dirname(dirname(__FILE__)).'/lib.php');
// default Divisions
CreateStandardDivisions($TourId, '3D');
// default SubClasses
CreateSubClass($TourId, 1, '00', '00');
// default Classes
CreateStandardClasses($TourId, $SubRule);
// default Distances
switch($TourType) {
case 11:
CreateDistanceNew($TourId, $TourType, '%', array(array('Course',0)));
break;
case 13:
CreateDistanceNew($TourId, $TourType, '%', array(array('Course 1',0), array('Course 2',0)));
break;
}
// default Events
CreateStandard3DEvents($TourId, $SubRule);
// insert class in events
InsertStandard3DEvents($TourId, $SubRule);
// Elimination rounds
InsertStandard3DEliminations($TourId, $SubRule);
// Finals & TeamFinals
CreateFinals($TourId);
// Default Target
switch($TourType) {
case 11:
CreateTargetFace($TourId, 1, '~Default', '%', '1', 8, 0);
break;
case 13:
CreateTargetFace($TourId, 1, '~Default', '%', '1', 8, 0, 8, 0);
break;
}
// create a first distance prototype
CreateDistanceInformation($TourId, $DistanceInfoArray, $tourDetNumEnds, 6);
// Update Tour details
$tourDetails=array(
'ToCollation' => $tourCollation,
'ToTypeName' => $tourDetTypeName,
'ToNumDist' => $tourDetNumDist,
'ToNumEnds' => $tourDetNumEnds,
'ToMaxDistScore' => $tourDetMaxDistScore,
'ToMaxFinIndScore' => $tourDetMaxFinIndScore,
'ToMaxFinTeamScore' => $tourDetMaxFinTeamScore,
'ToCategory' => $tourDetCategory,
'ToElabTeam' => $tourDetElabTeam,
'ToElimination' => $tourDetElimination,
'ToGolds' => $tourDetGolds,
'ToXNine' => $tourDetXNine,
'ToGoldsChars' => $tourDetGoldsChars,
'ToXNineChars' => $tourDetXNineChars,
'ToDouble' => $tourDetDouble,
// 'ToIocCode' => $tourDetIocCode,
);
UpdateTourDetails($TourId, $tourDetails);
?>