Changeset 468
- Timestamp:
- 08/12/10 12:00:28 (14 years ago)
- Location:
- branches/htmlform
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/htmlform
-
branches/htmlform/cgi-bin/IPDB.pm
r449 r468 833 833 my ($action,$subj,$message) = @_; 834 834 835 return if $smtphost eq 'smtp.example.com'; # do nothing if still using default SMTP host. 836 835 837 ##fixme: need to redesign the breakdown/processing for $action for proper handling of all cases 836 838 -
branches/htmlform/cgi-bin/admin.cgi
r459 r468 265 265 syslog "notice", "$authuser allocated '$webvar{cidr}' to '$webvar{custid}' as ". 266 266 "'$webvar{alloctype}'"; 267 mailNotify($ip_dbh, "a$webvar{alloctype}", 268 "$disp_alloctypes{$webvar{alloctype}} $webvar{cidr} allocated to customer". 269 " $webvar{custid}\n". 267 mailNotify($ip_dbh, "a$webvar{alloctype}", "ADDED: $disp_alloctypes{$webvar{alloctype}} allocation", 268 "$disp_alloctypes{$webvar{alloctype}} $webvar{cidr} allocated to customer $webvar{custid}\n". 270 269 "Description: $webvar{desc}\n\nAllocated by: $authuser\n"); 271 270 } -
branches/htmlform/cgi-bin/extras/db2rwhois.pl
r437 r468 74 74 "not (cidr <<= '10.0.0.0/8') and ". 75 75 "not (type = 'wr') and ". 76 " masklen(cidr) <=30and ".76 "((masklen(cidr) <=30 and family(cidr)=4) or (masklen(cidr) <=56 and family(cidr)=6)) and ". 77 77 "cidr <<= ?"); 78 78 -
branches/htmlform/cgi-bin/ipdb.psql
r417 r468 76 76 "pool" cidr DEFAULT '255.255.255.255/32' NOT NULL, 77 77 "ip" cidr DEFAULT '255.255.255.255/32' NOT NULL PRIMARY KEY, 78 "oldcustid" character varying(16) DEFAULT '' NOT NULL,79 78 "city" character varying(30) DEFAULT '' NOT NULL, 80 79 "type" character(2) DEFAULT '' NOT NULL, … … 95 94 CREATE TABLE "allocations" ( 96 95 "cidr" cidr DEFAULT '255.255.255.255/32' NOT NULL PRIMARY KEY, 97 "oldcustid" character varying(16) DEFAULT '',98 96 "type" character(2) DEFAULT '', 99 97 "city" character varying(30) DEFAULT '', … … 112 110 GRANT ALL on "allocations" to "ipdb"; 113 111 114 CREATE VIEW "searchme" as SELECT allocations.cidr, allocations.custid, allocations."type", allocations.city, allocations.description, allocations.notes, allocations. oldcustid, allocations.circuitid FROM allocations UNION SELECT poolips.ip, poolips.custid, poolips.type, poolips.city, poolips.description, poolips.notes, poolips.oldcustid, poolips.circuitid FROM poolips;112 CREATE VIEW "searchme" as SELECT allocations.cidr, allocations.custid, allocations."type", allocations.city, allocations.description, allocations.notes, allocations.circuitid FROM allocations UNION SELECT poolips.ip, poolips.custid, poolips.type, poolips.city, poolips.description, poolips.notes, poolips.circuitid FROM poolips; 115 113 116 114 REVOKE ALL on "searchme" from PUBLIC; -
branches/htmlform/cgi-bin/main.cgi
r466 r468 960 960 # because I'm lazy, we'll try to make the SELECT's bring out identical)ish) data 961 961 if ($webvar{block} =~ /\/32$/) { 962 $sql = "select ip,custid,type,city,circuitid,description,notes,modifystamp,privdata ,oldcustidfrom poolips where ip='$webvar{block}'";962 $sql = "select ip,custid,type,city,circuitid,description,notes,modifystamp,privdata from poolips where ip='$webvar{block}'"; 963 963 } else { 964 $sql = "select cidr,custid,type,city,circuitid,description,notes,modifystamp,privdata, oldcustid,swip from allocations where cidr='$webvar{block}'"964 $sql = "select cidr,custid,type,city,circuitid,description,notes,modifystamp,privdata,swip from allocations where cidr='$webvar{block}'" 965 965 } 966 966 … … 1037 1037 } 1038 1038 ## end node hack 1039 $html =~ s/\$\$OLDCUSTID\$\$/$data[9]/g;1040 1039 $html =~ s/\$\$CITY\$\$/<input type=text name=city value="$data[3]">/g; 1041 1040 $html =~ s/\$\$CIRCID\$\$/<input type="text" name="circid" value="$data[4]" maxlength=64 size=64 class="regular">/g; … … 1055 1054 ## end node hack 1056 1055 $html =~ s/\$\$CUSTID\$\$/$data[1]/g; 1057 $html =~ s/\$\$OLDCUSTID\$\$/$data[9]/g;1058 1056 $html =~ s/\$\$TYPESELECT\$\$/$disp_alloctypes{$data[2]}/g; 1059 1057 $html =~ s/\$\$CITY\$\$/$data[3]/g; -
branches/htmlform/cgi-bin/search.cgi
r451 r468 139 139 my $sql = "(select $cols from searchme where". 140 140 " $webvar{custexclude} (custid ilike '%$webvar{custid}%'". 141 " OR $webvar{custexclude} oldcustid ilike '%$webvar{custid}%'))".142 141 " $sqlconcat (select $cols from searchme where $webvar{descexclude} description ilike '%$webvar{desc}%')". 143 142 " $sqlconcat (select $cols from searchme where $webvar{notesexclude} notes ilike '%$webvar{notes}%')"; … … 353 352 # Query for a customer ID. Note that we can't restrict to "numeric-only" 354 353 # as we have non-numeric custIDs in the legacy data. :/ 355 $sql = "select $cols from searchme where custid ilike '%$query%' or oldcustid ilike '%$query%' ordescription like '%$query%'";354 $sql = "select $cols from searchme where custid ilike '%$query%' or description like '%$query%'"; 356 355 my $count = countRows($sql); 357 356 $sql .= " order by cidr limit $RESULTS_PER_PAGE offset $offset"; -
branches/htmlform/editDisplay.html
r397 r468 15 15 16 16 <tr class="color2"><td class=heading>CustID:</td><td class="regular">$$CUSTID$$</td></tr> 17 <tr class="color2"><td class=heading>Old CustID:</td><td class="regular">$$OLDCUSTID$$</td></tr>18 17 19 18 <tr class="color2"><td class=heading>SWIPed?:</td><td class=regular>$$SWIP$$</td></tr>
Note:
See TracChangeset
for help on using the changeset viewer.