OSDN Git Service

通信方式を設定できるようにした
[webchat/WebChat.git] / public / admin.ejs
index 46bc8cd..a12a73d 100644 (file)
@@ -37,7 +37,7 @@
                                        </tr>\r
                                <% } %>\r
                        </table>\r
-                       <input type="hidden" name="token" value="<%= token %>"></input>\r
+                       <input type="hidden" name="_csrf" value="<%= token %>"></input>\r
                        <input type="submit" name="erase" value="削除"/>\r
                </form>\r
        </div>\r
                        <p>IPBANリスト</p>\r
                        <textarea name="newbanlist" rows="4" cols="40"><%= ipbanlist %></textarea>\r
                        <br/>\r
-                       <input type="hidden" name="token" value="<%= token %>"></input>\r
+                       <input type="hidden" name="_csrf" value="<%= token %>"></input>\r
                        <input type="submit" name="registor" value="登録">\r
                </form>\r
        </div>\r
        <div id="roomlist_tab">\r
                <form action="/admin" method="post">\r
-                       <p>ルームリスト</p>\r
-                       <textarea name="newroomlist" rows="4" cols="40"><%= roomlist %></textarea>\r
-                       <br/>\r
-                       <input type="hidden" name="token" value="<%= token %>"></input>\r
+                       <table>\r
+                               <% for(var i=0; i < roomlist.length; i++) {%>\r
+                                       <tr>\r
+                                               <td>\r
+                                                       <% if(roomlist[i].applyflag) {%>\r
+                                                               <input type="checkbox" name="config[<%= i %>][applyflag]" value="<%= i %>" checked></input>\r
+                                                       <% }else{ %>\r
+                                                               <input type="checkbox" name="config[<%= i %>][applyflag]" value="<%= i %>"></input>\r
+                                                       <% } %>\r
+                                               </td>\r
+                                               <td>\r
+                                                       <%= i %>\r
+                                               </td>\r
+                                               <td>\r
+                                                       パスワード\r
+                                                       <input type="text" name="config[<%= i %>][password]" value="<%= roomlist[i].password %>"></input>\r
+                                               </td>\r
+                                               <td>\r
+                                                       ROM禁止\r
+                                                       <% if(roomlist[i].hiddenlog) {%>\r
+                                                               <input type="checkbox" name="config[<%= i %>][hiddenlog]" value="romonly" checked></input>\r
+                                                       <% }else{ %>\r
+                                                               <input type="checkbox" name="config[<%= i %>][hiddenlog]" value="romonly"></input>\r
+                                                       <% } %>\r
+                                               </td>\r
+                                       </tr>\r
+                               <% } %>\r
+                       </table>\r
+                       <input type="hidden" name="_csrf" value="<%= token %>"></input>\r
                        <input type="submit" name="updateroom" value="登録">\r
                </form>\r
        </div>\r