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

Contents of /trunk/tntnet/dynamic/header.ecpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 80 - (show annotations) (download)
Wed Nov 28 14:27:51 2007 UTC (16 years, 5 months ago) by torben
File size: 1841 byte(s)
A little more work on the login system

1 <%args>
2 title;
3 </%args>
4 <%session scope="global">
5 std::string userName;
6 bool isAdmin;
7 </%session>
8 <{
9 if (title.size() > 0)
10 {
11 title = std::string(" - ") + title;
12 }
13
14 //Cache control
15 reply.setHeader("Cache-Control", "no-cache, must-revalidate"); // Http/1.1
16 reply.setHeader("Expires", "Mon, 26 Jul 1997 05:00:00 GMT"); //date in the past
17 }>
18
19 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
20 <html>
21 <head>
22 <title>Serren furnace monitor system<$ title $> </title>
23
24 <style type="text/css">
25
26 #menubg {
27 background: #ff0000;
28 color: #ffffff;
29 margin: 8px;
30 position: absolute;
31 top: 0px;
32 left: 0px;
33 width: 170px;
34 min-height: 500px;
35 border-width: 1px;
36 border-color: black;
37 border-style: solid;
38 }
39
40
41 #menubox{
42 margin:8px;
43 margin-top:20px;
44 }
45
46 .menu {
47 color: #ffffff;
48 }
49
50 body {
51 margin-left: 190px;
52 margin-right: 100px;
53 color: #000000;
54 background: #ffffff;
55 }
56
57
58 h1 {
59 text-align: center;
60 }
61
62 h2 {
63 text-align: center;
64 }
65
66 </style>
67
68 </head>
69 <body>
70
71 <!-- Menu stuff -->
72 <div id="menubg">
73 <div id="menubox">
74 <br><br><br>
75 <p style='font-size: 120%;'><b>Serren AB</b></p>
76
77 <a class="menu" href="index">Index</a><br>
78 <a class="menu" href="critical">Critical systems</a><br>
79 <a class="menu" href="customerlist">Customers & installations</a><br>
80
81 <br>
82
83 <{
84 if (userName.size() > 0) {
85 }>
86 <p class="menu">Logged in as <$ userName $></p>
87 <a class="menu" href="adm_custom">Customer admin</a><br>
88 <{
89 if (isAdmin) {
90 }>
91 <a class="menu" href="adm_users">User admin</a><br>
92 <{
93 } else {
94 }>
95 <div class="menu">User admin</div><br>
96 <{
97 } // end if/else isadmin
98 }>
99
100 <br>
101 <a class="menu" href="logout">Logout</a><br>
102
103 <{
104 } else {
105 }>
106 <a class="menu" href="login">Login</a>
107 <{
108 } //endif
109 }>
110
111 <br><br><br><br><br>
112 </div>
113 </div>

  ViewVC Help
Powered by ViewVC 1.1.20