-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathteamsetup.php
More file actions
111 lines (101 loc) · 3.81 KB
/
teamsetup.php
File metadata and controls
111 lines (101 loc) · 3.81 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<?php
include 'checklogged.php';
include 'template-upper.php';
?>
<style>
/* a wrapper for the paginatior */
.btn-group-wrap {
text-align: center;
}
div.btn-group {
margin: 0 auto;
text-align: center;
width: inherit;
display: inline-block;
}
a {
float: left;
}
</style>
<div class="modal fade" tabindex="-1" role="dialog" id="addTeamModal">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title">Add Team</h4>
</div>
<div class="modal-body">
<form id="addTeamForm">
Team:<br>
<select id="teamSelect"><option value="Other">Other</option></select><input type="text" id="teamOther" placeholder="Other" style="display: none"><br>
Time:<br>
<input type="text" name="timeField" id="timeField"><br>
Competitor:<br>
<select id="competitorSelect"><option value="Other">Other</option></select> <input type="text" id="competitorOther" placeholder="Other" style="display: none"><br>
Location:<br>
<select id="locationSelect"><option value="Other">Other</option></select><input type="text" id="locationOther" placeholder="Other" style="display: none"><br>
Player Names:<br><textarea cols="50" id="playerNames"></textarea>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-primary" onclick="addTeam()">Add Team</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<br>
<div class="btn-group-wrap">
<div class="btn-group btn-group-lg" role="group" aria-label="...">
<button type="button" class="btn btn-primary active" id="nashButton" onclick="changeSchools('NASH')">NASH</button>
<button type="button" class="btn btn-default" id="naiButton" onclick="changeSchools('NAI')">NAI</button>
</div>
</div>
<br>
<br>
<div class="table-responsive">
<table border="1" style="border-collapse: collapse;width:75%;display: block;" id="teamData" class="table">
<thead>
<tr>
<td><b>Team</b></td>
<td><b>Time</b></td>
<td><b>Competitor</b></td>
<td><b>Location</b></td>
<td><b>Player Names</b></td>
<td><b>Edit</b></td>
<td><b>Delete</b></td>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<!-- Button trigger modal -->
<button type="button" class="btn btn-primary btn-lg" onclick="addTeamButtonPressed()">
Add Item
</button>
<hr>
<h3>Prefill</h3>
<form action="teamsetup" method="post">
<input type="file" name="dataFile" accept=".csv" id="csvFile">
<button type="button" onclick="writeUserData()">Enter</button>
</form>
<hr>
<button type="button" onclick="clearDatabase()">Clear Database</button>
<script src="https://www.gstatic.com/firebasejs/3.7.4/firebase.js"></script>
<script>
// Initialize Firebase
var config = {
apiKey: "AIzaSyAJqS8YxLjKQcXLeoWdH4rtHEyxdH7lrEU",
authDomain: "lunar-caster-87118.firebaseapp.com",
databaseURL: "https://lunar-caster-87118.firebaseio.com",
projectId: "lunar-caster-87118",
storageBucket: "lunar-caster-87118.appspot.com",
messagingSenderId: "472703596562"
};
firebase.initializeApp(config);
</script>
<script src="/js/teamSetup.js"></script>
<script src="js/jquery-1.11.2.min.js"></script>
<script src="js/bootstrap.min.js" data-no-instant></script>
<?php include 'template-lower.php';?>