ファイル構成変更

This commit is contained in:
2024-02-12 03:24:36 +09:00
parent 445d6da9ef
commit 1ae5df5420
12 changed files with 54 additions and 2581 deletions
+53
View File
@@ -0,0 +1,53 @@
<?php
use \Dao;
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';