キケッツ掲示板のリポジトリです. https://bbs.kekec.wiki
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.frm.php 15 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  1. <!DOCTYPE html>
  2. <html lang="ja">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta name="robots" content="noindex" />
  6. <title><?= ($title == '') ? '' : ($title . ' - ') ?>キケッツチャンネル お絵描き掲示板</title>
  7. <link rel="stylesheet" href="https://jpafonts.osdn.jp/webfonts/jpafonts.css" />
  8. <link rel="stylesheet" type="text/css" href="/style.css" />
  9. <link rel="stylesheet" type="text/css" href="style.css" />
  10. <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/all.css" />
  11. <script defer src="https://use.fontawesome.com/releases/v5.15.4/js/all.js"></script>
  12. <script src="modules/colour-pad.js"></script>
  13. </head>
  14. <body>
  15. <!-- <div style="font-size: 500%">
  16. メンテ中
  17. </div> -->
  18. <div id="modal" class="modal">
  19. <div class="modal-content">
  20. <h3>Canvas のサイズを変更</h3>
  21. <form>
  22. <div style="margin-bottom: 16px">
  23. <div>
  24. <label for="width">幅:</label>
  25. <input type="number" id="change-width" name="width" value="480" min="32" max="640" />
  26. <label>(32 〜 640)</label>
  27. </div>
  28. <div>
  29. <label for="height">高さ:</label>
  30. <input type="number" id="change-height" name="height" value="480" min="24" max="480" />
  31. <label>(24 〜 480)</label>
  32. </div>
  33. </div>
  34. <button type="button" onclick="closeModal ()">取消</button>
  35. <button type="button" onclick="applyResolution ()">適用</button>
  36. </form>
  37. </div>
  38. </div>
  39. <h1><a href="."><img src="/img/kusobbs.gif" alt="クソ掲示板" style="width: 398px" /></a></h1>
  40. <div style="text-align: center"><a href="#" onclick="PauseMusic ()" id="mute">&emsp;</a></div>
  41. <?php if ($thread == -1): ?>
  42. <form action="make_thread.php" method="POST">
  43. スレ名:<input type="text" name="thread-name" /><br />
  44. スレ内容:<textarea name="thread-explain"></textarea><br />
  45. <input type="submit" value="スレ立て" />
  46. </form>
  47. <?php if ($result = $mysqli -> query ("SELECT * FROM threads WHERE id <> 1 ORDER BY latest DESC")): ?>
  48. <?php while ($row = $result -> fetch_assoc ()): ?>
  49. <table width="90%">
  50. <thead>
  51. <tr><td class="header"><a href="?thread=<?= $row['id'] ?>"><?= $row['title'] ?></a>&emsp;更新:1<?= $row['latest'] ?>&emsp;<?= $row['length'] ?> レス</td></tr>
  52. </thead>
  53. <?php if ($row['explain'] != '<p></p>'): ?>
  54. <tbody>
  55. <tr><td><?= $row['explain'] ?></td></tr>
  56. </tbody>
  57. <?php endif ?>
  58. </table>
  59. <?php endwhile ?>
  60. <?php endif ?>
  61. <?php else: ?>
  62. <table width="90%">
  63. <thead>
  64. <tr><td class="header"><?= $title ?></td></tr>
  65. </thead>
  66. <?php if ($explain != '<p></p>'): ?>
  67. <tbody>
  68. <tr><td><?= $explain ?></td></tr>
  69. </tbody>
  70. <?php endif ?>
  71. </table>
  72. <form id="message-form">
  73. <label>名前:</label><input type="text" id="user-name" name="name" /><br />
  74. <label>削除用パスワード:</label><input type="password" id="password" name="password" />
  75. <!-- <textarea id="message" name="message"></textarea> -->
  76. </form>
  77. <div id="paint">
  78. <div style="display: flex; justify-content: center">
  79. <div class="button-area" style="margin-right: 64px">
  80. <button id="new">新規作成</button>
  81. <button id="send">送信</button>
  82. <button id="save">ダウンロード</button>
  83. <button id="change-size">サイズ変更</button>
  84. </div>
  85. <div class="button-area" style="vertical-align: middle">
  86. <button id="undo">←</button>
  87. <button id="redo">→</button>
  88. </div>
  89. </div>
  90. <div style="display: flex; width: max-content; flex-direction: column">
  91. <div class="radio">
  92. <form id="mode">
  93. <label>モード:</label>
  94. <label><input type="radio" name="mode" value="pen" id="pen" checked />ペン</label>
  95. <label><input type="radio" name="mode" value="rubber" id="rubber" />消しゴム</label>
  96. <label><input type="radio" name="mode" value="bucket" id="bucket" />塗りつぶし</label>
  97. </form>
  98. </div>
  99. <div class="radio">
  100. <label>取込み:</label>
  101. <input id="load" type="file" onChange="LoadFile (this.files)" />
  102. </div>
  103. <div class="radio">
  104. <form id="colour">
  105. <label>色:</label>
  106. <!-- <input type="radio" name="colour" value="black" checked="checked" />黒
  107. <input type="radio" name="colour" value="blue" />ブルー
  108. <input type="radio" name="colour" value="red" />赤
  109. <input type="radio" name="colour" value="magenta" />マジェンタ
  110. <input type="radio" name="colour" value="lime" />ライム
  111. <input type="radio" name="colour" value="cyan" />青
  112. <input type="radio" name="colour" value="yellow" />イェロウ
  113. <input type="radio" name="colour" value="white" />白 -->
  114. <button id="colour-picker" type="button" onclick="cmanCP_JS_open(this)" cmanCPat="def_color:cns=#000000,rc_form:RGBA,rc_func:changeColour">選択</button>
  115. <label id="irorororo">黒</label>
  116. </form>
  117. </div>
  118. <div class="radio">
  119. <form id="size">
  120. <label>太さ:</label>
  121. <label><input type="radio" name="size" value="1" />1</label>
  122. <label><input type="radio" name="size" value="2" />2</label>
  123. <label><input type="radio" name="size" value="3" checked="checked" />3</label>
  124. <label><input type="radio" name="size" value="5" />5</label>
  125. <label><input type="radio" name="size" value="7" />7</label>
  126. <label><input type="radio" name="size" value="10" />10</label>
  127. <label><input type="radio" name="size" value="15" />15</label>
  128. <!-- <input type="range" name="size" min="1" max="57" value="3" /> -->
  129. <label><input type="radio" name="size" value="0" />指定:
  130. <input style="width: 2em" type="number" name="size" id="size-free" value="57" /></label>
  131. </form>
  132. </div>
  133. <div class="radio">
  134. <form id="layer">
  135. <label>レイア:</label>
  136. <label><input onclick="reDraw ()" type="radio" name="layer" value="0" checked="checked" />基底</label>
  137. <label><input onclick="reDraw ()" type="radio" name="layer" value="1" />1</label>
  138. <label><input onclick="reDraw ()" type="radio" name="layer" value="2" />2</label>
  139. <button type="button" name="del">削除</button>
  140. <button type="button" name="down">下へ</button>
  141. <button type="button" name="up">上へ</button>
  142. <button type="button" name="add">追加</button>
  143. <br />
  144. <label><input onclick="reDraw ()" type="checkbox" name="sep" />レイアを分けて表示</label>
  145. </form>
  146. </div>
  147. </div>
  148. <div class="canvas-area" id="canvas-area">
  149. <canvas id="canvas" width="480" height="480"></canvas>
  150. <!-- <canvas id="canvas1" width="480" height="480"></canvas> -->
  151. <!-- <canvas id="canvas2" width="480" height="480"></canvas> -->
  152. </div>
  153. </div>
  154. <form name="sort">
  155. <label>
  156. 並べ替え:
  157. <select id="sort" style="font-size: 24px">
  158. <option value="time-desc"<?= ($sort == 'td') ? ' selected="selected"' : '' ?>>投稿が新しい順</option>
  159. <option value="evaluate-good"<?= ($sort == 'eg') ? ' selected="selected"' : '' ?>>評価が高い順</option>
  160. <option value="time-asc"<?= ($sort == 'ta') ? ' selected="selected"' : '' ?>>投稿が古い順</option>
  161. <option value="evaluate-bad"<?= ($sort == 'eb') ? ' selected="selected"' : '' ?>>評価が低い順</option>
  162. </select>
  163. </label>
  164. </form>
  165. <div id="bbs">
  166. <?php
  167. if ($result = $mysqli -> query ("
  168. SELECT
  169. response_id as id, name, message, date, image, held, deleted, pass, good, bad, good - bad as evaluate
  170. FROM
  171. responses
  172. WHERE
  173. thread_id = $thread
  174. ORDER BY
  175. " . (($sort == 'td')
  176. ? 'id DESC'
  177. : (($sort == 'eg')
  178. ? 'evaluate DESC, id DESC'
  179. : (($sort == 'ta')
  180. ? 'id ASC'
  181. : (($sort == 'eb')
  182. ? 'evaluate ASC, id DESC'
  183. : 'id DESC')))))):
  184. ?>
  185. <?php while ($row = $result -> fetch_assoc ()): ?>
  186. <table width="90%" id="<?= $row['id'] ?>">
  187. <thead>
  188. <tr>
  189. <td class="header">
  190. <div style="margin: 0 8px">
  191. <div style="float: left"><?= $row['id'] ?>:
  192. <?= (($row['name'] == '')
  193. ? '名なしさん'
  194. : $row['name']) ?>
  195. </div>
  196. <div style="text-align: right">
  197. 1<?= date ('Y/m/d H:i:s', strtotime ($row['date'])) ?>
  198. </div>
  199. </div>
  200. <div style="display: grid;
  201. grid-template-columns: auto <?= ($row['good'] + $row['bad'] == 0) ? '.48fr' : ((.96 * $row['bad'] / ($row['good'] + $row['bad'])) . 'fr') ?> <?= ($row['good'] + $row['bad'] == 0) ? '.48fr' : ((.96 * $row['good'] / ($row['good'] + $row['bad'])) . 'fr') ?> auto;
  202. align-items: center;
  203. margin-top: 8px;
  204. margin-left: auto;
  205. margin-right: auto;
  206. width: 90%;
  207. font-size: 80%">
  208. <div style="grid-columns: 1; text-align: left;">
  209. <a style="color: blue; white-space: nowrap" title="低評価"
  210. href="?thread=<?= $thread ?>&sort=<?= $sort ?>&evaluate=bad&id=<?= $row['id'] ?>#<?= $row['id'] ?>">
  211. <i class="fas fa-thumbs-down"></i>&thinsp;<?= $row['bad'] ?>
  212. </a>
  213. </div>
  214. <div style="grid-columns: 2;
  215. background-color: blue;
  216. text-align: center;
  217. height: 40%">
  218. &nbsp;
  219. </div>
  220. <div style="grid-columns: 3;
  221. background-color: red;
  222. text-align: center;
  223. height: 40%">
  224. &nbsp;
  225. </div>
  226. <div style="grid-columns: 4; text-align: right">
  227. <a style="color: red" title="高評価" href="?thread=<?= $thread ?>&sort=<?= $sort ?>&evaluate=good&id=<?= $row['id'] ?>#<?= $row['id'] ?>">
  228. <?= $row['good'] ?>&thinsp;<i class="fas fa-thumbs-up"></i>
  229. </a>
  230. </div>
  231. </div>
  232. </td>
  233. </tr>
  234. </thead>
  235. <tbody>
  236. <?php if ($row['deleted']): ?>
  237. <tr><td><p>削除されました.</p></td></tr>
  238. <?php elseif ($row['held']): ?>
  239. <tr><td><p>確認中です.</p></td></tr>
  240. <?php else: ?>
  241. <tr><td class="illust" style="display: grid; grid-template-columns: .375fr auto .375fr; align-items: end"><div style="grid-columns: 1"></div><div style="grid-columns: 2; text-align: center"><img style="border: solid 1px"src="<?= $dir . $row['image'] ?>" /></div><div style="grid-columns: 3; justify-self: end; margin-right: 8px; margin-bottom: 8px; font-size: 80%"><a href="#del" onclick="deletePost (<?= $row['id'] ?>)">削除</a></div></td></tr>
  242. <?php endif ?>
  243. </tbody>
  244. </table>
  245. <?php endwhile ?>
  246. <?php
  247. // MySQL を閉ぢる.
  248. $result -> close ();
  249. endif;
  250. ?>
  251. </div>
  252. <h3 id="del">レス削除</h3>
  253. 削除したいレス番号と削除用パスワードを入力して &ldquo;削除&rdquo; を押してください.<br />
  254. <label>レス番号:</label><input type="text" id="del-id" /><br />
  255. <label>削除用パスワード:</label><input type="password" id="del-pass" /><br />
  256. <button id="delete" onclick="deletePostReally ()">削除</button>
  257. <?php endif ?>
  258. <hr />
  259. <footer>
  260. <div class="attention">
  261. このサイトでは,<a href="https://moji.or.jp/ipafont/license/" target="_blank">IPA フォントライセンス v1.0</a> で公開されてゐる <a href="https://jpafonts.osdn.jp/" target="_blank">JPA フォント</a>を使用してゐます.
  262. </div>
  263. <div class="copyright">
  264. &copy; このペィジへの投稿は,すべて,パブリック・ドメインとします.
  265. </div>
  266. </footer>
  267. <canvas style="display: none" width="1" height="1" id="work"></canvas>
  268. <canvas style="display: none" width="480" height="480" id="canvas-perfect"></canvas>
  269. <script type="text/javascript" src="script.js"></script>
  270. <?php if ($thread != -1): ?>
  271. <script type="text/javascript" src="paint.js"></script>
  272. <?php endif ?>
  273. </body>
  274. </html>