- Timestamp:
- 02/14/07 13:03:31 (18 years ago)
- Location:
- branches/stable
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/cgi-bin/search.cgi
r323 r357 40 40 my %webvar = parse_post(); 41 41 cleanInput(\%webvar); 42 43 if (defined($webvar{rpp})) { 44 ($RESULTS_PER_PAGE) = ($webvar{rpp} =~ /(\d+)/); 45 } 42 46 43 47 if (!defined($webvar{stype})) { … … 185 189 } else { 186 190 # Add the limit/offset clauses 187 $sql .= " order by cidr limit $RESULTS_PER_PAGE offset $offset"; 191 $sql .= " order by cidr"; 192 $sql .= " limit $RESULTS_PER_PAGE offset $offset" if $RESULTS_PER_PAGE != 0; 188 193 # And tell the user. 189 194 print "<div class=heading>Searching...............</div>\n"; … … 420 425 421 426 # print the page thing.. 422 if ($ rowCount > $RESULTS_PER_PAGE) {427 if ($RESULTS_PER_PAGE > 0 && $rowCount > $RESULTS_PER_PAGE) { 423 428 my $pages = ceil($rowCount/$RESULTS_PER_PAGE); 424 429 print qq(<div class="center"> Page: ); -
branches/stable/compsearch.html
r286 r357 6 6 <td colspan=2>Match on:<input type=radio checked name=which value="all">All 7 7 <input type=radio name=which value="any">Any 8 <td colspan=2 align=right><input type=submit value="Search Now"></td> 8 <td>Results per page: <select name=rpp> 9 <option value='25'>25</option> 10 <option value='50'>50</option> 11 <option value='100'>100</option> 12 <option value='200'>200</option> 13 <option value='0'>Show all</option> 14 </select> 15 <td align=right><input type=submit value="Search Now"></td> 9 16 </td> 10 17 <tr class="color1">
Note:
See TracChangeset
for help on using the changeset viewer.