Changeset 238
- Timestamp:
- 02/22/12 18:03:41 (13 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dns.cgi
r237 r238 78 78 $session->param('domlistsortby','domain'); 79 79 $session->param('domlistorder','ASC'); 80 $session->param('revzonessortby','revnet'); 81 $session->param('revzonesorder','ASC'); 80 82 $session->param('useradminsortby','user'); 81 83 $session->param('useradminorder','ASC'); … … 195 197 my $page; 196 198 eval { 197 $page = HTML::Template->new(filename => "$templatedir/$webvar{page}.tmpl"); 199 # sigh. can't set loop_context_vars or global_vars once instantiated. 200 $page = HTML::Template->new(filename => "$templatedir/$webvar{page}.tmpl", 201 loop_context_vars => 1, global_vars => 1); 198 202 }; 199 203 if ($@) { 200 warn "Bad page $webvar{page} requested";204 my $msg = $@; 201 205 $page = HTML::Template->new(filename => "$templatedir/badpage.tmpl"); 202 $page->param(badpage => $q->escapeHTML($webvar{page})); 206 if (-e "$templatedir/$webvar{page}.tmpl") { 207 $page->param(badtemplate => $q->escapeHTML($msg)); 208 } else { 209 warn "Bad page $webvar{page} requested"; 210 $page->param(badpage => $q->escapeHTML($webvar{page})); 211 } 203 212 $webvar{page} = 'badpage'; 204 213 } -
trunk/templates/badpage.tmpl
r173 r238 1 1 <!-- <TMPL_VAR NAME=sid> --> 2 2 <div id="badpage"> 3 <TMPL_IF badpage> 3 4 Bad page requested: 4 5 <div class="errmsg"> … … 6 7 </div> 7 8 Press the 'Back' button on your browser to continue. 9 </TMPL_IF> 10 <TMPL_IF badtemplate> 11 Template error: 12 <div class="warnmsg"> 13 <TMPL_VAR NAME=badtemplate> 8 14 </div> 15 </TMPL_IF> 16 </div> -
trunk/templates/menu.tmpl
r224 r238 8 8 <a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=log">Log</a><br /> 9 9 <TMPL_IF maydefrec><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=reclist&id=<TMPL_VAR NAME=group>&defrec=y">Default Records</a><br /> 10 <TMPL_IF mayrdns>< Ahref="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=reclist&id=<TMPL_VAR NAME=group>&defrec=y&revrec=y">Default Reverse Records</a><br /></TMPL_IF></TMPL_IF>10 <TMPL_IF mayrdns><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=reclist&id=<TMPL_VAR NAME=group>&defrec=y&revrec=y">Default Reverse Records</a><br /></TMPL_IF></TMPL_IF> 11 11 <TMPL_IF mayimport><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=axfr">AXFR Import</a><br /></TMPL_IF> 12 12 <TMPL_IF maybulk><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=bulkdomain">Bulk Domain Operations</a><br /></TMPL_IF>
Note:
See TracChangeset
for help on using the changeset viewer.