Diff for /loncom/metadata_database/Attic/lonsql.pm between versions 1.2 and 1.3

version 1.2, 2001/02/20 14:17:15 version 1.3, 2001/02/20 15:03:23
Line 10  use Opcode; Line 10  use Opcode;
 use Apache::lonnet;  use Apache::lonnet;
 use Apache::Constants qw(:common :http);  use Apache::Constants qw(:common :http);
   
   use CGI;
   
 # ================================================================ Main handler  # ================================================================ Main handler
 #  #
Line 20  use Apache::Constants qw(:common :http); Line 20  use Apache::Constants qw(:common :http);
   
 sub handler {  sub handler {
     my $r=shift;      my $r=shift;
   
       if ($r->header_only) {
         $r->content_type('text/html');
         $r->send_http_header;
         return OK;
       }
   
   # ------------------------------------------------------------------- Open page
   
       my $query=new CGI;
   
       my $searchquery;
       my $searchresults;
   
       if ($query->{'SUBMIT'}) {
    $searchquery="trying to search...";
       }
   
       $r->content_type('text/html');
       $r->header_out('Cache-control','no-cache');
       $r->header_out('Pragma','no-cache');
       $r->send_http_header;
     my $output=<<END;      my $output=<<END;
 Content-type: text/html  
   
 <H1>Test output message for lonsql.pm</H1>  <P>
   <H1>MySQL search engine</H1>
   <FORM METHOD="GET" ACTION="/adm/sqltest">
   <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>
   <TR><TD><STRONG>title</STRONG></TD>
   <TD><INPUT TYPE="TEXT" NAME="title"></TD>
   <TR><TD><STRONG>author</STRONG></TD>
   <TD><INPUT TYPE="TEXT" NAME="author"></TD>
   <TR><TD><STRONG>subject</STRONG></TD>
   <TD><INPUT TYPE="TEXT" NAME="subject"></TD>
   <TR><TD><STRONG>notes</STRONG></TD>
   <TD><INPUT TYPE="TEXT" NAME="notes"></TD>
   <TR><TD><STRONG>abstract</STRONG></TD>
   <TD><INPUT TYPE="TEXT" NAME="abstract"></TD>
   <TR><TD><STRONG>mime</STRONG></TD>
   <TD><INPUT TYPE="TEXT" NAME="mime"></TD>
   <TR><TD><STRONG>language</STRONG></TD>
   <TD><INPUT TYPE="TEXT" NAME="language"></TD>
   <TR><TD><STRONG>creationdate</STRONG></TD>
   <TD><INPUT TYPE="TEXT" NAME="creationdate"></TD>
   <TR><TD><STRONG>lastrevisiondate</STRONG></TD>
   <TD><INPUT TYPE="TEXT" NAME="lastrevisiondate"></TD>
   <TR><TD><STRONG>owner</STRONG></TD>
   <TD><INPUT TYPE="TEXT" NAME="owner"></TD>
   <TR><TD><STRONG>copyright</STRONG></TD>
   <TD><INPUT TYPE="TEXT" NAME="copyright"></TD>
   </TR>
   </TABLE>
   <SELECT NAME="logic">
   <OPTION SELECTED>and</OPTION>
   <OPTION>or</OPTION>
   </SELECT>
   <INPUT TYPE="SUBMIT" NAME="SUBMIT" VALUE="SEARCH MySQL DATABASE">
   </P>
   <P>
   $searchquery
   </P>
   <P>
   $searchresults
   </P>
 END  END
     $r->print($output);      $r->print($output);
     return OK;      return OK;

Removed from v.1.2  
changed lines
  Added in v.1.3


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>