Changeset 25 for trunk/dns.cgi
- Timestamp:
- 11/02/09 16:40:07 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dns.cgi
r24 r25 445 445 } else { 446 446 ($code,$msg) = addUser($dbh,$webvar{username}, $webvar{group}, $webvar{pass1}, 447 ($webvar{makeactive} eq 'on' ? 1 : 0), $webvar{fname}, $webvar{lname}); 447 ($webvar{makeactive} eq 'on' ? 1 : 0), $webvar{accttype}, 448 $webvar{fname}, $webvar{lname}, $webvar{phone}); 448 449 } 449 450 450 451 # hokay, a bit of magic to decide which page we hit. 451 452 if ($code eq 'OK') { 452 # redirect to dns.cgi?etc&page=reclist453 453 changepage(page => "useradmin"); 454 # $page = HTML::Template->new(filename => "$templatedir/reclist.tmpl");455 # showdomain(0,$msg);456 ##work457 454 } else { 458 455 # oooh, yeah, this is supposed to be a redirect. er, maybe. whee. … … 469 466 470 467 $page->param(add_failed => 1); 468 469 } elsif ($webvar{page} eq 'deluser') { 470 471 $page->param(id => $webvar{id}); 472 # first pass = confirm y/n (sorta) 473 if (!defined($webvar{del})) { 474 $page->param(del_getconf => 1); 475 $page->param(user => userFullName($dbh,$webvar{id})); 476 } elsif ($webvar{del} eq 'ok') { 477 my ($code,$msg) = delUser($dbh, $webvar{id}); 478 if ($code ne 'OK') { 479 # need to find failure mode 480 $page->param(del_failed => 1); 481 $page->param(errmsg => $msg); 482 list_users($curgroup); 483 } else { 484 # success. go back to the domain list, do not pass "GO" 485 changepage(page => "useradmin"); 486 } 487 } else { 488 # cancelled. whee! 489 changepage(page => "useradmin"); 490 } 491 471 492 } 472 493 … … 821 842 822 843 my @userlist; 823 $sth = $dbh->prepare("SELECT u.user_id, u. email, u.firstname, u.lastname, u.type, g.group_name, u.status ".844 $sth = $dbh->prepare("SELECT u.user_id, u.username, u.firstname, u.lastname, u.type, g.group_name, u.status ". 824 845 "FROM users u ". 825 846 "INNER JOIN groups g ON u.group_id=g.group_id ".
Note:
See TracChangeset
for help on using the changeset viewer.