diff --git a/.gitignore b/.gitignore index 7530e88..6716a90 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ /image /draft +/images +/drafts /database.php diff --git a/assets/kusobbs.gif b/assets/kusobbs.gif new file mode 100644 index 0000000..863b0c8 Binary files /dev/null and b/assets/kusobbs.gif differ diff --git a/forms/index.frm.php b/forms/index.frm.php index 730978b..cfa6eb9 100644 --- a/forms/index.frm.php +++ b/forms/index.frm.php @@ -5,7 +5,6 @@ <?= ($title == '') ? '' : ($title . ' - ') ?>キケッツチャンネル お絵描き掲示板 - @@ -42,11 +41,11 @@ -

クソ掲示板

+

クソ掲示板

-
+ スレ名:
スレ内容:
@@ -302,7 +301,7 @@ - + diff --git a/index.php b/index.php index 917384b..df08d87 100644 --- a/index.php +++ b/index.php @@ -25,7 +25,7 @@ else: endif; // 画像のディレクトリを開く. -$dir = 'image/'; +$dir = '/images/'; $handle = opendir ($dir); // MySQL 宣言 diff --git a/migrate.php b/migrate.php new file mode 100644 index 0000000..27fc12d --- /dev/null +++ b/migrate.php @@ -0,0 +1,10 @@ + query (file_get_contents ($file)); + diff --git a/migrations/2023_09_01_011340_create_threads_table.sql b/migrations/2023_09_01_011340_create_threads_table.sql new file mode 100644 index 0000000..cf0e292 --- /dev/null +++ b/migrations/2023_09_01_011340_create_threads_table.sql @@ -0,0 +1,2 @@ +CREATE TABLE `miteruzo_bbs`.`threads` ( `id` INT NOT NULL AUTO_INCREMENT , `title` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL , `explain` MEDIUMTEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL , `latest` DATETIME NOT NULL , `length` INT NOT NULL DEFAULT '0' , PRIMARY KEY (`id`)) ENGINE = InnoDB CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci; + diff --git a/migrations/2023_09_01_012000_create_responses_table.sql b/migrations/2023_09_01_012000_create_responses_table.sql new file mode 100644 index 0000000..90d6217 --- /dev/null +++ b/migrations/2023_09_01_012000_create_responses_table.sql @@ -0,0 +1,2 @@ +CREATE TABLE `miteruzo_bbs`.`responses` ( `thread_id` INT NOT NULL , `response_id` INT NOT NULL , `name` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '名なしさん' , `message` MEDIUMTEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL , `date` DATETIME NOT NULL , `image` VARCHAR(31) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL , `held` TINYINT NOT NULL DEFAULT '0' , `deleted` TINYINT NOT NULL DEFAULT '0' , `pass` VARCHAR(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL , `good` INT NOT NULL DEFAULT '0' , `bad` INT NOT NULL DEFAULT '0' , PRIMARY KEY (`thread_id`, `response_id`)) ENGINE = InnoDB CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci; + diff --git a/modules/backup.php b/modules/backup.php index bc7fe68..267271b 100644 --- a/modules/backup.php +++ b/modules/backup.php @@ -1,17 +1,19 @@ close (); } -header ("location: ./?thread=$current"); +header ("location: ../?thread=$current"); diff --git a/modules/upload.php b/modules/upload.php index 69c0cc7..58a12ae 100644 --- a/modules/upload.php +++ b/modules/upload.php @@ -2,10 +2,10 @@ require "${_SERVER['DOCUMENT_ROOT']}/database.php"; -define ('SAVE_DIR', 'image/'); // 保存ディレクトリ定義 +define ('SAVE_DIR', "${_SERVER['DOCUMENT_ROOT']}/images/"); // 保存ディレクトリ定義 $thread = $_GET['thread']; -file_put_contents ('log.txt', $thread); +// file_put_contents ('log.txt', $thread); $json = getParamJSON (); // JSON パラメタ diff --git a/styles/colour-pad.js b/scripts/colour-pad.js similarity index 100% rename from styles/colour-pad.js rename to scripts/colour-pad.js diff --git a/scripts/paint.js b/scripts/paint.js index 696840c..9d90c53 100644 --- a/scripts/paint.js +++ b/scripts/paint.js @@ -219,11 +219,11 @@ SendToServer (backup) mode: 'cors'}; if (backup) - await SendServer (`backup.php?id=${uniqId}`, param); + await SendServer (`/modules/backup.php?id=${uniqId}`, param); else { // SendServer (`upload.php?name=${userName.value}&pass=${password.value}&msg=${message.value}`, param); - await SendServer (`upload.php${window.location.search}&name=${userName.value}&pass=${password.value}&held=${held ? 1 : 0}&uniqid=${uniqId}`, param); + await SendServer (`/modules/upload.php${window.location.search}&name=${userName.value}&pass=${password.value}&held=${held ? 1 : 0}&uniqid=${uniqId}`, param); } } diff --git a/styles/style.css b/styles/style.css index 57f4775..4788483 100644 --- a/styles/style.css +++ b/styles/style.css @@ -1,3 +1,139 @@ +html +{ + font-size: 24px; + font-family: "Helvetica Neue", "Helvetica", "Segoe UI", "Arial", + "JPAGothic", "IPAGothic", + "Hiragino Sans", "Hiragino Kaku Gothic ProN", + "Yu Gothic", "Meiryo", "MS Gothic", + sans-serif; + width: 960px; + text-align: justify; + margin: auto; + punctuation-trim: adjacent; +} + +em +{ + font-style: normal; + font-size: 120%; + font-weight: bold; + color: red; + font-family: "Helvetica Neue", "Helvetica", "Segoe UI", "Arial", + "JPAGothic", "IPAGothic", + "Hiragino Sans", "Hiragino Kaku Gothic ProN", + "Yu Gothic", "Meiryo", "MS Gothic", + sans-serif; +} + +.miteruzochan +{ + white-space: nowrap; +} + +section +{ + margin-bottom: 3em; +} + +p:not(.noindent) +{ + text-indent: 1em; +} + +p +{ + margin: 0 2em; + line-height: 3em; +} + +.copy +{ + font-size: 200%; + font-weight: bold; + font-style: italic; + text-align: center; + font-family: "Times New Roman", + "JPAMincho", "IPAMincho", "Hiragino Mincho ProN", + "Yu Mincho", "MS Mincho", + serif; + margin: 1em 0; +} + +footer +{ + font-size: 16px; + color: dimgray; + text-align: center; + line-height: 2em; + padding-bottom: 24px; +} + +footer > div +{ + margin: 24px 0; +} + +.copyright +{ + text-align: center; + margin: 24px 0; +} + +footer a +{ + color: darkslategray; +} + +a +{ + text-decoration: none; +} + +div.paragraph +{ + margin-bottom: 1.5em; +} + +table +{ + margin: auto; +} + +tr:nth-child(odd) +{ + background-color: lightgray; +} + +th, td +{ + padding: 8px 16px; +} + +#title +{ + text-align: left; + display: inline-block; +} + +#translate +{ + text-align: right; + display: inline-block; + width: 288px; +} + +header +{ + display: flex; + justify-content: space-between; + align-items: center; +} + +button, input +{ + font-size: 24px; +} + body { background-color: aquamarine;