-
Notifications
You must be signed in to change notification settings - Fork 0
/
eventEditor.php
100 lines (79 loc) · 1.62 KB
/
eventEditor.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
92
93
94
95
96
97
98
99
100
<?php
include ('config.php');
include ('init.php');
include ('include.php');
$shootId = $_GET['shootId'];
?>
<!DOCTYPE html>
<html>
<head>
<title>Event Editor</title>
<?php
include 'header.php';
?>
<style type="text/css">
tr {
height:30px;
}
tr.erow td, tr.nrow td {
width:100px;
max-width:150px;
text-overflow: ellipsis;
white-space: nowrap;
overflow:hidden;
}
td.editing input {
width: inherit;
}
td.action, th.action {
width:120px;
}
th {
text-align: left;
}
.id, .shootId, .registrationCost, .hicCost, .hoaCost, .lewisCost, .lewisGroups, .stations, .targets{
width:50px !important;
}
.eventType {
width:80px !important;
}
</style>
</head>
<body>
<h1>Event Editor</h1>
<h2> Events in the
<?php
$query = 'SELECT shootName
FROM registeredshoot
WHERE id=1';
$result = dbquery($query);
$row = mysqli_fetch_assoc($result);
echo $row['shootName'];
?>
Registered Shoot</h2>
<div class="eventTable"></div>
</body>
<?php
include 'footer.php';
?>
<script type="text/javascript">
$(function() {
var eventsTable = new EditableTable({
db: '<?= $mysql_database_name ?>',
dbTable: 'shootevent',
columnHeaders: ['ID','Shoot ID','eventType','Reg$','HIC$','HOA$','Lewis$','Lewis Groups','Stations','Targets'],
uneditableColumns: ['id','shootId'],
element: $('.eventTable'),
displayFunction: {
id: function(id) {
return $('<a href="stationEditor.php?eventId='+id+'">'+id+'</a>');
}
}
});
eventsTable.loadTable(0,100,'shootId = <?= $shootId ?>');
$('#all').click(function(){
$('.erow').trigger('click');
});
});
</script>
</html>