Changeset 493 for trunk


Ignore:
Timestamp:
04/30/13 18:00:29 (12 years ago)
Author:
Kris Deugau
Message:

/trunk

Overhaul session handling; pure URL-based sessions are subject to
copy-paste session-stealing. Convert to cookie-based session tracking
instead. This also provides bonuses in terms of inlinks from other
utilities or copy-paste links.
While session-handling was in pieces, add "pick-up-where-I-left-off"
login handling so that logins don't always end up only on the initial
domain list. This is especially handy for copy-paste links.

Also clean up some of the docucomments, use the CGI::Simple object to
do 302 redirects, and bring the revzone default sort field setup into
line with other thing-lists.

Location:
trunk
Files:
33 edited

Legend:

Unmodified
Added
Removed
  • trunk/dns.cgi

    r489 r493  
    6565$webvar{revrec} = 'n' if !$webvar{revrec};      # non-reverse (domain) records
    6666
    67 # load some local system defaults (mainly DB connect info)
    68 # note this is not *absolutely* fatal, since there's a default dbname/user/pass in DNSDB.pm
    69 # we'll catch a bad DB connect string once we get to trying that
    70 ##fixme:  pass params to loadConfig, and use them there, to allow one codebase to support multiple sites
     67# create a DNSDB object.  this loads some local system defaults and connects to the DB
     68# with the credentials configured
     69##fixme:  pass params for loadConfig, and use them there, to allow one codebase to support multiple sites
    7170my $dnsdb = new DNSDB;
    7271
     
    7574$footer->param(version => $DNSDB::VERSION);
    7675
     76##fixme:  slim chance this could be triggered on errors other than DB failure?
    7777if (!$dnsdb) {
    7878  print "Content-type: text/html\n\n";
     
    8787$header->param(orgname => $dnsdb->{orgname}) if $dnsdb->{orgname} ne 'Example Corp';
    8888
    89 # persistent stuff needed on most/all pages
    90 my $sid = ($webvar{sid} ? $webvar{sid} : undef);
    91 my $session = new CGI::Session("driver:File", $sid, {Directory => $dnsdb->{sessiondir}})
     89my $logingroup;
     90my $curgroup;
     91my @viewablegroups;
     92
     93# retrieve the session ID from our cookie, if possible
     94my $sid = $q->cookie('dnsadmin_session');
     95
     96# see if the session loads
     97my $session = CGI::Session->load("driver:File", $sid, {Directory => $dnsdb->{sessiondir}})
    9298        or die CGI::Session->errstr();
    93 #$sid = $session->id() if !$sid;
     99
    94100if (!$sid) {
    95   # init stuff.  can probably axe this down to just above if'n'when user manipulation happens
    96   $sid = $session->id();
    97   $session->expire($dnsdb->{timeout});
    98 # need to know the "upper" group the user can deal with;  may as well
    99 # stick this in the session rather than calling out to the DB every time.
    100   $session->param('logingroup',1);
    101   $session->param('curgroup',1);        # yes, we *do* need to track this too.  er, probably.
    102   $session->param('domlistsortby','domain');
    103   $session->param('domlistorder','ASC');
    104   $session->param('revzonessortby','revnet');
    105   $session->param('revzonesorder','ASC');
    106   $session->param('useradminsortby','user');
    107   $session->param('useradminorder','ASC');
    108   $session->param('grpmansortby','group');
    109   $session->param('grpmanorder','ASC');
    110   $session->param('reclistsortby','host');
    111   $session->param('reclistorder','ASC');
    112   $session->param('loclistsortby','description');
    113   $session->param('loclistorder','ASC');
    114   $session->param('logsortby','stamp');
    115   $session->param('logorder','DESC');
     101  $webvar{page} = 'login';
     102} else {
     103  # we have a session to load from, maybe
     104  $logingroup = ($session->param('logingroup') ? $session->param('logingroup') : 1);
     105  $curgroup = ($session->param('curgroup') ? $session->param('curgroup') : $logingroup);
     106  # security check - does the user have permission to view this entity?
     107  # this is a prep step used "many" places
     108  $dnsdb->getChildren($logingroup, \@viewablegroups, 'all');
     109  push @viewablegroups, $logingroup;
     110##fixme: make sessions persist through closing the site?
     111# this even bridges browser close too.  hmm...
     112  $webvar{page} = 'domlist' if !$webvar{page};
    116113}
    117114
    118 # Just In Case.  Stale sessions should not be resurrectable.
    119 if ($sid ne $session->id()) {
    120   $sid = '';
    121   changepage(page=> "login", sessexpired => 1);
    122 }
    123 
    124 # normal expiry, more or less
    125 if ($session->is_expired) {
    126   $sid = '';
    127   changepage(page=> "login", sessexpired => 1);
    128 }
    129 
    130 my $logingroup = ($session->param('logingroup') ? $session->param('logingroup') : 1);
    131 my $curgroup = ($session->param('curgroup') ? $session->param('curgroup') : $logingroup);
    132 
    133 # decide which page to spit out...
    134 # also set $webvar{page} before we try to use it.
     115# set $webvar{page} before we try to use it.
    135116$webvar{page} = 'login' if !$webvar{page};
    136117
    137 # per-page startwith, filter, searchsubs
     118## per-page startwith, filter, searchsubs
    138119
    139120##fixme:  complain-munge-and-continue with non-"[a-z0-9-.]" filter and startwith
     
    163144push @filterargs, $filter if $filter;
    164145
    165 ## set up "URL to self"
     146## set up "URL to self" (whereami edition)
    166147# @#$%@%@#% XHTML - & in a URL must be escaped.  >:(
    167148my $uri_self = $ENV{REQUEST_URI};
     
    181162
    182163# Fix up $uri_self so we don't lose the session/page
    183 $uri_self .= "?sid=$sid&page=$webvar{page}" if $uri_self =~ m{/dns.cgi$};
    184 $uri_self = "$ENV{SCRIPT_NAME}?sid=$sid&page=$webvar{page}$1" if $uri_self =~ m{/dns.cgi\&(.+)$};
     164$uri_self .= "?page=$webvar{page}" if $uri_self =~ m{/dns.cgi$};
     165$uri_self = "$ENV{SCRIPT_NAME}?page=$webvar{page}$1" if $uri_self =~ m{/dns.cgi\&(.+)$};
     166
     167## end uri_self monkeying
    185168
    186169# pagination
    187 my $perpage = 15;
     170my $perpage = 15;  # Just In Case
    188171$perpage = $dnsdb->{perpage} if $dnsdb->{perpage};
    189172my $offset = ($webvar{offset} ? $webvar{offset} : 0);
    190173
    191174# NB:  these must match the field name and SQL ascend/descend syntax respectively
     175# sortby is reset to a suitable "default", then re-reset to whatever the user has
     176# clicked on last in the record=listing subs, but best to put a default here.
    192177my $sortby = "domain";
    193178my $sortorder = "ASC";
    194179
    195 # security check - does the user have permission to view this entity?
    196 # this is a prep step used "many" places
    197 my @viewablegroups;
    198 $dnsdb->getChildren($logingroup, \@viewablegroups, 'all');
    199 push @viewablegroups, $logingroup;
    200 
     180# Create the page template object.  Display a reasonable error page and whine if the template doesn't exist.
    201181my $page;
    202182eval {
     
    217197}
    218198
    219 # handle login redirect
     199my $sesscookie;
     200
     201# handle can-happen-on-(almost)-any-page actions
    220202if ($webvar{action}) {
     203
    221204  if ($webvar{action} eq 'login') {
    222205    # Snag ACL/permissions here too
     
    226209    if ($userdata) {
    227210
     211      # (re)create the session
     212      $session = new CGI::Session("driver:File", $sid, {Directory => $dnsdb->{sessiondir}})
     213        or die CGI::Session->errstr();
     214      $sid = $session->id();
     215
     216      $sesscookie = $q->cookie( -name => 'dnsadmin_session',
     217        -value => $sid,
     218        -expires => "+".$dnsdb->{timeout},
     219        -secure => 0,
     220## fixme:  need to extract root path for cookie, so as to limit cookie to dnsadmin instance
     221#        -path => $url
     222        );
     223
    228224      # set session bits
     225      $session->expire($dnsdb->{timeout});
    229226      $session->param('logingroup',$userdata->{group_id});
    230227      $session->param('curgroup',$userdata->{group_id});
     
    232229      $session->param('username',$webvar{username});
    233230
    234       changepage(page => "domlist");
     231# for reference.  seems we don't need to set these on login any more.
     232#  $session->param('domlistsortby','domain');
     233#  $session->param('domlistorder','ASC');
     234#  $session->param('revzonessortby','revnet');
     235#  $session->param('revzonesorder','ASC');
     236#  $session->param('useradminsortby','user');
     237#  $session->param('useradminorder','ASC');
     238#  $session->param('grpmansortby','group');
     239#  $session->param('grpmanorder','ASC');
     240#  $session->param('reclistsortby','host');
     241#  $session->param('reclistorder','ASC');
     242#  $session->param('loclistsortby','description');
     243#  $session->param('loclistorder','ASC');
     244#  $session->param('logsortby','stamp');
     245#  $session->param('logorder','DESC');
     246
     247      ## "recover my link" - tack on request bits and use requested page instead of hardcoding domlist
     248      # this could possibly be compacted by munging changepage a little so we don't have to deconstruct
     249      # and reconstruct the URI argument list.
     250      my %target = (page => "domlist");
     251      if ($webvar{target}) {
     252        my $tmp = (split /\?/, $webvar{target})[1];
     253        $tmp =~ s/^\&//;
     254        my @targs = split /\&/, $tmp;
     255        foreach (@targs) {
     256          my ($k,$v) = split /=/;
     257          $target{$k} = $v if $k;
     258          # if we're going through a "session expired" login, we may have a different
     259          # "current group" than the login group.
     260          $session->param('curgroup', $v) if $k eq 'curgroup';
     261##fixme:  page=record goes "FOOM", sometimes - cause/fix?
     262        }
     263      }
     264      changepage(%target);
    235265
    236266    } else {
     
    243273    $session->flush();
    244274
     275    my $sesscookie = $q->cookie( -name => 'dnsadmin_session',
     276      -value => $sid,
     277      -expires => "-1",
     278      -secure => 0,
     279## fixme:  need to extract root path for cookie, so as to limit cookie to dnsadmin instance
     280#      -path => $url
     281      );
     282
    245283    my $newurl = "http://$ENV{HTTP_HOST}$ENV{SCRIPT_NAME}";
    246284    $newurl =~ s|/[^/]+$|/|;
    247     print "Status: 302\nLocation: $newurl\n\n";
     285    print $q->redirect( -uri => $newurl, -cookie => $sesscookie);
    248286    exit;
    249287
    250   } elsif ($webvar{action} eq 'chgroup') {
     288  } elsif ($webvar{action} eq 'chgroup' && $webvar{page} ne 'login') {
    251289    # fiddle session-stored group data
    252290    # magic incantation to... uhhh...
     
    280318} # handle global webvar{action}s
    281319
     320
    282321# finally check if the user was disabled.  we could just leave this for logout/session expiry,
    283322# but if they keep the session active they'll continue to have access long after being disabled.  :/
     
    295334$dnsdb->initActionLog($session->param('uid'));
    296335
    297 $page->param(sid => $sid) unless $webvar{page} eq 'login';      # no session ID on the login page
     336##
     337## Per-page processing
     338##
    298339
    299340if ($webvar{page} eq 'login') {
    300341
    301   $page->param(loginfailed => 1) if $webvar{loginfailed};
    302   $page->param(sessexpired => 1) if $webvar{sessexpired};
     342  my $target = $ENV{REQUEST_URI};
     343  $target =~ s/\&/\&/g;
     344  $page->param(target => $target); # needs to be trimmed a little, maybe?
     345
     346  $page->param(sessexpired => 1) if (!$sid && $target !~ m|/$|);
     347
     348  if ($webvar{loginfailed}) {
     349    $page->param(loginfailed => 1);
     350    $webvar{target} =~ s/\&/\&/g;   # XHTML we do (not) love you so
     351    $page->param(target => $webvar{target}) if $webvar{target};
     352  }
     353#  if $webvar{sessexpired};      # or this with below?
     354  if ($session->is_expired) {
     355    $page->param(sessexpired => 1);
     356    $session->delete();   # Just to make sure
     357    $session->flush();
     358  }
    303359  $page->param(version => $DNSDB::VERSION);
     360  $page->param(script_self => ($ENV{SCRIPT_NAME} =~ m|/([^/]+)$|)[0]);
    304361
    305362} elsif ($webvar{page} eq 'domlist' or $webvar{page} eq 'index') {
     
    16931750
    16941751# start output here so we can redirect pages.
    1695 print "Content-type: text/html\n\n", $header->output;
     1752print $q->header( -cookie => $sesscookie);
     1753print $header->output;
    16961754
    16971755##common bits
     
    17221780  $page->param(inlogingrp => $curgroup == $logingroup);
    17231781
    1724 # fill in the URL-to-self
     1782# fill in the URL-to-self for the group tree and search-by-letter
    17251783  $page->param(whereami => $uri_self);
     1784# fill in general URL-to-self
     1785  $page->param(script_self => "$ENV{SCRIPT_NAME}?".($curgroup ? "curgroup=$curgroup" : ''));
    17261786}
    17271787
     
    18051865
    18061866  # handle user check
    1807   my $newurl = "http://$ENV{HTTP_HOST}$ENV{SCRIPT_NAME}?sid=$sid";
     1867  my $newurl = "http://$ENV{HTTP_HOST}$ENV{SCRIPT_NAME}?";
    18081868  foreach (sort keys %params) {
    18091869## fixme:  something is undefined here on add location
     
    18141874  $session->flush();
    18151875
    1816   print "Status: 302\nLocation: $newurl\n\n";
     1876  print $q->redirect ( -url => $newurl, -cookie => $sesscookie);
    18171877  exit;
    18181878} # end changepage
     
    19061966  foreach my $rec (@$foo2) {
    19071967    $rec->{type} = $typemap{$rec->{type}};
    1908     $rec->{sid} = $webvar{sid};
    19091968    $rec->{fwdzone} = $rev eq 'n';
    19101969    $rec->{distance} = 'n/a' unless ($rec->{type} eq 'MX' || $rec->{type} eq 'SRV');
     
    20442103  fill_fpnla($count);
    20452104
     2105  $sortby = ($webvar{revrec} eq 'n' ? 'domain' : 'revnet');
    20462106# sort/order
    20472107  $session->param($webvar{page}.'sortby', $webvar{sortby}) if $webvar{sortby};
     
    22922352  foreach my $col (@$cols) {
    22932353    my %coldata;
    2294     $coldata{sid} = $sid;
    22952354    $coldata{page} = $webvar{page};
    22962355    $coldata{offset} = $webvar{offset} if $webvar{offset};
  • trunk/templates/axfr.tmpl

    r436 r493  
    1 <!-- <TMPL_VAR NAME=sid> -->
    21<table class="wholepage"><tr>
    32<TMPL_INCLUDE NAME="menu.tmpl">
     
    54<td align="center" valign="top">
    65
    7 <form action="dns.cgi" method="post">
     6<form action="<TMPL_VAR NAME=script_self>" method="post">
    87<fieldset>
    9 <input type="hidden" name="sid" value="<TMPL_VAR NAME=sid>" />
    108<input type="hidden" name="page" value="axfr" />
    119<input type="hidden" name="doit" value="y" />
  • trunk/templates/badpage.tmpl

    r238 r493  
    1 <!-- <TMPL_VAR NAME=sid> -->
    21<div id="badpage">
    32<TMPL_IF badpage>
  • trunk/templates/bulkchange.tmpl

    r295 r493  
    1 <!-- <TMPL_VAR NAME=sid> -->
    21<table class="wholepage"><tr>
    32<TMPL_INCLUDE NAME="menu.tmpl">
  • trunk/templates/bulkdomain.tmpl

    r492 r493  
    1 <!-- <TMPL_VAR NAME=sid> -->
    21<table class="wholepage"><tr>
    32<TMPL_INCLUDE NAME="menu.tmpl">
     
    54<td align="center" valign="top">
    65
    7 <form action="dns.cgi">
     6<form action="<TMPL_VAR NAME=script_self>" method="post">
    87<fieldset>
    98
    10 <input type="hidden" name="sid" value="<TMPL_VAR NAME=sid>" />
    119<input type="hidden" name="page" value="bulkchange" />
    1210<input type="hidden" name="offset" value="<TMPL_VAR NAME=offset>" />
  • trunk/templates/deldom.tmpl

    r427 r493  
    55<td align="center" valign="top">
    66<h3>Are you really sure you want to delete domain <TMPL_VAR NAME=domain>?</h3>
    7 <a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=deldom&amp;del=cancel&amp;id=<TMPL_VAR NAME=id>">cancel</a> &nbsp; | &nbsp;
    8 <a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=deldom&amp;del=ok&amp;id=<TMPL_VAR NAME=id>">confirm</a>
     7<a href="<TMPL_VAR NAME=script_self>&amp;page=deldom&amp;del=cancel&amp;id=<TMPL_VAR NAME=id>">cancel</a> &nbsp; | &nbsp;
     8<a href="<TMPL_VAR NAME=script_self>&amp;page=deldom&amp;del=ok&amp;id=<TMPL_VAR NAME=id>">confirm</a>
    99</td></tr></table>
    1010
  • trunk/templates/delgrp.tmpl

    r427 r493  
    55<td align="center" valign="top">
    66<h3>Are you really sure you want to delete group <TMPL_VAR NAME=delgroupname>?</h3>
    7 <a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=delgrp&amp;del=cancel&amp;id=<TMPL_VAR NAME=id>">cancel</a> &nbsp; | &nbsp;
    8 <a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=delgrp&amp;del=ok&amp;id=<TMPL_VAR NAME=id>">confirm</a>
     7<a href="<TMPL_VAR NAME=script_self>&amp;page=delgrp&amp;del=cancel&amp;id=<TMPL_VAR NAME=id>">cancel</a> &nbsp; | &nbsp;
     8<a href="<TMPL_VAR NAME=script_self>&amp;page=delgrp&amp;del=ok&amp;id=<TMPL_VAR NAME=id>">confirm</a>
    99</td></tr></table>
    1010
  • trunk/templates/delloc.tmpl

    r427 r493  
    55<td align="center" valign="top">
    66<h3>Are you really sure you want to delete location <TMPL_VAR NAME=location>?</h3>
    7 <a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=delloc&amp;del=cancel&amp;locid=<TMPL_VAR NAME=locid>">cancel</a> &nbsp; | &nbsp;
    8 <a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=delloc&amp;del=ok&amp;locid=<TMPL_VAR NAME=locid>">confirm</a>
     7<a href="<TMPL_VAR NAME=script_self>&amp;page=delloc&amp;del=cancel&amp;locid=<TMPL_VAR NAME=locid>">cancel</a> &nbsp; | &nbsp;
     8<a href="<TMPL_VAR NAME=script_self>&amp;page=delloc&amp;del=ok&amp;locid=<TMPL_VAR NAME=locid>">confirm</a>
    99</td></tr></table>
    1010
  • trunk/templates/delrec.tmpl

    r243 r493  
    66<h3>Are you really sure you want to delete record:<br />
    77<TMPL_VAR NAME=host> <TMPL_VAR NAME=ftype> <TMPL_VAR NAME=recval></h3>
    8 <a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=delrec&amp;del=cancel&amp;id=<TMPL_VAR NAME=id>&amp;defrec=<TMPL_VAR NAME=defrec>&amp;revrec=<TMPL_VAR NAME=revrec>&amp;parentid=<TMPL_VAR NAME=parentid>">cancel</a>
     8<a href="<TMPL_VAR NAME=script_self>&amp;page=delrec&amp;del=cancel&amp;id=<TMPL_VAR NAME=id>&amp;defrec=<TMPL_VAR NAME=defrec>&amp;revrec=<TMPL_VAR NAME=revrec>&amp;parentid=<TMPL_VAR NAME=parentid>">cancel</a>
    99 &nbsp; | &nbsp;
    10 <a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=delrec&amp;del=ok&amp;id=<TMPL_VAR NAME=id>&amp;defrec=<TMPL_VAR NAME=defrec>&amp;revrec=<TMPL_VAR NAME=revrec>&amp;parentid=<TMPL_VAR NAME=parentid>">confirm</a>
     10<a href="<TMPL_VAR NAME=script_self>&amp;page=delrec&amp;del=ok&amp;id=<TMPL_VAR NAME=id>&amp;defrec=<TMPL_VAR NAME=defrec>&amp;revrec=<TMPL_VAR NAME=revrec>&amp;parentid=<TMPL_VAR NAME=parentid>">confirm</a>
    1111</td></tr></table>
    1212
  • trunk/templates/delrevzone.tmpl

    r427 r493  
    55<td align="center" valign="top">
    66<h3>Are you really sure you want to delete reverse zone <TMPL_VAR NAME=revzone>?</h3>
    7 <a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=delrevzone&amp;del=cancel&amp;id=<TMPL_VAR NAME=id>">cancel</a> &nbsp; | &nbsp;
    8 <a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=delrevzone&amp;del=ok&amp;id=<TMPL_VAR NAME=id>">confirm</a>
     7<a href="<TMPL_VAR NAME=script_self>&amp;page=delrevzone&amp;del=cancel&amp;id=<TMPL_VAR NAME=id>">cancel</a> &nbsp; | &nbsp;
     8<a href="<TMPL_VAR NAME=script_self>&amp;page=delrevzone&amp;del=ok&amp;id=<TMPL_VAR NAME=id>">confirm</a>
    99</td></tr></table>
    1010
  • trunk/templates/deluser.tmpl

    r427 r493  
    55<td align="center" valign="top">
    66<h3>Are you really sure you want to delete user <TMPL_VAR NAME=user>?</h3>
    7 <a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=deluser&amp;del=cancel&amp;id=<TMPL_VAR NAME=id>">cancel</a> &nbsp; | &nbsp;
    8 <a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=deluser&amp;del=ok&amp;id=<TMPL_VAR NAME=id>">confirm</a>
     7<a href="<TMPL_VAR NAME=script_self>&amp;page=deluser&amp;del=cancel&amp;id=<TMPL_VAR NAME=id>">cancel</a> &nbsp; | &nbsp;
     8<a href="<TMPL_VAR NAME=script_self>&amp;page=deluser&amp;del=ok&amp;id=<TMPL_VAR NAME=id>">confirm</a>
    99</td></tr></table>
    1010
  • trunk/templates/dnsq.tmpl

    r100 r493  
    1 <!-- <TMPL_VAR NAME=sid> -->
    21<table class="wholepage"><tr>
    32<TMPL_INCLUDE NAME="menu.tmpl">
     
    76<TMPL_IF errmsg><div class="errmsg">Query error: <TMPL_VARNAME=errmsg></div></TMPL_IF>
    87
    9 <form action="dns.cgi" method="post">
     8<form action="<TMPL_VAR NAME=script_self>" method="post">
    109<fieldset>
    11 <input type="hidden" name="sid" value="<TMPL_VAR NAME=sid>" />
    1210<input type="hidden" name="page" value="dnsq" />
    1311
  • trunk/templates/domlist.tmpl

    r403 r493  
    1 <!-- <TMPL_VAR NAME=sid> -->
    21<table class="wholepage"><tr>
    32<TMPL_INCLUDE NAME="menu.tmpl">
     
    1817<TMPL_IF domain_create>
    1918<TMPL_IF domlist>
    20 <a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=newdomain">New Domain</a>
     19<a href="<TMPL_VAR NAME=script_self>&amp;page=newdomain">New Domain</a>
    2120<TMPL_ELSE>
    22 <a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=newrevzone">New Reverse Zone</a>
     21<a href="<TMPL_VAR NAME=script_self>&amp;page=newrevzone">New Reverse Zone</a>
    2322</TMPL_IF>
    2423</TMPL_IF>
     
    2827<table width="98%" border="0" cellspacing="4" cellpadding="3">
    2928<tr>
    30 <TMPL_LOOP NAME=colheads>       <td class="datahead_<TMPL_IF __first__>l<TMPL_ELSE>s</TMPL_IF>"><a href="dns.cgi?sid=<TMPL_VAR
    31  NAME=sid>&amp;page=<TMPL_VAR NAME=page><TMPL_IF NAME=offset>&amp;offset=<TMPL_VAR
     29<TMPL_LOOP NAME=colheads>       <td class="datahead_<TMPL_IF __first__>l<TMPL_ELSE>s</TMPL_IF>"><a href="<TMPL_VAR
     30 NAME=script_self>&amp;page=<TMPL_VAR NAME=page><TMPL_IF NAME=offset>&amp;offset=<TMPL_VAR
    3231 NAME=offset></TMPL_IF>&amp;sortby=<TMPL_VAR NAME=sortby>&amp;order=<TMPL_VAR NAME=order>"><TMPL_VAR
    3332 NAME=colname></a><TMPL_IF NAME=sortorder>&nbsp;<img alt="<TMPL_VAR NAME=sortorder>" src="images/<TMPL_VAR
     
    4039<TMPL_LOOP name=domtable>
    4140<tr class="row<TMPL_IF __odd__>0<TMPL_ELSE>1</TMPL_IF>">
    42         <td align="left"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=reclist&amp;id=<TMPL_VAR NAME=domain_id>&amp;defrec=n<TMPL_UNLESS domlist>&amp;revrec=y</TMPL_UNLESS>"><TMPL_VAR NAME=domain></a></td>
     41        <td align="left"><a href="<TMPL_VAR NAME=script_self>&amp;page=reclist&amp;id=<TMPL_VAR NAME=domain_id>&amp;defrec=n<TMPL_UNLESS domlist>&amp;revrec=y</TMPL_UNLESS>"><TMPL_VAR NAME=domain></a></td>
    4342        <td><TMPL_IF status>Active<TMPL_ELSE>Inactive</TMPL_IF></td>
    4443        <td><TMPL_VAR name=group></td>
    45 <TMPL_IF domain_edit>   <td align="center"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=<TMPL_VAR NAME=curpage><TMPL_IF NAME=offset>&amp;offset=<TMPL_VAR NAME=offset></TMPL_IF>&amp;id=<TMPL_VAR NAME=domainid>&amp;zonestatus=<TMPL_IF status>domoff<TMPL_ELSE>domon</TMPL_IF>"><TMPL_IF status>deactivate<TMPL_ELSE>activate</TMPL_IF></a></td></TMPL_IF>
    46 <TMPL_IF domain_delete> <td align="center"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=<TMPL_IF domlist>deldom<TMPL_ELSE>delrevzone</TMPL_IF>&amp;id=<TMPL_VAR NAME=domain_id>"><img src="images/trash2.png" alt="[ Delete ]" /></a></td></TMPL_IF>
     44<TMPL_IF domain_edit>   <td align="center"><a href="<TMPL_VAR NAME=script_self>&amp;page=<TMPL_VAR NAME=curpage><TMPL_IF NAME=offset>&amp;offset=<TMPL_VAR NAME=offset></TMPL_IF>&amp;id=<TMPL_VAR NAME=domainid>&amp;zonestatus=<TMPL_IF status>domoff<TMPL_ELSE>domon</TMPL_IF>"><TMPL_IF status>deactivate<TMPL_ELSE>activate</TMPL_IF></a></td></TMPL_IF>
     45<TMPL_IF domain_delete> <td align="center"><a href="<TMPL_VAR NAME=script_self>&amp;page=<TMPL_IF domlist>deldom<TMPL_ELSE>delrevzone</TMPL_IF>&amp;id=<TMPL_VAR NAME=domain_id>"><img src="images/trash2.png" alt="[ Delete ]" /></a></td></TMPL_IF>
    4746</tr>
    4847</TMPL_LOOP>
  • trunk/templates/edgroup.tmpl

    r207 r493  
    1 <!-- <TMPL_VAR NAME=sid> -->
    21<table class="wholepage"><tr>
    32<TMPL_INCLUDE NAME="menu.tmpl">
     
    54<td align="center" valign="top">
    65
    7 <form action="dns.cgi" method="post">
     6<form action="<TMPL_VAR NAME=script_self>" method="post">
    87<fieldset>
    9 <input type="hidden" name="sid" value="<TMPL_VAR NAME=sid>" />
    108<input type="hidden" name="page" value="edgroup" />
    119<input type="hidden" name="grpaction" value="updperms" />
  • trunk/templates/editsoa.tmpl

    r311 r493  
    1 <!-- <TMPL_VAR NAME=sid> -->
    21<table class="wholepage"><tr>
    32<TMPL_INCLUDE NAME="menu.tmpl">
     
    1110<div id="tableholder">
    1211
    13 <form action="dns.cgi" method="post">
     12<form action="<TMPL_VAR NAME=script_self>" method="post">
    1413<fieldset>
    15 <input type="hidden" name="sid" value="<TMPL_VAR NAME=sid>" />
    1614<input type="hidden" name="page" value="updatesoa" />
    1715<input type="hidden" name="id" value="<TMPL_VAR NAME=id>" />
  • trunk/templates/fpnla.tmpl

    r241 r493  
    1 <TMPL_IF navfirst><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=<TMPL_VAR NAME=curpage>&amp;offset=0<TMPL_IF id>&amp;id=<TMPL_VAR NAME=id></TMPL_IF><TMPL_IF defrec>&amp;defrec=<TMPL_VAR NAME=defrec></TMPL_IF><TMPL_IF revrec>&amp;revrec=<TMPL_VAR NAME=revrec></TMPL_IF>"><img src="images/frev.png" alt="[ First ]" />First</a><TMPL_ELSE><img src="images/frev.png" alt="[ First ]" />First</TMPL_IF>&nbsp;
    2 <TMPL_IF navprev><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=<TMPL_VAR NAME=curpage>&amp;offset=<TMPL_VAR NAME=prevoffs><TMPL_IF id>&amp;id=<TMPL_VAR NAME=id></TMPL_IF><TMPL_IF defrec>&defrec=<TMPL_VAR NAME=defrec></TMPL_IF><TMPL_IF revrec>&amp;revrec=<TMPL_VAR NAME=revrec></TMPL_IF>"><img src="images/rev.png" alt="[ Previous ]" />Previous</a><TMPL_ELSE><img src="images/rev.png" alt="[ Previous ]" />Previous</TMPL_IF>&nbsp;
    3 <TMPL_IF navnext><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=<TMPL_VAR NAME=curpage>&amp;offset=<TMPL_VAR NAME=nextoffs><TMPL_IF id>&amp;id=<TMPL_VAR NAME=id></TMPL_IF><TMPL_IF defrec>&amp;defrec=<TMPL_VAR NAME=defrec></TMPL_IF><TMPL_IF revrec>&amp;revrec=<TMPL_VAR NAME=revrec></TMPL_IF>">Next<img src="images/fwd.png" alt="[ Next ]" /></a><TMPL_ELSE>Next<img src="images/fwd.png" alt="[ Next ]" /></TMPL_IF>&nbsp;
    4 <TMPL_IF navlast><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=<TMPL_VAR NAME=curpage>&amp;offset=<TMPL_VAR NAME=lastoffs><TMPL_IF id>&amp;id=<TMPL_VAR NAME=id></TMPL_IF><TMPL_IF defrec>&amp;defrec=<TMPL_VAR NAME=defrec></TMPL_IF><TMPL_IF revrec>&amp;revrec=<TMPL_VAR NAME=revrec></TMPL_IF>">Last<img src="images/ffwd.png" alt="[ Last ]" /></a><TMPL_ELSE>Last<img src="images/ffwd.png" alt="[ Last ]" /></TMPL_IF>&nbsp;
    5 <TMPL_IF navall><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=<TMPL_VAR NAME=curpage>&amp;offset=all<TMPL_IF id>&amp;id=<TMPL_VAR NAME=id></TMPL_IF><TMPL_IF defrec>&amp;defrec=<TMPL_VAR NAME=defrec></TMPL_IF><TMPL_IF revrec>&amp;revrec=<TMPL_VAR NAME=revrec></TMPL_IF>">All</a><TMPL_ELSE><TMPL_UNLESS onepage><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=<TMPL_VAR NAME=curpage>&amp;offset=0<TMPL_IF id>&amp;id=<TMPL_VAR NAME=id></TMPL_IF><TMPL_IF defrec>&amp;defrec=<TMPL_VAR NAME=defrec></TMPL_IF><TMPL_IF revrec>&amp;revrec=<TMPL_VARNAME=revrec></TMPL_IF>"><TMPL_VAR NAME=perpage> per page</a></TMPL_UNLESS></TMPL_IF>
     1<TMPL_IF navfirst><a href="<TMPL_VAR NAME=script_self>&amp;page=<TMPL_VAR NAME=curpage>&amp;offset=0<TMPL_IF id>&amp;id=<TMPL_VAR NAME=id></TMPL_IF><TMPL_IF defrec>&amp;defrec=<TMPL_VAR NAME=defrec></TMPL_IF><TMPL_IF revrec>&amp;revrec=<TMPL_VAR NAME=revrec></TMPL_IF>"><img src="images/frev.png" alt="[ First ]" />First</a><TMPL_ELSE><img src="images/frev.png" alt="[ First ]" />First</TMPL_IF>&nbsp;
     2<TMPL_IF navprev><a href="<TMPL_VAR NAME=script_self>&amp;page=<TMPL_VAR NAME=curpage>&amp;offset=<TMPL_VAR NAME=prevoffs><TMPL_IF id>&amp;id=<TMPL_VAR NAME=id></TMPL_IF><TMPL_IF defrec>&defrec=<TMPL_VAR NAME=defrec></TMPL_IF><TMPL_IF revrec>&amp;revrec=<TMPL_VAR NAME=revrec></TMPL_IF>"><img src="images/rev.png" alt="[ Previous ]" />Previous</a><TMPL_ELSE><img src="images/rev.png" alt="[ Previous ]" />Previous</TMPL_IF>&nbsp;
     3<TMPL_IF navnext><a href="<TMPL_VAR NAME=script_self>&amp;page=<TMPL_VAR NAME=curpage>&amp;offset=<TMPL_VAR NAME=nextoffs><TMPL_IF id>&amp;id=<TMPL_VAR NAME=id></TMPL_IF><TMPL_IF defrec>&amp;defrec=<TMPL_VAR NAME=defrec></TMPL_IF><TMPL_IF revrec>&amp;revrec=<TMPL_VAR NAME=revrec></TMPL_IF>">Next<img src="images/fwd.png" alt="[ Next ]" /></a><TMPL_ELSE>Next<img src="images/fwd.png" alt="[ Next ]" /></TMPL_IF>&nbsp;
     4<TMPL_IF navlast><a href="<TMPL_VAR NAME=script_self>&amp;page=<TMPL_VAR NAME=curpage>&amp;offset=<TMPL_VAR NAME=lastoffs><TMPL_IF id>&amp;id=<TMPL_VAR NAME=id></TMPL_IF><TMPL_IF defrec>&amp;defrec=<TMPL_VAR NAME=defrec></TMPL_IF><TMPL_IF revrec>&amp;revrec=<TMPL_VAR NAME=revrec></TMPL_IF>">Last<img src="images/ffwd.png" alt="[ Last ]" /></a><TMPL_ELSE>Last<img src="images/ffwd.png" alt="[ Last ]" /></TMPL_IF>&nbsp;
     5<TMPL_IF navall><a href="<TMPL_VAR NAME=script_self>&amp;page=<TMPL_VAR NAME=curpage>&amp;offset=all<TMPL_IF id>&amp;id=<TMPL_VAR NAME=id></TMPL_IF><TMPL_IF defrec>&amp;defrec=<TMPL_VAR NAME=defrec></TMPL_IF><TMPL_IF revrec>&amp;revrec=<TMPL_VAR NAME=revrec></TMPL_IF>">All</a><TMPL_ELSE><TMPL_UNLESS onepage><a href="<TMPL_VAR NAME=script_self>&amp;page=<TMPL_VAR NAME=curpage>&amp;offset=0<TMPL_IF id>&amp;id=<TMPL_VAR NAME=id></TMPL_IF><TMPL_IF defrec>&amp;defrec=<TMPL_VAR NAME=defrec></TMPL_IF><TMPL_IF revrec>&amp;revrec=<TMPL_VARNAME=revrec></TMPL_IF>"><TMPL_VAR NAME=perpage> per page</a></TMPL_UNLESS></TMPL_IF>
  • trunk/templates/grpman.tmpl

    r398 r493  
    1 <!-- <TMPL_VAR NAME=sid> -->
    21<table class="wholepage"><tr>
    32<TMPL_INCLUDE NAME="menu.tmpl">
     
    1615<tr><td colspan="3" align="center"><TMPL_INCLUDE NAME="lettsearch.tmpl"></td></tr>
    1716<tr>
    18         <td colspan="2"><TMPL_IF edgrp><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=edgroup&amp;gid=<TMPL_VAR NAME=gid>">Edit Current Group</a></TMPL_IF></td>
    19         <td align="right"><TMPL_IF addgrp><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=newgrp">New Group</a></TMPL_IF>
     17        <td colspan="2"><TMPL_IF edgrp><a href="<TMPL_VAR NAME=script_self>&amp;page=edgroup&amp;gid=<TMPL_VAR NAME=gid>">Edit Current Group</a></TMPL_IF></td>
     18        <td align="right"><TMPL_IF addgrp><a href="<TMPL_VAR NAME=script_self>&amp;page=newgrp">New Group</a></TMPL_IF>
    2019</td>
    2120</tr>
     
    2423<table width="98%" border="0" cellspacing="4" cellpadding="3">
    2524<tr>
    26 <TMPL_LOOP NAME=colheads>       <td class="datahead_<TMPL_IF __first__>l<TMPL_ELSE>s</TMPL_IF>"><a href="dns.cgi?sid=<TMPL_VAR
    27  NAME=sid>&amp;page=<TMPL_VAR NAME=page><TMPL_IF NAME=offset>&amp;offset=<TMPL_VAR
     25<TMPL_LOOP NAME=colheads>       <td class="datahead_<TMPL_IF __first__>l<TMPL_ELSE>s</TMPL_IF>"><a href="<TMPL_VAR
     26 NAME=script_self>&amp;page=<TMPL_VAR NAME=page><TMPL_IF NAME=offset>&amp;offset=<TMPL_VAR
    2827 NAME=offset></TMPL_IF>&amp;sortby=<TMPL_VAR NAME=sortby>&amp;order=<TMPL_VAR NAME=order>"><TMPL_VAR
    2928 NAME=colname></a><TMPL_IF NAME=sortorder>&nbsp;<img alt="<TMPL_VAR NAME=sortorder>" src="images/<TMPL_VAR
     
    3736<TMPL_LOOP name=grouptable>
    3837<tr class="row<TMPL_IF __odd__>0<TMPL_ELSE>1</TMPL_IF>">
    39         <td align="left"><TMPL_IF edgrp><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=edgroup&amp;gid=<TMPL_VAR NAME=groupid>"><TMPL_VAR NAME=groupname></a><TMPL_ELSE><TMPL_VAR NAME=groupname></TMPL_IF></td>
     38        <td align="left"><TMPL_IF edgrp><a href="<TMPL_VAR NAME=script_self>&amp;page=edgroup&amp;gid=<TMPL_VAR NAME=groupid>"><TMPL_VAR NAME=groupname></a><TMPL_ELSE><TMPL_VAR NAME=groupname></TMPL_IF></td>
    4039        <td><TMPL_VAR name=pgroup></td>
    4140        <td><TMPL_VAR name=nusers></td>
     
    4342        <td><TMPL_VAR NAME=nrevzones></td>
    4443<TMPL_IF delgrp>
    45         <td align="center"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=delgrp&amp;id=<TMPL_VAR NAME=groupid>"><img src="images/trash2.png" alt="[ Delete ]" /></a></td>
     44        <td align="center"><a href="<TMPL_VAR NAME=script_self>&amp;page=delgrp&amp;id=<TMPL_VAR NAME=groupid>"><img src="images/trash2.png" alt="[ Delete ]" /></a></td>
    4645</TMPL_IF>
    4746</tr>
  • trunk/templates/header.tmpl

    r210 r493  
    2121        <link rel="stylesheet" type="text/css" href="templates/grouptree.css" />
    2222        <!-- [endif] -->
     23
     24        <!-- Custom local stylesheet, if desired -->
     25        <link rel="stylesheet" type="text/css" href="local.css" />
    2326    </head>
    2427<body>
  • trunk/templates/location.tmpl

    r375 r493  
    1 <!-- <TMPL_VAR NAME=sid> -->
    21<table class="wholepage"><tr>
    32<TMPL_INCLUDE NAME="menu.tmpl">
     
    98<TMPL_ELSE>
    109
    11 <form action="dns.cgi" method="post">
     10<form action="<TMPL_VAR NAME=script_self>" method="post">
    1211<fieldset>
    1312
    1413<input type="hidden" name="page" value="location" />
    15 <input type="hidden" name="sid" value="<TMPL_VAR NAME=sid>" />
    1614<TMPL_IF id><input type="hidden" name="id" value="<TMPL_VAR NAME=id>" /></TMPL_IF>
    1715<input type="hidden" name="locact" value="<TMPL_VAR NAME=locact>" />
  • trunk/templates/loclist.tmpl

    r427 r493  
    1 <!-- <TMPL_VAR NAME=sid> -->
    21<table class="wholepage"><tr>
    32<TMPL_INCLUDE NAME="menu.tmpl">
     
    1514</tr>
    1615<TMPL_IF addloc>
    17 <tr><td colspan="3" align="right"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=location">New Location/View</a></td></tr>
     16<tr><td colspan="3" align="right"><a href="<TMPL_VAR NAME=script_self>&amp;page=location">New Location/View</a></td></tr>
    1817</TMPL_IF>
    1918</table>
     
    2120<table width="98%" border="0" cellspacing="4" cellpadding="3" class="csubtable">
    2221<tr>
    23 <TMPL_LOOP NAME=colheads>       <td class="datahead_s"><a href="dns.cgi?sid=<TMPL_VAR
    24  NAME=sid>&amp;page=<TMPL_VAR NAME=page><TMPL_IF NAME=offset>&amp;offset=<TMPL_VAR
     22<TMPL_LOOP NAME=colheads>       <td class="datahead_s"><a href="<TMPL_VAR
     23 NAME=script_self>&amp;page=<TMPL_VAR NAME=page><TMPL_IF NAME=offset>&amp;offset=<TMPL_VAR
    2524 NAME=offset></TMPL_IF>&amp;sortby=<TMPL_VAR NAME=sortby>&amp;order=<TMPL_VAR NAME=order>"><TMPL_VAR
    2625 NAME=colname></a><TMPL_IF NAME=sortorder>&nbsp;<img alt="<TMPL_VAR NAME=sortorder>" src="images/<TMPL_VAR
     
    3231<TMPL_LOOP name=loctable>
    3332<tr class="row<TMPL_IF __odd__>0<TMPL_ELSE>1</TMPL_IF>">
    34         <td align="left"><TMPL_IF edloc><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=location&amp;locact=edit&amp;loc=<TMPL_VAR NAME=location>"><TMPL_VAR NAME=description></a><TMPL_ELSE><TMPL_VAR NAME=description></TMPL_IF></td>
     33        <td align="left"><TMPL_IF edloc><a href="<TMPL_VAR NAME=script_self>&amp;page=location&amp;locact=edit&amp;loc=<TMPL_VAR NAME=location>"><TMPL_VAR NAME=description></a><TMPL_ELSE><TMPL_VAR NAME=description></TMPL_IF></td>
    3534        <td><TMPL_VAR name=iplist></td>
    3635        <td><TMPL_VAR name=group_name></td>
    3736<TMPL_IF delloc>
    38         <td align="center"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=delloc&amp;locid=<TMPL_VAR
     37        <td align="center"><a href="<TMPL_VAR NAME=script_self>&amp;page=delloc&amp;locid=<TMPL_VAR
    3938NAME=location>"><img src="images/trash2.png" alt="[ Delete ]" /></a></td>
    4039</TMPL_IF>
  • trunk/templates/log.tmpl

    r379 r493  
    1 <!-- <TMPL_VAR NAME=sid> -->
    21<table class="wholepage"><tr>
    32<TMPL_INCLUDE NAME="menu.tmpl">
     
    2120      <!-- td>Customer ID</td -->
    2221<tr class="darkrowheader">
    23 <TMPL_LOOP NAME=colheads>       <td><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=<TMPL_VAR NAME=page><TMPL_IF
     22<TMPL_LOOP NAME=colheads>       <td><a href="<TMPL_VAR NAME=script_self>&amp;page=<TMPL_VAR NAME=page><TMPL_IF
    2423 NAME=offset>&amp;offset=<TMPL_VAR NAME=offset></TMPL_IF>&amp;sortby=<TMPL_VAR
    2524 NAME=sortby>&amp;order=<TMPL_VAR NAME=order>&amp;id=<TMPL_VAR NAME=id>&amp;ltype=<TMPL_VAR
  • trunk/templates/login.tmpl

    r210 r493  
    1 <form method="post" action="dns.cgi">
     1<form method="post" action="<TMPL_VAR NAME=script_self>">
    22<fieldset>
    33<input type="hidden" name="action" value="login" />
    44<input type="hidden" name="page" value="login" />
     5<input type="hidden" name="target" value="<TMPL_VAR NAME=target>" />
    56
    67<div id="login">
  • trunk/templates/menu.tmpl

    r394 r493  
    11<td class="menu">
    22<TMPL_VAR NAME=username> logged in<br />
    3 <a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;action=logout">Log out</a>
     3<a href="<TMPL_VAR NAME=script_self>&amp;action=logout">Log out</a>
    44<hr />
    5 <a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=domlist">Domains</a><br />
    6 <TMPL_IF mayrdns><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=revzones">Reverse Zones</a><br /></TMPL_IF>
    7 <a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=useradmin">Users</a><br />
    8 <a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=log">Log</a><br />
    9 <TMPL_IF maydefrec><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=reclist&amp;id=<TMPL_VAR NAME=group>&amp;defrec=y">Default Records</a><br />
    10 <TMPL_IF mayrdns><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=reclist&amp;id=<TMPL_VAR NAME=group>&amp;defrec=y&amp;revrec=y">Default Reverse Records</a><br /></TMPL_IF></TMPL_IF>
    11 <TMPL_IF mayloc><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=loclist&amp;id=<TMPL_VAR NAME=group>">Locations/Views</a><br /></TMPL_IF>
    12 <TMPL_IF mayimport><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=axfr">AXFR Import</a><br /></TMPL_IF>
    13 <TMPL_IF maybulk><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=bulkdomain">Bulk Domain Operations</a><br /></TMPL_IF>
     5<a href="<TMPL_VAR NAME=script_self>&amp;page=domlist">Domains</a><br />
     6<TMPL_IF mayrdns><a href="<TMPL_VAR NAME=script_self>&amp;page=revzones">Reverse Zones</a><br /></TMPL_IF>
     7<a href="<TMPL_VAR NAME=script_self>&amp;page=useradmin">Users</a><br />
     8<a href="<TMPL_VAR NAME=script_self>&amp;page=log">Log</a><br />
     9<TMPL_IF maydefrec><a href="<TMPL_VAR NAME=script_self>&amp;page=reclist&amp;id=<TMPL_VAR NAME=group>&amp;defrec=y">Default Records</a><br />
     10<TMPL_IF mayrdns><a href="<TMPL_VAR NAME=script_self>&amp;page=reclist&amp;id=<TMPL_VAR NAME=group>&amp;defrec=y&amp;revrec=y">Default Reverse Records</a><br /></TMPL_IF></TMPL_IF>
     11<TMPL_IF mayloc><a href="<TMPL_VAR NAME=script_self>&amp;page=loclist&amp;id=<TMPL_VAR NAME=group>">Locations/Views</a><br /></TMPL_IF>
     12<TMPL_IF mayimport><a href="<TMPL_VAR NAME=script_self>&amp;page=axfr">AXFR Import</a><br /></TMPL_IF>
     13<TMPL_IF maybulk><a href="<TMPL_VAR NAME=script_self>&amp;page=bulkdomain">Bulk Domain Operations</a><br /></TMPL_IF>
    1414<br />
    15 <a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=grpman"><TMPL_IF chggrps>Manage<TMPL_ELSE>View</TMPL_IF> groups</a><br />
     15<a href="<TMPL_VAR NAME=script_self>&amp;page=grpman"><TMPL_IF chggrps>Manage<TMPL_ELSE>View</TMPL_IF> groups</a><br />
    1616<hr />
    1717<div id="grptree">
     
    3030<!-- hmm:  <TMPL_VAR NAME=groupname> -->
    3131<hr />
    32 <a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=dnsq">DNS Query</a><br />
    33 <a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=whoisq">WHOIS Query</a><br />
     32<a href="<TMPL_VAR NAME=script_self>&amp;page=dnsq">DNS Query</a><br />
     33<a href="<TMPL_VAR NAME=script_self>&amp;page=whoisq">WHOIS Query</a><br />
     34
    3435</td>
  • trunk/templates/newdomain.tmpl

    r435 r493  
    1 <!-- <TMPL_VAR NAME=sid> -->
    21<table class="wholepage"><tr>
    32<TMPL_INCLUDE NAME="menu.tmpl">
     
    54<td align="center" valign="top">
    65
    7 <form action="dns.cgi">
     6<form action="<TMPL_VAR NAME=script_self>">
    87<fieldset>
    98
    10 <input type="hidden" name="sid" value="<TMPL_VAR NAME=sid>" />
    119<input type="hidden" name="page" value="adddomain" />
    1210<input type="hidden" name="newdomain" value="yes" />
  • trunk/templates/newgrp.tmpl

    r394 r493  
    1 <!-- <TMPL_VAR NAME=sid> -->
    21<table class="wholepage"><tr>
    32<TMPL_INCLUDE NAME="menu.tmpl">
     
    54<td align="center" valign="top">
    65
    7 <form action="dns.cgi">
     6<form action="<TMPL_VAR NAME=script_self>">
    87<fieldset>
    98
    10 <input type="hidden" name="sid" value="<TMPL_VAR NAME=sid>" />
    119<input type="hidden" name="page" value="newgrp" />
    1210<input type="hidden" name="grpaction" value="add" />
  • trunk/templates/newrevzone.tmpl

    r446 r493  
    1 <!-- <TMPL_VAR NAME=sid> -->
    21<table class="wholepage"><tr>
    32<TMPL_INCLUDE NAME="menu.tmpl">
     
    54<td align="center" valign="top">
    65
    7 <form action="dns.cgi">
     6<form action="<TMPL_VAR NAME=script_self>">
    87<fieldset>
    98
    10 <input type="hidden" name="sid" value="<TMPL_VAR NAME=sid>" />
    119<input type="hidden" name="page" value="addrevzone" />
    1210<input type="hidden" name="newrevzone" value="yes" />
  • trunk/templates/reclist.tmpl

    r420 r493  
    1 <!-- <TMPL_VAR NAME=sid> -->
    21<table class="wholepage"><tr>
    32<TMPL_INCLUDE NAME="menu.tmpl">
     
    2524        </td>
    2625        <td colspan="2" align="right">
    27                 <form action="dns.cgi">
     26                <form action="<TMPL_VAR NAME=script_self>">
    2827                <fieldset>
    29                 <input type="hidden" name="sid" value="<TMPL_VAR NAME=sid>" />
    3028                <input type="hidden" name="page" value="reclist" />
    3129                <input type="hidden" name="offset" value="0" />
     
    4139<tr class="darkrowheader">
    4240        <td colspan="3">Records</td>
    43         <td align="center"><a href="textrecs.cgi?sid=<TMPL_VAR NAME=sid>&amp;id=<TMPL_VAR NAME=id>&amp;defrec=<TMPL_VAR NAME=defrec>&amp;revrec=<TMPL_VAR NAME=revrec>">Plain text</a></td>
    44 <TMPL_IF record_create> <td align="right"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=record&amp;parentid=<TMPL_VAR NAME=id>&amp;defrec=<TMPL_VAR NAME=defrec>&amp;revrec=<TMPL_VAR NAME=revrec>&amp;recact=new">Add record</a></td></TMPL_IF>
    45         <td align="right"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=log&amp;id=<TMPL_VAR NAME=id><TMPL_IF logdom>&amp;ltype=dom</TMPL_IF><TMPL_IF logrdns>&amp;ltype=rdns</TMPL_IF>">View log</a></td>
     41        <td align="center"><a href="textrecs.cgi?id=<TMPL_VAR NAME=id>&amp;defrec=<TMPL_VAR NAME=defrec>&amp;revrec=<TMPL_VAR NAME=revrec>">Plain text</a></td>
     42<TMPL_IF record_create> <td align="right"><a href="<TMPL_VAR NAME=script_self>&amp;page=record&amp;parentid=<TMPL_VAR NAME=id>&amp;defrec=<TMPL_VAR NAME=defrec>&amp;revrec=<TMPL_VAR NAME=revrec>&amp;recact=new">Add record</a></td></TMPL_IF>
     43        <td align="right"><a href="<TMPL_VAR NAME=script_self>&amp;page=log&amp;id=<TMPL_VAR NAME=id><TMPL_IF logdom>&amp;ltype=dom</TMPL_IF><TMPL_IF logrdns>&amp;ltype=rdns</TMPL_IF>">View log</a></td>
    4644</tr>
    4745
     
    5149<TMPL_IF reclist>
    5250<tr class="darkrowheader">
    53 <TMPL_LOOP NAME=colheads>       <td><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=<TMPL_VAR NAME=page><TMPL_IF
     51<TMPL_LOOP NAME=colheads>       <td><a href="<TMPL_VAR NAME=script_self>&amp;page=<TMPL_VAR NAME=page><TMPL_IF
    5452 NAME=offset>&amp;offset=<TMPL_VAR NAME=offset></TMPL_IF>&amp;sortby=<TMPL_VAR
    5553 NAME=sortby>&amp;order=<TMPL_VAR NAME=order>&amp;id=<TMPL_VAR NAME=id>&amp;defrec=<TMPL_VAR
     
    6361<tr class="row<TMPL_IF __odd__>0<TMPL_ELSE>1</TMPL_IF>">
    6462<TMPL_IF fwdzone>
    65         <td><TMPL_IF record_edit><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=record&amp;parentid=<TMPL_VAR NAME=id>&amp;defrec=<TMPL_VAR NAME=defrec>&amp;revrec=<TMPL_VAR NAME=revrec>&amp;recact=edit&amp;id=<TMPL_VAR NAME=record_id>"><TMPL_VAR NAME=host></a><TMPL_IF locname> (<TMPL_VAR NAME=locname>)</TMPL_IF><TMPL_ELSE><TMPL_VAR NAME=host><TMPL_IF locname> (<TMPL_VAR NAME=locname>)</TMPL_IF></TMPL_IF></td>
     63        <td><TMPL_IF record_edit><a href="<TMPL_VAR NAME=script_self>&amp;page=record&amp;parentid=<TMPL_VAR NAME=id>&amp;defrec=<TMPL_VAR NAME=defrec>&amp;revrec=<TMPL_VAR NAME=revrec>&amp;recact=edit&amp;id=<TMPL_VAR NAME=record_id>"><TMPL_VAR NAME=host></a><TMPL_IF locname> (<TMPL_VAR NAME=locname>)</TMPL_IF><TMPL_ELSE><TMPL_VAR NAME=host><TMPL_IF locname> (<TMPL_VAR NAME=locname>)</TMPL_IF></TMPL_IF></td>
    6664        <td><TMPL_VAR NAME=type></td>
    6765        <td><TMPL_VAR NAME=val></td>
     
    7068        <td><TMPL_VAR NAME=port></td>
    7169<TMPL_ELSE>
    72         <td><TMPL_IF record_edit><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=record&amp;parentid=<TMPL_VAR NAME=id>&amp;defrec=<TMPL_VAR NAME=defrec>&amp;revrec=<TMPL_VAR NAME=revrec>&amp;recact=edit&amp;id=<TMPL_VAR NAME=record_id>"><TMPL_VAR NAME=val></a><TMPL_IF locname> (<TMPL_VAR NAME=locname>)</TMPL_IF><TMPL_ELSE><TMPL_VAR NAME=val><TMPL_IF locname> (<TMPL_VAR NAME=locname>)</TMPL_IF></TMPL_IF></td>
     70        <td><TMPL_IF record_edit><a href="<TMPL_VAR NAME=script_self>&amp;page=record&amp;parentid=<TMPL_VAR NAME=id>&amp;defrec=<TMPL_VAR NAME=defrec>&amp;revrec=<TMPL_VAR NAME=revrec>&amp;recact=edit&amp;id=<TMPL_VAR NAME=record_id>"><TMPL_VAR NAME=val></a><TMPL_IF locname> (<TMPL_VAR NAME=locname>)</TMPL_IF><TMPL_ELSE><TMPL_VAR NAME=val><TMPL_IF locname> (<TMPL_VAR NAME=locname>)</TMPL_IF></TMPL_IF></td>
    7371        <td><TMPL_VAR NAME=type></td>
    7472        <td><TMPL_VAR NAME=host></td>
    7573</TMPL_IF>
    7674        <td><TMPL_VAR NAME=ttl></td>
    77 <TMPL_IF record_delete> <td align="center"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=delrec&amp;id=<TMPL_VAR NAME=record_id>&amp;defrec=<TMPL_VAR NAME=defrec>&amp;revrec=<TMPL_VAR NAME=revrec>&amp;parentid=<TMPL_VAR NAME=id>"><img src="images/trash2.png" alt="[ Delete ]" /></a></td></TMPL_IF>
     75<TMPL_IF record_delete> <td align="center"><a href="<TMPL_VAR NAME=script_self>&amp;page=delrec&amp;id=<TMPL_VAR NAME=record_id>&amp;defrec=<TMPL_VAR NAME=defrec>&amp;revrec=<TMPL_VAR NAME=revrec>&amp;parentid=<TMPL_VAR NAME=id>"><img src="images/trash2.png" alt="[ Delete ]" /></a></td></TMPL_IF>
    7876</tr>
    7977</TMPL_LOOP>
  • trunk/templates/record.tmpl

    r388 r493  
    1 <!-- <TMPL_VAR NAME=sid> -->
    21<table class="wholepage"><tr>
    32<TMPL_INCLUDE NAME="menu.tmpl">
     
    98<TMPL_ELSE>
    109
    11 <form action="dns.cgi" method="post">
     10<form action="<TMPL_VAR NAME=script_self>" method="post">
    1211<fieldset>
    1312
     
    1514<input type="hidden" name="defrec" value="<TMPL_VAR NAME=defrec>" />
    1615<input type="hidden" name="revrec" value="<TMPL_VAR NAME=revrec>" />
    17 <input type="hidden" name="sid" value="<TMPL_VAR NAME=sid>" />
    1816<input type="hidden" name="parentid" value="<TMPL_VAR NAME=parentid>" />
    1917<input type="hidden" name="id" value="<TMPL_VAR NAME=id>" />
  • trunk/templates/soadata.tmpl

    r277 r493  
    33        <td align="left">SOA:</td>
    44<TMPL_IF mayeditsoa>
    5         <td align="right"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=editsoa&amp;id=<TMPL_VAR NAME=id>&amp;defrec=<TMPL_VAR NAME=defrec>&amp;revrec=<TMPL_VAR NAME=revrec>">edit</a></td></TMPL_IF>
     5        <td align="right"><a href="<TMPL_VAR NAME=script_self>&amp;page=editsoa&amp;id=<TMPL_VAR NAME=id>&amp;defrec=<TMPL_VAR NAME=defrec>&amp;revrec=<TMPL_VAR NAME=revrec>">edit</a></td></TMPL_IF>
    66</tr>
    77</table>
  • trunk/templates/template.tmpl

    r100 r493  
    1 <!-- <TMPL_VAR NAME=sid> -->
    21<table class="wholepage"><tr>
    32<TMPL_INCLUDE NAME="menu.tmpl">
  • trunk/templates/user.tmpl

    r294 r493  
    1 <!-- <TMPL_VAR NAME=sid> -->
    21<table class="wholepage"><tr>
    32<TMPL_INCLUDE NAME="menu.tmpl">
     
    54<td align="center" valign="top">
    65
    7 <form action="dns.cgi" method="post">
     6<form action="<TMPL_VAR NAME=script_self>" method="post">
    87<fieldset>
    98
    10 <input type="hidden" name="sid" value="<TMPL_VAR NAME=sid>" />
    119<input type="hidden" name="page" value="user" />
    1210<input type="hidden" name="useraction" value="<TMPL_VAR NAME=action>" />
  • trunk/templates/useradmin.tmpl

    r379 r493  
    1 <!-- <TMPL_VAR NAME=sid> -->
    21<table class="wholepage"><tr>
    32<TMPL_INCLUDE NAME="menu.tmpl">
     
    1615<tr><td colspan="3" align="center"><TMPL_INCLUDE NAME="lettsearch.tmpl"></td></tr>
    1716<TMPL_IF adduser>
    18 <tr><td colspan="3" align="right"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=user">New User</a></td></tr>
     17<tr><td colspan="3" align="right"><a href="<TMPL_VAR NAME=script_self>&amp;page=user">New User</a></td></tr>
    1918</TMPL_IF>
    2019</table>
     
    2221<table width="98%" border="0" cellspacing="4" cellpadding="3" class="csubtable">
    2322<tr>
    24 <TMPL_LOOP NAME=colheads>       <td class="datahead_<TMPL_IF __first__>l<TMPL_ELSE>s</TMPL_IF>"><a href="dns.cgi?sid=<TMPL_VAR
    25  NAME=sid>&amp;page=<TMPL_VAR NAME=page><TMPL_IF NAME=offset>&amp;offset=<TMPL_VAR
     23<TMPL_LOOP NAME=colheads>       <td class="datahead_<TMPL_IF __first__>l<TMPL_ELSE>s</TMPL_IF>"><a href="<TMPL_VAR
     24 NAME=script_self>&amp;page=<TMPL_VAR NAME=page><TMPL_IF NAME=offset>&amp;offset=<TMPL_VAR
    2625 NAME=offset></TMPL_IF>&amp;sortby=<TMPL_VAR NAME=sortby>&amp;order=<TMPL_VAR NAME=order>"><TMPL_VAR
    2726 NAME=colname></a><TMPL_IF NAME=sortorder>&nbsp;<img alt="<TMPL_VAR NAME=sortorder>" src="images/<TMPL_VAR
     
    3332<TMPL_LOOP name=usertable>
    3433<tr class="row<TMPL_IF __odd__>0<TMPL_ELSE>1</TMPL_IF>">
    35         <td align="left"><TMPL_IF eduser><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=user&amp;useraction=edit&amp;user=<TMPL_VAR NAME=user_id>"><TMPL_VAR NAME=username></a><TMPL_ELSE><TMPL_VAR NAME=username></TMPL_IF></td>
     34        <td align="left"><TMPL_IF eduser><a href="<TMPL_VAR NAME=script_self>&amp;page=user&amp;useraction=edit&amp;user=<TMPL_VAR NAME=user_id>"><TMPL_VAR NAME=username></a><TMPL_ELSE><TMPL_VAR NAME=username></TMPL_IF></td>
    3635        <td class="data_nowrap"><TMPL_VAR name=fname></td>
    3736        <td><TMPL_VAR name=type></td>
     
    3938        <td align="center">
    4039<TMPL_IF eduser>
    41                 <a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=useradmin<TMPL_IF NAME=offset>&amp;offset=<TMPL_VAR NAME=offset></TMPL_IF>&amp;id=<TMPL_VAR NAME=user_id>&amp;userstatus=<TMPL_IF status>useroff<TMPL_ELSE>useron</TMPL_IF>"><TMPL_IF status>enabled<TMPL_ELSE>disabled</TMPL_IF></a>
     40                <a href="<TMPL_VAR NAME=script_self>&amp;page=useradmin<TMPL_IF NAME=offset>&amp;offset=<TMPL_VAR NAME=offset></TMPL_IF>&amp;id=<TMPL_VAR NAME=user_id>&amp;userstatus=<TMPL_IF status>useroff<TMPL_ELSE>useron</TMPL_IF>"><TMPL_IF status>enabled<TMPL_ELSE>disabled</TMPL_IF></a>
    4241<TMPL_ELSE>
    4342                <TMPL_IF status>enabled<TMPL_ELSE>disabled</TMPL_IF>
     
    4544</td>
    4645<TMPL_IF deluser>
    47         <td align="center"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=deluser&amp;id=<TMPL_VAR NAME=user_id>"><img src="images/trash2.png" alt="[ Delete ]" /></a></td>
     46        <td align="center"><a href="<TMPL_VAR NAME=script_self>&amp;page=deluser&amp;id=<TMPL_VAR NAME=user_id>"><img src="images/trash2.png" alt="[ Delete ]" /></a></td>
    4847</TMPL_IF>
    4948</tr>
  • trunk/templates/whoisq.tmpl

    r100 r493  
    1 <!-- <TMPL_VAR NAME=sid> -->
    21<table class="wholepage"><tr>
    32<TMPL_INCLUDE NAME="menu.tmpl">
     
    76<TMPL_IF errmsg><div class="errmsg">Query error: <TMPL_VARNAME=errmsg></div></TMPL_IF>
    87
    9 <form action="dns.cgi" method="post">
     8<form action="<TMPL_VAR NAME=script_self>" method="post">
    109<fieldset>
    11 <input type="hidden" name="sid" value="<TMPL_VAR NAME=sid>" />
    1210<input type="hidden" name="page" value="whoisq" />
    1311<input type="hidden" name="askaway" value="y" />
Note: See TracChangeset for help on using the changeset viewer.