Changeset 38 for trunk/dns.cgi
- Timestamp:
- 11/20/09 17:32:04 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dns.cgi
r37 r38 25 25 26 26 my @debugbits; # temp, to be spit out near the end of processing 27 my $debugenv = 0; 27 28 28 29 # Let's do these templates right... … … 68 69 69 70 # default 70 my $perpage = 15;71 #my $perpage = 3;71 #my $perpage = 15; 72 my $perpage = 3; 72 73 my $offset = ($webvar{offset} ? $webvar{offset} : 0); 73 74 … … 481 482 $msg = "Passwords don't match"; 482 483 } else { 483 ($code,$msg) = addUser($dbh,$webvar{u sername}, $webvar{group}, $webvar{pass1},484 ($code,$msg) = addUser($dbh,$webvar{uname}, $webvar{group}, $webvar{pass1}, 484 485 ($webvar{makeactive} eq 'on' ? 1 : 0), $webvar{accttype}, 485 486 $webvar{fname}, $webvar{lname}, $webvar{phone}); … … 490 491 changepage(page => "useradmin"); 491 492 } else { 492 # oooh, yeah, this is supposed to be a redirect. er, maybe. whee. 493 # $page = HTML::Template->new(filename => "$templatedir/newuser.tmpl"); 493 # oddity - apparently, xhtml 1.0 strict swallows username as an HTML::Template var. O_o 494 494 $page->param(add_failed => 1); 495 $page->param(u sername => $webvar{username});495 $page->param(uname => $webvar{uname}); 496 496 $page->param(fname => $webvar{fname}); 497 497 $page->param(lname => $webvar{lname}); … … 502 502 } 503 503 504 $page->param(add_failed => 1);504 # $page->param(add_failed => 1); 505 505 506 506 } elsif ($webvar{page} eq 'deluser') { … … 654 654 # stuff for menu group change. nb: this is icky. 655 655 fill_grouplist("grouplist"); 656 $page->param(whereami => $ENV{REQUEST_URI}); 656 # @#$%@%@#% XHTML - & in a URL must be escaped. >:( 657 my $tmp_ruri = $ENV{REQUEST_URI}; 658 $tmp_ruri =~ s/\&([a-z])/\&\;$1/g; 659 # $page->param(whereami => $ENV{REQUEST_URI}); 660 $page->param(whereami => $tmp_ruri); 657 661 } 658 662 … … 662 666 print $page->output; 663 667 664 print "<div id=debug>webvar keys: <pre>\n"; 665 foreach my $key (keys %webvar) { 666 print "key: $key\tval: $webvar{$key}\n"; 667 } 668 print "</pre>\nsession:\n<pre>\n"; 669 my $sesdata = $session->dataref(); 670 foreach my $key (keys %$sesdata) { 671 print "key: $key\tval: ".$sesdata->{$key}."\n"; 672 } 673 print "</pre>\nENV:\n<pre>\n"; 674 foreach my $key (keys %ENV) { 675 print "key: $key\tval: $ENV{$key}\n"; 676 } 677 print "</pre></div>\n"; 668 if ($debugenv) { 669 print "<div id=\"debug\">webvar keys: <pre>\n"; 670 foreach my $key (keys %webvar) { 671 print "key: $key\tval: $webvar{$key}\n"; 672 } 673 print "</pre>\nsession:\n<pre>\n"; 674 my $sesdata = $session->dataref(); 675 foreach my $key (keys %$sesdata) { 676 print "key: $key\tval: ".$sesdata->{$key}."\n"; 677 } 678 print "</pre>\nENV:\n<pre>\n"; 679 foreach my $key (keys %ENV) { 680 print "key: $key\tval: $ENV{$key}\n"; 681 } 682 print "</pre></div>\n"; 683 } 678 684 679 685 print $footer->output;
Note:
See TracChangeset
for help on using the changeset viewer.