|
@@ -2,27 +2,25 @@ |
|
|
|
|
|
|
|
|
require_once "${_SERVER['DOCUMENT_ROOT']}/database.php"; |
|
|
require_once "${_SERVER['DOCUMENT_ROOT']}/database.php"; |
|
|
|
|
|
|
|
|
if (isset ($_GET['page'])): |
|
|
|
|
|
$page = $_GET['page']; |
|
|
|
|
|
else: |
|
|
|
|
|
$page = 0; |
|
|
|
|
|
endif; |
|
|
|
|
|
|
|
|
|
|
|
if (isset ($_GET['thread'])): |
|
|
|
|
|
$thread = $_GET['thread']; |
|
|
|
|
|
else: |
|
|
|
|
|
$thread = -1; |
|
|
|
|
|
endif; |
|
|
|
|
|
|
|
|
|
|
|
if (isset ($_GET['sort'])): |
|
|
|
|
|
|
|
|
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']; |
|
|
$sort = $_GET['sort']; |
|
|
|
|
|
|
|
|
if (!(in_array ($sort, array ('td', 'eg', 'ta', 'eb')))): |
|
|
|
|
|
$sort = 'td'; |
|
|
|
|
|
endif; |
|
|
|
|
|
else: |
|
|
|
|
|
$sort = 'td'; |
|
|
|
|
|
endif; |
|
|
|
|
|
|
|
|
if (!(in_array ($sort, array ('td', 'eg', 'ta', 'eb')))) |
|
|
|
|
|
$sort = 'td'; |
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
$sort = 'td'; |
|
|
|
|
|
|
|
|
// 画像のディレクトリを開く. |
|
|
// 画像のディレクトリを開く. |
|
|
$dir = '/images/'; |
|
|
$dir = '/images/'; |
|
@@ -33,18 +31,20 @@ $mysqli = set_mysql ('miteruzo_bbs'); |
|
|
|
|
|
|
|
|
$mysqli -> set_charset ('utf8'); |
|
|
$mysqli -> set_charset ('utf8'); |
|
|
|
|
|
|
|
|
if ($result = $mysqli -> query ("SELECT * FROM threads WHERE id = $thread")): |
|
|
|
|
|
|
|
|
if ($result = $mysqli -> query ("SELECT * FROM threads WHERE id = $thread")) |
|
|
|
|
|
{ |
|
|
$row = $result -> fetch_assoc (); |
|
|
$row = $result -> fetch_assoc (); |
|
|
|
|
|
|
|
|
$title = $row['title']; |
|
|
$title = $row['title']; |
|
|
$explain = $row['explain']; |
|
|
$explain = $row['explain']; |
|
|
|
|
|
|
|
|
$result -> close (); |
|
|
$result -> close (); |
|
|
endif; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (isset ($_GET['id']) |
|
|
if (isset ($_GET['id']) |
|
|
&& isset ($_GET['evaluate']) |
|
|
&& isset ($_GET['evaluate']) |
|
|
&& (($_GET['evaluate'] == 'good') || ($_GET['evaluate'] == 'bad'))): |
|
|
|
|
|
|
|
|
&& (($_GET['evaluate'] == 'good') || ($_GET['evaluate'] == 'bad'))) |
|
|
|
|
|
{ |
|
|
$mysqli -> query (" |
|
|
$mysqli -> query (" |
|
|
UPDATE |
|
|
UPDATE |
|
|
responses |
|
|
responses |
|
@@ -54,7 +54,7 @@ if (isset ($_GET['id']) |
|
|
(thread_id = $thread) AND (response_id = {$_GET['id']})"); |
|
|
(thread_id = $thread) AND (response_id = {$_GET['id']})"); |
|
|
|
|
|
|
|
|
header ("Location: ./?thread=$thread&sort=$sort"); |
|
|
header ("Location: ./?thread=$thread&sort=$sort"); |
|
|
endif; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
require_once './forms/index.frm.php'; |
|
|
require_once './forms/index.frm.php'; |
|
|
|
|
|
|