- Timestamp:
- 03/01/05 16:31:04 (20 years ago)
- Location:
- branches/stable/cgi-bin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/cgi-bin/IPDB.pm
r168 r185 122 122 # Return here if we can't select. Note that this indicates a 123 123 # problem executing the select. 124 my $sth = $dbh->prepare("select cidr from masterblocks");124 my $sth = $dbh->prepare("select type from alloctypes"); 125 125 $sth->execute(); 126 126 return (undef,$DBI::errstr) if ($sth->err); … … 156 156 } else { 157 157 # it connects, try a stmt. 158 my $sth = $dbh->prepare("select cidr from masterblocks");158 my $sth = $dbh->prepare("select type from alloctypes"); 159 159 my $err = $sth->execute(); 160 160 -
branches/stable/cgi-bin/ipdb.psql
r178 r185 1 \connect - postgres 1 CREATE DATABASE ipdb; 2 2 3 3 \connect ipdb ipdb … … 49 49 50 50 CREATE TABLE "freeblocks" ( 51 "cidr" cidr DEFAULT '255.255.255.255/32' NOT NULL PRIMARY KEY 51 "cidr" cidr DEFAULT '255.255.255.255/32' NOT NULL PRIMARY KEY, 52 52 "maskbits" integer DEFAULT 128, 53 53 "city" character varying(30) DEFAULT '', … … 120 120 GRANT ALL on "cities" to "ipdb"; 121 121 122 COPY "alloctypes" FROM stdin; 123 cd Static Pool - Cable Cable pool 41 CBL-BUS 124 dp Static Pool - DSL DSL pool 42 DSL-BUS 125 mp Static Pool - Dialup Static dialup pool 43 DIAL-BUS 126 wp Static Pool - Wireless Static wireless pool 44 WL-BUS 127 dc Dynamic cable block Dynamic cable block 103 CBL-RES 128 dy Dynamic DSL block Dynamic DSL block 102 DSL-RES 129 dn Dialup netblock Dialup netblock 101 DIAL-RES 130 dw Dynamic WiFi block Dynamic WiFi block 104 WL-RES 131 mm Master block Master block 999 6750400 132 rr Routing Routed netblock 500 6750400 133 in Internal netblock Internal netblock 990 6750400 134 ee End-use netblock End-use netblock 100 6750400 135 sd Static Pool - Servers Server pool 40 6750400 136 cn Customer netblock Customer netblock 0 137 ci Static IP - Cable Static cable IP 21 138 di Static IP - DSL Static DSL IP 22 139 mi Static IP - Dialup Static dialup IP 23 140 wi Static IP - Wireless Static wireless IP 24 141 si Static IP - Server pool Server pool IP 20 6750400 142 \. -
branches/stable/cgi-bin/main.cgi
r174 r185 40 40 ($ip_dbh,$errstr) = connectDB_My; 41 41 if (!$ip_dbh) { 42 printAndExit("Failed to connect to database: $errstr\n"); 43 } 44 checkDBSanity($ip_dbh); 42 printAndExit("Database error: $errstr\n"); 43 } 45 44 initIPDBGlobals($ip_dbh); 46 45
Note:
See TracChangeset
for help on using the changeset viewer.