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