-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patherror_page.php
58 lines (46 loc) · 1.24 KB
/
error_page.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
<?php
session_start();
// $username = $_SESSION['name'];
if (isset($_SESSION['user_id'])) { //ログインしているとき
$msg = 'こんにちは' . htmlspecialchars($_SESSION['name'], \ENT_QUOTES, 'UTF-8') . 'さん';
$msg2 = 'id:' . htmlspecialchars($_SESSION['user_id']);
$link = '<a href="logout.php">ログアウト</a>';
} else { //ログインしていない時
$msg = 'ログインしていません';
$link = '<a href="login_form.php">ログイン</a>';
}
?>
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>シュシュ勤怠管理システム</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<a href="index.php" style="text-decoration:none;">
<header>
<div class="container">
<h1>シュシュ勤怠管理システム</h1>
</div>
</header>
</a>
<div class="container">
<br>
</form>
<?php echo $_SESSION['category'];?>
<br>
<?php echo $_SESSION['error_msg'];?>
<div class="container">
<br>
</form>
<FORM ACTION="error_page2.php" METHOD="GET">
<div class="container">
<INPUT TYPE="submit" VALUE="戻る" class="button" name="btn_error">
</div>
</form>
<div class="container">
<br>
</form>
</body>
</html>