-rw-r--r-- | htdocs/view.chtml | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/htdocs/view.chtml b/htdocs/view.chtml index d885330..f729465 100644 --- a/htdocs/view.chtml +++ b/htdocs/view.chtml @@ -1,35 +1,36 @@ -% html(); return; /* vim:set ft=sitecing: */ +% /* vim:set ft=sitecing: */ %%derive page = "/ancestry/page.chtml"; %%derive sources = "/ancestry/sources.chtml"; +%%pragma main=page <%impl> #include <iostream> #include <fstream> using namespace std; #include <sitecing/util.h> #include <sitecing/sitecing_util.h> #include <konforka/exception.h> #include "acconfig.h" </%impl> <%codemethod string title() %> return "introduction"; </%codemethod> <%method void body() %> <%code> string rfile = sitecing::normalize_path( sitecing::strip_prefix(__CGI->get_meta("PATH_INFO"),"/view.chtml"), sitecing::restrict_dotdot|sitecing::strip_leading_slash ); sourcefile_t *sof = 0; for(int n=0;n<source_files_count;n++) { sof = &source_files[n]; if(sof->name && sof->dir) { if(sitecing::normalize_path(sitecing::combine_path(sof->dir,sof->name,0),sitecing::strip_leading_slash)==rfile) break; } sof = 0; } if(!sof) throw konforka::exception(CODEPOINT,"no access to the file allowed"); string afile = sitecing::combine_path(WEB_ROOT,rfile,0); </%code> <div class="source"> <h1><% rfile %></h1> |