This repository was archived by the owner on Apr 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgroups.php
More file actions
73 lines (73 loc) · 4.1 KB
/
groups.php
File metadata and controls
73 lines (73 loc) · 4.1 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
<?php error_reporting(-1);
include_once $_SERVER['DOCUMENT_ROOT'] . "/modules/Config.php";
use User\User;
//Data checks
if (!isset($_GET['id']) or (isset($_GET['id']) and !preg_match(REGEX['group'], $_GET['id']))) {
//TODO searching
header("Location: " . "/");
die();
}
$result = $mysql->exec(QUERY_GROUP_SELECT, RETURN_FALSE_ON_EMPTY, array("name" => $_GET['id']));
if (!$result) {
header("Location: " . "/");
die();
}
$user = User::$user;
$editor = ($user instanceof User) ? ($user->have_access(16385) && $user->group_id == $result['id']) : false;
$date = new DateTime();
$req_time = time();
header("pragma","no-cache");
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
<meta http-equiv="Cache-Control" content="no-cache">
<meta name="description" content="Polytable - улучшенное расписание вашего вуза">
<meta name="keywords" content="Polytable, Политех, СПбПУ, ИКНТ, КСПТ, ФТК">
<meta name="theme-color" content="#105d3b">
<title>Группа <?=$result['name'];?> - PolyTable</title>
<link rel="icon" type="image/png" href="assets/favicon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="assets/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="assets/favicon-96x96.png" sizes="96x96">
<link rel="stylesheet" type="text/css" href="css/icon.css">
<link rel="stylesheet" type="text/css" href="css/style.css?time=<?=$req_time;?>"/>
<link rel="stylesheet" type="text/css" href="css/dropzone.css"/>
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700&subset=cyrillic" rel="stylesheet">
<!-- Yandex.Metrika counter --> <script type="text/javascript" > (function (d, w, c) { (w[c] = w[c] || []).push(function() { try { w.yaCounter48396962 = new Ya.Metrika({ id:48396962, clickmap:true, trackLinks:true, accurateTrackBounce:true, webvisor:true }); } catch(e) { } }); var n = d.getElementsByTagName("script")[0], s = d.createElement("script"), f = function () { n.parentNode.insertBefore(s, n); }; s.type = "text/javascript"; s.async = true; s.src = "https://mc.yandex.ru/metrika/watch.js"; if (w.opera == "[object Opera]") { d.addEventListener("DOMContentLoaded", f, false); } else { f(); } })(document, window, "yandex_metrika_callbacks"); </script> <noscript><div><img src="https://mc.yandex.ru/watch/48396962" style="position:absolute; left:-9999px;" alt="" /></div></noscript> <!-- /Yandex.Metrika counter -->
<script type="text/javascript" src="js/lib/jquery3.2.1.min.js"></script>
<script type="text/javascript" src="js/lib/handlebars-latest.js"></script>
<script type="text/javascript" src="js/lib/moment.js"></script>
<script type="text/javascript" src="js/lib/jquery.modal.window.js"></script>
<script type="text/javascript" src="js/lib/jquery.ajax.inputs.js?time=<?=$req_time;?>"></script>
<script type="text/javascript" src="js/lib/jquery.dropzone.js"></script>
<script type="text/javascript" src="js/modules/module.calendar.js?time=<?=$req_time;?>"></script>
<script type="text/javascript" src="js/loginform.js"></script>
<script type="text/javascript" src="js/calendar.js?time=<?=$req_time;?>"></script>
<script type="text/javascript">
calendar = new Calendar("<?=$result['name'];?>", $("#calendar"));
Calendar.editor = <?=($editor) ? "true" : "false";?>;
</script>
</head>
<body>
<table id="marking">
<tr id="header">
<td>
<?php include_once "templates/header.php"?>
</td>
</tr>
<tr id="notification">
<td></td>
</tr>
<tr id="content">
<td>
<div id="calendar-block"></div>
</td>
</tr>
<tr id="footer">
<td>
<?php include_once "templates/footer.php"; ?>
</td>
</tr>
</table>
</body>
</html>