Files
selima-perl/htdocs/emily/cgi-bin/search.cgi
2026-03-10 21:31:43 +08:00

56 lines
1.6 KiB
Perl
Executable File

#! /usr/bin/perl -w
# Emily 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 <imacat@mail.imacat.idv.tw>
# First written: 2006-04-11
use 5.008;
use strict;
use warnings;
use lib $ENV{"DOCUMENT_ROOT"} . qw(/magicat/lib/perl5);
use Selima::emily;
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,
"links" => LOCK_SH,
"guestbook" => 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::emily::List::Search;
html_header $LIST->{"title"}, $LIST->page_param;
$LIST->html;
html_footer;
return;
}