/[jquery]/no_pager/index.cgi
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /no_pager/index.cgi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 6 by dpavlin, Tue Aug 15 21:12:31 2006 UTC revision 10 by dpavlin, Wed Aug 16 01:02:00 2006 UTC
# Line 34  my $node = new Search::Estraier::Node(%{ Line 34  my $node = new Search::Estraier::Node(%{
34    
35  my $o = $q->param('index') || 0;  my $o = $q->param('index') || 0;
36  my $search = $q->param('q');  my $search = $q->param('q');
37    $search = join(" AND ", split(/\s+/, $search)) unless ($search =~ m/(?:AND|OR|\[|\])/);
38    
39  my $on_page = 30;  my $on_page = 30;
40  my $skip = $o * $on_page;  my $skip = $o * $on_page;
# Line 49  my $max = 0; Line 50  my $max = 0;
50    
51  if (defined($nres)) {  if (defined($nres)) {
52          $max = $nres->hits;          $max = $nres->hits;
53          print "Got ", $nres->hits, " results for $search\n";          my $time = $nres->hint('TIME');
54            print qq{
55                    <div id="status_update" style="display:none;">
56                            Got <b>$max</b> results for <tt>$search</tt> in <em>$time s</em>
57                    </div>
58            };
59    
60          sub html_snippet {          sub html_snippet {
61                  my $text = shift || return;                  my $text = shift || return;
# Line 76  if (defined($nres)) { Line 82  if (defined($nres)) {
82    
83                  print "<h1>", $rdoc->attr('@title'),"</h1>\n";                  print "<h1>", $rdoc->attr('@title'),"</h1>\n";
84                  print "<h2>", $rdoc->attr('source'),"</h2>\n";                  print "<h2>", $rdoc->attr('source'),"</h2>\n";
85                  print "", html_snippet( $rdoc->snippet ),"<br/>\n";                  print "<h3>", $rdoc->attr('@mdate'),"</h3>\n";
86                    print "<p>", html_snippet( $rdoc->snippet ),"</p>\n";
87                  print "[", $skip + $i, "] ";                  print "[", $skip + $i, "] ";
88                  print "<tt>", $rdoc->attr('@uri'),"</tt>";                  print "<tt>", $rdoc->attr('@uri'),"</tt>";
89                  print "</li>";                  print "</li>";

Legend:
Removed from v.6  
changed lines
  Added in v.10

  ViewVC Help
Powered by ViewVC 1.1.26