diff options
-rw-r--r-- | app/acf-util/logon-html.lsp | 14 | ||||
-rw-r--r-- | app/acf-util/logon-logout-html.lsp | 6 | ||||
-rw-r--r-- | app/acf-util/logon-status-html.lsp | 10 | ||||
-rwxr-xr-x | app/acf-util/password-html.lsp | 14 | ||||
-rwxr-xr-x | app/acf-util/password-status-html.lsp | 34 | ||||
-rw-r--r-- | app/acf-util/roles-editrole-html.lsp | 14 | ||||
-rw-r--r-- | app/acf-util/roles-html.lsp | 54 | ||||
-rw-r--r-- | app/acf-util/roles-viewroles-html.lsp | 42 | ||||
-rw-r--r-- | app/debug-html.lsp | 8 | ||||
-rw-r--r-- | app/dispatcherror-html.lsp | 8 | ||||
-rw-r--r-- | app/exception-html.lsp | 8 | ||||
-rw-r--r-- | app/expert-html.lsp | 16 | ||||
-rw-r--r-- | app/filedetails-html.lsp | 32 | ||||
-rw-r--r-- | app/form-html.lsp | 10 | ||||
-rw-r--r-- | app/startstop-html.lsp | 22 | ||||
-rw-r--r-- | app/status-html.lsp | 8 | ||||
-rw-r--r-- | app/template-html.lsp | 44 | ||||
-rw-r--r-- | app/template-stream.lsp | 14 | ||||
-rw-r--r-- | app/welcome-html.lsp | 6 | ||||
-rwxr-xr-x | www/cgi-bin/acf | 4 |
20 files changed, 184 insertions, 184 deletions
diff --git a/app/acf-util/logon-html.lsp b/app/acf-util/logon-html.lsp index 22deb4d..3d131bc 100644 --- a/app/acf-util/logon-html.lsp +++ b/app/acf-util/logon-html.lsp @@ -1,12 +1,12 @@ -<? local form = ... ?> -<? require("viewfunctions") ?> -<? --[[ +<% local form = ... %> +<% require("viewfunctions") %> +<% --[[ io.write(html.cfe_unpack(form)) - --]] ?> + --]] %> -<h1><?= form.label ?></h1> -<? +<h1><%= form.label %></h1> +<% form.value.password.type = "password" local order = { "userid", "password" } displayform(form, order) -?> +%> diff --git a/app/acf-util/logon-logout-html.lsp b/app/acf-util/logon-logout-html.lsp index b3e2f08..a658ea9 100644 --- a/app/acf-util/logon-logout-html.lsp +++ b/app/acf-util/logon-logout-html.lsp @@ -1,6 +1,6 @@ -<? local view= ... ?> +<% local view= ... %> <h1>Log Out</h1> -<?= html.cfe_unpack(view) ?> +<%= html.cfe_unpack(view) %> -<?= view.logout.value ?> +<%= view.logout.value %> diff --git a/app/acf-util/logon-status-html.lsp b/app/acf-util/logon-status-html.lsp index 661b588..5fb70c9 100644 --- a/app/acf-util/logon-status-html.lsp +++ b/app/acf-util/logon-status-html.lsp @@ -1,8 +1,8 @@ -<? local view= ... ?> -<? --[[ +<% local view= ... %> +<% --[[ io.write(html.cfe_unpack(view)) ---]] ?> +--]] %> <h1>User Status </h1> <p> Below is your current Session id <p> -<?= view.value.sessionid.value ?> -<p>You are currently known to the system as <?= view.value.username.value ?>.</p> +<%= view.value.sessionid.value %> +<p>You are currently known to the system as <%= view.value.username.value %>.</p> diff --git a/app/acf-util/password-html.lsp b/app/acf-util/password-html.lsp index d845316..dca559d 100755 --- a/app/acf-util/password-html.lsp +++ b/app/acf-util/password-html.lsp @@ -1,16 +1,16 @@ -<? local form, viewlibrary, pageinfo = ... ?> -<? require("viewfunctions") ?> -<? +<% local form, viewlibrary, pageinfo = ... %> +<% 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(html.cfe_unpack(FORM)) io.write("</span>") --]] -?> +%> -<H1><?= form.label ?></H1> -<? +<H1><%= form.label %></H1> +<% if form.value.password and form.value.password_confirm then form.value.password.type = "password" form.value.password_confirm.type = "password" @@ -21,4 +21,4 @@ io.write("</span>") end local order = { "userid", "username", "roles", "password", "password_confirm" } displayform(form, order) -?> +%> diff --git a/app/acf-util/password-status-html.lsp b/app/acf-util/password-status-html.lsp index c16e0d6..26416ce 100755 --- a/app/acf-util/password-status-html.lsp +++ b/app/acf-util/password-status-html.lsp @@ -1,14 +1,14 @@ -<? local form, viewlibrary, pageinfo, session = ... ?> -<? require("viewfunctions") ?> -<? +<% local form, viewlibrary, pageinfo, 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({"deleteuser"}, session) ?> +<% displaycommandresults({"deleteuser"}, session) %> <H1>User Accounts</H1> <H2>Create new account</H2> @@ -17,26 +17,26 @@ io.write("</span>") </form> <H2>Existing account</H2> <DL> -<? for name,user in pairs(form.value) do ?> - <DT><IMG SRC='/skins/static/tango/16x16/apps/system-users.png' HEIGHT='16' WIDTH='16'> <?= name ?></DT> +<% for name,user in pairs(form.value) do %> + <DT><IMG SRC='/skins/static/tango/16x16/apps/system-users.png' HEIGHT='16' WIDTH='16'> <%= name %></DT> <DD><TABLE> <TR> - <TD STYLE='border:none;'><B><?= user.value.userid.label ?></B></TD> - <TD STYLE='border:none;' WIDTH='90%'><?= user.value.userid.value ?></TD> + <TD STYLE='border:none;'><B><%= user.value.userid.label %></B></TD> + <TD STYLE='border:none;' WIDTH='90%'><%= user.value.userid.value %></TD> </TR><TR> - <TD STYLE='border:none;'><B><?= user.value.username.label ?></B></TD> - <TD STYLE='border:none;'><?= user.value.username.value ?></TD> + <TD STYLE='border:none;'><B><%= user.value.username.label %></B></TD> + <TD STYLE='border:none;'><%= user.value.username.value %></TD> </TR><TR> - <TD STYLE='border:none;'><B><?= user.value.roles.label ?></B></TD> - <TD STYLE='border:none;'><?= table.concat(user.value.roles.value, " / ") ?></TD> + <TD STYLE='border:none;'><B><%= user.value.roles.label %></B></TD> + <TD STYLE='border:none;'><%= table.concat(user.value.roles.value, " / ") %></TD> </TR><TR> <TD STYLE='border:none;'><B>Option</B></TD> <TD STYLE='border:none;'> - [<A HREF='edituser?userid=<?= name ?>'>Edit this account</A>] - [<A HREF='deleteuser?userid=<?= name ?>'>Delete this account</A>] - [<A HREF='<?= pageinfo.script ?>/acf-util/roles/viewuserroles?userid=<?= name ?>'>View roles for this account</A>] + [<A HREF='edituser?userid=<%= name %>'>Edit this account</A>] + [<A HREF='deleteuser?userid=<%= name %>'>Delete this account</A>] + [<A HREF='<%= pageinfo.script %>/acf-util/roles/viewuserroles?userid=<%= name %>'>View roles for this account</A>] </TD> </TR> </TABLE></DD> -<? end ?> +<% end %> </DL> diff --git a/app/acf-util/roles-editrole-html.lsp b/app/acf-util/roles-editrole-html.lsp index d0e1e3f..5f106fc 100644 --- a/app/acf-util/roles-editrole-html.lsp +++ b/app/acf-util/roles-editrole-html.lsp @@ -1,12 +1,12 @@ -<? local form, viewtable, page_info = ... ?> -<? require("viewfunctions") ?> +<% local form, viewtable, page_info = ... %> +<% require("viewfunctions") %> -<? --[[ +<% --[[ io.write(html.cfe_unpack(form)) ---]] ?> +--]] %> -<H1><?= form.label ?></H1> -<? +<H1><%= form.label %></H1> +<% form.action = page_info.script .. page_info.prefix .. page_info.controller .. "/" .. page_info.action -- If editing existing role, disable role if page_info.action ~= "newrole" then @@ -14,4 +14,4 @@ end local order = { "role", "permissions" } displayform(form, order) -?> +%> diff --git a/app/acf-util/roles-html.lsp b/app/acf-util/roles-html.lsp index a5c89dc..16e4747 100644 --- a/app/acf-util/roles-html.lsp +++ b/app/acf-util/roles-html.lsp @@ -1,33 +1,33 @@ -<? local view= ... ?> -<? --[[ +<% local view= ... %> +<% --[[ io.write(html.cfe_unpack(view)) ---]] ?> +--]] %> -<? ---[[ ?> -<? if view.value.userid then ?> - <H1>Roles/Permission list for <?= view.value.userid.value ?>:</H1> -<? elseif view.value.role then ?> - <H1>Permission list for <?= view.value.role.value ?>:</H1> -<? else ?> +<% ---[[ %> +<% if view.value.userid then %> + <H1>Roles/Permission list for <%= view.value.userid.value %>:</H1> +<% elseif view.value.role then %> + <H1>Permission list for <%= view.value.role.value %>:</H1> +<% else %> <H1>Complete permission list:</H1> -<? end ?> +<% end %> -<? if view.value.roles then ?> - <H2><?= view.value.userid.value ?> is valid in these roles</H2> - <? for a,b in pairs(view.value.roles.value) do +<% if view.value.roles then %> + <H2><%= view.value.userid.value %> is valid in these roles</H2> + <% for a,b in pairs(view.value.roles.value) do print("<li>",b,"</li>") - end ?> -<? end ?> -<? --]] ?> + end %> +<% end %> +<% --]] %> -<? ---[[ ?> -<? if view.value.permissions then ?> - <? if view.value.userid then ?> - <H2><?= view.value.userid.value ?>'s full permissions are</H2> - <? elseif view.value.role then ?> - <H2><?= view.value.role.value ?>'s full permissions are</H2> - <? end ?> - <? local controllers = {} +<% ---[[ %> +<% if view.value.permissions then %> + <% if view.value.userid then %> + <H2><%= view.value.userid.value %>'s full permissions are</H2> + <% elseif view.value.role then %> + <H2><%= view.value.role.value %>'s full permissions are</H2> + <% end %> + <% local controllers = {} -- It's nice to have it in alphabetical order for cont in pairs(view.value.permissions.value) do controllers[#controllers + 1] = cont @@ -49,6 +49,6 @@ io.write("<TD></TR>") end io.write("</TABLE>") - ?> -<? end ?> -<? --]] ?> + %> +<% end %> +<% --]] %> diff --git a/app/acf-util/roles-viewroles-html.lsp b/app/acf-util/roles-viewroles-html.lsp index 23e7195..f5ca4d5 100644 --- a/app/acf-util/roles-viewroles-html.lsp +++ b/app/acf-util/roles-viewroles-html.lsp @@ -1,39 +1,39 @@ -<? local view, viewlibrary, page_info, session= ... ?> -<? require("viewfunctions") ?> +<% local view, viewlibrary, page_info, session= ... %> +<% require("viewfunctions") %> -<? --[[ +<% --[[ io.write(html.cfe_unpack(view)) ---]] ?> +--]] %> -<? displaycommandresults({"deleterole"}, session) ?> +<% displaycommandresults({"deleterole"}, session) %> <H1>Roles</H1> <H2>Create new role</H2> -<form action="<?= page_info.script .. page_info.prefix .. page_info.controller ?>/newrole" method="POST"> +<form action="<%= page_info.script .. page_info.prefix .. page_info.controller %>/newrole" method="POST"> <dl><dt></dt><dd><input class="submit" type="submit" value="New Role"></dd></dl> </form> <H2>Existing roles</H2> -<? if view.value.default_roles then ?> +<% if view.value.default_roles then %> <dl> - <? for x,role in pairs(view.value.default_roles.value) do ?> - <dt><img src='/static/tango/16x16/categories/applications-system.png' height='16' width='16'> <?= role ?></dt> + <% for x,role in pairs(view.value.default_roles.value) do %> + <dt><img src='/static/tango/16x16/categories/applications-system.png' height='16' width='16'> <%= role %></dt> <dd> - [<a href='viewroleperms?role=<?= role ?>'>View this role</a>] + [<a href='viewroleperms?role=<%= role %>'>View this role</a>] </dd> - <? end ?> + <% end %> </dl> -<? end ?> -<? if view.value.defined_roles then ?> +<% end %> +<% if view.value.defined_roles then %> <dl> - <? table.sort(view.value.defined_roles.value) ?> - <? for x,role in pairs(view.value.defined_roles.value) do ?> - <dt><img src='/static/tango/16x16/apps/system-users.png' height='16' width='16'> <?= role ?></dt> + <% table.sort(view.value.defined_roles.value) %> + <% for x,role in pairs(view.value.defined_roles.value) do %> + <dt><img src='/static/tango/16x16/apps/system-users.png' height='16' width='16'> <%= role %></dt> <dd> - [<a href='viewroleperms?role=<?= role ?>'>View this role</a>] - [<a href='editrole?role=<?= role ?>'>Edit this role</a>] - [<a href='deleterole?role=<?= role ?>'>Delete this role</a>] + [<a href='viewroleperms?role=<%= role %>'>View this role</a>] + [<a href='editrole?role=<%= role %>'>Edit this role</a>] + [<a href='deleterole?role=<%= role %>'>Delete this role</a>] </dd> - <? end ?> + <% end %> </dl> -<? end ?> +<% end %> diff --git a/app/debug-html.lsp b/app/debug-html.lsp index 775b102..d3db3b4 100644 --- a/app/debug-html.lsp +++ b/app/debug-html.lsp @@ -1,8 +1,8 @@ -<? local data, viewlibrary, page_info, session = ... ?> +<% local data, viewlibrary, page_info, session = ... %> <H1>Debugging</H1> <H2>View Data:</H2> -<?= html.cfe_unpack(data) ?> +<%= html.cfe_unpack(data) %> <H2>Session:</H2> -<?= html.cfe_unpack(session) ?> +<%= html.cfe_unpack(session) %> <H2>Page Info:</H2> -<?= html.cfe_unpack(page_info) ?> +<%= html.cfe_unpack(page_info) %> diff --git a/app/dispatcherror-html.lsp b/app/dispatcherror-html.lsp index 66cfd5d..ce6b5c8 100644 --- a/app/dispatcherror-html.lsp +++ b/app/dispatcherror-html.lsp @@ -1,7 +1,7 @@ -<? view = ... ?> -<? --[[ +<% view = ... %> +<% --[[ io.write(html.cfe_unpack(view)) ---]] ?> +--]] %> <style type="text/css"> p.hiddendetail { @@ -27,4 +27,4 @@ <h1>Alpine Configuration Framework</h1> <p class="errordetail">Dispatch error occured</p> -<p class="hiddendetail">'<?= view.controller ?>' does not have a '<?= view.action ?>' action.</p> +<p class="hiddendetail">'<%= view.controller %>' does not have a '<%= view.action %>' action.</p> diff --git a/app/exception-html.lsp b/app/exception-html.lsp index 94aa1da..9b7a441 100644 --- a/app/exception-html.lsp +++ b/app/exception-html.lsp @@ -1,7 +1,7 @@ -<? view = ... ?> -<? --[[ +<% view = ... %> +<% --[[ io.write(html.cfe_unpack(view)) ---]] ?> +--]] %> <style type="text/css"> p.hiddendetail { @@ -27,4 +27,4 @@ <h1>Alpine Configuration Framework</h1> <p class="errordetail">Application error occured</p> -<p class="hiddendetail"><?= view.message ?></p> +<p class="hiddendetail"><%= view.message %></p> diff --git a/app/expert-html.lsp b/app/expert-html.lsp index 49fffd4..d349048 100644 --- a/app/expert-html.lsp +++ b/app/expert-html.lsp @@ -1,16 +1,16 @@ -<? local form, viewlibrary, page_info, session = ... ?> -<? require("viewfunctions") ?> +<% local form, viewlibrary, page_info, session = ... %> +<% require("viewfunctions") %> -<? if viewlibrary and viewlibrary.dispatch_component then +<% if viewlibrary and viewlibrary.dispatch_component then viewlibrary.dispatch_component("status") -end ?> +end %> -<? +<% local pattern = string.gsub(page_info.prefix..page_info.controller, "[%(%)%.%%%+%-%*%?%[%]%^%$]", "%%%1") local func = haserl.loadfile(page_info.viewfile:gsub(pattern..".*$", "/") .. "filedetails-html.lsp") func(form, viewlibrary, page_info, session) -?> +%> -<? if viewlibrary and viewlibrary.dispatch_component and session.permissions[page_info.controller].startstop then +<% if viewlibrary and viewlibrary.dispatch_component and session.permissions[page_info.controller].startstop then viewlibrary.dispatch_component("startstop") -end ?> +end %> diff --git a/app/filedetails-html.lsp b/app/filedetails-html.lsp index dac4444..8b5f75e 100644 --- a/app/filedetails-html.lsp +++ b/app/filedetails-html.lsp @@ -1,32 +1,32 @@ -<? local form, viewlibrary, page_info = ... ?> -<? require("viewfunctions") ?> +<% local form, viewlibrary, page_info = ... %> +<% require("viewfunctions") %> -<? if form.type == "form" then ?> +<% if form.type == "form" then %> <H1>Configuration</H1> <H2>Expert Configuration</H2> -<? else ?> +<% else %> <H1>View File</H1> -<? end ?> +<% end %> <H3>File Details</H3> <DL> -<? +<% displayitem(form.value.filename) displayitem(form.value.filesize) displayitem(form.value.mtime) -?> +%> </DL> <H3>File Content</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 ?> -<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 ?>"> +<% 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 %> +<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 %>"> <textarea name="filecontent"> -<?= form.value.filecontent.value ?> +<%= form.value.filecontent.value %> </textarea> -<? 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 %> -<? if form.type == "form" then ?> -<DL><DT></DT><DD><input class="submit" type="submit" name="<?= form.option ?>" value="<?= form.option ?>"></DD></DL> -<? end ?> +<% if form.type == "form" then %> +<DL><DT></DT><DD><input class="submit" type="submit" name="<%= form.option %>" value="<%= form.option %>"></DD></DL> +<% end %> </form> diff --git a/app/form-html.lsp b/app/form-html.lsp index 451123a..de09780 100644 --- a/app/form-html.lsp +++ b/app/form-html.lsp @@ -1,9 +1,9 @@ -<? 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 displayform(form) -?> +%> diff --git a/app/startstop-html.lsp b/app/startstop-html.lsp index c0ead72..56404f9 100644 --- a/app/startstop-html.lsp +++ b/app/startstop-html.lsp @@ -1,23 +1,23 @@ -<? local data, viewlibrary, page_info = ... ?> +<% local data, viewlibrary, page_info = ... %> <H1>Management</H1> <DL> -<form action="<?= page_info.script .. page_info.prefix .. page_info.controller .. "/" .. page_info.action ?>" method="POST"> +<form action="<%= page_info.script .. page_info.prefix .. page_info.controller .. "/" .. page_info.action %>" method="POST"> <DT>Program control-panel</DT> <DD> -<input class="submit" type="submit" name="action" value="Start" <? if data.value.status.value== "Enabled" then io.write("disabled") end ?>> -<input class="submit" type="submit" name="action" value="Stop" <? if data.value.status.value== "Disabled" then io.write("disabled") end ?>> -<input class="submit" type="submit" name="action" value="Restart" <? if data.value.status.value== "Disabled" then io.write("disabled") end ?>> +<input class="submit" type="submit" name="action" value="Start" <% if data.value.status.value== "Enabled" then io.write("disabled") end %>> +<input class="submit" type="submit" name="action" value="Stop" <% if data.value.status.value== "Disabled" then io.write("disabled") end %>> +<input class="submit" type="submit" name="action" value="Restart" <% if data.value.status.value== "Disabled" then io.write("disabled") end %>> </DD> </form> -<? if data.value.result then ?> +<% if data.value.result then %> <DT>Previous action result</DT> <DD> -<? if data.value.result.descr then ?> -<P CLASS='descr'><?= string.gsub(data.value.result.descr, "\n", "<BR>") ?></P> -<? end if data.value.result.errtxt then ?> -<P CLASS='error'><?= string.gsub(data.value.result.errtxt, "\n", "<BR>") ?></P> -<? end end ?> +<% if data.value.result.descr then %> +<P CLASS='descr'><%= string.gsub(data.value.result.descr, "\n", "<BR>") %></P> +<% end if data.value.result.errtxt then %> +<P CLASS='error'><%= string.gsub(data.value.result.errtxt, "\n", "<BR>") %></P> +<% end end %> </DD> </DL> diff --git a/app/status-html.lsp b/app/status-html.lsp index 6cb9eea..4cb693f 100644 --- a/app/status-html.lsp +++ b/app/status-html.lsp @@ -1,12 +1,12 @@ -<? local data = ... +<% local data = ... require("viewfunctions") -?> +%> <H1>System Info</H1> <DL> -<? +<% displayitem(data.value.status) displayitem(data.value.version) displayitem(data.value.autostart) -?> +%> </DL> diff --git a/app/template-html.lsp b/app/template-html.lsp index eb9288e..4cd4f4d 100644 --- a/app/template-html.lsp +++ b/app/template-html.lsp @@ -1,19 +1,19 @@ -<? local viewtable, viewlibrary, pageinfo, session = ... - html=require("html") ?> +<% local viewtable, viewlibrary, pageinfo, session = ... + html=require("html") %> Status: 200 OK Content-Type: text/html -<? if (session.id) then +<% if (session.id) then io.write( html.cookie.set("sessionid", session.id) ) else io.write (html.cookie.unset("sessionid")) end -?> +%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> -<? +<% local hostname = "" if viewlibrary and viewlibrary.dispatch_component then local result = viewlibrary.dispatch_component("alpine-baselayout/hostname/read", nil, true) @@ -21,12 +21,12 @@ if viewlibrary and viewlibrary.dispatch_component then hostname = result.value end end -?> -<title><?= hostname .. " - " .. pageinfo.controller .. "->" .. pageinfo.action ?></title> -<link rel="stylesheet" type="text/css" href="<?= pageinfo.skindir ?>static/reset.css"> -<link rel="stylesheet" type="text/css" href="<?= pageinfo.skindir .. pageinfo.skin.."/"..pageinfo.skin..".css" ?>"> +%> +<title><%= hostname .. " - " .. pageinfo.controller .. "->" .. pageinfo.action %></title> +<link rel="stylesheet" type="text/css" href="<%= pageinfo.skindir %>static/reset.css"> +<link rel="stylesheet" type="text/css" href="<%= pageinfo.skindir .. pageinfo.skin.."/"..pageinfo.skin..".css" %>"> <!--[if IE]> -<link rel="stylesheet" type="text/css" href="<?= pageinfo.skindir .. pageinfo.skin.."/"..pageinfo.skin.."-ie.css" ?>"> +<link rel="stylesheet" type="text/css" href="<%= pageinfo.skindir .. pageinfo.skin.."/"..pageinfo.skin.."-ie.css" %>"> <![endif]--> </head> <body> @@ -39,18 +39,18 @@ end <div id="logo"> <div class="leader"></div> <h1>AlpineLinux</h1> - <p><?= hostname or "unknown hostname" ?></p> + <p><%= hostname or "unknown hostname" %></p> <div class="tailer"></div> </div> <span class="mute"> <p> - <? local ctlr = pageinfo.script .. "/acf-util/logon/" + <% local ctlr = pageinfo.script .. "/acf-util/logon/" if session.userinfo and session.userinfo.userid then io.write ( string.format("\t\t\t\t\t\t<a href=\"%s\">Log out as '" .. session.userinfo.userid .. "'</a>\n", ctlr .. "logout" ) ) else io.write ( string.format("\t\t\t\t\t\t<a href=\"%s\">Log in</a>\n", ctlr .. "logon" ) ) - end ?> + end %> | <a href="/">home</a> | <a href="http://wiki.alpinelinux.org">about</a> @@ -67,7 +67,7 @@ end <h3 class="hide">[Main menu]</h3> </div> - <? + <% local class local tabs io.write ( "<ul>") @@ -86,7 +86,7 @@ end io.write ( "\t\t\t\t\t</ul>" ) end io.write ( "\n\t\t\t\t</li>\n\t\t\t</ul>\n") - ?> + %> <div class="tailer"> </div> @@ -96,7 +96,7 @@ end <div id="postnav"> <div class="leader"> </div> - <h2><?= pageinfo.controller ?> : <?= pageinfo.action ?></h2> + <h2><%= pageinfo.controller %> : <%= pageinfo.action %></h2> <!-- FIXME: Next row is 'dead' data! Remove 'class=hide' when done! --> <p class='hide'>[ welcome ] > [ login ] > [ bgp ] > [ firewall ] > [ content filter ] > [ interfaces ]</p> <div class="tailer"> @@ -111,8 +111,8 @@ end </div> <ul> - <? local class="" ?> - <? for x,tab in pairs(tabs or {}) do + <% local class="" %> + <% for x,tab in pairs(tabs or {}) do if tab.action == pageinfo.action then class="class='selected'" else @@ -121,7 +121,7 @@ end io.write (string.format('<li %s><a %s href="%s">%s</a></li>\n', class,class,tab.action,tab.name )) end - ?> + %> </ul> <div class="tailer"> @@ -132,8 +132,8 @@ end <div class="leader"> </div> - <? local func = haserl.loadfile(pageinfo.viewfile) ?> - <? func (viewtable, viewlibrary, pageinfo, session) ?> + <% local func = haserl.loadfile(pageinfo.viewfile) %> + <% func (viewtable, viewlibrary, pageinfo, session) %> <div class="tailer"> </div> @@ -144,7 +144,7 @@ end <div id="footer"> <div class="leader"> </div> - <p>Page generated in <?= os.clock() ?> seconds on <?= os.date() ?>.</p> + <p>Page generated in <%= os.clock() %> seconds on <%= os.date() %>.</p> <div class="tailer"> </div> </div> <!-- footer --> diff --git a/app/template-stream.lsp b/app/template-stream.lsp index 1a5f3c0..88713fd 100644 --- a/app/template-stream.lsp +++ b/app/template-stream.lsp @@ -1,8 +1,8 @@ -<? local viewtable, viewlibrary, pageinfo, session = ... ?> +<% local viewtable, viewlibrary, pageinfo, session = ... %> Status: 200 OK -Content-Type: <? print(viewtable.option or "application/octet-stream") ?> -<? if viewtable.label ~= "" then ?> -Content-Disposition: attachment; filename="<?= viewtable.label ?>" -<? end ?> -<? io.write("\n") ?> -<?= viewtable.value ?> +Content-Type: <% print(viewtable.option or "application/octet-stream") %> +<% if viewtable.label ~= "" then %> +Content-Disposition: attachment; filename="<%= viewtable.label %>" +<% end %> +<% io.write("\n") %> +<%= viewtable.value %> diff --git a/app/welcome-html.lsp b/app/welcome-html.lsp index 4cf01d9..e4bd2be 100644 --- a/app/welcome-html.lsp +++ b/app/welcome-html.lsp @@ -1,9 +1,9 @@ -<? view = ... ?> +<% view = ... %> <h1>Alpine Configuration Framework</h1> <p>Welcome.</p> -<? --[[ +<% --[[ io.write(html.cfe_unpack(view)) io.write(html.cfe_unpack(FORM)) io.write(html.cfe_unpack(ENV)) ---]] ?> +--]] %> diff --git a/www/cgi-bin/acf b/www/cgi-bin/acf index d03b794..dfefb34 100755 --- a/www/cgi-bin/acf +++ b/www/cgi-bin/acf @@ -1,5 +1,5 @@ #!/usr/bin/haserl --shell=lua --upload-limit=32 -<? +<% require("mvc") -- create a new container @@ -18,4 +18,4 @@ APP=FRAMEWORK:new("acf_www") APP:dispatch() APP:destroy() FRAMEWORK:destroy() -?> +%> |