キケッツ掲示板のリポジトリです. https://bbs.kekec.wiki
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

55 lines
999 B

  1. <?php
  2. require_once __DIR__ . '/../import.php';
  3. use \Dto;
  4. if (isset ($_GET['page']))
  5. $page = $_GET['page'];
  6. else
  7. $page = 0;
  8. if (isset ($_GET['thread']))
  9. $thread = $_GET['thread'];
  10. else
  11. $thread = -1;
  12. if (isset ($_GET['sort']))
  13. {
  14. $sort = $_GET['sort'];
  15. if (!(in_array ($sort, array ('td', 'eg', 'ta', 'eb'))))
  16. $sort = 'td';
  17. }
  18. else
  19. $sort = 'td';
  20. // 画像のディレクトリを開く.
  21. $dir = './images/';
  22. $handle = opendir ($dir);
  23. if ($row = \Dao\Thread :: find ($thread))
  24. {
  25. $title = $row -> title;
  26. $explain = $row -> explain;
  27. }
  28. if (isset ($_GET['id']))
  29. {
  30. if (($_GET['evaluate'] ?? '') === 'good')
  31. {
  32. \Dao\Response :: like ((int) $_GET['id']);
  33. header ("Location: ./?thread=$thread&sort=$sort");
  34. }
  35. if (($_GET['evaluate'] ?? '') === 'bad')
  36. {
  37. \Dao\Response :: dislike ((int) $_GET['id']);
  38. header ("Location: ./?thread=$thread&sort=$sort");
  39. }
  40. }
  41. require_once './forms/index.frm.php';