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) (unidiff) | |
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 @@ | |||
1 | % html(); return; /* vim:set ft=sitecing: */ | ||
2 | %%derive layout = "/ancestry/layout.chtml"; | ||
3 | %%derive sources = "/ancestry/sources.chtml"; | ||
4 | <%impl> | ||
5 | #include <sitecing/sitecing_util.h> | ||
6 | </%impl> | ||
7 | <%constructor> | ||
8 | b_strict = false; | ||
9 | </%constructor> | ||
10 | <%codemethod string title() %> | ||
11 | return "runtime exceptions handling"; | ||
12 | </%codemethod> | ||
13 | <%method void content() %> | ||
14 | <h1>browse this site sources</h1> | ||
15 | |||
16 | <ul class="sourcebrowser"> | ||
17 | % for(int n=0;n<source_files_count;n++) { | ||
18 | % sourcefile_t& sf = source_files[n]; | ||
19 | % if(!sf.name) { /* the beginning or the end of the directory */ | ||
20 | % if(sf.dir) { /* the beginning */ | ||
21 | <li class="dir"><% sf.dir %>/<ul class="dir"> | ||
22 | % }else{ /* the end */ | ||
23 | </ul></li> | ||
24 | % } | ||
25 | % }else{ | ||
26 | <li class="file"><a href="/view/<% sf.dir %>/<% sf.name %>" title="<% sf.desc %>" target="insert"><% sf.name %></a></li> | ||
27 | % } | ||
28 | % } | ||
29 | </ul> | ||
30 | |||
31 | <%code> | ||
32 | string rfile = sitecing::normalize_path( | ||
33 | sitecing::strip_prefix(__CGI->get_meta("PATH_INFO"),"/sources.chtml"), | ||
34 | sitecing::restrict_dotdot|sitecing::strip_leading_slash ); | ||
35 | if(rfile.empty()) | ||
36 | rfile = "about:blank"; | ||
37 | else | ||
38 | rfile = "/view/"+rfile; | ||
39 | </%code> | ||
40 | <div class="insert"> | ||
41 | <iframe id="insert" name="insert" src="<% rfile %>" width="95%" height="300"> | ||
42 | <p>I wanted to put an <iframe> here, but your browser does not seem to | ||
43 | support it. That is okay, it still will open links somehow.</p> | ||
44 | </iframe> | ||
45 | </div> | ||
46 | |||
47 | </%method> | ||