OSDN Git Service

fixed multi-window using.
authorelixirel <elixirel@users.sourceforge.jp>
Wed, 16 Sep 2009 13:40:17 +0000 (22:40 +0900)
committerelixirel <elixirel@users.sourceforge.jp>
Wed, 16 Sep 2009 13:40:17 +0000 (22:40 +0900)
erbtemp/delentry.html.erb
erbtemp/editentry.html.erb
erbtemp/editfeed.html.erb
erbtemp/insertfeed.html.erb
erbtemp/log.html.erb
erbtemp/newentry.html.erb
erbtemp/replacefeed.html.erb
erbtemp/reset.html.erb
erbtemp/select.html.erb
feedgenerator.rb

index 62cfc3e..9f37c88 100644 (file)
@@ -28,8 +28,8 @@
                         </tr>
                         <% db.transaction do
                         entry = nil
-                        db["entry"].each_with_index { |e, i|
-                        entry = db["entry"][i] if e.entryid == session["delid"]
+                        session["entry"].each_with_index { |e, i|
+                        entry = session["entry"][i] if e.entryid == session["delid"]
                         }
                         entry.paramlist.each do |val| %>
                         <tr style="display: <%= entry.display[val] %>;">
@@ -77,7 +77,7 @@
                                 最終更新時間
                             </td>
                         </tr>
-                        <% db["entry"].each_with_index do |entry, i| %>
+                        <% session["entry"].each_with_index do |entry, i| %>
                         <tr>
                             <td class="forminput" style="width: 30px; text-align: center;">
                                 <input type="radio" name="delid" value="<%= entry.send("entryid") %>">
@@ -93,7 +93,7 @@
                     </tbody>
                 </table>
                 <br>
-                <% if db["entry"].length != 0 %>
+                <% if session["entry"].length != 0 %>
                 <input type="hidden" name="mode" value="delentry"><input type="hidden" name="action" value="confirm"><input type="submit" value="確認"><% else %>
                 削除対象となる記事が存在しません。
                 <br>
index 58ff03a..5565917 100644 (file)
                             </td>
                         </tr>
                         <% db.transaction do
-                        entry = db["editentry"]
+                        entry = session["editentry"]
                         entry.paramlist.each do |val| %>
                         <tr style="display: <%= entry.display[val] %>;">
                             <td class="formnavi" style="width: 140px;">
                                 <%= entry.name[val] %>
                             </td>
                             <td class="forminput">
-                                <% if val != "content" %><%= entry.send(val) %><% else %><%= entry.content_for_view %><% end %>
+                                <input type="hidden" name="<%= val %>" value="<%= entry.send(val) %>"><% if val != "content" %><%= entry.send(val) %><% else %><%= entry.content_for_view %><% end %>
                             </td>
                         </tr>
                         <% end %>
@@ -73,8 +73,8 @@
                         </tr>
                         <% db.transaction do
                         entry = nil
-                        db["entry"].each_with_index { |e, i|
-                        entry = db["entry"][i] if e.entryid == session["editid"]
+                        session["entry"].each_with_index { |e, i|
+                        entry = session["entry"][i] if e.entryid == session["editid"]
                         }
                         entry.paramlist.each do |val| %>
                         <tr style="display: <%= entry.display[val] %>;">
                             </td>
                         </tr>
                         <% db.transaction do
-                        entry = nil
-                        db["entry"].each_with_index { |e, i|
-                        entry = db["entry"][i] if e.entryid == session["editid"]
-                        }
+                        entry = session["editentry"]
                         entry.paramlist.each do |val| %>
                         <tr style="display: <%= entry.display[val] %>;">
                             <td class="formnavi" style="width: 140px;">
                                 最終更新時間
                             </td>
                         </tr>
-                        <% db["entry"].each_with_index do |entry, i| %>
+                        <% session["entry"].each_with_index do |entry, i| %>
                         <tr>
                             <td class="forminput" style="width: 30px; text-align: center;">
                                 <input type="radio" name="editid" value="<%= entry.send("entryid") %>">
                     </tbody>
                 </table>
                 <br>
-                <% if db["entry"].length != 0 %>
+                <% if session["entry"].length != 0 %>
                 <input type="hidden" name="mode" value="editentry"><input type="hidden" name="action" value="edit"><input type="submit" value="編集"><% else %>
                 編集対象となる記事が存在しません。
                 <br>
index afd12c5..e50fc38 100644 (file)
@@ -9,7 +9,7 @@
                 form.submit();
             }
             
-            function autocomp_feedid() {
+            function autocomp_feedid(){
                 document.getElementsByName("feedid").item(0).value = document.getElementsByName("url").item(0).value;
             }
         </script>
@@ -30,7 +30,7 @@
                             </td>
                         </tr>
                         <% db.transaction do
-                        feed = db["feed"]
+                        feed = session["feed"]
                         feed.paramlist.each do |val| %>
                         <tr style="display: <%= feed.display[val] %>;">
                             <td class="formnavi" style="width: 200px;">
                             </td>
                             <td class="forminput">
                                 <%= feed.send(val) %>
+                                <input type="hidden" name="<%= val %>" value="<%= feed.send(val) %>">
                             </td>
-                        </tr>
-                        <% end %>
+                        </tr><% end %>
                         <% end %>
                     </tbody>
                 </table>
                 <br>
-                <input type="hidden" name="mode" value="editfeed"><input type="hidden" name="action" value=""><input type="button" value="戻る" onclick="switchsubmit(this.form, 'back')"> <input type="button" value="確定" onclick="switchsubmit(this.form, 'exec')">
-                <% when "exec" %>
+                <input type="hidden" name="mode" value="editfeed"><input type="hidden" name="action" value=""><input type="button" value="戻る" onclick="switchsubmit(this.form, 'back')"> <input type="button" value="確定" onclick="switchsubmit(this.form, 'exec')"><% when "exec" %>
                 <table align="center" style="width: <%= (TABLEWIDTH - 20) %>px;">
                     <tbody>
                         <tr>
                     <tbody>
                         <tr>
                             <td colspan="2" class="formheader">
-                                ■ XML情報編集<br>
+                                ■ XML情報編集
+                                <br>
                             </td>
                         </tr>
                         <% db.transaction do
-                        feed = db["feed"]
+                        feed = session["feed"]
                         feed.paramlist.each do |val| %>
                         <tr style="display: <%= feed.display[val] %>;">
                             <td class="formnavi" style="width: 200px;">
                             <td class="forminput">
                                 <% date = Time.now.iso8601 %>
                                 <% if val == "updated" %>
-                                <input type="text" name="<%= val %>" value="<%= date %>" style="width: 100%">
-                                <% elsif val == "url" %>
-                                <input type="text" name="<%= val %>" value="<%= feed.send(val) %>" style="width: 100%" onchange="autocomp_feedid();">
-                                <% elsif val == "feedid" %>
+                                <input type="text" name="<%= val %>" value="<%= date %>" style="width: 100%"><% elsif val == "url" %>
+                                <input type="text" name="<%= val %>" value="<%= feed.send(val) %>" style="width: 100%" onchange="autocomp_feedid();"><% elsif val == "feedid" %>
                                 <input type="text" name="<%= val %>" value="<%= feed.send(val) %>" style="width: 100%">
                                 <br>
                                 <span style="font-style: italic;">通常ウェブページのidはあなたのウェブページURLと同一のものを使用してください。</span>
index f11e066..8fa01bc 100644 (file)
                             </td>
                         </tr>
                         <% written = false %>
-                        <% db["loglist"].path.each_with_index do |log, i| %>
-                        <% if i == db["loginsertindex"] %>
+                        <% session["loglist"].path.each_with_index do |log, i| %>
+                        <% if i == session["loginsertindex"] %>
                         <tr>
                             <td style="text-align: center;" class="forminputhilight">
-                                <%= db["logpath"] %>
+                                <%= session["logpath"] %>
                             </td>
                             <td style="text-align: center;" class="forminputhilight">
-                                <%= db["logdisplay"] %>
+                                <%= session["logdisplay"] %>
                             </td>
                         </tr>
                         <% written = true %>
                                 <%= log %>
                             </td>
                             <td style="text-align: center;" class="forminput">
-                                <%= db["loglist"].display[i] %>
+                                <%= session["loglist"].display[i] %>
                             </td>
                         </tr>
                         <% end %>
                         <% if written == false %>
                         <tr>
                             <td style="text-align: center;" class="forminputhilight">
-                                <%= db["logpath"] %>
+                                <%= session["logpath"] %>
                             </td>
                             <td style="text-align: center;" class="forminputhilight">
-                                <%= db["logdisplay"] %>
+                                <%= session["logdisplay"] %>
                             </td>
                         </tr>
                         <% end %>
                             </td>
                         </tr>
                         <% index = 1 %>
-                        <% db["loglist"].path.each_with_index do |log, i| %>
+                        <% session["loglist"].path.each_with_index do |log, i| %>
                         <tr>
                             <td style="text-align: center; width: 30px;" class="forminput">
                                 <% if index == 1 %>
                                 <%= log %>
                             </td>
                             <td style="text-align: center;" class="forminput">
-                                <%= db["loglist"].display[i] %>
+                                <%= session["loglist"].display[i] %>
                             </td>
                         </tr>
                         <% index = index + 1 %>
                             </td>
                         </tr>
                     </tbody>
-                </table><%= db["error"] %>
+                </table><%= session["error"] %>
                 <br>
                 <input type="hidden" name="mode" value="insert"><input type="hidden" name="action" value=""><input type="button" value="確認" onclick="switchsubmit(this.form, 'confirm')">
                 <br>
index 3a0e1b4..92ccbdb 100644 (file)
         <div class="divstyle" style="width: <%= TABLEWIDTH %>px;">
             <form action="<%= cgi.script_name %>" method="POST">
                 <% case params["action"] when "addconfirm" %>
+                <% db.transaction do %>
+                <table align="center" style="width: <%= (TABLEWIDTH - 20) %>px;">
+                    <tbody>
+                        <tr>
+                            <td colspan="2" class="formheader">
+                                ■ 赤枠の位置に現在の記事をログとして保存します
+                            </td>
+                        </tr>
+                        <tr>
+                            <td style="width: 306px; text-align: center;" class="formnavi">
+                                ログファイルのパス
+                            </td>
+                            <td style="text-align: center;" class="formnavi">
+                                ログの表示名
+                            </td>
+                        </tr>
+                        <% session["loglist"].path.each_with_index do |log, i| %>
+                        <tr>
+                            <td style="text-align: center;" class="forminput">
+                                <%= log %>
+                            </td>
+                            <td style="text-align: center;" class="forminput">
+                                <%= session["loglist"].display[i] %>
+                            </td>
+                        </tr>
+                        <% if i == 0 %>
+                        <tr>
+                            <td style="text-align: center;" class="forminputhilight">
+                                <%= session["logpath"] %>
+                                <input type="hidden" name="logpath" value="<%= session["logpath"] %>">
+                            </td>
+                            <td style="text-align: center;" class="forminputhilight">
+                                <%= session["logdisplay"] %>
+                                <input type="hidden" name="logdisplay" value="<%= session["logdisplay"] %>">
+                            </td>
+                        </tr><% end %>
+                        <% end %>
+                        <% end %>
+                    </tbody>
+                </table>
+                <br>
+                <input type="hidden" name="mode" value="log"><input type="hidden" name="action" value=""><input type="button" value="戻る" onclick="switchsubmit(this.form, 'back')"> <input type="button" value="確定" onclick="switchsubmit(this.form, 'addexec')"><% when "addexec" %>
+                <table align="center" style="width: <%= (TABLEWIDTH - 20) %>px;">
+                    <tbody>
+                        <tr>
+                            <td class="forminput" style="text-align: center;">
+                                ログファイルの作成が完了しました。
+                            </td>
+                        </tr>
+                    </tbody>
+                </table>
+                <br>
+                <a href="<%= cgi.script_name %>">メニューに戻る</a>
+                <% when "delconfirm" %>
+                <div class="divstyle" align="center">
                     <% db.transaction do %>
                     <table align="center" style="width: <%= (TABLEWIDTH - 20) %>px;">
                         <tbody>
                             <tr>
                                 <td colspan="2" class="formheader">
-                                    â\96  èµ¤æ\9e ã\81®ä½\8dç½®ã\81«ç\8f¾å\9c¨ã\81®è¨\98äº\8bã\82\92ã\83­ã\82°ã\81¨ã\81\97ã\81¦ä¿\9då­\98ã\81\97ã\81¾ã\81\99
+                                    â\96  èµ¤æ\9e ã\81®ä½\8dç½®ã\81®ã\83­ã\82°ã\82\92å\89\8aé\99¤ã\81\97ã\81¾ã\81\99ã\80\82ã\82\88ã\82\8dã\81\97ã\81\84ã\81§ã\81\99ã\81\8bï¼\9f
                                 </td>
                             </tr>
                             <tr>
                                     ログの表示名
                                 </td>
                             </tr>
-                            <% db["loglist"].path.each_with_index do |log, i| %>
+                            <% session["loglist"].path.each_with_index do |log, i| %>
+                            <% if session["logdelindex"] != i %>
                             <tr>
                                 <td style="text-align: center;" class="forminput">
                                     <%= log %>
                                 </td>
                                 <td style="text-align: center;" class="forminput">
-                                    <%= db["loglist"].display[i] %>
+                                    <%= session["loglist"].display[i] %>
                                 </td>
                             </tr>
-                            <% if i == 0 %>
+                            <% else %>
                             <tr>
                                 <td style="text-align: center;" class="forminputhilight">
-                                    <%= db["logpath"] %>
+                                    <%= log %>
                                 </td>
                                 <td style="text-align: center;" class="forminputhilight">
-                                    <%= db["logdisplay"] %>
+                                    <%= session["loglist"].display[i] %>
                                 </td>
                             </tr>
                             <% end %>
                         </tbody>
                     </table>
                     <br>
-                    <input type="hidden" name="mode" value="log"><input type="hidden" name="action" value=""><input type="button" value="戻る" onclick="switchsubmit(this.form, 'back')"> <input type="button" value="確定" onclick="switchsubmit(this.form, 'addexec')">
-                                       <% when "addexec" %>
+                    <input type="hidden" name="logdelindex" value="<%= session["logdelindex"] %>"><input type="hidden" name="mode" value="log"><input type="hidden" name="action" value=""><input type="button" value="戻る" onclick="switchsubmit(this.form, 'back')"> <input type="button" value="確定" onclick="switchsubmit(this.form, 'delexec')"><% when "delexec" %>
                     <table align="center" style="width: <%= (TABLEWIDTH - 20) %>px;">
                         <tbody>
                             <tr>
                                 <td class="forminput" style="text-align: center;">
-                                    ログファイルの作成が完了しました。
+                                    ログファイルの削除が完了しました。
                                 </td>
                             </tr>
                         </tbody>
                     </table>
                     <br>
                     <a href="<%= cgi.script_name %>">メニューに戻る</a>
-                    <% when "delconfirm" %>
-                    <div class="divstyle" align="center">
-                        <% db.transaction do %>
-                        <table align="center" style="width: <%= (TABLEWIDTH - 20) %>px;">
-                            <tbody>
-                                <tr>
-                                    <td colspan="2" class="formheader">
-                                        ■ 赤枠の位置のログを削除します。よろしいですか?
-                                    </td>
-                                </tr>
-                                <tr>
-                                    <td style="width: 306px; text-align: center;" class="formnavi">
-                                        ログファイルのパス
-                                    </td>
-                                    <td style="text-align: center;" class="formnavi">
-                                        ログの表示名
-                                    </td>
-                                </tr>
-                                <% db["loglist"].path.each_with_index do |log, i| %>
-                                <% if db["logdelindex"] != i %>
-                                <tr>
-                                    <td style="text-align: center;" class="forminput">
-                                        <%= log %>
-                                    </td>
-                                    <td style="text-align: center;" class="forminput">
-                                        <%= db["loglist"].display[i] %>
-                                    </td>
-                                </tr>
-                                <% else %>
-                                <tr>
-                                    <td style="text-align: center;" class="forminputhilight">
-                                        <%= log %>
-                                    </td>
-                                    <td style="text-align: center;" class="forminputhilight">
-                                        <%= db["loglist"].display[i] %>
-                                    </td>
-                                </tr>
-                                <% end %>
-                                <% end %>
-                                <% end %>
-                            </tbody>
-                        </table>
-                        <br>
-                        <input type="hidden" name="mode" value="log"><input type="hidden" name="action" value=""><input type="button" value="戻る" onclick="switchsubmit(this.form, 'back')"> <input type="button" value="確定" onclick="switchsubmit(this.form, 'delexec')"><% when "delexec" %>
-                        <table align="center" style="width: <%= (TABLEWIDTH - 20) %>px;">
-                            <tbody>
+                    <% when "edit" %>
+                    <% db.transaction do %>
+                    <table align="center" style="width: <%= (TABLEWIDTH - 20) %>px;">
+                        <tbody>
+                            <tr>
+                                <td colspan="3" class="formheader">
+                                    ■  ログファイル管理
+                                    <br>
+                                    赤枠のログを入力された名前で、チェックされたログの後に挿入します。
+                                    <br>
+                                </td>
+                            </tr>
+                            <tr>
+                                <td class="formnavi">
+                                      
+                                </td>
+                                <td style="text-align: center;" class="formnavi">
+                                    ログファイルのパス
+                                </td>
+                                <td style="text-align: center;" class="formnavi">
+                                    ログの表示名
+                                </td>
+                            </tr>
+                            <% editcounter = 0 %>
+                            <% session["loglist"].path.each_with_index do |log, i| %>
+                            <% if session["logeditindex"] != i %>
+                            <tr>
+                                <td style="text-align: center; width: 30px;" class="forminput">
+                                    <% if session["logeditindex"] == (i + 1) %>
+                                    <input type="radio" name="loginsertindex" value="<%= editcounter %>" checked="checked"><% else %>
+                                    <input type="radio" name="loginsertindex" value="<%= editcounter %>"><% end %>
+                                </td>
+                                <td style="text-align: center;" class="forminput">
+                                    <%= log %>
+                                </td>
+                                <td style="text-align: center;" class="forminput">
+                                    <%= session["loglist"].display[i] %>
+                                </td>
+                            </tr>
+                            <% editcounter = editcounter + 1 %>
+                            <% else %>
+                            <tr>
+                                <td style="text-align: center; width: 30px;" class="forminputhilight">
+                                      
+                                </td>
+                                <td style="text-align: center;" class="forminputhilight">
+                                    <%= log %>
+                                </td>
+                                <td style="text-align: center;" class="forminputhilight">
+                                    <%= session["loglist"].display[i] %>
+                                </td>
+                            </tr>
+                            <% end %>
+                            <% end %>
+                        </tbody>
+                    </table>
+                    <br>
+                    <table align="center">
+                        <tbody>
+                            <tr>
+                                <td colspan="2" class="forminput">
+                                    ■ <%= session["logpath"] %>の新しい情報を入力してください
+                                </td>
                                 <tr>
-                                    <td class="forminput" style="text-align: center;">
-                                        ã\83­ã\82°ã\83\95ã\82¡ã\82¤ã\83«ã\81®å\89\8aé\99¤ã\81\8cå®\8cäº\86ã\81\97ã\81¾ã\81\97ã\81\9fã\80\82
+                                    <td style="text-align: right;">
+                                        ã\83­ã\82°ã\81®ã\83\91ã\82¹
                                     </td>
-                                </tr>
-                            </tbody>
-                        </table>
-                        <br>
-                        <a href="<%= cgi.script_name %>">メニューに戻る</a>
-                        <% when "edit" %>
-                        <% db.transaction do %>
-                        <table align="center" style="width: <%= (TABLEWIDTH - 20) %>px;">
-                            <tbody>
-                                <tr>
-                                    <td colspan="3" class="formheader">
-                                        ■  ログファイル管理
-                                        <br>
-                                        赤枠のログを入力された名前で、チェックされたログの後に挿入します。
-                                        <br>
+                                    <td>
+                                        <input type="text" name="logpath" style="width: 100%" value="<%= session["logpath"] %>">
                                     </td>
                                 </tr>
                                 <tr>
-                                    <td class="formnavi">
-                                          
-                                    </td>
-                                    <td style="text-align: center;" class="formnavi">
-                                        ログファイルのパス
-                                    </td>
-                                    <td style="text-align: center;" class="formnavi">
+                                    <td style="text-align: right;">
                                         ログの表示名
                                     </td>
-                                </tr>
-                                <% editcounter = 0 %>
-                                <% db["loglist"].path.each_with_index do |log, i| %>
-                                <% if db["logeditindex"] != i %>
-                                <tr>
-                                    <td style="text-align: center; width: 30px;" class="forminput">
-                                        <% if db["logeditindex"] == (i + 1) %>
-                                        <input type="radio" name="loginsertindex" value="<%= editcounter %>" checked="checked"><% else %>
-                                        <input type="radio" name="loginsertindex" value="<%= editcounter %>"><% end %>
-                                    </td>
-                                    <td style="text-align: center;" class="forminput">
-                                        <%= log %>
-                                    </td>
-                                    <td style="text-align: center;" class="forminput">
-                                        <%= db["loglist"].display[i] %>
+                                    <td>
+                                        <input type="text" name="logdisplay" style="width: 100%" value="<%= session["logdisplay"] %>">
                                     </td>
                                 </tr>
-                                <% editcounter = editcounter + 1 %>
-                                <% else %>
-                                <tr>
-                                    <td style="text-align: center; width: 30px;" class="forminputhilight">
-                                          
-                                    </td>
-                                    <td style="text-align: center;" class="forminputhilight">
-                                        <%= log %>
-                                    </td>
-                                    <td style="text-align: center;" class="forminputhilight">
-                                        <%= db["loglist"].display[i] %>
-                                    </td>
-                                </tr>
-                                <% end %>
-                                <% end %>
-                            </tbody>
-                        </table>
-                        <br>
-                        <table align="center">
-                            <tbody>
-                                <tr>
-                                    <td colspan="2" class="forminput">
-                                        ■ <%= db["logpath"] %>の新しい情報を入力してください
-                                    </td>
+                                </tbody>
+                            </table><%= session["error"] %>
+                            <br>
+                            <input type="hidden" name="logeditindex" value="<%= session["logeditindex"] %>"><input type="hidden" name="mode" value="log"><input type="hidden" name="action" value=""><input type="button" value="戻る" onclick="switchsubmit(this.form, 'back')"> <input type="button" value="確認" onclick="switchsubmit(this.form, 'editconfirm')"><% end %>
+                            <% when "editconfirm" %>
+                            <% db.transaction do %>
+                            <table align="center" style="width: <%= (TABLEWIDTH - 20) %>px;">
+                                <tbody>
                                     <tr>
-                                        <td style="text-align: right;">
-                                            ログのパス
+                                        <td colspan="3" class="formheader">
+                                            ■  確認
+                                            <br>
+                                            以下のように変更を適用します。よろしいですか?
+                                            <br>
                                         </td>
-                                        <td>
-                                            <input type="text" name="logpath" style="width: 100%" value="<%= db["logpath"] %>">
+                                    </tr>
+                                    <tr>
+                                        <td style="text-align: center;" class="formnavi">
+                                            ログファイルのパス
+                                        </td>
+                                        <td style="text-align: center;" class="formnavi">
+                                            ログの表示名
+                                        </td>
+                                    </tr>
+                                    <% editcounter = 0 %>
+                                    <% session["loglist"].path.each_with_index do |log, i| %>
+                                    <% if session["logeditindex"] != i %>
+                                    <tr>
+                                        <td style="text-align: center;" class="forminput">
+                                            <%= log %>
+                                        </td>
+                                        <td style="text-align: center;" class="forminput">
+                                            <%= session["loglist"].display[i] %>
                                         </td>
                                     </tr>
+                                    <% if editcounter == session["loginsertindex"] %>
                                     <tr>
-                                        <td style="text-align: right;">
+                                        <td style="text-align: center;" class="forminputhilight">
+                                            <%= session["logpath"] %>
+                                            <input type="hidden" name="logpath" value="<%= session["logpath"] %>">
+                                        </td>
+                                        <td style="text-align: center;" class="forminputhilight">
+                                            <%= session["logdisplay"] %>
+                                            <input type="hidden" name="logdisplay" value="<%= session["logdisplay"] %>">
+                                        </td>
+                                    </tr><% end %>
+                                    <% editcounter = editcounter + 1 %>
+                                    <% end %>
+                                    <% end %>
+                                </tbody>
+                            </table>
+                            <br>
+                            <br>
+                            <input type="hidden" name="logeditindex" value="<%= session["logeditindex"] %>"><input type="hidden" name="loginsertindex" value="<%= session["loginsertindex"] %>"><input type="hidden" name="mode" value="log"><input type="hidden" name="action" value=""><input type="button" value="戻る" onclick="switchsubmit(this.form, 'edit')"> <input type="button" value="確定" onclick="switchsubmit(this.form, 'editexec')"><% end %>
+                            <% when "editexec" %>
+                            <table align="center" style="width: <%= (TABLEWIDTH - 20) %>px;">
+                                <tbody>
+                                    <tr>
+                                        <td class="forminput" style="text-align: center;">
+                                            ログファイルの編集が完了しました。
+                                        </td>
+                                    </tr>
+                                </tbody>
+                            </table>
+                            <br>
+                            <a href="<%= cgi.script_name %>">メニューに戻る</a>
+                            <% else %>
+                            <% db.transaction do %>
+                            <table align="center" style="width: <%= (TABLEWIDTH - 20) %>px;">
+                                <tbody>
+                                    <tr>
+                                        <td colspan="3" class="formheader">
+                                            ■  ログファイル管理
+                                            <br>
+                                            (現在の<%= session["loglist"].path[0] %>をログとして保存します。その後loglist.xmlを変更します。)
+                                            <br>
+                                        </td>
+                                    </tr>
+                                    <tr>
+                                        <td class="formnavi">
+                                              
+                                        </td>
+                                        <td colspan="" style="text-align: center;" class="formnavi">
+                                            ログファイルのパス
+                                        </td>
+                                        <td style="text-align: center;" class="formnavi">
                                             ログの表示名
                                         </td>
-                                        <td>
-                                            <input type="text" name="logdisplay" style="width: 100%" value="<%= db["logdisplay"] %>">
+                                    </tr>
+                                    <% session["loglist"].path.each_with_index do |log, i| %>
+                                    <tr>
+                                        <td style="text-align: center; width: 30px;" class="forminput">
+                                            <% if i != 0 %>
+                                            <input type="radio" name="logdelindex" value="<%= i %>"><% else %> <% end %>
+                                        </td>
+                                        <td style="text-align: center;" class="forminput">
+                                            <%= log %>
+                                        </td>
+                                        <td style="text-align: center;" class="forminput">
+                                            <%= session["loglist"].display[i] %>
                                         </td>
                                     </tr>
-                                    </tbody>
-                                </table><%= db["error"] %>
-                                <br>
-                                <input type="hidden" name="mode" value="log"><input type="hidden" name="action" value=""><input type="button" value="戻る" onclick="switchsubmit(this.form, 'back')"> <input type="button" value="確認" onclick="switchsubmit(this.form, 'editconfirm')"><% end %>
-                                <% when "editconfirm" %>
-                                <% db.transaction do %>
-                                <table align="center" style="width: <%= (TABLEWIDTH - 20) %>px;">
-                                    <tbody>
-                                        <tr>
-                                            <td colspan="3" class="formheader">
-                                                ■  確認
-                                                <br>
-                                                以下のように変更を適用します。よろしいですか?
-                                                <br>
-                                            </td>
-                                        </tr>
-                                        <tr>
-                                            <td style="text-align: center;" class="formnavi">
-                                                ログファイルのパス
-                                            </td>
-                                            <td style="text-align: center;" class="formnavi">
-                                                ログの表示名
-                                            </td>
-                                        </tr>
-                                        <% editcounter = 0 %>
-                                        <% db["loglist"].path.each_with_index do |log, i| %>
-                                        <% if db["logeditindex"] != i %>
-                                        <tr>
-                                            <td style="text-align: center;" class="forminput">
-                                                <%= log %>
-                                            </td>
-                                            <td style="text-align: center;" class="forminput">
-                                                <%= db["loglist"].display[i] %>
-                                            </td>
-                                        </tr>
-                                        <% if editcounter == db["loginsertindex"] %>
-                                        <tr>
-                                            <td style="text-align: center;" class="forminputhilight">
-                                                <%= db["logpath"] %>
-                                            </td>
-                                            <td style="text-align: center;" class="forminputhilight">
-                                                <%= db["logdisplay"] %>
-                                            </td>
-                                        </tr>
-                                        <% end %>
-                                        <% editcounter = editcounter + 1 %>
-                                        <% end %>
-                                        <% end %>
-                                    </tbody>
-                                </table>
-                                <br>
-                                <br>
-                                <input type="hidden" name="logdelindex" value="<%= db["logeditindex"] %>"><input type="hidden" name="mode" value="log"><input type="hidden" name="action" value=""><input type="button" value="戻る" onclick="switchsubmit(this.form, 'edit')"> <input type="button" value="確定" onclick="switchsubmit(this.form, 'editexec')"><% end %>
-                                <% when "editexec" %>
-                                <table align="center" style="width: <%= (TABLEWIDTH - 20) %>px;">
-                                    <tbody>
+                                    <% end %>
+                                </tbody>
+                            </table>
+                            <br>
+                            <input type="button" value="編集" onclick="switchsubmit(this.form, 'edit')"> <input type="button" value="削除" onclick="switchsubmit(this.form, 'delconfirm')">
+                            <br>
+                            <br>
+                            <table align="center">
+                                <tbody>
+                                    <tr>
+                                        <td colspan="2" class="forminput">
+                                            ■ 現在のdiary.xmlを保存する情報を設定してください
+                                        </td>
                                         <tr>
-                                            <td class="forminput" style="text-align: center;">
-                                                ã\83­ã\82°ã\83\95ã\82¡ã\82¤ã\83«ã\81®ç·¨é\9b\86ã\81\8cå®\8cäº\86ã\81\97ã\81¾ã\81\97ã\81\9fã\80\82
+                                            <td style="text-align: right;">
+                                                ã\83­ã\82°ã\81®ã\83\91ã\82¹
                                             </td>
-                                        </tr>
-                                    </tbody>
-                                </table>
-                                <br>
-                                <a href="<%= cgi.script_name %>">メニューに戻る</a>
-                                <% else %>
-                                <% db.transaction do %>
-                                <table align="center" style="width: <%= (TABLEWIDTH - 20) %>px;">
-                                    <tbody>
-                                        <tr>
-                                            <td colspan="3" class="formheader">
-                                                ■  ログファイル管理
-                                                <br>
-                                                (現在の<%= db["loglist"].path[0] %>をログとして保存します。その後loglist.xmlを変更します。)
-                                                <br>
+                                            <td>
+                                                <input type="text" name="logpath" style="width: 100%" value="<%= session["logpath"] %>">
                                             </td>
                                         </tr>
                                         <tr>
-                                            <td class="formnavi">
-                                                  
-                                            </td>
-                                            <td colspan="" style="text-align: center;" class="formnavi">
-                                                ログファイルのパス
-                                            </td>
-                                            <td style="text-align: center;" class="formnavi">
+                                            <td style="text-align: right;">
                                                 ログの表示名
                                             </td>
-                                        </tr>
-                                        <% db["loglist"].path.each_with_index do |log, i| %>
-                                        <tr>
-                                            <td style="text-align: center; width: 30px;" class="forminput">
-                                                <% if i != 0 %>
-                                                <input type="radio" name="logdelindex" value="<%= i %>"><% else %> <% end %>
-                                            </td>
-                                            <td style="text-align: center;" class="forminput">
-                                                <%= log %>
-                                            </td>
-                                            <td style="text-align: center;" class="forminput">
-                                                <%= db["loglist"].display[i] %>
+                                            <td>
+                                                <input type="text" name="logdisplay" style="width: 100%" value="<%= session["logdisplay"] %>">
                                             </td>
                                         </tr>
-                                        <% end %>
-                                    </tbody>
-                                </table>
-                                <br>
-                                <input type="button" value="編集" onclick="switchsubmit(this.form, 'edit')"> <input type="button" value="削除" onclick="switchsubmit(this.form, 'delconfirm')">
-                                <br>
-                                <br>
-                                <table align="center">
-                                    <tbody>
-                                        <tr>
-                                            <td colspan="2" class="forminput">
-                                                ■ 現在のdiary.xmlを保存する情報を設定してください
-                                            </td>
-                                            <tr>
-                                                <td style="text-align: right;">
-                                                    ログのパス
-                                                </td>
-                                                <td>
-                                                    <input type="text" name="logpath" style="width: 100%" value="<%= db["logpath"] %>">
-                                                </td>
-                                            </tr>
-                                            <tr>
-                                                <td style="text-align: right;">
-                                                    ログの表示名
-                                                </td>
-                                                <td>
-                                                    <input type="text" name="logdisplay" style="width: 100%" value="<%= db["logdisplay"] %>">
-                                                </td>
-                                            </tr>
-                                            </tbody>
-                                        </table><%= db["error"] %>
-                                        <br>
-                                        <input type="hidden" name="mode" value="log"><input type="hidden" name="action" value=""><input type="button" value="確定" onclick="switchsubmit(this.form, 'addconfirm')"><% end %>
-                                        <% end %>
-                                        </form>
-                                    </div>
+                                        </tbody>
+                                    </table><%= session["error"] %>
                                     <br>
-                                    <div class="divstyle" style="border: none;">
-                                        <%= APPVERSION %>
-                                    </div>
-                                    </body>
-                                </html>
+                                    <input type="hidden" name="mode" value="log"><input type="hidden" name="action" value=""><input type="button" value="確定" onclick="switchsubmit(this.form, 'addconfirm')"><% end %>
+                                    <% end %>
+                                    </form>
+                                </div>
+                                <br>
+                                <div class="divstyle" style="border: none;">
+                                    <%= APPVERSION %>
+                                </div>
+                                </body>
+                            </html>
index 3df25a8..e842c95 100644 (file)
                             </td>
                         </tr>
                         <% db.transaction do
-                        entry = db["newentry"]
+                        entry = session["newentry"]
                         entry.paramlist.each do |val| %>
                         <tr style="display: <%= entry.display[val] %>;">
                             <td class="formnavi" style="width: 140px;">
                                 <%= entry.name[val] %>
                             </td>
-                            <td class="forminput"><% if val != "content" %><%= entry.send(val) %><% else %><%= entry.content_for_view %><% end %></td>
+                            <td class="forminput"><input type="hidden" name="<%= val %>" value="<%= entry.send(val) %>"><% if val != "content" %><%= entry.send(val) %><% else %><%= entry.content_for_view %><% end %></td>
                         </tr>
                         <% end %>
                         <% end %>
@@ -71,7 +71,7 @@
                         </tr>
                         <% db.transaction do
                         if cgi["action"] == "back"
-                        entry = db["newentry"]
+                        entry = session["newentry"]
                         else
                         entry = Entry.new({})
                         end
                         </tr>
                         <% db.transaction do
                         if cgi["action"] == "back"
-                        entry = db["newentry"]
+                        entry = session["newentry"]
                         else
                         entry = Entry.new({})
                         end
                                 <% if val == "content" %>
                                 <textarea name="<%= val %>" rows="10" style="width: 100%" id="contenteditor"><%= entry.content_for_generator %></textarea>
                                 <% elsif val == "entryid" %>
-                                <input type="text" name="<%= val %>" value="<%= db["feed"].feedid %>?<%= date %>" style="width: 100%"><% elsif val == "updated" || val == "published" %>
+                                <input type="text" name="<%= val %>" value="<%= session["feed"].feedid %>?<%= date %>" style="width: 100%"><% elsif val == "updated" || val == "published" %>
                                 <input type="text" name="<%= val %>" value="<%= date %>" style="width: 100%"><% elsif val == "url" %>
-                                <input type="text" name="<%= val %>" value="<%= db["feed"].url %>#<%= db["feed"].feedid %>?<%= date %>" style="width: 100%"><% else %>
+                                <input type="text" name="<%= val %>" value="<%= session["feed"].url %>#<%= session["feed"].feedid %>?<%= date %>" style="width: 100%"><% else %>
                                 <input type="text" name="<%= val %>" value="<%= entry.send(val) %>" style="width: 100%"><% end %>
                             </td>
                         </tr><% end %>
index 0ba3d8d..3553ff1 100644 (file)
                                 ログの表示名
                             </td>
                         </tr>
-                        <% db["loglist"].path.each_with_index do |log, i| %>
+                        <% session["loglist"].path.each_with_index do |log, i| %>
                         <tr>
                             <td style="text-align: center;" class="forminput">
                                 <%= log %>
                             </td>
                             <td style="text-align: center;" class="forminput">
-                                <%= db["loglist"].display[i] %>
+                                <%= session["loglist"].display[i] %>
                             </td>
                         </tr>
                         <% if i == 0 %>
                         <tr>
                             <td style="text-align: center;" class="forminputhilight">
-                                <%= db["logpath"] %>
+                                <%= session["logpath"] %>
                             </td>
                             <td style="text-align: center;" class="forminputhilight">
-                                <%= db["logdisplay"] %>
+                                <%= session["logdisplay"] %>
                             </td>
                         </tr>
                         <% end %>
                             </td>
                         </tr>
                     </tbody>
-                </table><%= db["error"] %>
+                </table><%= session["error"] %>
                 <br>
                 <input type="hidden" name="mode" value="replace"><input type="hidden" name="action" value=""><input type="button" value="確認" onclick="switchsubmit(this.form, 'confirm')">
                 <br>
index 0b3fbfb..22c1781 100644 (file)
@@ -83,7 +83,7 @@
                                                 [ <%= XMLPATH %>] ディレクトリ内部のファイル一覧
                                             </td>
                                         </tr>
-                                        <% db["filelist"].each do |fname| %>
+                                        <% session["filelist"].each do |fname| %>
                                         <tr>
                                             <td class="forminput" style="text-align: center; padding: 3px;">
                                                 <a href="<%= XMLPATH %><%= fname %>" target="_blank"><%= fname %></a>
index cea83f8..e19884b 100644 (file)
                             </td>
                         </tr>
                         <% db.transaction do %>
-                        <% db["loglist"].display.each_with_index do |val, i| %>
+                        <% session["loglist"].display.each_with_index do |val, i| %>
                         <tr>
                             <td style="text-align: center; width: 25px;" class="forminput">
-                                <input type="radio" name="logpath" value="<%= db["loglist"].path[i] %>"<% if db["loglist"].path[i] == session["filepath"] %>checked="checked"<% end %>>
+                                <input type="radio" name="logpath" value="<%= session["loglist"].path[i] %>"<% if session["loglist"].path[i] == session["filepath"] %>checked="checked"<% end %>>
                             </td>
                             <td style="text-align: center;" class="forminput">
-                                <%= db["loglist"].display[i] %>
+                                <%= session["loglist"].display[i] %>
                             </td>
                             <td style="text-align: center;" class="forminput">
-                                <%= db["loglist"].path[i] %>
+                                <%= session["loglist"].path[i] %>
                             </td>
                             <td style="text-align: center;" class="forminput">
-                                [ <a href="<%= XMLPATH + db["loglist"].path[i].match(/[^\/]*?$/).to_a[0] %>" target="_blank">OPEN</a>
+                                [ <a href="<%= XMLPATH + session["loglist"].path[i].match(/[^\/]*?$/).to_a[0] %>" target="_blank">OPEN</a>
                                 ]
                             </td>
                         </tr>
index 9a2ea0e..3b19933 100644 (file)
@@ -564,28 +564,32 @@ class Controller
         # ログ選択画面
         when "logselect"
         session["filepath"] = params["logpath"]
-        db["loglist"] = LogList.readxml(LISTXMLPATH)
+        session["loglist"] = LogList.readxml(LISTXMLPATH)
         # 初期状態で選択されるログは「loglist.xml」の最上に位置するログになります
-        session["filepath"] = db["loglist"].path[0] if session["filepath"] == nil
-        db["feed"] = Feed.readxml(XMLPATH + session["filepath"].match(/[^\/]*?$/).to_a[0])
-        db["entry"] = Entry.readxml(XMLPATH + session["filepath"].match(/[^\/]*?$/).to_a[0])
+        session["filepath"] = session["loglist"].path[0] if session["filepath"] == nil
+        session["feed"] = Feed.readxml(XMLPATH + session["filepath"].match(/[^\/]*?$/).to_a[0])
+        session["entry"] = Entry.readxml(XMLPATH + session["filepath"].match(/[^\/]*?$/).to_a[0])
         
         # 新規記事追加部分
         when "newentry"
         case params["action"]
           # 確認画面
           when "confirm"
-          db["newentry"] = Entry.new(params)
-          db["newentry"].content = db["newentry"].content_for_blog
+          session["newentry"] = Entry.new(params)
+          session["newentry"].content = session["newentry"].content_for_blog
           # 記事の追記を実際にファイルに反映
           when "exec"
-          db["entry"].unshift db["newentry"]
+          session["newentry"] = Entry.new(params)
+          session["entry"].unshift session["newentry"]
           feedwriter = FeedWriter.new(XMLPATH + session["filepath"].match(/[^\/]*?$/).to_a[0])
-          feedwriter.to_xml(db["feed"], db["entry"])
+          feedwriter.to_xml(session["feed"], session["entry"])
+          # 確認画面から戻った場合
+          when "back"
+          session["newentry"] = Entry.new(params)
         else 
           # New Diary - Default
-          db["feed"] = Feed.readxml(XMLPATH + session["filepath"].match(/[^\/]*?$/).to_a[0])
-          db["entry"] = Entry.readxml(XMLPATH + session["filepath"].match(/[^\/]*?$/).to_a[0])
+          session["feed"] = Feed.readxml(XMLPATH + session["filepath"].match(/[^\/]*?$/).to_a[0])
+          session["entry"] = Entry.readxml(XMLPATH + session["filepath"].match(/[^\/]*?$/).to_a[0])
         end
         
         # 記事編集部分
@@ -597,19 +601,24 @@ class Controller
           # 確認画面
           when "confirm"
           session["editid"] = cgi["editid"].to_s
-          db["editentry"] = Entry.new(params)
-          db["editentry"].content = db["editentry"].content_for_blog
+          session["editentry"] = Entry.new(params)
+          session["editentry"].content = session["editentry"].content_for_blog
           # 記事の変更を実際にファイルに反映
           when "exec"
-          db["entry"].each_with_index { |e, i|
-            db["entry"][i] = db["editentry"] if e.entryid == cgi["editid"].to_s
+          session["editentry"] = Entry.new(params)
+          session["entry"].each_with_index { |e, i|
+            session["entry"][i] = session["editentry"] if e.entryid == cgi["editid"].to_s
           }
           feedwriter = FeedWriter.new(XMLPATH + session["filepath"].match(/[^\/]*?$/).to_a[0])
-          feedwriter.to_xml(db["feed"], db["entry"])
+          feedwriter.to_xml(session["feed"], session["entry"])
+          # 確認画面から戻った場合
+          when "back"
+          session["editid"] = cgi["editid"].to_s
+          session["editentry"] = Entry.new(params)
         else
           # Edit Diary - Default
-          db["feed"] = Feed.readxml(XMLPATH + session["filepath"].match(/[^\/]*?$/).to_a[0])
-          db["entry"] = Entry.readxml(XMLPATH + session["filepath"].match(/[^\/]*?$/).to_a[0])
+          session["feed"] = Feed.readxml(XMLPATH + session["filepath"].match(/[^\/]*?$/).to_a[0])
+          session["entry"] = Entry.readxml(XMLPATH + session["filepath"].match(/[^\/]*?$/).to_a[0])
         end
         
         # 記事削除部分
@@ -621,16 +630,16 @@ class Controller
           # 記事の削除を実際にファイルに反映
           when "exec"
           delindex = nil
-          db["entry"].each_with_index { |e, i|
+          session["entry"].each_with_index { |e, i|
             delindex = i if e.entryid == cgi["delid"].to_s
           }
-          db["entry"].delete_at(delindex) unless delindex == nil
+          session["entry"].delete_at(delindex) unless delindex == nil
           feedwriter = FeedWriter.new(XMLPATH + session["filepath"].match(/[^\/]*?$/).to_a[0])
-          feedwriter.to_xml(db["feed"], db["entry"])
+          feedwriter.to_xml(session["feed"], session["entry"])
         else
           # Delete Diary - Default
-          db["feed"] = Feed.readxml(XMLPATH + session["filepath"].match(/[^\/]*?$/).to_a[0])
-          db["entry"] = Entry.readxml(XMLPATH + session["filepath"].match(/[^\/]*?$/).to_a[0])
+          session["feed"] = Feed.readxml(XMLPATH + session["filepath"].match(/[^\/]*?$/).to_a[0])
+          session["entry"] = Entry.readxml(XMLPATH + session["filepath"].match(/[^\/]*?$/).to_a[0])
         end
         
         # Feed情報変更部分
@@ -638,11 +647,15 @@ class Controller
         case params["action"]
           # 確認画面
           when "confirm"
-          db["feed"] = Feed.new(params)
+          session["feed"] = Feed.new(params)
           # 実際にFeed情報の変更をファイルに反映
           when "exec"
+          session["feed"] = Feed.new(params)
           feedwriter = FeedWriter.new(XMLPATH + session["filepath"].match(/[^\/]*?$/).to_a[0])
-          feedwriter.to_xml(db["feed"], db["entry"])
+          feedwriter.to_xml(session["feed"], session["entry"])
+          # 確認画面から戻った場合
+          when "back"
+          session["feed"] = Feed.new(params)
         else
           
         end
@@ -652,22 +665,39 @@ class Controller
         case params["action"]
           # ログファイルの編集を実際にファイルに反映
           when "addexec"
+          # 入力されたログが既に存在するかを確認
+          session["loglist"].path.each do |val|
+            if val == cgi["logpath"]
+              # 重複していた場合エラーメッセージを表示し、処理を行わない
+              params["action"] = ""
+              error = "<span style='color: #ff0000'>同一のファイルが存在します!別の名前を指定してください。</span><br>"
+              break;
+            end
+          end
+          
+          session["logpath"] = cgi["logpath"]
+          session["logdisplay"] = cgi["logdisplay"]
+          
           # 入力された内容を保持する配列に追加
-          db["loglist"].path[1, 0] = db["logpath"]
-          db["loglist"].display[1, 0] = db["logdisplay"]
-          db["loglist"].to_xml
+          session["loglist"].path[1, 0] = session["logpath"]
+          session["loglist"].display[1, 0] = session["logdisplay"]
+          session["loglist"].to_xml
+          
           # 既存のdiary.xmlを指定された名称でコピーして保存
-          FileUtils.copy_file(XMLPATH + db["loglist"].path[0].match(/[^\/]*?$/).to_a[0], XMLPATH + db["logpath"].match(/[^\/]*?$/).to_a[0], true)
+          FileUtils.copy_file(XMLPATH + session["loglist"].path[0].match(/[^\/]*?$/).to_a[0], XMLPATH + session["logpath"].match(/[^\/]*?$/).to_a[0], true)
+          
           # 保持している情報を更新する
-          db["loglist"] = LogList.readxml(LISTXMLPATH)
-          db["entry"] = []
+          session["loglist"] = LogList.readxml(LISTXMLPATH)
+          session["entry"] = []
+          
           # 新たなdiary.xmlを生成。この際保持する情報は同一のFeedオブジェクト
-          writer = FeedWriter.new(XMLPATH + db["loglist"].path[0].match(/[^\/]*?$/).to_a[0])
-          writer.to_xml(db["feed"], [])
+          writer = FeedWriter.new(XMLPATH + session["loglist"].path[0].match(/[^\/]*?$/).to_a[0])
+          writer.to_xml(session["feed"], [])
+          
           # 確認画面
           when "addconfirm"
           # 入力されたログが既に存在するかを確認
-          db["loglist"].path.each do |val|
+          session["loglist"].path.each do |val|
             if val == cgi["logpath"]
               # 重複していた場合エラーメッセージを表示し、処理を行わない
               params["action"] = ""
@@ -676,52 +706,53 @@ class Controller
             end
           end
           
-          db["logpath"] = cgi["logpath"]
-          db["logdisplay"] = cgi["logdisplay"]
+          session["logpath"] = cgi["logpath"]
+          session["logdisplay"] = cgi["logdisplay"]
           
-          if db["logpath"].blank? || db["logdisplay"].blank?
+          if session["logpath"].blank? || session["logdisplay"].blank?
             params["action"] = ""
           end
           when "back"
           # 削除確認画面
           when "delconfirm"
-          db["logdelindex"] = params["logdelindex"].to_i
+          session["logdelindex"] = params["logdelindex"].to_i
           
-          if db["logdelindex"] == 0
+          if session["logdelindex"] == 0
             params["action"] = ""
           end
           # 削除処理
           when "delexec"
-          if db["logdelindex"] == 0
+          session["logdelindex"] = params["logdelindex"].to_i
+          if session["logdelindex"] == 0
             params["action"] = ""
           else
             # 記事ファイルを削除します
-            File.delete(XMLPATH + db["loglist"].path[db["logdelindex"]].match(/[^\/]*?$/).to_s)
+            File.delete(XMLPATH + session["loglist"].path[session["logdelindex"]].match(/[^\/]*?$/).to_s)
             # ログリストから削除します
-            db["loglist"].path.delete_at(db["logdelindex"])
-            db["loglist"].display.delete_at(db["logdelindex"])
-            db["loglist"].to_xml
+            session["loglist"].path.delete_at(session["logdelindex"])
+            session["loglist"].display.delete_at(session["logdelindex"])
+            session["loglist"].to_xml
             # 保持している情報を更新する
-            db["loglist"] = LogList.readxml(LISTXMLPATH)
-            db["entry"] = []
+            session["loglist"] = LogList.readxml(LISTXMLPATH)
+            session["entry"] = []
           end
           # 編集画面
           when "edit"
-          db["logeditindex"] = params["logdelindex"].to_i
+          session["logeditindex"] = params["logdelindex"].to_i
           
-          db["logpath"] = db["loglist"].path[db["logeditindex"]]
-          db["logdisplay"] = db["loglist"].display[db["logeditindex"]]
+          session["logpath"] = session["loglist"].path[session["logeditindex"]]
+          session["logdisplay"] = session["loglist"].display[session["logeditindex"]]
           
-          if db["logeditindex"] == 0
+          if session["logeditindex"] == 0
             params["action"] = ""
           end
           # 編集確認画面
           when "editconfirm"
-          
+          session["logeditindex"] = params["logeditindex"].to_i
           checkflag = true
-          db["loglist"].path.each_with_index do |val, i|
-            if db["logeditindex"] != i
-              if params["logpath"].to_s == db["loglist"].path[i].to_s
+          session["loglist"].path.each_with_index do |val, i|
+            if session["logeditindex"] != i
+              if params["logpath"].to_s == session["loglist"].path[i].to_s
                 checkflag = false
               end
             end
@@ -729,44 +760,65 @@ class Controller
           
           if checkflag == false
             params["action"] = "edit"
-            db["error"] = "<span style='color: #ff0000'>同一のファイルが存在します!別の名前を指定してください。</span><br>"
+            session["error"] = "<span style='color: #ff0000'>同一のファイルが存在します!別の名前を指定してください。</span><br>"
           else
-            db["loginsertindex"] = params["loginsertindex"].to_i
+            session["loginsertindex"] = params["loginsertindex"].to_i
             
-            db["logpath"] = params["logpath"].to_s
-            db["logdisplay"] = params["logdisplay"].to_s
+            session["logpath"] = params["logpath"].to_s
+            session["logdisplay"] = params["logdisplay"].to_s
           end
           # 編集実行
           when "editexec"
+          session["logeditindex"] = params["logeditindex"].to_i
+          checkflag = true
+          session["loglist"].path.each_with_index do |val, i|
+            if session["logeditindex"] != i
+              if params["logpath"].to_s == session["loglist"].path[i].to_s
+                checkflag = false
+              end
+            end
+          end
+          
+          if checkflag == false
+            params["action"] = "edit"
+            session["error"] = "<span style='color: #ff0000'>同一のファイルが存在します!別の名前を指定してください。</span><br>"
+            return
+          else
+            session["loginsertindex"] = params["loginsertindex"].to_i
+            
+            session["logpath"] = params["logpath"].to_s
+            session["logdisplay"] = params["logdisplay"].to_s
+          end
+          
           # ファイルを移動します
-          if XMLPATH + db["loglist"].path[db["logeditindex"]].match(/[^\/]*?$/).to_s != XMLPATH + db["logpath"].match(/[^\/]*?$/).to_s
-            FileUtils.move(XMLPATH + db["loglist"].path[db["logeditindex"]].match(/[^\/]*?$/).to_s, XMLPATH + db["logpath"].match(/[^\/]*?$/).to_s)
+          if XMLPATH + session["loglist"].path[session["logeditindex"]].match(/[^\/]*?$/).to_s != XMLPATH + session["logpath"].match(/[^\/]*?$/).to_s
+            FileUtils.move(XMLPATH + session["loglist"].path[session["logeditindex"]].match(/[^\/]*?$/).to_s, XMLPATH + session["logpath"].match(/[^\/]*?$/).to_s)
           end
           # ログリストを更新します
-          db["loglist"].path.delete_at(db["logeditindex"])
-          db["loglist"].display.delete_at(db["logeditindex"])
-          db["loglist"].path.insert(db["loginsertindex"] + 1, db["logpath"])
-          db["loglist"].display.insert(db["loginsertindex"] + 1, db["logdisplay"])
-          db["loglist"].to_xml
+          session["loglist"].path.delete_at(session["logeditindex"])
+          session["loglist"].display.delete_at(session["logeditindex"])
+          session["loglist"].path.insert(session["loginsertindex"] + 1, session["logpath"])
+          session["loglist"].display.insert(session["loginsertindex"] + 1, session["logdisplay"])
+          session["loglist"].to_xml
           # 初期表示画面
         else
           # 初期表示の際に内部保持データをリフレッシュ
-          db["loglist"] = LogList.readxml(LISTXMLPATH)
+          session["loglist"] = LogList.readxml(LISTXMLPATH)
           
           # 現在編集中のデータを強制的に最上のファイルパスに変更
-          session["filepath"] = db["loglist"].path[0]
+          session["filepath"] = session["loglist"].path[0]
           
           # 前月の時刻を作成します
           prevmonth = (DateTime.now << 1)
           
           # 前月の時刻を元に、ディフォルト書式を生成します
-          db["logpath"] = FEEDXMLDIR + prevmonth.strftime("%Y%m") + ".xml"
-          db["logdisplay"] = prevmonth.strftime("%Y年%m月").gsub("年0", "年")
+          session["logpath"] = FEEDXMLDIR + prevmonth.strftime("%Y%m") + ".xml"
+          session["logdisplay"] = prevmonth.strftime("%Y年%m月").gsub("年0", "年")
         end
         
         # インポートモードの場合の処理
         when "import"
-        db["loglist"] = LogList.readxml(LISTXMLPATH)
+        session["loglist"] = LogList.readxml(LISTXMLPATH)
         
         # リセットモードの場合の処理
         when "reset"
@@ -785,16 +837,16 @@ class Controller
           writer = FeedWriter.new(XMLPATH + loglist.path[0].match(/[^\/]*?$/).to_a[0])
           writer.to_xml(Feed.new({}), [])
           
-          db["loglist"] = LogList.readxml(LISTXMLPATH)
+          session["loglist"] = LogList.readxml(LISTXMLPATH)
           
           # diary.xmlの初期化
-          writer = FeedWriter.new(XMLPATH + db["loglist"].path[0].match(/[^\/]*?$/).to_a[0])
+          writer = FeedWriter.new(XMLPATH + session["loglist"].path[0].match(/[^\/]*?$/).to_a[0])
           writer.to_xml(Feed.new({}), [])
           
           # 初期の編集ファイルはloglist.xml上の最も上のファイル
-          session["filepath"] = db["loglist"].path[0]
-          db["feed"] = Feed.readxml(XMLPATH + session["filepath"].match(/[^\/]*?$/).to_a[0].to_s)
-          db["entry"] = Entry.readxml(XMLPATH + session["filepath"].match(/[^\/]*?$/).to_a[0].to_s)
+          session["filepath"] = session["loglist"].path[0]
+          session["feed"] = Feed.readxml(XMLPATH + session["filepath"].match(/[^\/]*?$/).to_a[0].to_s)
+          session["entry"] = Entry.readxml(XMLPATH + session["filepath"].match(/[^\/]*?$/).to_a[0].to_s)
           
           # 画面の遷移先をトップページにする
           params["mode"] = ""
@@ -805,8 +857,8 @@ class Controller
           filelist = FileUploader.new.filelist()
           
           # タイプがファイルのみリストとして取得する
-          db["filelist"] = []
-          filelist.each { |fname| db["filelist"] << fname if File.ftype(XMLPATH + fname) == "file"}
+          session["filelist"] = []
+          filelist.each { |fname| session["filelist"] << fname if File.ftype(XMLPATH + fname) == "file"}
         end
         
         # ログイン時の画面
@@ -820,19 +872,19 @@ class Controller
           writer.to_xml(Feed.new({}), [])
         end
         
-        db["loglist"] = LogList.readxml(LISTXMLPATH)
+        session["loglist"] = LogList.readxml(LISTXMLPATH)
         
         # diary.xmlが存在するかチェック
-        if File.exist?(XMLPATH + db["loglist"].path[0].match(/[^\/]*?$/).to_a[0]) == false
+        if File.exist?(XMLPATH + session["loglist"].path[0].match(/[^\/]*?$/).to_a[0]) == false
           # なかった場合はdiary.xmlを自動生成
-          writer = FeedWriter.new(XMLPATH + db["loglist"].path[0].match(/[^\/]*?$/).to_a[0])
+          writer = FeedWriter.new(XMLPATH + session["loglist"].path[0].match(/[^\/]*?$/).to_a[0])
           writer.to_xml(Feed.new({}), [])
         end
         
         # 初期の編集ファイルはloglist.xml上の最も上のファイル
-        session["filepath"] = db["loglist"].path[0] if session["filepath"] == nil
-        db["feed"] = Feed.readxml(XMLPATH + session["filepath"].match(/[^\/]*?$/).to_a[0].to_s)
-        db["entry"] = Entry.readxml(XMLPATH + session["filepath"].match(/[^\/]*?$/).to_a[0].to_s)
+        session["filepath"] = session["loglist"].path[0] if session["filepath"] == nil
+        session["feed"] = Feed.readxml(XMLPATH + session["filepath"].match(/[^\/]*?$/).to_a[0].to_s)
+        session["entry"] = Entry.readxml(XMLPATH + session["filepath"].match(/[^\/]*?$/).to_a[0].to_s)
       end
     end
   end
@@ -847,64 +899,64 @@ class Controller
           when "exec"
           # ファイルを実際にアップロードします
           file = FileUploader.new
-          file.upload(db["logpath"], db["importxml"])
+          file.upload(session["logpath"], session["importxml"])
           
           # loglist.xmlを更新します
-          db["loglist"].path[db["loginsertindex"], 0] = db["logpath"]
-          db["loglist"].display[db["loginsertindex"], 0] = db["logdisplay"]
-          db["loglist"].to_xml
+          session["loglist"].path[session["loginsertindex"], 0] = session["logpath"]
+          session["loglist"].display[session["loginsertindex"], 0] = session["logdisplay"]
+          session["loglist"].to_xml
           
           # 情報を更新します
-          db["loglist"] = LogList.readxml(LISTXMLPATH)
-          session["filepath"] = db["loglist"].path[0] if session["filepath"] == nil
-          db["feed"] = Feed.readxml(XMLPATH + session["filepath"].match(/[^\/]*?$/).to_a[0].to_s)
-          db["entry"] = Entry.readxml(XMLPATH + session["filepath"].match(/[^\/]*?$/).to_a[0].to_s)
+          session["loglist"] = LogList.readxml(LISTXMLPATH)
+          session["filepath"] = session["loglist"].path[0] if session["filepath"] == nil
+          session["feed"] = Feed.readxml(XMLPATH + session["filepath"].match(/[^\/]*?$/).to_a[0].to_s)
+          session["entry"] = Entry.readxml(XMLPATH + session["filepath"].match(/[^\/]*?$/).to_a[0].to_s)
           
           when "confirm"
           # 入力されたログファイルパスが既に存在するかを確認
           checkflag = true
-          db["logpath"] = Controller.get_mpart_value(cgi["logpath"])
-          db["loglist"].path.each do |val|
-            if val == db["logpath"]
+          session["logpath"] = Controller.get_mpart_value(cgi["logpath"])
+          session["loglist"].path.each do |val|
+            if val == session["logpath"]
               # 重複していた場合エラーメッセージを表示し、処理を行わない
-              db["logpath"] = ""
+              session["logpath"] = ""
               params["action"] = ""
-              db["error"] = "<br><span style='color: #ff0000'>同一のファイルが存在します!別の名前を指定してください。</span><br>"
+              session["error"] = "<br><span style='color: #ff0000'>同一のファイルが存在します!別の名前を指定してください。</span><br>"
               checkflag = false
               break;
             end
           end
           
           if checkflag == true
-            db["loginsertindex"] = cgi["loginsertindex"].read.to_i
-            db["logdisplay"] = Controller.get_mpart_value(cgi["logdisplay"])
-            db["importxml"] = cgi["updata"].read
+            session["loginsertindex"] = cgi["loginsertindex"].read.to_i
+            session["logdisplay"] = Controller.get_mpart_value(cgi["logdisplay"])
+            session["importxml"] = cgi["updata"].read
             
             # XMLの整合性をチェックします
             begin
-              REXML::Document.new(Controller.fix_updata_enc(db["importxml"].to_s))
+              REXML::Document.new(Controller.fix_updata_enc(session["importxml"].to_s))
             rescue => exception
-              db["error"] = "<br><span style='color: #ff0000'>不正な整形のXMLです!ファイルを見直してください。</span><br>"
-              db["error"] << "<div class='divstyle' style='width: 560px; color: #ff0000; text-align: left;'>"
-              db["error"] << CGI.escapeHTML(exception.to_s).gsub("\n", "<br>")
-              db["error"] << "</div>"
+              session["error"] = "<br><span style='color: #ff0000'>不正な整形のXMLです!ファイルを見直してください。</span><br>"
+              session["error"] << "<div class='divstyle' style='width: 560px; color: #ff0000; text-align: left;'>"
+              session["error"] << CGI.escapeHTML(exception.to_s).gsub("\n", "<br>")
+              session["error"] << "</div>"
               params["action"] = ""
             end
           end
           
           # 0位置への挿入防止
-          if db["loginsertindex"] == 0
+          if session["loginsertindex"] == 0
             params["action"] = ""
-            db["error"] = "<br><span style='color: #ff0000'>ラジオボックスでログの挿入位置を選択してください!</span><br>"
+            session["error"] = "<br><span style='color: #ff0000'>ラジオボックスでログの挿入位置を選択してください!</span><br>"
           end
           
-          if db["logpath"] == FEEDXMLDIR || db["logdisplay"].blank?
+          if session["logpath"] == FEEDXMLDIR || session["logdisplay"].blank?
             params["action"] = ""
-            db["error"] = "<br><span style='color: #ff0000'>インポートファイル、及び、ログの表示名は空欄にできません。</span><br>"
+            session["error"] = "<br><span style='color: #ff0000'>インポートファイル、及び、ログの表示名は空欄にできません。</span><br>"
           end
         else
           # loglist.xmlをロードします
-          db["loglist"] = LogList.readxml(LISTXMLPATH)
+          session["loglist"] = LogList.readxml(LISTXMLPATH)
         end
         
         # diary.xmlを入れ替える処理
@@ -912,63 +964,63 @@ class Controller
         case params["action"]
           when "exec"
           # diary.xmlを移動します
-          FileUtils.move(XMLPATH + "diary.xml", XMLPATH + db["logpath"].match(/[^\/]*?$/).to_s)
+          FileUtils.move(XMLPATH + "diary.xml", XMLPATH + session["logpath"].match(/[^\/]*?$/).to_s)
           # ファイルをアップロードします
           file = FileUploader.new
-          file.upload("diary.xml", db["importxml"])
+          file.upload("diary.xml", session["importxml"])
           
           # loglist.xmlを更新します
-          db["loglist"].path[1, 0] = db["logpath"]
-          db["loglist"].display[1, 0] = db["logdisplay"]
-          db["loglist"].to_xml
+          session["loglist"].path[1, 0] = session["logpath"]
+          session["loglist"].display[1, 0] = session["logdisplay"]
+          session["loglist"].to_xml
           
           # 情報を更新します
-          db["loglist"] = LogList.readxml(LISTXMLPATH)
-          session["filepath"] = db["loglist"].path[0] if session["filepath"] == nil
-          db["feed"] = Feed.readxml(XMLPATH + session["filepath"].match(/[^\/]*?$/).to_a[0].to_s)
-          db["entry"] = Entry.readxml(XMLPATH + session["filepath"].match(/[^\/]*?$/).to_a[0].to_s)
+          session["loglist"] = LogList.readxml(LISTXMLPATH)
+          session["filepath"] = session["loglist"].path[0] if session["filepath"] == nil
+          session["feed"] = Feed.readxml(XMLPATH + session["filepath"].match(/[^\/]*?$/).to_a[0].to_s)
+          session["entry"] = Entry.readxml(XMLPATH + session["filepath"].match(/[^\/]*?$/).to_a[0].to_s)
           
           when "confirm"
           # 入力されたログファイルパスが既に存在するかを確認
           checkflag = true
-          db["logpath"] = Controller.get_mpart_value(cgi["logpath"])
-          db["loglist"].path.each do |val|
-            if val == db["logpath"]
+          session["logpath"] = Controller.get_mpart_value(cgi["logpath"])
+          session["loglist"].path.each do |val|
+            if val == session["logpath"]
               # 重複していた場合エラーメッセージを表示し、処理を行わない
               params["action"] = ""
-              db["error"] = "<br><span style='color: #ff0000'>同一のファイルが存在します!別の名前を指定してください。</span><br>"
+              session["error"] = "<br><span style='color: #ff0000'>同一のファイルが存在します!別の名前を指定してください。</span><br>"
               checkflag = false
               break;
             end
           end
           
           if checkflag == true
-            db["logdisplay"] = Controller.get_mpart_value(cgi["logdisplay"])
-            db["importxml"] = cgi["updata"].read
+            session["logdisplay"] = Controller.get_mpart_value(cgi["logdisplay"])
+            session["importxml"] = cgi["updata"].read
             
             # XMLの整合性をチェックします
             begin
-              REXML::Document.new(Controller.fix_updata_enc(db["importxml"].to_s))
+              REXML::Document.new(Controller.fix_updata_enc(session["importxml"].to_s))
             rescue => exception
-              db["error"] = "<br><span style='color: #ff0000'>不正な整形のXMLです!ファイルを見直してください。</span><br>"
-              db["error"] << "<div class='divstyle' style='width: 560px; color: #ff0000; text-align: left;'>"
-              db["error"] << CGI.escapeHTML(exception.to_s).gsub("\n", "<br>")
-              db["error"] << "</div>"
+              session["error"] = "<br><span style='color: #ff0000'>不正な整形のXMLです!ファイルを見直してください。</span><br>"
+              session["error"] << "<div class='divstyle' style='width: 560px; color: #ff0000; text-align: left;'>"
+              session["error"] << CGI.escapeHTML(exception.to_s).gsub("\n", "<br>")
+              session["error"] << "</div>"
               params["action"] = ""
             end
           end
           
-          if db["logpath"].blank? || db["logdisplay"].blank? || db["importxml"].blank?
+          if session["logpath"].blank? || session["logdisplay"].blank? || session["importxml"].blank?
             params["action"] = ""
-            db["error"] = "<span style='color: #ff0000'>インポートファイル、及び、ログの表示名、ログのパスは空欄にできません。</span><br>"
+            session["error"] = "<span style='color: #ff0000'>インポートファイル、及び、ログの表示名、ログのパスは空欄にできません。</span><br>"
           end
         else
           # loglist.xmlをロードします
-          db["loglist"] = LogList.readxml(LISTXMLPATH)
+          session["loglist"] = LogList.readxml(LISTXMLPATH)
         end
       else
         # loglist.xmlをロードします
-        db["loglist"] = LogList.readxml(LISTXMLPATH)
+        session["loglist"] = LogList.readxml(LISTXMLPATH)
       end
     end
   end
@@ -1029,9 +1081,6 @@ def main
       # PStore破損チェック!
       begin
         db = PStore.new("./work/#{session.session_id}.dat")
-        db.transaction do
-          db["error"] = ""
-        end
       rescue
         # PStoreファイルを破棄する
         File.delete("./work/#{session.session_id}.dat")
@@ -1044,6 +1093,7 @@ def main
       
       # フォームによって挙動を変更します
       if cgi["mode"].respond_to?(:read) && cgi["action"].respond_to?(:read)
+        session["error"] = ""
         params["mode"] = cgi["mode"].read
         params["action"] = cgi["action"].read
         Controller.MultiForm(cgi, session, params, db)
@@ -1053,20 +1103,11 @@ def main
     end
     
     # メニューとして表示されるHTML文字列です
-=begin
     if USEFILEMANAGER == true
       menu = "<div class=\"divstyle\" style=\"width: #{TABLEWIDTH}px;\"><div class=\"divstyle\" align=\"center\" style=\"margin-bottom: 5px;\">現在編集中のファイル : #{session["filepath"]} [ <a href=\"#{cgi.script_name}?mode=selectlog\">他のファイルを選択</a> ]</div>[ <a href=\"#{cgi.script_name}\">トップページ</a> | 記事管理 ( <a href=\"#{cgi.script_name}?mode=newentry\">作成</a> | <a href=\"#{cgi.script_name}?mode=editentry\">編集</a> | <a href=\"#{cgi.script_name}?mode=delentry\">消去</a> )  | <a href=\"#{cgi.script_name}?mode=editfeed\">XML情報編集</a> | <a href=\"#{cgi.script_name}?mode=log\">ログ管理</a> | <a href=\"#{cgi.script_name}?mode=import\">インポート</a> | <a href=\"#{FILEMANAGER}\" target=\"_blank\">ファイル管理</a> | <a href=\"#{cgi.script_name}?mode=reset\">初期化</a> | <a href=\"#{cgi.script_name}?mode=logout\">ログアウト</a> ]</div>"
     else
       menu = "<div class=\"divstyle\" style=\"width: #{TABLEWIDTH}px;\"><div class=\"divstyle\" align=\"center\" style=\"margin-bottom: 5px;\">現在編集中のファイル : #{session["filepath"]} [ <a href=\"#{cgi.script_name}?mode=selectlog\">他のファイルを選択</a> ]</div>[ <a href=\"#{cgi.script_name}\">トップページ</a> | 記事管理 ( <a href=\"#{cgi.script_name}?mode=newentry\">作成</a> | <a href=\"#{cgi.script_name}?mode=editentry\">編集</a> | <a href=\"#{cgi.script_name}?mode=delentry\">消去</a> )  | <a href=\"#{cgi.script_name}?mode=editfeed\">XML情報編集</a> | <a href=\"#{cgi.script_name}?mode=log\">ログ管理</a> | <a href=\"#{cgi.script_name}?mode=import\">インポート</a> | <a href=\"#{cgi.script_name}?mode=reset\">初期化</a> | <a href=\"#{cgi.script_name}?mode=logout\">ログアウト</a> ]</div>"
     end
-=end
-
-    # メニューとして表示されるHTML文字列です
-    if USEFILEMANAGER == true
-      menu = "<div class=\"divstyle\" style=\"width: #{TABLEWIDTH}px;\"><div class=\"divstyle\" align=\"center\" style=\"margin-bottom: 5px;\">現在編集中のファイル : #{session["filepath"]} [ <a class=\"menu_link\" onclick=\"location.href ='#{cgi.script_name}?mode=selectlog'\">他のファイルを選択</a> ]</div>[ <a class=\"menu_link\" onclick=\"location.href ='#{cgi.script_name}'\">トップページ</a> | 記事管理 ( <a class=\"menu_link\" onclick=\"location.href ='#{cgi.script_name}?mode=newentry'\">作成</a> | <a class=\"menu_link\" onclick=\"location.href ='#{cgi.script_name}?mode=editentry'\">編集</a> | <a class=\"menu_link\" onclick=\"location.href ='#{cgi.script_name}?mode=delentry'\">消去</a> )  | <a class=\"menu_link\" onclick=\"location.href ='#{cgi.script_name}?mode=editfeed'\">XML情報編集</a> | <a class=\"menu_link\" onclick=\"location.href ='#{cgi.script_name}?mode=log'\">ログ管理</a> | <a class=\"menu_link\" onclick=\"location.href ='#{cgi.script_name}?mode=import'\">インポート</a> | <a href=\"#{FILEMANAGER}\" target=\"_blank\">ファイル管理</a> | <a class=\"menu_link\" onclick=\"location.href ='#{cgi.script_name}?mode=reset'\">初期化</a> | <a class=\"menu_link\" onclick=\"location.href ='#{cgi.script_name}?mode=logout'\">ログアウト</a> ]</div>"
-    else
-      menu = "<div class=\"divstyle\" style=\"width: #{TABLEWIDTH}px;\"><div class=\"divstyle\" align=\"center\" style=\"margin-bottom: 5px;\">現在編集中のファイル : #{session["filepath"]} [ <a class=\"menu_link\" onclick=\"location.href ='#{cgi.script_name}?mode=selectlog'\">他のファイルを選択</a> ]</div>[ <a class=\"menu_link\" onclick=\"location.href ='#{cgi.script_name}'\">トップページ</a> | 記事管理 ( <a class=\"menu_link\" onclick=\"location.href ='#{cgi.script_name}?mode=newentry'\">作成</a> | <a class=\"menu_link\" onclick=\"location.href ='#{cgi.script_name}?mode=editentry'\">編集</a> | <a class=\"menu_link\" onclick=\"location.href ='#{cgi.script_name}?mode=delentry'\">消去</a> )  | <a class=\"menu_link\" onclick=\"location.href ='#{cgi.script_name}?mode=editfeed'\">XML情報編集</a> | <a class=\"menu_link\" onclick=\"location.href ='#{cgi.script_name}?mode=log'\">ログ管理</a> | <a class=\"menu_link\" onclick=\"location.href ='#{cgi.script_name}?mode=import'\">インポート</a> | <a class=\"menu_link\" onclick=\"location.href ='#{cgi.script_name}?mode=reset'\">初期化</a> | <a class=\"menu_link\" onclick=\"location.href ='#{cgi.script_name}?mode=logout\">ログアウト</a> ]</div>"
-    end
     
     # ビュー部分
     # modeとactionの相関図は以下のようになります。