<!DOCTYPE html>
<html>
	<head>
		<%= htmlparts["headtag"] %>
		<%= htmlparts['headjs_switchpost'] %>
	</head>
	<body>
		<form action="<%= cgi.script_name %>" method="POST">
			<div class="menu_wrapper">
				<%= htmlparts["menu"] %>
			</div>
			<%= htmlparts["selectfile"] %>
			<%= htmlparts["infoarea"] %>
			<div class="contents">
				<h1>編集ファイル選択</h1>
				<table align="center">
                    <tbody>
                        <tr>
                            <th class="middle padding_normal" style="width: 50px;">
                                　 
                            </th>
                            <th class="normal middle padding_normal">
                                ログファイルの説明
                            </th>
                            <th class="normal middle padding_normal">
                                ログファイルパス
                            </th>
                            <th class="middle padding_normal" style="width: 100px;">
                                開く
                            </th>
                        </tr>
                        <tr>
                            <td class="hr"></td>
                            <td class="hr"></td>
                            <td class="hr"></td>
                            <td class="hr"></td>
                        </tr>
                        <% db.transaction do %>
                        <% db["loglist"].display.each_with_index do |val, i| %>
                        <tr>
                            <td class="middle padding_normal center">
                                <input type="radio" name="logpath" value="<%= db["loglist"].path[i] %>"<% if db["loglist"].path[i] == session["filepath"] %>checked="checked"<% end %>>
                            </td>
                            <td class="middle padding_normal center">
                                <%= db["loglist"].display[i] %>
                            </td>
                            <td class="middle padding_normal center">
                                <%= db["loglist"].path[i] %>
                            </td>
                            <td class="middle padding_normal center">
                                [ <a href="<%= XMLPATH + db["loglist"].path[i].match(/[^\/]*?$/).to_a[0] %>" target="_blank">OPEN</a>
                                ]
                            </td>
                        </tr>
                        <tr>
                            <td class="hr"></td>
                            <td class="hr"></td>
                            <td class="hr"></td>
                            <td class="hr"></td>
                        </tr>
                        <% end %>
                        <% end %>
                    </tbody>
                </table>
                <br>
                <div class="center">
                	<input type="hidden" name="mode" value="logselect"><input type="submit" value="選択">
                </div>
                <br>
                <br>
			</div>
			<div class="bottom_area">
				<%= APPVERSION %>
			</div>
		</form>
	</body>
</html>
