- Timestamp:
- 01/24/12 17:59:24 (13 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DNSDB.pm
r223 r224 129 129 perpage => 15, 130 130 ); 131 132 133 ## 134 ## utilty functions 135 # _rectable() 136 # Takes default+rdns flags, returns appropriate table name 137 sub _rectable { 138 my $def = shift; 139 my $rev = shift; 140 141 return 'records' if $def ne 'y'; 142 return 'default_records' if $rev ne 'y'; 143 return 'default_rev_records'; 144 } # end _rectable() 145 146 # _recparent() 147 # Takes default+rdns flags, returns appropriate parent-id column name 148 sub _recparent { 149 my $def = shift; 150 my $rev = shift; 151 152 return 'group_id' if $def eq 'y'; 153 return 'rdns_id' if $rev eq 'y'; 154 return 'domain_id'; 155 } # end _recparent() 131 156 132 157 … … 703 728 704 729 730 ## DNSDB::revName() 731 # Return the reverse zone name based on an rDNS ID 732 # Takes a database handle and the rDNS ID 733 # Returns the reverse zone name or undef on failure 734 sub revName { 735 $errstr = ''; 736 my $dbh = shift; 737 my $revid = shift; 738 my ($revname) = $dbh->selectrow_array("SELECT revnet FROM revzones WHERE rdns_id=?", undef, ($revid) ); 739 $errstr = $DBI::errstr if !$revname; 740 return $revname if $revname; 741 } # end revName() 742 743 705 744 ## DNSDB::domainID() 706 745 # Takes a database handle and domain name … … 1212 1251 ## DNSDB::getSOA() 1213 1252 # Return all suitable fields from an SOA record in separate elements of a hash 1214 # Takes a database handle, default/live flag, and group (default) or domain (live)ID1253 # Takes a database handle, default/live flag, domain/reverse flag, and parent ID 1215 1254 sub getSOA { 1216 1255 $errstr = ''; 1217 1256 my $dbh = shift; 1218 1257 my $def = shift; 1258 my $rev = shift; 1219 1259 my $id = shift; 1220 1260 my %ret; 1221 1261 1222 # (ab)use distance and weight columns to store SOA data 1223 1224 my $sql = "SELECT record_id,host,val,ttl,distance from"; 1225 if ($def eq 'def' or $def eq 'y') { 1226 $sql .= " default_records WHERE group_id=? AND type=$reverse_typemap{SOA}"; 1227 } else { 1228 # we're editing a live SOA record; find based on domain 1229 $sql .= " records WHERE domain_id=? AND type=$reverse_typemap{SOA}"; 1230 } 1262 # (ab)use distance and weight columns to store SOA data? can't for default_rev_records... 1263 # - should really attach serial to the zone parent somewhere 1264 1265 my $sql = "SELECT record_id,host,val,ttl from "._rectable($def,$rev). 1266 " WHERE "._recparent($def,$rev)." = ? AND type=$reverse_typemap{SOA}"; 1267 1231 1268 my $sth = $dbh->prepare($sql); 1232 1269 $sth->execute($id); 1233 1270 1234 my ($recid,$host,$val,$ttl ,$serial) = $sth->fetchrow_array() or return;1271 my ($recid,$host,$val,$ttl) = $sth->fetchrow_array() or return; 1235 1272 my ($contact,$prins) = split /:/, $host; 1236 1273 my ($refresh,$retry,$expire,$minttl) = split /:/, $val; … … 1238 1275 $ret{recid} = $recid; 1239 1276 $ret{ttl} = $ttl; 1240 $ret{serial} = $serial; 1277 # $ret{serial} = $serial; # ca't use distance for serial with default_rev_records 1241 1278 $ret{prins} = $prins; 1242 1279 $ret{contact} = $contact; … … 1289 1326 $errstr = ''; 1290 1327 my $dbh = shift; 1291 my $type = shift; 1328 my $def = shift; 1329 my $rev = shift; 1292 1330 my $id = shift; 1293 1331 my $nrecs = shift || 'all'; … … 1300 1338 my $filter = shift || ''; 1301 1339 1302 $type = 'y' if $type eq 'def'; 1303 1304 my $sql = "SELECT r.record_id,r.host,r.type,r.val,r.distance,r.weight,r.port,r.ttl FROM "; 1305 $sql .= "default_" if $type eq 'y'; 1306 $sql .= "records r "; 1340 my $sql = "SELECT r.record_id,r.host,r.type,r.val,r.ttl"; 1341 $sql .= ",r.distance,r.weight,r.port" if $rev eq 'n'; 1342 $sql .= " FROM "._rectable($def,$rev)." r "; 1307 1343 $sql .= "INNER JOIN rectypes t ON r.type=t.val "; # for sorting by type alphabetically 1308 if ($type eq 'y') { 1309 $sql .= "WHERE r.group_id=?"; 1310 } else { 1311 $sql .= "WHERE r.domain_id=?"; 1312 } 1344 $sql .= "WHERE "._recparent($def,$rev)." = ?"; 1313 1345 $sql .= " AND NOT r.type=$reverse_typemap{SOA}"; 1314 1346 $sql .= " AND host ~* ?" if $filter; 1315 1347 # use alphaorder column for "correct" ordering of sort-by-type instead of DNS RR type number 1316 1348 $sql .= " ORDER BY ".($order eq 'type' ? 't.alphaorder' : "r.$order")." $direction"; 1317 $sql .= " LIMIT $nrecs OFFSET ".($nstart*$nrecs) if $nstart ne 'all';1318 1349 1319 1350 my @bindvars = ($id); 1320 1351 push @bindvars, $filter if $filter; 1352 1353 # just to be ultraparanoid about SQL injection vectors 1354 if ($nstart ne 'all') { 1355 $sql .= " LIMIT ? OFFSET ?"; 1356 push @bindvars, $nrecs; 1357 push @bindvars, ($nstart*$nrecs); 1358 } 1321 1359 my $sth = $dbh->prepare($sql) or warn $dbh->errstr; 1322 1360 $sth->execute(@bindvars) or warn "$sql: ".$sth->errstr; … … 1333 1371 1334 1372 ## DNSDB::getRecCount() 1335 # Return count of non-SOA records in domain (or default records in a group) 1336 # Takes a database handle, default/live flag, group/domain ID, and optional filtering modifier 1373 # Return count of non-SOA records in zone (or default records in a group) 1374 # Takes a database handle, default/live flag, reverse/forward flag, group/domain ID, 1375 # and optional filtering modifier 1337 1376 # Returns the count 1338 1377 sub getRecCount { 1339 1378 my $dbh = shift; 1340 1379 my $defrec = shift; 1380 my $revrec = shift; 1341 1381 my $id = shift; 1342 1382 my $filter = shift || ''; … … 1348 1388 my @bindvars = ($id); 1349 1389 push @bindvars, $filter if $filter; 1350 my ($count) = $dbh->selectrow_array("SELECT count(*) FROM ".1351 ($defrec eq 'y' ? 'default_' : '')."records ".1352 "WHERE ".($defrec eq 'y' ? 'group' : 'domain')."_id=? ".1353 1354 ($filter ? " AND host ~* ?" : '') ,1355 1390 my $sql = "SELECT count(*) FROM ". 1391 _rectable($defrec,$revrec). 1392 " WHERE "._recparent($defrec,$revrec)."=? ". 1393 "AND NOT type=$reverse_typemap{SOA}". 1394 ($filter ? " AND host ~* ?" : ''); 1395 my ($count) = $dbh->selectrow_array($sql, undef, (@bindvars) ); 1356 1396 1357 1397 return $count; -
trunk/dns.cgi
r216 r224 52 52 53 53 # shut up some warnings, in case we arrive somewhere we forgot to set this 54 $webvar{defrec} = 'n' if !$webvar{defrec}; 54 $webvar{defrec} = 'n' if !$webvar{defrec}; # non-default records 55 $webvar{revrec} = 'n' if !$webvar{revrec}; # non-reverse (domain) records 55 56 56 57 # load some local system defaults (mainly DB connect info) … … 268 269 269 270 # I hate special cases. 271 ##fixme: probably need to handle webvar{revrec}=='y' too 270 272 if ($webvar{page} eq 'reclist' && $webvar{defrec} eq 'y') { 271 273 my %args = (page => $webvar{page}, id => $curgroup, defrec => $webvar{defrec}); … … 438 440 $page->param(curpage => $webvar{page}); 439 441 440 my $count = getRecCount($dbh, $webvar{defrec}, $webvar{ id}, $filter);442 my $count = getRecCount($dbh, $webvar{defrec}, $webvar{revrec}, $webvar{id}, $filter); 441 443 442 444 $sortby = 'host'; … … 449 451 450 452 # set up the headers 451 my @cols = ('host', 'type', 'val', 'distance', 'weight', 'port', 'ttl'); 452 my %colheads = (host => 'Name', type => 'Type', val => 'Address', 453 my @cols; 454 my %colheads; 455 if ($webvar{revrec} eq 'n') { 456 @cols = ('host', 'type', 'val', 'distance', 'weight', 'port', 'ttl'); 457 %colheads = (host => 'Name', type => 'Type', val => 'Address', 453 458 distance => 'Distance', weight => 'Weight', port => 'Port', ttl => 'TTL'); 454 my %custom = (id => $webvar{id}, defrec => $webvar{defrec}); 459 } else { 460 @cols = ('host', 'type', 'val', 'ttl'); 461 %colheads = (host => 'IP Address', type => 'Type', val => 'Hostname', ttl => 'TTL'); 462 } 463 my %custom = (id => $webvar{id}, defrec => $webvar{defrec}, revrec => $webvar{revrec}); 455 464 fill_colheads($sortby, $sortorder, \@cols, \%colheads, \%custom); 456 465 457 466 # fill the page-count and first-previous-next-last-all details 458 467 fill_pgcount($count,"records", 459 ($webvar{defrec} eq 'y' ? "group ".groupName($dbh,$webvar{id}) : domainName($dbh,$webvar{id}))); 468 ($webvar{defrec} eq 'y' ? "group ".groupName($dbh,$webvar{id}) : 469 ($webvar{revrec} eq 'y' ? revName($dbh,$webvar{id}) : domainName($dbh,$webvar{id})) 470 )); 460 471 fill_fpnla($count); # should put some params on this sub... 461 472 462 473 $page->param(defrec => $webvar{defrec}); 474 showzone($webvar{defrec}, $webvar{revrec}, $webvar{id}); 463 475 if ($webvar{defrec} eq 'y') { 464 showdomain('y',$curgroup);465 476 } else { 466 showdomain('n',$webvar{id});477 # showzone('n',$webvar{id}); 467 478 ##fixme: permission for viewing logs? 479 ##fixme: determine which slice of the log we view (group, domain, revzone) 468 480 $page->param(logdom => 1); 469 481 } … … 1584 1596 $page->param(logingrp_num => $logingroup); 1585 1597 1598 ##fixme 1599 $page->param(mayrdns => 1); 1600 1586 1601 $page->param(maydefrec => $permissions{admin}); 1587 1602 $page->param(mayimport => $permissions{admin} || $permissions{domain_create}); … … 1725 1740 } 1726 1741 1727 sub show domain{1742 sub showzone { 1728 1743 my $def = shift; 1744 my $rev = shift; 1729 1745 my $id = shift; 1730 1746 1731 1747 # get the SOA first 1732 my %soa = getSOA($dbh,$def,$ id);1748 my %soa = getSOA($dbh,$def,$rev,$id); 1733 1749 1734 1750 $page->param(contact => $soa{contact}); … … 1740 1756 $page->param(ttl => $soa{ttl}); 1741 1757 1742 my $foo2 = getDomRecs($dbh,$def,$ id,$perpage,$webvar{offset},$sortby,$sortorder,$filter);1758 my $foo2 = getDomRecs($dbh,$def,$rev,$id,$perpage,$webvar{offset},$sortby,$sortorder,$filter); 1743 1759 1744 1760 my $row = 0; … … 1747 1763 $rec->{row} = $row % 2; 1748 1764 $rec->{defrec} = $def; 1765 $rec->{revrec} = $rev; 1749 1766 $rec->{sid} = $webvar{sid}; 1750 1767 $rec->{id} = $id; 1768 $rec->{fwdzone} = $rev eq 'n'; 1751 1769 $rec->{distance} = 'n/a' unless ($rec->{type} eq 'MX' || $rec->{type} eq 'SRV'); 1752 1770 $rec->{weight} = 'n/a' unless ($rec->{type} eq 'SRV'); -
trunk/dns.sql
r215 r224 41 41 \. 42 42 43 CREATE TABLE default_rev_records ( 44 record_id serial NOT NULL, 45 group_id integer DEFAULT 1 NOT NULL, 46 host text DEFAULT '' NOT NULL, 47 "type" integer DEFAULT 1 NOT NULL, 48 val text DEFAULT '' NOT NULL, 49 ttl integer DEFAULT 86400 NOT NULL, 50 description text 51 ); 52 53 COPY default_rev_records (record_id, group_id, host, "type", ip, ttl, description) FROM stdin; 54 1 1 hostmaster.ADMINDOMAIN:ns1.ADMINDOMAIN 6 3600:900:1048576:2560 3600 55 2 1 unused-%r.ADMINDOMAIN 65283 ZONE 3600 56 \. 57 43 58 CREATE TABLE domains ( 44 59 domain_id serial NOT NULL, 45 60 "domain" character varying(80) NOT NULL, 61 group_id integer DEFAULT 1 NOT NULL, 62 description character varying(255) DEFAULT ''::character varying NOT NULL, 63 status integer DEFAULT 1 NOT NULL, 64 zserial integer, 65 sertype character(1) DEFAULT 'D'::bpchar 66 ); 67 68 CREATE TABLE revzones ( 69 rdns_id serial NOT NULL, 70 revnet cidr NOT NULL, 46 71 group_id integer DEFAULT 1 NOT NULL, 47 72 description character varying(255) DEFAULT ''::character varying NOT NULL, … … 69 94 log_id serial NOT NULL, 70 95 domain_id integer, 96 rdns_id integer, 71 97 user_id integer, 72 98 group_id integer, … … 103 129 \. 104 130 105 -- fixme: need to handle looooong records (eg, SPF)131 -- rdns_id defaults to 0 since many records will not have an associated rDNS entry. 106 132 CREATE TABLE records ( 107 domain_id integer NOT NULL, 133 domain_id integer NOT NULL DEFAULT 0, 134 rdns_id integer NOT NULL DEFAULT 0, 108 135 record_id serial NOT NULL, 109 136 host text DEFAULT '' NOT NULL, … … 119 146 CREATE TABLE rectypes ( 120 147 val integer NOT NULL, 121 name character varying( 12) NOT NULL,148 name character varying(20) NOT NULL, 122 149 stdflag integer DEFAULT 1 NOT NULL, 123 150 listorder integer DEFAULT 255 NOT NULL, … … 129 156 COPY rectypes (val, name, stdflag, listorder, alphaorder) FROM stdin; 130 157 1 A 1 1 1 131 2 NS 1 2 37 132 3 MD 2 255 29 133 4 MF 2 255 30 134 5 CNAME 1 6 9 135 6 SOA 0 8 53 136 7 MB 3 255 28 137 8 MG 3 255 31 138 9 MR 3 255 33 139 10 NULL 3 255 43 140 11 WKS 3 255 64 141 12 PTR 2 4 46 142 13 HINFO 3 255 18 143 14 MINFO 3 255 32 144 15 MX 1 3 34 145 16 TXT 1 5 60 146 17 RP 2 255 48 147 18 AFSDB 3 255 4 148 19 X25 3 255 65 149 20 ISDN 3 255 21 150 21 RT 3 255 50 151 22 NSAP 3 255 38 152 23 NSAP-PTR 3 255 39 153 24 SIG 3 255 51 154 25 KEY 3 255 23 155 26 PX 3 255 47 156 27 GPOS 3 255 17 157 28 AAAA 1 2 3 158 29 LOC 3 255 25 159 30 NXT 3 255 44 160 31 EID 3 255 15 161 32 NIMLOC 3 255 36 162 33 SRV 1 7 55 163 34 ATMA 3 255 6 164 35 NAPTR 3 255 35 165 36 KX 3 255 24 166 37 CERT 3 255 8 167 38 A6 3 3 2 168 39 DNAME 3 255 12 169 40 SINK 3 255 52 170 41 OPT 3 255 45 171 42 APL 3 255 5 172 43 DS 3 255 14 173 44 SSHFP 3 255 56 174 45 IPSECKEY 3 255 20 175 46 RRSIG 3 255 49 176 47 NSEC 3 255 40 177 48 DNSKEY 3 255 13 178 49 DHCID 3 255 10 179 50 NSEC3 3 255 41 180 51 NSEC3PARAM 3 255 42 181 55 HIP 3 255 19 182 99 SPF 3 255 54 183 100 UINFO 3 255 62 184 101 UID 3 255 61 185 102 GID 3 255 16 186 103 UNSPEC 3 255 63 187 249 TKEY 3 255 58 188 250 TSIG 3 255 59 189 251 IXFR 3 255 22 190 252 AXFR 3 255 7 191 253 MAILB 3 255 27 192 254 MAILA 3 255 26 193 32768 TA 3 255 57 194 32769 DLV 3 255 11 158 2 NS 1 5 37 159 3 MD 5 255 29 160 4 MF 5 255 30 161 5 CNAME 1 7 9 162 6 SOA 0 0 53 163 7 MB 5 255 28 164 8 MG 5 255 31 165 9 MR 5 255 33 166 10 NULL 5 255 43 167 11 WKS 5 255 64 168 12 PTR 3 10 46 169 13 HINFO 5 255 18 170 14 MINFO 5 255 32 171 15 MX 1 6 34 172 16 TXT 1 8 60 173 17 RP 4 255 48 174 18 AFSDB 5 255 4 175 19 X25 5 255 65 176 20 ISDN 5 255 21 177 21 RT 5 255 50 178 22 NSAP 5 255 38 179 23 NSAP-PTR 5 255 39 180 24 SIG 5 255 51 181 25 KEY 5 255 23 182 26 PX 5 255 47 183 27 GPOS 5 255 17 184 28 AAAA 1 3 3 185 29 LOC 5 255 25 186 30 NXT 5 255 44 187 31 EID 5 255 15 188 32 NIMLOC 5 255 36 189 33 SRV 1 9 55 190 34 ATMA 5 255 6 191 35 NAPTR 5 255 35 192 36 KX 5 255 24 193 37 CERT 5 255 8 194 38 A6 5 3 2 195 39 DNAME 5 255 12 196 40 SINK 5 255 52 197 41 OPT 5 255 45 198 42 APL 5 255 5 199 43 DS 5 255 14 200 44 SSHFP 5 255 56 201 45 IPSECKEY 5 255 20 202 46 RRSIG 5 255 49 203 47 NSEC 5 255 40 204 48 DNSKEY 5 255 13 205 49 DHCID 5 255 10 206 50 NSEC3 5 255 41 207 51 NSEC3PARAM 5 255 42 208 55 HIP 5 255 19 209 99 SPF 5 255 54 210 100 UINFO 5 255 62 211 101 UID 5 255 61 212 102 GID 5 255 16 213 103 UNSPEC 5 255 63 214 249 TKEY 5 255 58 215 250 TSIG 5 255 59 216 251 IXFR 5 255 22 217 252 AXFR 5 255 7 218 253 MAILB 5 255 27 219 254 MAILA 5 255 26 220 32768 TA 5 255 57 221 32769 DLV 5 255 11 222 \. 223 224 -- Custom types (ab)using the "Private use" range from 65280 to 65534 225 COPY rectypes (val, name, stdflag, listorder, alphaorder) FROM stdin; 226 65280 A+PTR 2 2 2 227 65281 AAAA+PTR 2 4 4 228 65282 PTR template 3 11 2 229 65283 A+PTR template 3 12 2 230 65284 AAAA+PTR template 3 13 2 195 231 \. 196 232 … … 254 290 ADD CONSTRAINT "$1" FOREIGN KEY (group_id) REFERENCES groups(group_id); 255 291 256 ALTER TABLE ONLY records257 ADD CONSTRAINT "$1" FOREIGN KEY (domain_id) REFERENCES domains(domain_id);258 259 292 ALTER TABLE ONLY users 260 293 ADD CONSTRAINT "$1" FOREIGN KEY (group_id) REFERENCES groups(group_id); … … 264 297 265 298 -- set starting sequence numbers, since we've inserted data before they're active 266 SELECT pg_catalog.setval('misc_misc_id_seq', 1, true); 267 SELECT pg_catalog.setval('default_records_record_id_seq', 8, true); 299 SELECT pg_catalog.setval('misc_misc_id_seq', 2, false); 300 SELECT pg_catalog.setval('default_records_record_id_seq', 8, false); 301 SELECT pg_catalog.setval('default_rev_records_record_id_seq', 3, false); 268 302 SELECT pg_catalog.setval('domains_domain_id_seq', 1, false); 269 SELECT pg_catalog.setval('groups_group_id_seq', 1, true);270 SELECT pg_catalog.setval('permissions_permission_id_seq', 2, true);303 SELECT pg_catalog.setval('groups_group_id_seq', 2, false); 304 SELECT pg_catalog.setval('permissions_permission_id_seq', 3, false); 271 305 SELECT pg_catalog.setval('records_record_id_seq', 1, false); 272 306 SELECT pg_catalog.setval('users_user_id_seq', 2, false); -
trunk/templates/menu.tmpl
r214 r224 4 4 <hr /> 5 5 <a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=domlist">Domains</a><br /> 6 <TMPL_IF mayrdns><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=revzones">Reverse Zones</a><br /></TMPL_IF> 6 7 <a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=useradmin">Users</a><br /> 7 8 <a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=log">Log</a><br /> 8 <TMPL_IF maydefrec><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=reclist&id=<TMPL_VAR NAME=group>&defrec=y">Default Records</a><br /></TMPL_IF> 9 <TMPL_IF maydefrec><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=reclist&id=<TMPL_VAR NAME=group>&defrec=y">Default Records</a><br /> 10 <TMPL_IF mayrdns><A href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=reclist&id=<TMPL_VAR NAME=group>&defrec=y&revrec=y">Default Reverse Records</a><br /></TMPL_IF></TMPL_IF> 9 11 <TMPL_IF mayimport><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=axfr">AXFR Import</a><br /></TMPL_IF> 10 12 <TMPL_IF maybulk><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=bulkdomain">Bulk Domain Operations</a><br /></TMPL_IF> -
trunk/templates/reclist.tmpl
r151 r224 37 37 <input type="hidden" name="id" value="<TMPL_VAR NAME=id>" /> 38 38 <input type="hidden" name="defrec" value="<TMPL_VAR NAME=defrec>" /> 39 <input type="hidden" name="revrec" value="<TMPL_VAR NAME=revrec>" /> 39 40 <input name="filter"<TMPL_IF filter> value="<TMPL_VAR NAME=filter>"</TMPL_IF> /> 40 41 <input type="submit" value="Filter" /> … … 45 46 <tr class="darkrowheader"> 46 47 <td colspan="4">Records</td> 47 <TMPL_IF record_create> <td align="right"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=record&parentid=<TMPL_VAR NAME=id>&defrec=<TMPL_VAR NAME=defrec>&re cact=new">Add record</a></td></TMPL_IF>48 <TMPL_IF record_create> <td align="right"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=record&parentid=<TMPL_VAR NAME=id>&defrec=<TMPL_VAR NAME=defrec>&revrec=<TMPL_VAR NAME=revrec>&recact=new">Add record</a></td></TMPL_IF> 48 49 <td align="right"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=log&id=<TMPL_VAR NAME=id><TMPL_IF logdom>&ltype=dom</TMPL_IF>">View log</a></td> 49 50 </tr> … … 58 59 NAME=offset>&offset=<TMPL_VAR NAME=offset></TMPL_IF>&sortby=<TMPL_VAR 59 60 NAME=sortby>&order=<TMPL_VAR NAME=order>&id=<TMPL_VAR NAME=id>&defrec=<TMPL_VAR 60 NAME=defrec>"><TMPL_VAR NAME=colname></a><TMPL_IF NAME=sortorder> <img alt="<TMPL_VAR 61 NAME=sortorder>" src="images/<TMPL_VAR NAME=sortorder>.png" /></TMPL_IF></td></TMPL_LOOP> 61 NAME=defrec>&revrec=<TMPL_VAR NAME=revrec>"><TMPL_VAR NAME=colname></a><TMPL_IF 62 NAME=sortorder> <img alt="<TMPL_VAR NAME=sortorder>" src="images/<TMPL_VAR NAME=sortorder>.png" 63 /></TMPL_IF></td></TMPL_LOOP> 62 64 <TMPL_IF record_delete> <td>Delete</td></TMPL_IF> 63 65 </tr> 64 66 <TMPL_LOOP NAME=reclist> 65 67 <tr class="row<TMPL_VAR NAME=row>"> 66 <td><TMPL_IF record_edit><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=record&parentid=<TMPL_VAR NAME=id>&defrec=<TMPL_VAR NAME=defrec>&recact=edit&id=<TMPL_VAR NAME=record_id>"><TMPL_VAR NAME=host></a><TMPL_ELSE><TMPL_VAR NAME=host></TMPL_IF></td> 68 <TMPL_IF fwdzone> 69 <td><TMPL_IF record_edit><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=record&parentid=<TMPL_VAR NAME=id>&defrec=<TMPL_VAR NAME=defrec>&revrec=<TMPL_VAR NAME=revrec>&recact=edit&id=<TMPL_VAR NAME=record_id>"><TMPL_VAR NAME=host></a><TMPL_ELSE><TMPL_VAR NAME=host></TMPL_IF></td> 67 70 <td><TMPL_VAR NAME=type></td> 68 71 <td><TMPL_VAR NAME=val></td> … … 70 73 <td><TMPL_VAR NAME=weight></td> 71 74 <td><TMPL_VAR NAME=port></td> 75 <TMPL_ELSE> 76 <td><TMPL_IF record_edit><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=record&parentid=<TMPL_VAR NAME=id>&defrec=<TMPL_VAR NAME=defrec>&revrec=<TMPL_VAR NAME=revrec>&recact=edit&id=<TMPL_VAR NAME=record_id>"><TMPL_VAR NAME=val></a><TMPL_ELSE><TMPL_VAR NAME=val></TMPL_IF></td> 77 <td><TMPL_VAR NAME=type></td> 78 <td><TMPL_VAR NAME=host></td> 79 </TMPL_IF> 72 80 <td><TMPL_VAR NAME=ttl></td> 73 <TMPL_IF record_delete> <td align="center"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=delrec&id=<TMPL_VAR NAME=record_id>&defrec=<TMPL_VAR NAME=defrec>& parentid=<TMPL_VAR NAME=id>"><img src="images/trash2.png" alt="[ Delete ]" /></a></td></TMPL_IF>81 <TMPL_IF record_delete> <td align="center"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=delrec&id=<TMPL_VAR NAME=record_id>&defrec=<TMPL_VAR NAME=defrec>&revrec=<TMPL_VAR NAME=revrec>&parentid=<TMPL_VAR NAME=id>"><img src="images/trash2.png" alt="[ Delete ]" /></a></td></TMPL_IF> 74 82 </tr> 75 83 </TMPL_LOOP>
Note:
See TracChangeset
for help on using the changeset viewer.