Changeset 283 for branches/privdata/cgi-bin
- Timestamp:
- 09/21/05 14:20:31 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/privdata/cgi-bin/main.cgi
r282 r283 1166 1166 1167 1167 # 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}'"); 1170 1170 $sth->execute(); 1171 1171 # croak $sth->errstr() if($sth->errstr()); 1172 1172 1173 $sth->bind_columns(\$cidr, \$custid, \$city, \$alloctype, \$notes, \$circid); 1173 $sth->bind_columns(\$cidr, \$custid, \$city, \$alloctype, \$notes, \$circid, 1174 \$privdata); 1174 1175 $sth->fetch() || croak $sth->errstr; 1175 1176 1176 1177 } else { # done with alloctype=~ /^.i$/ 1177 1178 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}'"); 1180 1181 $sth->execute(); 1181 1182 # croak $sth->errstr() if($sth->errstr()); 1182 1183 1183 $sth->bind_columns(\$cidr, \$custid, \$alloctype, \$city, \$circid, \$desc, \$notes); 1184 $sth->bind_columns(\$cidr, \$custid, \$alloctype, \$city, \$circid, \$desc, 1185 \$notes, \$privdata); 1184 1186 $sth->fetch() || carp $sth->errstr; 1185 1187 } # end cases for different alloctypes … … 1204 1206 $html =~ s|<!--warn-->|<tr bgcolor="black"><td colspan="2"><div class="red">Warning: clicking confirm will remove this record entirely.</div></td></tr>|; 1205 1207 } 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/; 1206 1220 1207 1221 print $html;
Note:
See TracChangeset
for help on using the changeset viewer.