Changeset 378 for branches/stable


Ignore:
Timestamp:
01/16/08 15:25:19 (16 years ago)
Author:
Kris Deugau
Message:

/branches/stable

Add backlink from "Allocation info updated" to "parent" (pool listing
or routed-block listing)

Requested by Kevin Lamothe

Location:
branches/stable
Files:
2 edited

Legend:

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

    r376 r378  
    11421142  my $html = join('', <HTML>);
    11431143
     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
    11441163my $swiptmp = ($webvar{swip} eq 'on' ? 'Yes' : 'No');
    11451164  $html =~ s/\$\$BLOCK\$\$/$webvar{block}/g;
     
    11561175  $webvar{notes} = desanitize($webvar{notes});
    11571176  $html =~ s/\$\$NOTES\$\$/$webvar{notes}/g;
     1177  $html =~ s/\$\$BACKLINK\$\$/$backlink/g;
     1178  $html =~ s/\$\$BACKBLOCK\$\$/$cblock/g;
    11581179
    11591180  if ($IPDBacl{$authuser} =~ /s/) {
  • branches/stable/updated.html

    r286 r378  
    1313</table>
    1414</div>
     15<p>
     16<div name="backlink">
     17<a href="$$BACKLINK$$">Back to $$BACKBLOCK$$</a>
     18</div>
Note: See TracChangeset for help on using the changeset viewer.