#! /usr/bin/perl -w # Mandy Wu's Website # search.cgi: The web site full-text search. # Copyright (c) 2006-2021 imacat. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Author: imacat # First written: 2006-11-15 use 5.008; use strict; use warnings; use lib $ENV{"DOCUMENT_ROOT"} . qw(/magicat/lib/perl5); use Selima::emandy; local $SIG{"__DIE__"} = \&http_500; my $d = new Selima::Destroy; # Prototype declaration sub main(); use Fcntl qw(:seek); initenv(-allowed => [qw(GET HEAD)], -session => 0, -dbi_lock => {"pages" => LOCK_SH, "legend" => LOCK_SH, "links" => LOCK_SH}, -lastmod => 1, -page_param => {"keywords" => N_("search, query, full text search"), "class" => "search"}); main; exit 0; sub main() { local ($_, %_); my $LIST; # List handler handles its own error $LIST = new Selima::emandy::List::Search; html_header $LIST->{"title"}, $LIST->page_param; $LIST->html; html_footer; return; }