Changeset 378 for branches/stable/cgi-bin/main.cgi
- Timestamp:
- 01/16/08 15:25:19 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/cgi-bin/main.cgi
r376 r378 1142 1142 my $html = join('', <HTML>); 1143 1143 1144 # Link back to browse-routed or list-pool page on "Update complete" page. 1145 my $backlink = "/ip/cgi-bin/main.cgi?action="; 1146 my $cblock; # to contain the CIDR of the container block we're retrieving. 1147 my $sql; 1148 if (my $pooltype = ($webvar{alloctype} =~ /^(.)i$/) ) { 1149 $sql = "select pool from poolips where ip='$webvar{block}'"; 1150 $backlink .= "listpool&pool="; 1151 } else { 1152 $sql = "select cidr from routed where cidr >>= '$webvar{block}'"; 1153 $backlink .= "showrouted&block="; 1154 } 1155 # I define there to be no errors on this operation... so we don't need to check for them. 1156 $sth = $ip_dbh->prepare($sql); 1157 $sth->execute; 1158 $sth->bind_columns(\$cblock); 1159 $sth->fetch(); 1160 $sth->finish; 1161 $backlink .= $cblock; 1162 1144 1163 my $swiptmp = ($webvar{swip} eq 'on' ? 'Yes' : 'No'); 1145 1164 $html =~ s/\$\$BLOCK\$\$/$webvar{block}/g; … … 1156 1175 $webvar{notes} = desanitize($webvar{notes}); 1157 1176 $html =~ s/\$\$NOTES\$\$/$webvar{notes}/g; 1177 $html =~ s/\$\$BACKLINK\$\$/$backlink/g; 1178 $html =~ s/\$\$BACKBLOCK\$\$/$cblock/g; 1158 1179 1159 1180 if ($IPDBacl{$authuser} =~ /s/) {
Note:
See TracChangeset
for help on using the changeset viewer.