/[H9]/trunk/tntnet/dynamic/adm_template.ecpp
ViewVC logotype

Annotation of /trunk/tntnet/dynamic/adm_template.ecpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 92 - (hide annotations) (download)
Thu Nov 29 05:21:04 2007 UTC (16 years, 6 months ago) by torben
File size: 443 byte(s)
Enforcing the requirement of a valid login session by using early exit from <compontent>::operator()

1 torben 83 <%pre>
2     #include <tntdb/connect.h>
3     #include <tntdb/connection.h>
4     #include <tntdb/result.h>
5     #include <tntdb/row.h>
6     </%pre>
7    
8     <%config>
9     dburl;
10     </%config>
11    
12     <%session scope="global">
13     std::string userName;
14     bool isAdmin;
15     </%session>
16    
17    
18     <&header title="--Template--">
19     </&header>
20     <{
21    
22     if (userName.size() == 0)
23 torben 92 {
24 torben 83 reply.setHeader("Refresh", "0; url=login");
25 torben 92 return HTTP_OK;
26     }
27 torben 83
28     tntdb::Connection conn = tntdb::connect(dburl);
29    
30     }>
31    
32     <&footer>
33     </&footer>

  ViewVC Help
Powered by ViewVC 1.1.20