Changeset 572
- Timestamp:
- 12/30/13 17:42:06 (11 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DNSDB.pm
r571 r572 2307 2307 if ($args{revrec} eq 'n') { 2308 2308 $args{sortby} = 'domain' if !$args{sortby} || !grep /^$args{sortby}$/, ('domain','group','status'); 2309 $sql = "SELECT domain_id ,domain,status,groups.group_name AS group FROM domains".2309 $sql = "SELECT domain_id AS zoneid,domain AS zone,status,groups.group_name AS group FROM domains". 2310 2310 " INNER JOIN groups ON domains.group_id=groups.group_id". 2311 2311 " WHERE domains.group_id IN ($args{curgroup}".($args{childlist} ? ",$args{childlist}" : '').")". … … 2315 2315 ##fixme: arguably startwith here is irrelevant. depends on the UI though. 2316 2316 $args{sortby} = 'revnet' if !$args{sortby} || !grep /^$args{sortby}$/, ('revnet','group','status'); 2317 $sql = "SELECT rdns_id ,revnet,status,groups.group_name AS group FROM revzones".2317 $sql = "SELECT rdns_id AS zoneid,revnet AS zone,status,groups.group_name AS group FROM revzones". 2318 2318 " INNER JOIN groups ON revzones.group_id=groups.group_id". 2319 2319 " WHERE revzones.group_id IN ($args{curgroup}".($args{childlist} ? ",$args{childlist}" : '').")". … … 2325 2325 ($args{offset} eq 'all' ? '' : " LIMIT $self->{perpage}". 2326 2326 " OFFSET ".$args{offset}*$self->{perpage}); 2327 my $sth = $dbh->prepare($sql); 2328 $sth->execute(@filterargs); 2329 my $rownum = 0; 2330 2331 while (my @data = $sth->fetchrow_array) { 2332 my %row; 2333 $row{domain_id} = $data[0]; 2334 $row{domain} = $data[1]; 2335 $row{status} = $data[2]; 2336 $row{group} = $data[3]; 2337 push @zonelist, \%row; 2338 } 2339 2340 return \@zonelist; 2327 2328 my $ret = $dbh->selectall_arrayref($sql, { Slice => {} }, @filterargs); 2329 return $ret; 2341 2330 } # end getZoneList() 2342 2331 -
trunk/templates/bulkdomain.tmpl
r493 r572 38 38 <table> 39 39 <tr> 40 <TMPL_LOOP NAME=domtable><td><input type="checkbox" name="dom_<TMPL_VAR NAME= domain_id>" value="<TMPL_VAR NAME=domain_id>" /> <TMPL_VAR NAME=domain></td>40 <TMPL_LOOP NAME=domtable><td><input type="checkbox" name="dom_<TMPL_VAR NAME=zoneid>" value="<TMPL_VAR NAME=zoneid>" /> <TMPL_VAR NAME=zone></td> 41 41 <TMPL_IF newrow></tr> 42 42 <tr> -
trunk/templates/domlist.tmpl
r538 r572 39 39 <TMPL_LOOP name=domtable> 40 40 <tr class="row<TMPL_IF __odd__>0<TMPL_ELSE>1</TMPL_IF>"> 41 <td align="left"><a href="<TMPL_VAR NAME=script_self>&page=reclist&id=<TMPL_VAR NAME=domain_id>&defrec=n<TMPL_UNLESS domlist>&revrec=y</TMPL_UNLESS>"><TMPL_VAR NAME=domain></a></td>41 <td align="left"><a href="<TMPL_VAR NAME=script_self>&page=reclist&id=<TMPL_VAR NAME=zoneid>&defrec=n<TMPL_UNLESS domlist>&revrec=y</TMPL_UNLESS>"><TMPL_VAR NAME=zone></a></td> 42 42 <td><TMPL_IF status>Active<TMPL_ELSE>Inactive</TMPL_IF></td> 43 43 <td><TMPL_VAR name=group></td> 44 <TMPL_IF domain_edit> <td align="center"><a href="<TMPL_VAR NAME=script_self>&page=<TMPL_VAR NAME=curpage><TMPL_IF NAME=offset>&offset=<TMPL_VAR NAME=offset></TMPL_IF>&id=<TMPL_VAR NAME= domainid>&zonestatus=<TMPL_IF status>domoff<TMPL_ELSE>domon</TMPL_IF>"><TMPL_IF status>deactivate<TMPL_ELSE>activate</TMPL_IF></a></td></TMPL_IF>44 <TMPL_IF domain_edit> <td align="center"><a href="<TMPL_VAR NAME=script_self>&page=<TMPL_VAR NAME=curpage><TMPL_IF NAME=offset>&offset=<TMPL_VAR NAME=offset></TMPL_IF>&id=<TMPL_VAR NAME=zoneid>&zonestatus=<TMPL_IF status>domoff<TMPL_ELSE>domon</TMPL_IF>"><TMPL_IF status>deactivate<TMPL_ELSE>activate</TMPL_IF></a></td></TMPL_IF> 45 45 <TMPL_IF domain_delete> <td align="center"><a href="<TMPL_VAR NAME=script_self>&page=<TMPL_IF domlist>deldom<TMPL_ELSE>delrevzone</TMPL_IF>&id=<TMPL_VAR NAME=domain_id>"><img src="images/trash2.png" alt="[ Delete ]" /></a></td></TMPL_IF> 46 46 </tr>
Note:
See TracChangeset
for help on using the changeset viewer.