Changeset 283 for branches


Ignore:
Timestamp:
09/21/05 14:20:31 (19 years ago)
Author:
Kris Deugau
Message:

/branches/privdata

Add display for restricted data to delete confirmation page

Location:
branches/privdata
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/privdata/cgi-bin/main.cgi

    r282 r283  
    11661166
    11671167    # Unassigning a static IP
    1168     my $sth = $ip_dbh->prepare("select ip,custid,city,type,notes,circuitid from poolips".
    1169         " where ip='$webvar{block}'");
     1168    my $sth = $ip_dbh->prepare("select ip,custid,city,type,notes,circuitid,privdata".
     1169        " from poolips where ip='$webvar{block}'");
    11701170    $sth->execute();
    11711171#  croak $sth->errstr() if($sth->errstr());
    11721172
    1173     $sth->bind_columns(\$cidr, \$custid, \$city, \$alloctype, \$notes, \$circid);
     1173    $sth->bind_columns(\$cidr, \$custid, \$city, \$alloctype, \$notes, \$circid,
     1174        \$privdata);
    11741175    $sth->fetch() || croak $sth->errstr;
    11751176
    11761177  } else { # done with alloctype=~ /^.i$/
    11771178
    1178     my $sth = $ip_dbh->prepare("select cidr,custid,type,city,circuitid,description,notes from ".
    1179         "allocations where cidr='$webvar{block}'");
     1179    my $sth = $ip_dbh->prepare("select cidr,custid,type,city,circuitid,description,notes,privdata".
     1180        " from allocations where cidr='$webvar{block}'");
    11801181    $sth->execute();
    11811182#       croak $sth->errstr() if($sth->errstr());
    11821183
    1183     $sth->bind_columns(\$cidr, \$custid, \$alloctype, \$city, \$circid, \$desc, \$notes);
     1184    $sth->bind_columns(\$cidr, \$custid, \$alloctype, \$city, \$circid, \$desc,
     1185        \$notes, \$privdata);
    11841186    $sth->fetch() || carp $sth->errstr;
    11851187  } # end cases for different alloctypes
     
    12041206    $html =~ s|<!--warn-->|<tr bgcolor="black"><td colspan="2"><div class="red">Warning: clicking confirm will remove this record entirely.</div></td></tr>|;
    12051207  }
     1208
     1209  my $i = 1;
     1210  # Check to see if user is allowed to do anything with sensitive data
     1211  if ($IPDBacl{$authuser} =~ /s/) {
     1212    $privdata = qq(<tr class="color).($i%2).qq("><td>Restricted data:</td>).
     1213        qq(<td class=regular>$privdata</td></tr>\n);
     1214    $i++;
     1215  }
     1216  $html =~ s/\$\$PRIVDATA\$\$/$privdata/g;
     1217
     1218  $i = ++$i % 2;
     1219  $html =~ s/\$\$BUTTONROWCOLOUR\$\$/color$i/;
    12061220
    12071221  print $html;
  • branches/privdata/confirmRemove.html

    r74 r283  
    1010<tr class="color1"><td valign="top">Description/Name:</td><td>$$DESC$$</td></tr>
    1111<tr class="color2"><td valign="top">Notes:</td><td>$$NOTES$$</td></tr>
     12$$PRIVDATA$$
    1213<!--warn-->
    1314<input type="hidden" name="action" value="$$ACTION$$">
    14 <tr class="color1"><td class="center" colspan=2>
     15<tr class="$$BUTTONROWCOLOUR$$"><td class="center" colspan=2>
    1516<input type="button" value="Back" onclick="history.go(-1)"><input type="submit" value="Confirm">
    1617</td></tr>
Note: See TracChangeset for help on using the changeset viewer.