- Timestamp:
- 11/30/11 15:43:31 (13 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dns.cgi
r169 r173 102 102 my $logingroup = ($session->param('logingroup') ? $session->param('logingroup') : 1); 103 103 my $curgroup = ($session->param('curgroup') ? $session->param('curgroup') : $logingroup); 104 my $group = ($webvar{group} ? $webvar{group} : 1);105 104 106 105 # per-page startwith, filter, searchsubs … … 182 181 push @viewablegroups, $logingroup; 183 182 184 my $page = HTML::Template->new(filename => "$templatedir/$webvar{page}.tmpl"); 183 my $page; 184 eval { 185 $page = HTML::Template->new(filename => "$templatedir/$webvar{page}.tmpl"); 186 }; 187 if ($@) { 188 warn "Bad page $webvar{page} requested"; 189 $page = HTML::Template->new(filename => "$templatedir/badpage.tmpl"); 190 $page->param(badpage => $q->escapeHTML($webvar{page})); 191 $webvar{page} = 'badpage'; 192 } 185 193 186 194 # handle login redirect … … 1407 1415 1408 1416 ##common bits 1409 if ($webvar{page} ne 'login' ) {1417 if ($webvar{page} ne 'login' && $webvar{page} ne 'badpage') { 1410 1418 $page->param(username => $session->param("username")); 1411 1419 -
trunk/templates/dns.css
r166 r173 185 185 padding: 5px; 186 186 width: 70%; 187 margin: 1% auto; 187 188 } 188 189 .right { … … 238 239 #soadetail { 239 240 text-align: left; 241 } 242 #badpage { 243 margin: 5% auto; 244 border: solid 2px #FFFF00; 245 color: #333300; 246 background-color: #e0e0e0; 247 text-align: center; 248 padding: 5px; 249 width: 70%; 240 250 } 241 251 /* somewhat generic/reusable */
Note:
See TracChangeset
for help on using the changeset viewer.