Changeset 375 for trunk/dns.cgi
- Timestamp:
- 08/08/12 18:04:47 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dns.cgi
r374 r375 1368 1368 1369 1369 if ($webvar{locact} eq 'new') { 1370 1370 # uuhhmm.... 1371 1371 } elsif ($webvar{locact} eq 'add') { 1372 1372 changepage(page => "loclist", errmsg => "You are not permitted to add locations/views", id => $webvar{parentid}) 1373 1373 unless ($permissions{admin} || $permissions{location_create}); 1374 1374 1375 ##work 1376 my ($code,$msg) = addLocation($dbh, $webvar{parentid}, $webvar{locname}, $webvar{iplist}); 1375 my ($code,$msg) = addLoc($dbh, $curgroup, $webvar{locname}, $webvar{comments}, $webvar{iplist}); 1377 1376 1378 1377 if ($code eq 'OK' || $code eq 'WARN') { … … 1388 1387 $page->param(todo => "Add location/view"); 1389 1388 $page->param(locact => "add"); 1390 $page->param(parentid => $webvar{parentid});1391 1389 $page->param(id => $webvar{id}); 1392 fill_recdata(); # populate the form... er, mostly. 1390 $page->param(locname => $webvar{locname}); 1391 $page->param(comments => $webvar{comments}); 1392 $page->param(iplist => $webvar{iplist}); 1393 1393 } 1394 1394 … … 1396 1396 changepage(page => "loclist", errmsg => "You are not permitted to edit locations/views", id => $webvar{parentid}) 1397 1397 unless ($permissions{admin} || $permissions{location_edit}); 1398 1399 my $loc = getLoc($dbh, $webvar{loc}); 1400 $page->param(wastrying => "adding"); 1401 $page->param(todo => "Edit location/view"); 1402 $page->param(locact => "update"); 1403 $page->param(id => $webvar{loc}); 1404 $page->param(locname => $loc->{description}); 1405 $page->param(comments => $loc->{comments}); 1406 $page->param(iplist => $loc->{iplist}); 1407 1398 1408 } elsif ($webvar{locact} eq 'update') { 1399 1409 changepage(page => "loclist", errmsg => "You are not permitted to edit locations/views", id => $webvar{parentid}) 1400 1410 unless ($permissions{admin} || $permissions{location_edit}); 1411 ##work 1401 1412 } else { 1402 1413 changepage(page => "loclist", errmsg => "You are not permitted to add locations/views", id => $webvar{parentid}) … … 1405 1416 $page->param(todo => "Add location/view"); 1406 1417 $page->param(locact => "add"); 1407 $page->param(parentid => $webvar{parentid});1408 1409 1418 $page->param(locname => ($webvar{locname} ? $webvar{locname} : '')); 1410 1419 $page->param(iplist => ($webvar{iplist} ? $webvar{iplist} : ''));
Note:
See TracChangeset
for help on using the changeset viewer.