-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdataHandler.php
91 lines (80 loc) · 2.05 KB
/
dataHandler.php
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
80
81
82
83
84
85
86
87
88
89
90
91
<?php
include("matchInput.php");
function filter($str)
{
return filter_var($str, FILTER_SANITIZE_STRING);
}
?>
<?php
if (isset($_POST['matchNum'])) {
include("databaseLibrary.php");
$user = filter($_POST['userName']);
$matchNum = filter($_POST['matchNum']);
$teamNum = filter($_POST['teamNum']);
$allianceColor = filter($_POST['allianceColor']);
$autoPath = filter($_POST['autoPath']);
$crossLineA = filter($_POST['crossLineA']);
$ID = $matchNum . "-" . $teamNum;
$upperGoal = filter($_POST['upperGoal']);
$upperGoalMiss = filter($_POST['upperGoalMiss']);
$lowerGoal = filter($_POST['lowerGoal']);
$lowerGoalMiss = filter($_POST['lowerGoalMiss']);
$upperGoalT = filter($_POST['upperGoalT']);
$upperGoalMissT = filter($_POST['upperGoalMissT']);
$lowerGoalT = filter($_POST['lowerGoalT']);
$lowerGoalMissT = filter($_POST['lowerGoalMissT']);
$controlPanelPosT = filter($_POST['controlPanelPosT']);
$controlPanelNumT = filter($_POST['controlPanelNumT']);
$climb = filter($_POST['climb']);
$climbTwo = filter($_POST['climbTwo']);
$climbThree = filter($_POST['climbThree']);
$climbCenter = filter($_POST['climbCenter']);
$climbSide = filter($_POST['climbSide']);
$issues = filter($_POST['issues']);
$defenseBot = filter($_POST['defenseBot']);
$defenseComments = filter($_POST['defenseComments']);
$matchComments = filter($_POST['matchComments']);
$penalties = filter($_POST['penalties']);
$cycleNumber = filter($_POST['cycleNumber']);
matchInput(
$user,
$ID,
$matchNum,
$teamNum,
$allianceColor,
$autoPath,
$crossLineA,
$upperGoal,
$upperGoalMiss,
$lowerGoal,
$lowerGoalMiss,
$upperGoalT,
$upperGoalMissT,
$lowerGoalT,
$lowerGoalMissT,
$controlPanelPosT,
$controlPanelNumT,
$climb,
$climbTwo,
$climbThree,
$climbCenter,
$climbSide,
$issues,
$defenseBot,
$defenseComments,
$matchComments,
$penalties,
$cycleNumber
);
}
?>
<script>
function getMatchData() {
$.ajax({
type: "POST",
url: "beckythescout/dataHandler.php?matchData:",
data: JSON.stringify(nums),
success: success,
});
}
</script>