-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunction.php
executable file
·68 lines (65 loc) · 1.96 KB
/
function.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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale1">
<title>機能一覧 - カレンダー</title>
</head>
<body>
<?php
session_start();
require('dbconnect.php');
// ログイン状態のチェック
if (!isset($_SESSION["user"])) {
header("Location: login.php");
exit;
}
?>
<h1>機能一覧</h1>
<table width="400" border="0" cellspacing="0">
<tr>
<td><a href="index.php">トップページ</a></td>
</tr>
<tr>
<td><a href="schedule.php">日別スケジュール一覧</a></td>
</tr>
<tr>
<td><a href="schedule_list.php">今日以降のスケジュール一覧</a></td>
</tr>
<tr>
<td><a href="schedule/addschedule.php">スケジュール追加</a></td>
</tr>
<tr>
<td><a href="reg/addreg.php">受け取りカレンダー追加</a></td>
</tr>
<tr>
<td><a href="reg/delreg.php">受け取りカレンダー削除</a></td>
</tr>
<tr><td> </td></tr>
<?php
//教職員IDでログインしているときのみ表示
$sql = sprintf('SELECT Team FROM users WHERE ID = "%d"',(int)$_SESSION['user']);
$result = mysqli_query($db, $sql) or die(mysqli_error($db));
$Team = mysqli_fetch_assoc($result);
if((int)$Team['Team'] == 0): ?>
<tr>
<td><a href="user/adduser.php">ユーザー追加</a></td>
</tr>
<tr>
<td><a href="team/addteam.php">チーム追加</a></td>
</tr>
<tr>
<td><a href="cal/addcal.php">新規カレンダー追加</a></td>
</tr>
<?php endif; ?>
<tr><td> </td></tr>
<tr>
<td><a href="readme.html">ヘルプページ</a></td>
<tr><td> </td></tr>
<tr>
<td><a href="logout.php">ログアウト</a></td>
</tr>
</table>
</body>
</HTML>