summaryrefslogtreecommitdiffstats
path: root/fetchmail-listentries-html.lsp
blob: 2176bee72bce4105025d7f6ddabfd74df947498f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<% local data, viewlibrary, page_info, session = ... 
require("viewfunctions")
%>

<% displaycommandresults({"editentry", "deleteentry", "createentry"}, session) %>

<h1>Edit/View Fetchmail Entries</h1>
<DL>
<TABLE>
	<TR style="background:#eee;font-weight:bold;">
		<TD style="padding-right:20px;white-space:nowrap;text-align:left;" class="header">Action</TD>
		<TD style="padding-right:20px;white-space:nowrap;text-align:left;" class="header">Entry</TD>
		<TD style="padding-right:20px;white-space:nowrap;text-align:left;" class="header">Enabled</TD>
		<TD style="padding-right:20px;white-space:nowrap;text-align:left;" class="header">Method</TD>
		<TD style="white-space:nowrap;text-align:left;" class="header">Remote Mailbox / Domain</TD>
	</TR>		
<% for i,entry in ipairs(data.value) do %>
	<TR>
		<TD style="padding-right:20px;white-space:nowrap;">
			<% io.write(html.link{value = "editentry?entry=" .. entry.entry.."&method="..entry.method.."&remotemailbox="..entry.remotemailbox.."&localdomain="..entry.localdomain.."&redir="..page_info.orig_action, label="Edit " }) %>
			<% io.write(html.link{value = "deleteentry?entry=" .. entry.entry.."&method="..entry.method.."&remotemailbox="..entry.remotemailbox.."&localdomain="..entry.localdomain, label="Delete " }) %>
		</TD>
		<TD style="padding-right:20px;white-space:nowrap;"><%= html.html_escape(entry.entry) %></TD>
		<TD style="padding-right:20px;white-space:nowrap;"><%= html.html_escape(tostring(entry.enabled)) %></TD>
		<TD style="padding-right:20px;white-space:nowrap;"><%= html.html_escape(entry.method) %></TD>
		<TD style="white-space:nowrap;" width="90%"><% if entry.localdomain and entry.localdomain ~= "" then io.write(html.html_escape(entry.localdomain)) else io.write(html.html_escape(entry.remotemailbox)) end %></TD>
	</TR>
<% end %>
</TABLE>

<DT>Add new entry</DT>
<DD><form action="<%= html.html_escape(page_info.script .. page_info.prefix .. page_info.controller .. "/createentry") %>" method="POST">
<input class="hidden" type="hidden"  name="redir"  value="<%= html.html_escape(page_info.orig_action) %>" >
<input type=submit value="New" class="submit">
</form></DD>
</DL>