-rw-r--r-- | htdocs/sources.chtml | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/htdocs/sources.chtml b/htdocs/sources.chtml index 268b0e0..57a03e9 100644 --- a/htdocs/sources.chtml +++ b/htdocs/sources.chtml | |||
@@ -1,18 +1,19 @@ | |||
1 | % /* vim:set ft=sitecing: */ | 1 | % /* vim:set ft=sitecing: */ |
2 | %%derive layout = "/ancestry/layout.chtml"; | 2 | %%derive layout = "/ancestry/layout.chtml"; |
3 | %%derive sources = "/ancestry/sources.chtml"; | 3 | %%derive sources = "/ancestry/sources.chtml"; |
4 | %%pragma main=page | 4 | %%pragma main=page |
5 | <%impl> | 5 | <%impl> |
6 | #include <sitecing/sitecing_util.h> | 6 | #include <sitecing/sitecing_util.h> |
7 | #include <konforka/util.h> | ||
7 | </%impl> | 8 | </%impl> |
8 | <%constructor> | 9 | <%constructor> |
9 | b_strict = false; | 10 | b_strict = false; |
10 | PN_PREV("/quickref/metasyntax","syntax","meta syntax"); | 11 | PN_PREV("/quickref/metasyntax","syntax","meta syntax"); |
11 | </%constructor> | 12 | </%constructor> |
12 | <%codemethod string title() %> | 13 | <%codemethod string title() %> |
13 | return "runtime exceptions handling"; | 14 | return "runtime exceptions handling"; |
14 | </%codemethod> | 15 | </%codemethod> |
15 | <%method void content() %> | 16 | <%method void content() %> |
16 | <h1>browse this site sources</h1> | 17 | <h1>browse this site sources</h1> |
17 | 18 | ||
18 | <ul class="sourcebrowser"> | 19 | <ul class="sourcebrowser"> |
@@ -22,27 +23,27 @@ | |||
22 | % if(sf.dir) { /* the beginning */ | 23 | % if(sf.dir) { /* the beginning */ |
23 | <li class="dir"><% sf.dir %>/<ul class="dir"> | 24 | <li class="dir"><% sf.dir %>/<ul class="dir"> |
24 | % }else{ /* the end */ | 25 | % }else{ /* the end */ |
25 | </ul></li> | 26 | </ul></li> |
26 | % } | 27 | % } |
27 | % }else{ | 28 | % }else{ |
28 | <li class="file"><a href="/view/<% sf.dir %>/<% sf.name %>" title="<% sf.desc %>" target="insert"><% sf.name %></a></li> | 29 | <li class="file"><a href="/view/<% sf.dir %>/<% sf.name %>" title="<% sf.desc %>" target="insert"><% sf.name %></a></li> |
29 | % } | 30 | % } |
30 | % } | 31 | % } |
31 | </ul> | 32 | </ul> |
32 | 33 | ||
33 | <%code> | 34 | <%code> |
34 | string rfile = sitecing::normalize_path( | 35 | string rfile = konforka::normalize_path( |
35 | sitecing::strip_prefix(__CGI->get_meta("PATH_INFO"),"/sources.chtml"), | 36 | sitecing::strip_prefix(__CGI->get_meta("PATH_INFO"),"/sources.chtml"), |
36 | sitecing::restrict_dotdot|sitecing::strip_leading_slash ); | 37 | konforka::restrict_dotdot|konforka::strip_leading_slash ); |
37 | if(rfile.empty()) | 38 | if(rfile.empty()) |
38 | rfile = "about:blank"; | 39 | rfile = "about:blank"; |
39 | else | 40 | else |
40 | rfile = "/view/"+rfile; | 41 | rfile = "/view/"+rfile; |
41 | </%code> | 42 | </%code> |
42 | <div class="insert"> | 43 | <div class="insert"> |
43 | <iframe id="insert" name="insert" src="<% rfile %>" width="95%" height="300"> | 44 | <iframe id="insert" name="insert" src="<% rfile %>" width="95%" height="300"> |
44 | <p>I wanted to put an <iframe> here, but your browser does not seem to | 45 | <p>I wanted to put an <iframe> here, but your browser does not seem to |
45 | support it. That is okay, it still will open links somehow.</p> | 46 | support it. That is okay, it still will open links somehow.</p> |
46 | </iframe> | 47 | </iframe> |
47 | </div> | 48 | </div> |
48 | 49 | ||