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