Changeset 68 for trunk/dns.cgi


Ignore:
Timestamp:
02/16/11 11:29:12 (14 years ago)
Author:
Kris Deugau
Message:

/trunk

Minor rearrangements of session handling, page-picking handling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dns.cgi

    r67 r68  
    4141# persistent stuff needed on most/all pages
    4242my $sid = ($webvar{sid} ? $webvar{sid} : undef);
    43 my $session = new CGI::Session("driver:File", $sid, {Directory => $sessiondir});
     43my $session = new CGI::Session("driver:File", $sid, {Directory => $sessiondir})
     44        or die CGI::Session->errstr();
    4445#$sid = $session->id() if !$sid;
    4546if (!$sid) {
     
    7374$session->param($webvar{page}.'searchsubs', $webvar{searchsubs}) if defined($webvar{searchsubs});
    7475
     76# decide which page to spit out...
     77# also set $webvar{page} before we try to use it.
     78$webvar{page} = 'login' if !$webvar{page};
     79
    7580my $startwith = $session->param($webvar{page}.'startwith');
    7681my $filter = $session->param($webvar{page}.'filter');
     
    9196my $sortorder = "ASC";
    9297
    93 my ($dbh,$msg) = connectDB("dnsdb","dnsdb","secret","dbhost");
     98my ($dbh,$msg) = connectDB("dnsdb","dnsdb","secret","newdbhost");
    9499#my $dbh = DBI->connect("DBI:mysql:database=vegadns","vegadns","secret",
    95100#       { AutoCommit => 0 }) or die $DBI::errstr;
     
    147152
    148153
    149 # decide which page to spit out...
    150 $webvar{page} = 'login' if !$webvar{page};
    151154#if (!$webvar{page}) {
    152155#  $page = HTML::Template->new(filename => "$templatedir/login.tmpl");
     
    649652        changepage(page => "useradmin");
    650653      }
    651 id => $webvar{id}, defrec => $webvar{defrec}
    652654    } else {
    653655# oddity - apparently, xhtml 1.0 strict swallows username as an HTML::Template var.  O_o
Note: See TracChangeset for help on using the changeset viewer.