--- loncom/interface/lonsearchcat.pm 2001/03/08 16:54:20 1.4
+++ loncom/interface/lonsearchcat.pm 2001/03/14 15:26:47 1.9
@@ -7,6 +7,9 @@ package Apache::lonsearchcat;
use strict;
use Apache::Constants qw(:common);
+use Apache::lonnet();
+use Apache::File();
+use CGI qw(:standard);
my %language;
my $scrout;
@@ -16,15 +19,32 @@ my %mimetag;
sub handler {
my $r = shift;
+
+# -------------------------------------- see if called from an interactive mode
+ map {
+ my ($name, $value) = split(/=/,$_);
+ $value =~ tr/+/ /;
+ $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg;
+ if ($name eq 'catalogmode') {
+ $ENV{'form.'.$name}=$value;
+ }
+ } (split(/&/,$ENV{'QUERY_STRING'}));
+
$r->content_type('text/html');
$r->send_http_header;
return OK if $r->header_only;
%metadatafields=();
+ my $hidden='';
+ $hidden=<
+END
+
# ------------------------------------------------ First, check out environment
$metadatafields{'owner'}=$ENV{'user.name'}.'@'.$ENV{'user.domain'};
+# --------------------------------- Compute various listings of metadata values
%language=();
$language{'any'}='Any language';
@@ -56,7 +76,11 @@ sub handler {
} <$fh>;
}
- $scrout="";
+ if ($ENV{'form.basicsubmit'} eq 'SEARCH') {
+ return &basicsearch($r,$ENV{'form.basicexp'});
+ }
+
+ $scrout=''; # building a part of screen output
$scrout.=&searchphrasefield('Limit by title','title',
'');
@@ -78,404 +102,108 @@ sub handler {
$scrout.=&selectbox('Limit by language','language',
'any',%language);
- $scrout.=<
LIMIT BY CREATION DATE RANGE:
-between:
-
-
-and:
-
-
-
+between:
+CREATIONDATESTART
+ $scrout.=&dateboxes('creationdatestart',1,1,1976);
+ $scrout.=<";
- $scrout.=<
LIMIT BY LAST REVISION DATE RANGE:
-
between:
-
-
-and: