|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <?php
-
- require_once __DIR__ . '/../import.php';
-
- use \Dto;
-
-
- if (isset ($_GET['page']))
- $page = $_GET['page'];
- else
- $page = 0;
-
- if (isset ($_GET['thread']))
- $thread = $_GET['thread'];
- else
- $thread = -1;
-
- if (isset ($_GET['sort']))
- {
- $sort = $_GET['sort'];
-
- if (!(in_array ($sort, array ('td', 'eg', 'ta', 'eb'))))
- $sort = 'td';
- }
- else
- $sort = 'td';
-
- // 画像のディレクトリを開く.
- $dir = './images/';
- $handle = opendir ($dir);
-
- if ($row = \Dao\Thread :: find ($thread))
- {
- $title = $row -> title;
- $explain = $row -> explain;
- }
-
- if (isset ($_GET['id']))
- {
- if (($_GET['evaluate'] ?? '') === 'good')
- {
- \Dao\Response :: like ((int) $_GET['id']);
- header ("Location: ./?thread=$thread&sort=$sort");
- }
-
- if (($_GET['evaluate'] ?? '') === 'bad')
- {
- \Dao\Response :: dislike ((int) $_GET['id']);
- header ("Location: ./?thread=$thread&sort=$sort");
- }
- }
-
- require_once './forms/index.frm.php';
-
|