Changeset 87 for trunk


Ignore:
Timestamp:
11/26/04 17:28:19 (20 years ago)
Author:
Kris Deugau
Message:

/trunk

Port bugfixes and tweaks from /branches/stable r79:86 forward.

Location:
trunk
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/assign.html

    r74 r87  
    1313<option>Burlington</option>
    1414<option>Chapleau</option>
     15<option>Chelmsford</option>
    1516<option>Espanola</option>
    1617<option>Elliot Lake</option>
     
    7475<td>Customer ID:&nbsp</td><td><input type="text" name="custid" size="15" maxlength="15"> (Only required for Customer allocations)</td>
    7576</tr><tr class="color1">
    76 <td>Route from this POP:&nbsp</td><td>
     77<td>Route from/through:&nbsp</td><td>
    7778<select name="pop"><option selected>-</option>
     79<option>Blind River</option>
     80<option>Chelmsford</option>
    7881<option>Elliot Lake</option>
     82<option>Espanola</option>
    7983<option>Huntsville</option>
     84<option>Little Current</option>
     85<option>Lively</option>
    8086<option>North Bay</option>
    8187<option>Ottawa</option>
    8288<option>Pembroke</option>
    8389<option>Sault Ste. Marie</option>
     90<option>Sturgeon</option>
    8491<option>Sudbury</option>
    8592<option>Timmins</option>
    8693<option>Thunder Bay</option>
    8794<option>Toronto</option>
     95<option>Valley</option>
    8896</select>
    8997</td>
  • trunk/cgi-bin/main.cgi

    r74 r87  
    828828my $city;       # Shut up Perl's "strict" scoping/usage check.
    829829      $sql = "select * from poolips where available='y' and".
    830         " ptype='$base' and city='$webvar{city}'";
     830        " ptype='$base' and city='$webvar{pop}'";
    831831    }
    832832
     
    839839      $ipcount{$data[0]}++;
    840840    }
     841    $sth = $ip_dbh->prepare("select city from allocations where cidr=?");
    841842    foreach my $key (keys %ipcount) {
    842       $optionlist .= "<option value='$key'>$key [$ipcount{$key} free IP(s)]</option>\n";
     843      $sth->execute($key);
     844      my @data = $sth->fetchrow_array;
     845      $optionlist .= "<option value='$key'>$key [$ipcount{$key} free IP(s)] in $data[0]</option>\n";
    843846    }
    844847    $cidr = "Single static IP";
     
    931934  $html =~ s|\$\$ALLOC_FROM\$\$|$alloc_from|g;
    932935  $html =~ s|\$\$CIDR\$\$|$cidr|g;
     936  $webvar{city} = desanitize($webvar{city});
    933937  $html =~ s|\$\$CITY\$\$|$webvar{city}|g;
    934938  $html =~ s|\$\$CUSTID\$\$|$webvar{custid}|g;
     939  $webvar{circid} = desanitize($webvar{circid});
    935940  $html =~ s|\$\$CIRCID\$\$|$webvar{circid}|g;
    936941  $webvar{desc} = desanitize($webvar{desc});
     
    11561161      printAndExit("Please enter a customer ID.");
    11571162    }
    1158     if ($webvar{custid} !~ /^(?:\d{10}|\d{7}|STAFF)(?:-\d\d?)?$/) {
     1163    if ($webvar{custid} !~ /^(?:\d{10}|\d{7}|STAFF|TEMP)(?:-\d\d?)?$/) {
    11591164      printAndExit("Please enter a valid customer ID- this must be a 7- or 10-digit number, or STAFF for static IPs for staff.");
    11601165    }
  • trunk/fb-assign.html

    r38 r87  
    44<form method="POST" action="main.cgi" class="regular">
    55<tr class="color1"><td>Free block selected for assignment:&nbsp</td><td>$$BLOCK$$<input type=hidden name=block value="$$BLOCK$$"></td></tr>
    6 <tr class="color1">
     6<tr class="color2">
    77<td>City:&nbsp</td><td>
    88<select name="city"><option selected>-</option>
     
    1414<option>Burlington</option>
    1515<option>Chapleau</option>
     16<option>Chelmsford</option>
    1617<option>Espanola</option>
    1718<option>Elliot Lake</option>
     
    4950</td>
    5051</tr>
    51 <tr class="color2">
     52<tr class="color1">
    5253<td>Allocation type:</td><td>
    5354<select name="alloctype"><option value="cn" selected>Customer netblock</option>
     
    6465<input type="button" value=" ? " onclick="helpAllocTypes()" class="regular">
    6566</td>
    66 </tr><tr class="color1">
     67</tr><tr class="color2">
    6768<td>Customer ID:&nbsp</td><td><input type="text" name="custid" size="15" maxlength="15"> (Only required for Customer allocations)</td>
    6869</tr><tr class="color1">
  • trunk/header.inc

    r45 r87  
    1414function helpAllocTypes() {
    1515        window.open("/ip/alloctypes.html", "alloc_window", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=750,height=550")
     16}
     17function popNotes(page) {
     18        window.open(page, "IPDB_notes", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=400,height=300");
    1619}
    1720</script>
     
    6063  </tr>
    6164</tbody></table>
    62 <br></br>
     65<table width="98%" border=0><tr><td align=right><a href="javascript:popNotes('/ip/changes.html')">Recent Changes</a></td></tr></table>
     66<br>
Note: See TracChangeset for help on using the changeset viewer.