-
Notifications
You must be signed in to change notification settings - Fork 1
/
primaryDataHandler.php
66 lines (54 loc) · 1.52 KB
/
primaryDataHandler.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
<?php
include("primaryMatchInput.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']);
$ID = $matchNum . "-" . $teamNum;
$upperGoal = filter($_POST['upperGoal']);
$upperGoalMiss = filter($_POST['upperGoalMiss']);
$lowerGoal = filter($_POST['lowerGoal']);
$upperGoalT = filter($_POST['upperGoalT']);
$upperGoalMissT = filter($_POST['upperGoalMissT']);
$lowerGoalT = filter($_POST['lowerGoalT']);
$controlPanelPosT = filter($_POST['controlPanelPosT']);
$controlPanelNumT = filter($_POST['controlPanelNumT']);
$matchComments = filter($_POST['matchComments']);
$cycleNumber = filter($_POST['cycleNumber']);
primaryMatchInput(
$user,
$ID,
$matchNum,
$teamNum,
$allianceColor,
$upperGoal,
$upperGoalMiss,
$lowerGoal,
$upperGoalT,
$upperGoalMissT,
$lowerGoalT,
$controlPanelPosT,
$controlPanelNumT,
$matchComments,
$cycleNumber
);
}
?>
<script>
function getPrimaryMatchData() {
$.ajax({
type: "POST",
url: "beckythescout/primaryDataHandler.php?matchData:",
data: JSON.stringify(nums),
success: success,
});
}
</script>