質問編集履歴
1
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -19,6 +19,26 @@
|
|
19
19
|
$error['memo'] = 'blank';
|
20
20
|
|
21
21
|
}
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
if (isset($_SESSION['id']) && $_SESSION['time'] + 3600 > time()) {
|
26
|
+
|
27
|
+
$_SESSION['time'] = time();
|
28
|
+
|
29
|
+
$users = $db->prepare('SELECT * FROM users WHERE id=?');
|
30
|
+
|
31
|
+
$users->execute(array($_SESSION['id']));
|
32
|
+
|
33
|
+
$user = $users->fetch();
|
34
|
+
|
35
|
+
} else {
|
36
|
+
|
37
|
+
header('Location: login.php'); exit();
|
38
|
+
|
39
|
+
}
|
40
|
+
|
41
|
+
|
22
42
|
|
23
43
|
|
24
44
|
|
@@ -90,16 +110,18 @@
|
|
90
110
|
|
91
111
|
```
|
92
112
|
|
113
|
+
|
114
|
+
|
93
115
|
データベース
|
94
116
|
|
95
|
-
|
117
|
+
(users)
|
96
118
|
|
97
|
-
id
|
119
|
+
id name email password picture created modified
|
98
120
|
|
99
|
-
memo
|
121
|
+
(memos)
|
100
122
|
|
101
|
-
user_id
|
123
|
+
id memo user_id reply_post_id created_at modified
|
102
124
|
|
103
|
-
|
125
|
+
|
104
126
|
|
105
127
|
```
|