コミットを比較
6 コミット
| 作成者 | SHA1 | 日付 | |
|---|---|---|---|
| 60b82f2ae2 | |||
| 6c4e401d5a | |||
| 26d78aab88 | |||
| 34758dfa19 | |||
| a7a601c769 | |||
| 0a96136e34 |
@@ -1,5 +1,3 @@
|
||||
/image
|
||||
/draft
|
||||
/images
|
||||
/drafts
|
||||
/database.php
|
||||
|
||||
@@ -2,27 +2,25 @@
|
||||
|
||||
require_once "${_SERVER['DOCUMENT_ROOT']}/database.php";
|
||||
|
||||
if (isset ($_GET['page'])):
|
||||
$page = $_GET['page'];
|
||||
else:
|
||||
$page = 0;
|
||||
endif;
|
||||
if (isset ($_GET['page']))
|
||||
$page = $_GET['page'];
|
||||
else
|
||||
$page = 0;
|
||||
|
||||
if (isset ($_GET['thread'])):
|
||||
$thread = $_GET['thread'];
|
||||
else:
|
||||
$thread = -1;
|
||||
endif;
|
||||
if (isset ($_GET['thread']))
|
||||
$thread = $_GET['thread'];
|
||||
else
|
||||
$thread = -1;
|
||||
|
||||
if (isset ($_GET['sort'])):
|
||||
if (isset ($_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/';
|
||||
@@ -33,18 +31,20 @@ $mysqli = set_mysql ('miteruzo_bbs');
|
||||
|
||||
$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 ();
|
||||
|
||||
$title = $row['title'];
|
||||
$explain = $row['explain'];
|
||||
|
||||
$result -> close ();
|
||||
endif;
|
||||
}
|
||||
|
||||
if (isset ($_GET['id'])
|
||||
&& isset ($_GET['evaluate'])
|
||||
&& (($_GET['evaluate'] == 'good') || ($_GET['evaluate'] == 'bad'))):
|
||||
&& (($_GET['evaluate'] == 'good') || ($_GET['evaluate'] == 'bad')))
|
||||
{
|
||||
$mysqli -> query ("
|
||||
UPDATE
|
||||
responses
|
||||
@@ -54,7 +54,7 @@ if (isset ($_GET['id'])
|
||||
(thread_id = $thread) AND (response_id = {$_GET['id']})");
|
||||
|
||||
header ("Location: ./?thread=$thread&sort=$sort");
|
||||
endif;
|
||||
}
|
||||
|
||||
require_once './forms/index.frm.php';
|
||||
|
||||
|
||||
+2
-2
@@ -28,11 +28,11 @@ if ($result = $mysqli -> query ("
|
||||
WHERE
|
||||
(thread_id = $thread) AND (response_id = $id)");
|
||||
|
||||
echo "消しましたぁ!!<br /><br /><img style='border: solid 1px' src='image/{$row['image']}' />";
|
||||
echo "消しましたぁ!!<br /><br /><img style='border: solid 1px' src='/images/{$row['image']}' />";
|
||||
else:
|
||||
echo '残念.<br />削除用パスワードが違います.';
|
||||
endif;
|
||||
|
||||
echo "<br /><br />5 秒後に元のページに戻ります.<br /><br /><a href='./?thread=$thread#$id'>戻らない場合はこちら</a><script>setTimeout (function () {window.location.href = `./?thread=$thread#$id`}, 5000)</script>";
|
||||
echo "<br /><br />5 秒後に元のページに戻ります.<br /><br /><a href='/?thread=$thread#$id'>戻らない場合はこちら</a><script>setTimeout (function () {window.location.href = `/?thread=$thread#$id`}, 5000)</script>";
|
||||
endif;
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ if (!(empty ($_POST['thread-name'])))
|
||||
|
||||
$result -> close ();
|
||||
|
||||
$sql = "INSERT INTO threads (id, title, `explain`, latest, length) VALUES ($current, '{$_POST['thread-name']}', '$explain', '" . date ('Y-m-d H:i:s') . "', 0)";
|
||||
$sql = "INSERT INTO threads (title, `explain`, latest, length) VALUES ('{$_POST['thread-name']}', '$explain', '" . date ('Y-m-d H:i:s') . "', 0)";
|
||||
$mysqli -> query ($sql);
|
||||
/* $sql = "CREATE TABLE `miteruzo_bbs`.`thread_$current` (
|
||||
`id` INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY COMMENT 'レス番',
|
||||
|
||||
+4
-2
@@ -116,7 +116,7 @@ if (imageUrl != '')
|
||||
reDraw ();
|
||||
}, false);
|
||||
|
||||
imgData.src = `//miteruzo.ml/kekec/bbs/draft/${imageUrl}`;
|
||||
imgData.src = `./draft/${imageUrl}`;
|
||||
}
|
||||
|
||||
let nowDraw = false; // 描画フラグ
|
||||
@@ -872,7 +872,7 @@ deletePostReally ()
|
||||
{
|
||||
const searchParams = new URLSearchParams (window.location.search);
|
||||
|
||||
window.location.href = `./delete.php?thread=${searchParams.get (
|
||||
window.location.href = `./modules/delete.php?thread=${searchParams.get (
|
||||
'thread')}&id=${delId.value}&pass=${delPass.value}`;
|
||||
}
|
||||
else
|
||||
@@ -1043,5 +1043,7 @@ delLayer (lyr, fromHistory)
|
||||
layer: lyr};
|
||||
++count;
|
||||
}
|
||||
|
||||
reDraw ();
|
||||
}
|
||||
|
||||
|
||||
新しい課題から参照
ユーザをブロックする