|
@@ -1,6 +1,7 @@ |
|
|
<?php |
|
|
<?php |
|
|
|
|
|
|
|
|
use \Dao; |
|
|
|
|
|
|
|
|
require_once __DIR__ . '/../import.php'; |
|
|
|
|
|
|
|
|
use \Dto; |
|
|
use \Dto; |
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -28,7 +29,7 @@ else |
|
|
$dir = './images/'; |
|
|
$dir = './images/'; |
|
|
$handle = opendir ($dir); |
|
|
$handle = opendir ($dir); |
|
|
|
|
|
|
|
|
if ($row = Dao\Thread :: find ($thread)) |
|
|
|
|
|
|
|
|
if ($row = \Dao\Thread :: find ($thread)) |
|
|
{ |
|
|
{ |
|
|
$title = $row -> title; |
|
|
$title = $row -> title; |
|
|
$explain = $row -> explain; |
|
|
$explain = $row -> explain; |
|
@@ -38,13 +39,13 @@ if (isset ($_GET['id'])) |
|
|
{ |
|
|
{ |
|
|
if (($_GET['evaluate'] ?? '') === 'good') |
|
|
if (($_GET['evaluate'] ?? '') === 'good') |
|
|
{ |
|
|
{ |
|
|
Dao\Response :: like ((int) $_GET['id']); |
|
|
|
|
|
|
|
|
\Dao\Response :: like ((int) $_GET['id']); |
|
|
header ("Location: ./?thread=$thread&sort=$sort"); |
|
|
header ("Location: ./?thread=$thread&sort=$sort"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (($_GET['evaluate'] ?? '') === 'bad') |
|
|
if (($_GET['evaluate'] ?? '') === 'bad') |
|
|
{ |
|
|
{ |
|
|
Dao\Response :: dislike ((int) $_GET['id']); |
|
|
|
|
|
|
|
|
\Dao\Response :: dislike ((int) $_GET['id']); |
|
|
header ("Location: ./?thread=$thread&sort=$sort"); |
|
|
header ("Location: ./?thread=$thread&sort=$sort"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|