Changeset 493 for branches/htmlform/cgi-bin/main.cgi
- Timestamp:
- 09/23/10 20:58:52 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/htmlform/cgi-bin/main.cgi
r492 r493 150 150 elsif ($webvar{action} eq 'nodesearch') { 151 151 $sth = $ip_dbh->prepare("SELECT node_id, node_name FROM nodes ORDER BY node_type,node_id"); 152 $sth->execute() or print "DEBUG: failed retrieval from nodes: ".$sth->errstr,"<br>\n";152 $sth->execute() or $page->param(errmsg => $sth->errstr); 153 153 my @nodelist; 154 154 while (my ($nid,$nname) = $sth->fetchrow_array()) { … … 183 183 finish($ip_dbh); 184 184 185 #print qq(<div align=right style="position: absolute; right: 30px;">).186 # qq(<a href="/ip/cgi-bin/admin.cgi">Admin tools</a></div><br>\n)187 # if $IPDBacl{$authuser} =~ /A/;188 189 185 ## Do all our printing here so we can generate errors and stick them into the slots in the templates. 190 186 … … 202 198 # properly... we exit explicitly. 203 199 exit 0; 204 205 206 # args are: a reference to an array with the row to be printed and the207 # class(stylesheet) to use for formatting.208 # if ommitting the class - call the sub as &printRow(\@array)209 sub printRow {210 my ($rowRef,$class) = @_;211 212 if (!$class) {213 print "<tr>\n";214 } else {215 print "<tr class=\"$class\">\n";216 }217 218 ELEMENT: foreach my $element (@$rowRef) {219 if (!defined($element)) {220 print "<td></td>\n";221 next ELEMENT;222 }223 $element =~ s|\n|</br>|g;224 print "<td>$element</td>\n";225 }226 print "</tr>";227 } # printRow228 229 230 # Prints table headings. Accepts any number of arguments;231 # each argument is a table heading.232 sub startTable {233 print qq(<center><table width="98%" cellspacing="0" class="center"><tr>);234 235 foreach(@_) {236 print qq(<td class="heading">$_</td>);237 }238 print "</tr>\n";239 } # startTable240 200 241 201 … … 498 458 $page->param(city => $poolcity); 499 459 500 # print qq(<center><div class="heading">Listing pool IPs for $cidr<br>\n).501 # qq(($disp_alloctypes{$pooltype} in $poolcity)</div></center><br>\n);502 460 # Only display net/gw/bcast if it's a "real" netblock and not a PPP(oE) lunacy 503 461 $page->param(realblock => $pooltype =~ /^.d$/); … … 565 523 "and type not like '_i' and type not like '_r' order by listorder"); 566 524 $sth->execute; 567 my @data = $sth->fetchrow_array;568 525 my @typelist; 569 526 my $selflag = 0;
Note:
See TracChangeset
for help on using the changeset viewer.