author | Michael Krelin <hacker@klever.net> | 2005-01-30 00:57:53 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2005-01-30 00:57:53 (UTC) |
commit | 71f4cc84c3788c6904ede17cd626a9ca9c349e3b (patch) (side-by-side diff) | |
tree | cfe7736ae3416ad314b7451b756e587335c357c7 /htdocs/sources.chtml | |
parent | acd2a536dd6bb3ef9438482725f77ac9044ae79b (diff) | |
download | sitecing-71f4cc84c3788c6904ede17cd626a9ca9c349e3b.zip sitecing-71f4cc84c3788c6904ede17cd626a9ca9c349e3b.tar.gz sitecing-71f4cc84c3788c6904ede17cd626a9ca9c349e3b.tar.bz2 |
initial commit into repository
-rw-r--r-- | htdocs/sources.chtml | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/htdocs/sources.chtml b/htdocs/sources.chtml new file mode 100644 index 0000000..b1eeed3 --- a/dev/null +++ b/htdocs/sources.chtml @@ -0,0 +1,47 @@ +% html(); return; /* vim:set ft=sitecing: */ +%%derive layout = "/ancestry/layout.chtml"; +%%derive sources = "/ancestry/sources.chtml"; +<%impl> + #include <sitecing/sitecing_util.h> +</%impl> +<%constructor> + b_strict = false; +</%constructor> +<%codemethod string title() %> + return "runtime exceptions handling"; +</%codemethod> +<%method void content() %> + <h1>browse this site sources</h1> + + <ul class="sourcebrowser"> +% for(int n=0;n<source_files_count;n++) { +% sourcefile_t& sf = source_files[n]; +% if(!sf.name) { /* the beginning or the end of the directory */ +% if(sf.dir) { /* the beginning */ + <li class="dir"><% sf.dir %>/<ul class="dir"> +% }else{ /* the end */ + </ul></li> +% } +% }else{ + <li class="file"><a href="/view/<% sf.dir %>/<% sf.name %>" title="<% sf.desc %>" target="insert"><% sf.name %></a></li> +% } +% } + </ul> + + <%code> + string rfile = sitecing::normalize_path( + sitecing::strip_prefix(__CGI->get_meta("PATH_INFO"),"/sources.chtml"), + sitecing::restrict_dotdot|sitecing::strip_leading_slash ); + if(rfile.empty()) + rfile = "about:blank"; + else + rfile = "/view/"+rfile; + </%code> + <div class="insert"> + <iframe id="insert" name="insert" src="<% rfile %>" width="95%" height="300"> + <p>I wanted to put an <iframe> here, but your browser does not seem to + support it. That is okay, it still will open links somehow.</p> + </iframe> + </div> + +</%method> |