-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
133 lines (132 loc) · 5.48 KB
/
index.php
File metadata and controls
133 lines (132 loc) · 5.48 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<?php
/**
* Pääsivu
*
* Näytetään Datatablesilla kaikki protot ja sessiot, joita kannasta löytyy.
* Jos on kirjautunut ja on oikeuksia protoon, pääsee protoa klikkaamalla katselemaan protoa ja sessiota klikkaamalla katselemaan sessiota.
*
* @package SLS-Prototracker
* @license http://opensource.org/licenses/GPL-2.0
* @author Mauri "mos" Sahlberg
*
* @uses globals.php
* @users users.php
* @uses common.php
*/
require_once("globals.php");
require_once("$basepath/helpers/common.php");
require_once("$basepath/helpers/users.php");
require_once("$basepath/cleanDefaults.php");
include_once("$basepath/html_base.html");
?>
<title><?php echo _("Prototracker");?></title>
<script type="text/javascript">
$(document).ready(function() {
// Protot-taulu
$('#protot').dataTable( {
"processing" : true,
"serverSide" : true,
"responsive" : true,
"orderMulti" : true,
"search" : {
"regex" : true,
"casInsensitive" : true,
"smart" : true},
"ajax" : "<?php echo "$baseurl/json_prototEtusivu.php";?>",
<?php include("$basepath/datatables_language.js");?>
}
);
$("#protot tbody").on('click','tr', function () {
var id;
id=$(this).children("td:nth-child(1)").html();
window.location="<?php echo $baseurl;?>/proto_main.php?protoid="+id;
});
// Sessiot-taulu
$('#sessiot').dataTable( {
"processing" : true,
"serverSide" : true,
"responsive" : true,
"orderMulti" : true,
"search" : {
"regex" : true,
"casInsensitive" : true,
"smart" : true},
"ajax" : "<?php echo "$baseurl/json_sessiot.php";?>",
<?php include("$basepath/datatables_language.js");?>
}
);
$("#sessiot tbody").on('click','tr',function() {
var id;
id=$(this).children("td:nth-child(1)").html();
window.location="<?php echo $baseurl;?>/lataaSessio.php?sessioid="+id;
});
});
</script>
</head>
<body>
<?php include_once("navbar.html");?>
<section class="container">
<div class="row">
<section class="col-xs-12 col-sm-6 col-md-6">
<h2><?php echo _("Protot");?></h2>
<table id="protot" class="display" cellspacing="0" width="100%">
<thead>
<tr>
<th><?php echo _("Id");?></th>
<th><?php echo _("Nimi");?></th>
<th><?php echo _("Suunnittelijat");?></th>
<th><?php echo _("Pisteet");?></th>
<th><?php echo _("Luotu");?></th>
</tr>
</thead>
<tfoot>
<tr>
<th><?php echo _("Id");?></th>
<th><?php echo _("Nimi");?></th>
<th><?php echo _("Suunnittelijat");?></th>
<th><?php echo _("Pisteet");?></th>
<th><?php echo _("Luotu");?></th>
</tr>
</tfoot>
</table>
</section>
<section class="col-xs-12 col-sm-6 col-md-6">
<h2><?php echo _("Sessiot");?></h2>
<table id="sessiot" class="display" cellspacing="0" width="100%">
<thead>
<tr>
<th><?php echo _("Id");?></th>
<th><?php echo _("Ajankohta");?></th>
<th><?php echo _("Proto");?></th>
<th><?php echo _("Vetäjä");?></th>
<th><?php echo _("Kesto");?></th>
<th><?php echo _("Pelaajia");?></th>
</tr>
</thead>
<tbody>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
<tfoot>
<tr>
<th><?php echo _("Id");?></th>
<th><?php echo _("Ajankohta");?></th>
<th><?php echo _("Proto");?></th>
<th><?php echo _("Vetäjä");?></th>
<th><?php echo _("Kesto");?></th>
<th><?php echo _("Pelaajia");?></th>
</tr>
</tfoot>
</table>
</section>
</div>
</section>
<?php include_once("$basepath/footer.html");?>
</body>
</html>