summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <natanael.copa@gmail.com>2008-07-28 06:48:16 +0000
committerNatanael Copa <natanael.copa@gmail.com>2008-07-28 06:48:16 +0000
commit7eb0c7fa04e72496e07d25b21bf6a1f2b8f3ac41 (patch)
treeb20168e9e5bccceaf7f00ce94fdf7e2b3532706a
parentc796a251db813fcb96953a6c355b21d15a829c1a (diff)
downloadacf-tinydns-7eb0c7fa04e72496e07d25b21bf6a1f2b8f3ac41.tar.bz2
acf-tinydns-7eb0c7fa04e72496e07d25b21bf6a1f2b8f3ac41.tar.xz
use <% %> instead of <? ?>
git-svn-id: svn://svn.alpinelinux.org/acf/tinydns/trunk@1323 ab2d0c66-481e-0410-8bed-d214d4d58bed
-rwxr-xr-xtinydns-config-html.lsp22
-rw-r--r--tinydns-edit-html.lsp40
-rw-r--r--tinydns-html.lsp10
-rw-r--r--tinydns-listfiles-html.lsp36
-rw-r--r--tinydns-listpermissions-html.lsp28
-rw-r--r--tinydns-status-html.lsp12
-rw-r--r--tinydns-view-html.lsp80
7 files changed, 114 insertions, 114 deletions
diff --git a/tinydns-config-html.lsp b/tinydns-config-html.lsp
index a213785..47c9191 100755
--- a/tinydns-config-html.lsp
+++ b/tinydns-config-html.lsp
@@ -1,24 +1,24 @@
-<? local form, viewlibrary, page_info = ...
+<% local form, viewlibrary, page_info = ...
require("viewfunctions")
-?>
-<?
+%>
+<%
--[[ DEBUG INFORMATION
io.write("<H1>DEBUGGING</H1><span style='color:red'><H2>DEBUG INFO: CFE</H2>")
io.write(html.cfe_unpack(form))
io.write("</span>")
--]]
-?>
+%>
-<? if viewlibrary and viewlibrary.dispatch_component then
+<% if viewlibrary and viewlibrary.dispatch_component then
viewlibrary.dispatch_component("status")
-end ?>
+end %>
-<h1><?= form.label ?></h1>
-<?
+<h1><%= form.label %></h1>
+<%
form.action = page_info.script .. page_info.prefix .. page_info.controller .. "/" .. page_info.action
displayform(form)
-?>
+%>
-<? if viewlibrary and viewlibrary.dispatch_component then
+<% if viewlibrary and viewlibrary.dispatch_component then
viewlibrary.dispatch_component("startstop")
-end ?>
+end %>
diff --git a/tinydns-edit-html.lsp b/tinydns-edit-html.lsp
index 44cf642..a100c27 100644
--- a/tinydns-edit-html.lsp
+++ b/tinydns-edit-html.lsp
@@ -1,6 +1,6 @@
-<? local form, viewlibrary, page_info = ... ?>
-<? require("viewfunctions") ?>
-<? form = viewlibrary.dispatch_component(page_info.prefix .. page_info.controller .. "/editfile", form, true) ?>
+<% local form, viewlibrary, page_info = ... %>
+<% require("viewfunctions") %>
+<% form = viewlibrary.dispatch_component(page_info.prefix .. page_info.controller .. "/editfile", form, true) %>
<script type="text/javascript" src="/js/jquery-latest.js"></script>
<script type="text/javascript">
@@ -115,46 +115,46 @@
$(function(){
addLinks($("#entries").find("tr"));
$("input.submit").click(submitFile);
- <? if form.value.filecontent.linenumber then ?>
- $("#entries tr:eq(<?= form.value.filecontent.linenumber - 1 ?>)").find("a:eq(2)").click().parent().next().focus();
- <? end ?>
+ <% if form.value.filecontent.linenumber then %>
+ $("#entries tr:eq(<%= form.value.filecontent.linenumber - 1 %>)").find("a:eq(2)").click().parent().next().focus();
+ <% end %>
});
</script>
-<?
+<%
--[[ DEBUG INFORMATION
io.write("<H1>DEBUGGING</H1><span style='color:red'><H2>DEBUG INFO: CFE</H2>")
io.write(html.cfe_unpack(form))
io.write("</span>")
--]]
-?>
+%>
<H1>Configuration</H1>
<H2>Expert Configuration</H2>
<H3>File Details</H3>
<DL>
-<?
+<%
displayitem(form.value.filename)
displayitem(form.value.filesize)
displayitem(form.value.mtime)
-?>
+%>
</DL>
<H3>File Entries</H3>
-<? if form.descr then ?><P CLASS='descr'><?= string.gsub(form.descr, "\n", "<BR>") ?></P><? end ?>
-<? if form.errtxt then ?><P CLASS='error'><?= string.gsub(form.errtxt, "\n", "<BR>") ?></P><? end ?>
+<% if form.descr then %><P CLASS='descr'><%= string.gsub(form.descr, "\n", "<BR>") %></P><% end %>
+<% if form.errtxt then %><P CLASS='error'><%= string.gsub(form.errtxt, "\n", "<BR>") %></P><% end %>
<TABLE id="entries">
-<? for line in string.gmatch(form.value.filecontent.value.."\n", "([^\n]*)\n") do ?>
+<% for line in string.gmatch(form.value.filecontent.value.."\n", "([^\n]*)\n") do %>
<TR>
- <TD><?= line ?></TD>
+ <TD><%= line %></TD>
</TR>
-<? end ?>
+<% end %>
</TABLE>
-<? if form.value.filecontent.errtxt then ?><P CLASS='error'><?= string.gsub(form.value.filecontent.errtxt, "\n", "<BR>") ?></P><? end ?>
+<% if form.value.filecontent.errtxt then %><P CLASS='error'><%= string.gsub(form.value.filecontent.errtxt, "\n", "<BR>") %></P><% end %>
-<form action="<?= page_info.script .. page_info.prefix .. page_info.controller .. "/" .. page_info.action ?>" method="POST">
-<input type="hidden" name="filename" value="<?= form.value.filename.value ?>">
-<input type="hidden" name="filecontent" value="<?= form.value.filecontent.value ?>">
+<form action="<%= page_info.script .. page_info.prefix .. page_info.controller .. "/" .. page_info.action %>" method="POST">
+<input type="hidden" name="filename" value="<%= form.value.filename.value %>">
+<input type="hidden" name="filecontent" value="<%= form.value.filecontent.value %>">
<H2>Save and Apply Above Settings</H2>
-<DL><DT></DT><DD><input class="submit" type="submit" name="<?= form.option ?>" value="<?= form.option ?>"></DD></DL>
+<DL><DT></DT><DD><input class="submit" type="submit" name="<%= form.option %>" value="<%= form.option %>"></DD></DL>
</form>
diff --git a/tinydns-html.lsp b/tinydns-html.lsp
index 383906a..be0d7e9 100644
--- a/tinydns-html.lsp
+++ b/tinydns-html.lsp
@@ -1,12 +1,12 @@
-<? local form, viewlibrary, page_info = ...
+<% local form, viewlibrary, page_info = ...
require("viewfunctions")
-?>
+%>
-<H1><?= form.label ?></H1>
-<?
+<H1><%= form.label %></H1>
+<%
form.action = page_info.script .. page_info.prefix .. page_info.controller .. "/" .. page_info.action
if form.value.userid then form.value.userid.contenteditable = false end
if form.value.role then form.value.role.contenteditable = false end
local order = { "userid", "role" }
displayform(form, order)
-?>
+%>
diff --git a/tinydns-listfiles-html.lsp b/tinydns-listfiles-html.lsp
index 46753ec..21bc652 100644
--- a/tinydns-listfiles-html.lsp
+++ b/tinydns-listfiles-html.lsp
@@ -1,15 +1,15 @@
-<? local form, viewlibrary, page_info, session = ...
+<% local form, viewlibrary, page_info, session = ...
require("viewfunctions")
-?>
-<?
+%>
+<%
--[[ DEBUG INFORMATION
io.write("<H1>DEBUGGING</H1><span style='color:red'><H2>DEBUG INFO: CFE</H2>")
io.write(html.cfe_unpack(form))
io.write("</span>")
--]]
-?>
+%>
-<? displaycommandresults({"delete"}, session) ?>
+<% displaycommandresults({"delete"}, session) %>
<h1>Configuration</h1>
<h2>Edit/View existing Domains</h2>
@@ -20,25 +20,25 @@ io.write("</span>")
<TD style="padding-right:20px;white-space:nowrap;text-align:left;" class="header">Last Modified</TD>
<TD style="white-space:nowrap;text-align:left;" class="header">File</TD>
</TR>
-<? for i,file in ipairs(form.value) do ?>
+<% for i,file in ipairs(form.value) do %>
<TR>
<TD style="padding-right:20px;white-space:nowrap;">
- <? io.write(html.link{value = "delete?filename=" .. file.value.filename.value, label="Delete " }) ?>
- <? io.write(html.link{value = "view?filename=" .. file.value.filename.value, label="View " }) ?>
- <? io.write(html.link{value = "edit?filename=" .. file.value.filename.value, label="Edit " }) ?>
- <? io.write(html.link{value = "editfile?filename=" .. file.value.filename.value, label="Expert " }) ?>
+ <% io.write(html.link{value = "delete?filename=" .. file.value.filename.value, label="Delete " }) %>
+ <% io.write(html.link{value = "view?filename=" .. file.value.filename.value, label="View " }) %>
+ <% io.write(html.link{value = "edit?filename=" .. file.value.filename.value, label="Edit " }) %>
+ <% io.write(html.link{value = "editfile?filename=" .. file.value.filename.value, label="Expert " }) %>
</TD>
- <TD style="padding-right:20px;white-space:nowrap;text-align:right;"><?= file.value.filesize.value ?></TD>
- <TD style="padding-right:20px;white-space:nowrap;"><?= file.value.mtime.value ?></TD>
- <TD style="white-space:nowrap;" width="90%"><?= file.value.filename.value ?></TD>
+ <TD style="padding-right:20px;white-space:nowrap;text-align:right;"><%= file.value.filesize.value %></TD>
+ <TD style="padding-right:20px;white-space:nowrap;"><%= file.value.mtime.value %></TD>
+ <TD style="white-space:nowrap;" width="90%"><%= file.value.filename.value %></TD>
</TR>
-<? end ?>
+<% end %>
</TABLE>
-<? if viewlibrary and viewlibrary.dispatch_component and session.permissions.tinydns.newfile then
- local newfileform = viewlibrary.dispatch_component("newfile", nil, true) ?>
+<% if viewlibrary and viewlibrary.dispatch_component and session.permissions.tinydns.newfile then
+ local newfileform = viewlibrary.dispatch_component("newfile", nil, true) %>
<h2>Create new Domain</h2>
-<?
+<%
newfileform.action = "newfile"
displayform(newfileform)
-end ?>
+end %>
diff --git a/tinydns-listpermissions-html.lsp b/tinydns-listpermissions-html.lsp
index 0e8711c..355e49e 100644
--- a/tinydns-listpermissions-html.lsp
+++ b/tinydns-listpermissions-html.lsp
@@ -1,30 +1,30 @@
-<? local view, viewlibrary, page_info = ... ?>
-<? --[[
+<% local view, viewlibrary, page_info = ... %>
+<% --[[
io.write(html.cfe_unpack(view))
---]] ?>
+--]] %>
-<H1><?= view.label ?></H1>
+<H1><%= view.label %></H1>
<H2>User Permissions</H2>
<TABLE>
<TR><TD CLASS='header'>User</TD><TD CLASS='header'>Permissions</TD>
-<? for i,user in ipairs(view.value.user) do ?>
- <TR><TD><?= html.link{value=page_info.script .. page_info.prefix .. page_info.controller .. "/edituserpermissions?userid=" .. user.id, label=user.id} ?></TD><TD>
- <? for y,allowed in pairs(user.allowed) do
+<% for i,user in ipairs(view.value.user) do %>
+ <TR><TD><%= html.link{value=page_info.script .. page_info.prefix .. page_info.controller .. "/edituserpermissions?userid=" .. user.id, label=user.id} %></TD><TD>
+ <% for y,allowed in pairs(user.allowed) do
print(allowed, "<BR>")
- end ?>
+ end %>
<TD></TR>
-<? end ?>
+<% end %>
</TABLE>
<H2>Role Permissions</H2>
<TABLE>
<TR><TD CLASS='header'>Role</TD><TD CLASS='header'>Permissions</TD>
-<? for i,role in ipairs(view.value.role) do ?>
- <TR><TD><?= html.link{value=page_info.script .. page_info.prefix .. page_info.controller .. "/editrolepermissions?role=" .. role.id, label=role.id} ?></TD><TD>
- <? for y,allowed in pairs(role.allowed) do
+<% for i,role in ipairs(view.value.role) do %>
+ <TR><TD><%= html.link{value=page_info.script .. page_info.prefix .. page_info.controller .. "/editrolepermissions?role=" .. role.id, label=role.id} %></TD><TD>
+ <% for y,allowed in pairs(role.allowed) do
print(allowed, "<BR>")
- end ?>
+ end %>
<TD></TR>
-<? end ?>
+<% end %>
</TABLE>
diff --git a/tinydns-status-html.lsp b/tinydns-status-html.lsp
index f175e92..3a34eaf 100644
--- a/tinydns-status-html.lsp
+++ b/tinydns-status-html.lsp
@@ -1,16 +1,16 @@
-<? local data = ... ?>
-<? require("viewfunctions") ?>
-<? --[[
+<% local data = ... %>
+<% require("viewfunctions") %>
+<% --[[
io.write(html.cfe_unpack(data))
---]] ?>
+--]] %>
<H1>System Info</H1>
<DL>
-<?
+<%
displayitem(data.value.status)
displayitem(data.value.version)
displayitem(data.value.autostart)
displayitem(data.value.configdir)
displayitem(data.value.listen)
-?>
+%>
</DL>
diff --git a/tinydns-view-html.lsp b/tinydns-view-html.lsp
index 354b199..e851569 100644
--- a/tinydns-view-html.lsp
+++ b/tinydns-view-html.lsp
@@ -1,6 +1,6 @@
-<? local view, viewlibrary = ...
+<% local view, viewlibrary = ...
require("viewfunctions")
-?>
+%>
<script type="text/javascript" src="/js/jquery-latest.js"></script>
<script type="text/javascript">
@@ -42,46 +42,46 @@ require("viewfunctions")
});
</script>
-<?
+<%
--[[ DEBUG INFORMATION
io.write("<H1>DEBUGGING</H1><span style='color:red'><H2>DEBUG INFO: CFE</H2>")
io.write(html.cfe_unpack(view))
io.write("</span>")
--]]
-?>
+%>
<H1>DNS Entries
-<? if view.filename then io.write(" for "..view.filename) end ?>
+<% if view.filename then io.write(" for "..view.filename) end %>
</H1>
<H2>Locations</H2>
<DL id="locations">
<ul>
-<? local currentloc = ""
+<% local currentloc = ""
for i,loc in ipairs(view.value) do
if loc.type == '%' then
if currentloc ~= loc[1] then
- if currentloc ~= "" then ?>
+ if currentloc ~= "" then %>
</ul>
- <? end ?>
- <li><IMG SRC='/skins/static/tango/16x16/places/start-here.png' width='16' height='16' alt> <B><?= loc[1] ?></B></li>
+ <% end %>
+ <li><IMG SRC='/skins/static/tango/16x16/places/start-here.png' width='16' height='16' alt> <B><%= loc[1] %></B></li>
<ul STYLE='margin-left:30px';>
- <? end
- currentloc = loc[1] ?>
- <li id='filename=<?= loc.filename ?>;linenumber=<?= loc.linenumber ?>'>
- <?= loc[2] ?><? if loc[2] == "" then io.write('*') end ?>
- <? if (loc.errtxt) then ?><P CLASS='error'><?= string.gsub(loc.errtxt, "\n", "<BR>") ?></P><? end ?>
+ <% end
+ currentloc = loc[1] %>
+ <li id='filename=<%= loc.filename %>;linenumber=<%= loc.linenumber %>'>
+ <%= loc[2] %><% if loc[2] == "" then io.write('*') end %>
+ <% if (loc.errtxt) then %><P CLASS='error'><%= string.gsub(loc.errtxt, "\n", "<BR>") %></P><% end %>
</li>
- <? end
-end ?>
-<? if currentloc == "" then ?>
+ <% end
+end %>
+<% if currentloc == "" then %>
No locations defined
-<? else ?>
+<% else %>
</ul>
-<? end ?>
+<% end %>
</ul>
</DL>
-<?
+<%
local function doListIndents(next, indent)
local newentry = {}
for mt in string.gmatch(next, "([^.]+)") do
@@ -107,38 +107,38 @@ local function doListIndents(next, indent)
end
return revnewentry
end
-?>
+%>
<H2>Records</H2>
<form id="filter-list">Filter: <input name="filter" id="filter" value="" maxlength="30" size="30" type="text"></form>
<DL id="records">
<ul>
-<? local indent = {}
+<% local indent = {}
for j,entry in ipairs(view.value) do
if entry.type ~= '%' then
- indent = doListIndents(entry[1], indent) ?>
- <ul><li STYLE='margin-left:10px;' id='filename=<?= entry.filename ?>;linenumber=<?= entry.linenumber ?>'>
- <IMG SRC='/skins/static/tango/16x16/devices/computer.png' width='16' height='16'><?= entry.label ?><BR>
- <pre><?= entry.configline ?></pre>
- <TABLE STYLE='margin-left:<?= tostring(7-#indent) ?>0px;'>
- <? for k=2,#entry do
+ indent = doListIndents(entry[1], indent) %>
+ <ul><li STYLE='margin-left:10px;' id='filename=<%= entry.filename %>;linenumber=<%= entry.linenumber %>'>
+ <IMG SRC='/skins/static/tango/16x16/devices/computer.png' width='16' height='16'><%= entry.label %><BR>
+ <pre><%= entry.configline %></pre>
+ <TABLE STYLE='margin-left:<%= tostring(7-#indent) %>0px;'>
+ <% for k=2,#entry do
local option = entry[k]
- if (option) and option ~= "" then ?>
- <TR><TD WIDTH='160px' STYLE='border:none;'><?= view.fieldlabels[entry.type][k] ?>:</TD>
- <TD STYLE='border:none;'><?= option ?></TD></TR>
- <? end
- end ?>
+ if (option) and option ~= "" then %>
+ <TR><TD WIDTH='160px' STYLE='border:none;'><%= view.fieldlabels[entry.type][k] %>:</TD>
+ <TD STYLE='border:none;'><%= option %></TD></TR>
+ <% end
+ end %>
</TABLE>
- <? if entry.errtxt then ?>
- <P CLASS='error'><?= string.gsub(entry.errtxt, "\n", "<BR>") ?></P>
- <? end ?>
+ <% if entry.errtxt then %>
+ <P CLASS='error'><%= string.gsub(entry.errtxt, "\n", "<BR>") %></P>
+ <% end %>
</li></ul>
- <? end
+ <% end
end
-if #indent == 0 then ?>
+if #indent == 0 then %>
No records defined
-<? else
+<% else
doListIndents("", indent)
-end ?>
+end %>
</ul>
</DL>