-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsecondaryDataHandler.php
71 lines (62 loc) · 1.5 KB
/
secondaryDataHandler.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
<?php
include("secondaryMatchInput.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']);
$teleopPath = filter($_POST['teleopPath']);
$ID = $matchNum . "-" . $teamNum;
$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']);
secondaryMatchInput(
$user,
$ID,
$matchNum,
$teamNum,
$allianceColor,
$autoPath,
$crossLineA,
$teleopPath,
$climb,
$climbTwo,
$climbThree,
$climbCenter,
$climbSide,
$issues,
$defenseBot,
$defenseComments,
$matchComments,
$penalties,
$cycleNumber
);
}
?>
<script>
function getSecondaryMatchData() {
$.ajax({
type: "POST",
url: "beckythescout/secondaryDataHandler.php?matchData:",
data: JSON.stringify(nums),
success: success,
});
}
</script>