Initial commit.

This commit is contained in:
2026-03-10 21:25:26 +08:00
commit 78739bf725
3089 changed files with 472990 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
#! /usr/bin/perl -w
# History: Theory and Culture
# actlog.cgi: The activity log viewer.
# Copyright (c) 2005-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: 2005-05-10
use 5.008;
use strict;
use warnings;
use lib $ENV{"DOCUMENT_ROOT"} . qw(/magicat/lib/perl5);
use Selima::htc;
local $SIG{"__DIE__"} = \&http_500;
my $d = new Selima::Destroy;
# Prototype declaration
sub main();
initenv(-restricted => 1,
-allowed => [qw(GET HEAD)],
-lastmod => 0,
-lmfiles => [$ACTLOG],
-page_param => {"keywords" => N_("activity, logs")});
main;
exit 0;
sub main() {
local ($_, %_);
my $LIST;
# List handler handles its own error
$LIST = new Selima::List::ActLog;
html_header $LIST->{"title"};
html_errmsg retrieve_status;
$LIST->html;
html_footer;
return;
}

View File

@@ -0,0 +1,236 @@
#! /usr/bin/perl -w
# History: Theory and Culture
# groupmem.cgi: The group-to-group membership administration.
# Copyright (c) 2004-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: 2004-10-16
use 5.008;
use strict;
use warnings;
use lib $ENV{"DOCUMENT_ROOT"} . qw(/magicat/lib/perl5);
use Selima::htc;
local $SIG{"__DIE__"} = \&http_500;
my $d = new Selima::Destroy;
# Prototype declaration
sub main();
sub check_get();
sub check_post();
sub html_page($);
sub fetch_curitem();
sub import_selgrp($);
sub import_selmember($);
initenv(-restricted => 1,
-this_table => "groupmem",
-dbi_lock => {"groupmem" => LOCK_EX,
"groups" => LOCK_SH,
"groups AS grpmembers" => LOCK_SH},
-lastmod => 1,
-page_param => {"keywords" => N_("group membership")});
main;
exit 0;
sub main() {
local ($_, %_);
my ($error, $success, $processor);
# If the request is a GET query
if ($ENV{"REQUEST_METHOD"} ne "POST") {
$error = check_get;
# If an error occurs
if (defined $error) {
html_page $error;
# Display the page
} else {
html_page retrieve_status;
}
# If a form was POSTed from the client
} else {
$error = check_post;
# If an error occurs
if (defined $error) {
error_redirect $error;
# Else, save the data
} else {
$processor = new Selima::Processor::GroupMem($POST);
$success = $processor->process;
success_redirect $success;
}
}
return;
}
# check_get: Check the GET arguments
sub check_get() {
local ($_, %_);
my $error;
# A form is requested
if (is_form) {
$_ = form_type;
# A form to create a new item
if ($_ eq "new") {
# Nothing to check on a new form
# A form to edit a current item
} elsif ($_ eq "cur") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;
# A form to delete a current item
} elsif ($_ eq "del") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;
# Not a valid form
} else {
return {"msg"=>N_("Incorrect form: [_1]."),
"margs"=>[$_],
"isform"=>0};
}
}
# List handler handles its own error
# OK
return;
}
# check_post: Check the POSTed form
sub check_post() {
local ($_, %_);
my ($checker, $error);
$_ = form_type;
# A form to create a new item
if ($_ eq "new") {
# Run the checker
$checker = new Selima::Checker::GroupMem(curform);
$checker->redir(qw(selgrp delgrp selmember delmember));
$error = $checker->check(qw(grp member));
return $error if defined $error;
# A form to edit a current item
} elsif ($_ eq "cur") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;
# Run the checker
$checker = new Selima::Checker::GroupMem(curform);
$checker->redir(qw(del selgrp delgrp selmember delmember));
$error = $checker->check(qw(grp member));
return $error if defined $error;
# A form to delete a current item
} elsif ($_ eq "del") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;;
# Run the checker
$checker = new Selima::Checker::GroupMem(curform);
$checker->redir(qw(cancel));
# Not a valid form
} else {
return {"msg"=>N_("Incorrect form: [_1]."),
"margs"=>[$_],
"isform"=>0};
}
# OK
return;
}
# html_page: Display the page
sub html_page($) {
local ($_, %_);
my ($status, $LIST, $FORM);
$status = $_[0];
# A form is requested
if (is_form $status) {
$FORM = new Selima::Form::GroupMem($status);
html_header $FORM->{"title"};
html_errmsg $status;
$FORM->html;
html_footer;
# List the available items
} else {
$LIST = new Selima::List::GroupMem;
html_header $LIST->{"title"}, $LIST->page_param;
html_errmsg $status;
$LIST->html;
html_footer;
}
return;
}
##################################
# Subroutines to manage the data #
##################################
# fetch_curitem: Fetch the current item
sub fetch_curitem() {
local ($_, %_);
my ($sn, $FORM);
# Return if fetched before
return if scalar(keys %CURRENT) > 0;
# Obtain the current form
$FORM = curform;
# No item specified
return {"msg"=>N_("Please select the membership record."),
"isform"=>0}
if !defined $FORM->param("sn");
$sn = $FORM->param("sn");
# Find the record
%CURRENT = fetchrec $sn, $THIS_TABLE;
# If this record exist
return {"msg"=>N_("This membership record does not exist anymore. Please select another one."),
"isform"=>0}
if scalar(keys %CURRENT) == 0;
# OK
return;
}
# import_selgrp: Import the selected group into the retrieved form
sub import_selgrp($) {
local ($_, %_);
my $FORM;
$FORM = $_[0];
$FORM->param("grp", $GET->param("selsn"))
if defined $GET->param("selsn")
&& check_sn_in ${$GET->param_fetch("selsn")}[0], "groups";
return;
}
# import_selmember: Import the selected member into the retrieved form
sub import_selmember($) {
local ($_, %_);
my $FORM;
$FORM = $_[0];
$FORM->param("member", $GET->param("selsn"))
if defined $GET->param("selsn")
&& check_sn_in ${$GET->param_fetch("selsn")}[0], "groups AS grpmembers";
return $FORM;
}

View File

@@ -0,0 +1,357 @@
#! /usr/bin/perl -w
# History: Theory and Culture
# groups.cgi: The account group administration.
# Copyright (c) 2004-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: 2004-10-16
use 5.008;
use strict;
use warnings;
use lib $ENV{"DOCUMENT_ROOT"} . qw(/magicat/lib/perl5);
use Selima::htc;
local $SIG{"__DIE__"} = \&http_500;
my $d = new Selima::Destroy;
# Prototype declaration
sub main();
sub check_get();
sub check_post();
sub html_page($);
sub fetch_curitem();
sub import_selsubuser($);
sub import_selsubgroup($);
sub import_selsupgroup($);
initenv(-restricted => 1,
-this_table => "groups",
-dbi_lock => {"groups" => LOCK_EX,
"usermem" => LOCK_EX,
"groupmem" => LOCK_EX,
"users" => LOCK_SH,
"users AS members" => LOCK_SH,
"groups AS members" => LOCK_SH},
-lastmod => 1,
-page_param => {"keywords" => N_("groups")});
main;
exit 0;
sub main() {
local ($_, %_);
my ($error, $success, $processor);
# If the request is a GET query
if ($ENV{"REQUEST_METHOD"} ne "POST") {
$error = check_get;
# If an error occurs
if (defined $error) {
html_page $error;
# Display the page
} else {
html_page retrieve_status;
}
# If a form was POSTed from the client
} else {
$error = check_post;
# If an error occurs
if (defined $error) {
error_redirect $error;
# Else, save the data
} else {
$processor = new Selima::Processor::Group($POST);
$success = $processor->process;
success_redirect $success;
}
}
return;
}
# check_get: Check the GET arguments
sub check_get() {
local ($_, %_);
my ($error, $FORM, $sn);
# A form is requested
if (is_form) {
$_ = form_type;
# A form to create a new item
if ($_ eq "new") {
# Nothing to check on a new form
# A form to edit a current item
} elsif ($_ eq "cur") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;
# A form to delete a current item
} elsif ($_ eq "del") {
# Check the privilege to manage this table
$FORM = curform;
$sn = defined $FORM->param("sn")? $FORM->param("sn"): -1;
unauth if !is_su && $sn == su_group_sn;
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;
# Not a valid form
} else {
return {"msg"=>N_("Incorrect form: [_1]."),
"margs"=>[$_],
"isform"=>0};
}
}
# List handler handles its own error
# OK
return;
}
# check_post: Check the POSTed form
sub check_post() {
local ($_, %_);
my ($checker, $error, $FORM, $sn);
$_ = form_type;
# A form to create a new item
if ($_ eq "new") {
# Run the checker
$checker = new Selima::Checker::Group(curform);
$checker->redir(qw(selsubuser selsubgroup selsupgroup));
$error = $checker->check(qw(id dsc subuser subgroup supgroup));
return $error if defined $error;
# A form to edit a current item
} elsif ($_ eq "cur") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;
# Run the checker
$checker = new Selima::Checker::Group(curform);
$checker->redir(qw(del selsubuser selsubgroup selsupgroup));
$error = $checker->check(qw(id dsc subuser subgroup supgroup));
return $error if defined $error;
# A form to delete a current item
} elsif ($_ eq "del") {
# Check the privilege to manage this table
$FORM = curform;
$sn = defined $FORM->param("sn")? $FORM->param("sn"): -1;
unauth if !is_su && $sn == su_group_sn;
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;
# Run the checker
$checker = new Selima::Checker::Group(curform);
$checker->redir(qw(cancel));
# Not a valid form
} else {
return {"msg"=>N_("Incorrect form: [_1]."),
"margs"=>[$_],
"isform"=>0};
}
# OK
return;
}
# html_page: Display the page
sub html_page($) {
local ($_, %_);
my ($status, $LIST, $FORM);
$status = $_[0];
# A form is requested
if (is_form $status) {
$FORM = new Selima::Form::Group($status);
html_header $FORM->{"title"};
html_errmsg $status;
$FORM->html;
html_footer;
# List the available items
} else {
$LIST = new Selima::List::Groups;
html_header $LIST->{"title"}, $LIST->page_param;
html_errmsg $status;
$LIST->html;
html_footer;
}
return;
}
##################################
# Subroutines to manage the data #
##################################
# fetch_curitem: Fetch the current item
sub fetch_curitem() {
local ($_, %_);
my ($sn, $FORM, $sth, $sql, $row, $title);
# Return if fetched before
return if scalar(keys %CURRENT) > 0;
# Obtain the current form
$FORM = curform;
# No item specified
return {"msg"=>N_("Please select the group."),
"isform"=>0}
if !defined $FORM->param("sn");
$sn = $FORM->param("sn");
# Find the record
%CURRENT = fetchrec $sn, $THIS_TABLE;
# If this record exist
return {"msg"=>N_("This group does not exist anymore. Please select another one."),
"isform"=>0}
if scalar(keys %CURRENT) == 0;
# Obtain the user members list
$title = $DBH->strcat("users.id", "' ('", "users.name", "')'");
$sql = "SELECT users.sn AS sn,"
. " $title AS title"
. " FROM usermem"
. " INNER JOIN users ON usermem.member=users.sn"
. " WHERE usermem.grp=$sn"
. " ORDER BY users.id;\n";
$sth = $DBH->prepare($sql);
$sth->execute;
$CURRENT{"subusercount"} = $sth->rows;
for ($_ = 0; $_ < $CURRENT{"subusercount"}; $_++) {
$row = $sth->fetchrow_hashref;
$CURRENT{"subuser$_"} = 1;
$CURRENT{"subuser$_" . "sn"} = $$row{"sn"};
$CURRENT{"subuser$_" . "title"} = $$row{"title"};
}
# Obtain the group members list
$sql = "SELECT groups.sn AS sn,"
. " groups.dsc AS title FROM groupmem"
. " INNER JOIN groups ON groupmem.member=groups.sn"
. " WHERE groupmem.grp=$sn"
. " ORDER BY groups.id;\n";
$sth = $DBH->prepare($sql);
$sth->execute;
$CURRENT{"subgroupcount"} = $sth->rows;
for ($_ = 0; $_ < $CURRENT{"subgroupcount"}; $_++) {
$row = $sth->fetchrow_hashref;
$CURRENT{"subgroup$_"} = 1;
$CURRENT{"subgroup$_" . "sn"} = $$row{"sn"};
$CURRENT{"subgroup$_" . "title"} = $$row{"title"};
}
# Obtain the belonging groups list
$sql = "SELECT groups.sn AS sn,"
. " groups.dsc AS title FROM groupmem"
. " INNER JOIN groups ON groupmem.grp=groups.sn"
. " WHERE groupmem.member=$sn"
. " ORDER BY groups.id;\n";
$sth = $DBH->prepare($sql);
$sth->execute;
$CURRENT{"supgroupcount"} = $sth->rows;
for ($_ = 0; $_ < $CURRENT{"supgroupcount"}; $_++) {
$row = $sth->fetchrow_hashref;
$CURRENT{"supgroup$_"} = 1;
$CURRENT{"supgroup$_" . "sn"} = $$row{"sn"};
$CURRENT{"supgroup$_" . "title"} = $$row{"title"};
}
# OK
return;
}
# import_selsubuser: Import the selected user into the retrieved form
sub import_selsubuser($) {
local ($_, %_);
my $FORM;
$FORM = $_[0];
# Sanity checks
if ( defined $GET->param("selsn")
&& check_sn_in ${$GET->param_fetch("selsn")}[0], "users AS members") {
# Get the current member list
%_ = map { $FORM->param($_) => 1 } grep /^subuser\d+sn$/, $FORM->param;
$_{$GET->param("selsn")} = 1;
@_ = sort { userid $a cmp userid $b } keys %_;
# Get the checked member list
%_ = map { $FORM->param($_ . "sn") => 1 }
grep /^subuser\d+$/ && defined $FORM->param($_ . "sn"), $FORM->param;
$_{$GET->param("selsn")} = 1;
# Remove the old values
$FORM->delete(grep /^subuser\d+/, $FORM->param);
# Add the current values
for ($_ = 0; $_ < @_; $_++) {
$FORM->param("subuser$_" . "sn", $_[$_]);
$FORM->param("subuser$_", 1) if exists $_{$_[$_]};
}
}
return;
}
# import_selsubgroup: Import the selected user into the retrieved form
sub import_selsubgroup($) {
local ($_, %_);
my $FORM;
$FORM = $_[0];
# Sanity checks
if ( defined $GET->param("selsn")
&& check_sn_in ${$GET->param_fetch("selsn")}[0], "groups AS members") {
# Get the current member list
%_ = map { $FORM->param($_) => 1 } grep /^subgroup\d+sn$/, $FORM->param;
$_{$GET->param("selsn")} = 1;
@_ = sort { groupid $a cmp groupid $b } keys %_;
# Get the checked member list
%_ = map { $FORM->param($_ . "sn") => 1 }
grep /^subgroup\d+$/ && defined $FORM->param($_ . "sn"), $FORM->param;
$_{$GET->param("selsn")} = 1;
# Remove the old values
$FORM->delete(grep /^subgroup\d+/, $FORM->param);
# Add the current values
for ($_ = 0; $_ < @_; $_++) {
$FORM->param("subgroup$_" . "sn", $_[$_]);
$FORM->param("subgroup$_", 1) if exists $_{$_[$_]};
}
}
return;
}
# import_selsupgroup: Import the selected user into the retrieved form
sub import_selsupgroup($) {
local ($_, %_);
my $FORM;
$FORM = $_[0];
# Sanity checks
if ( defined $GET->param("selsn")
&& check_sn_in ${$GET->param_fetch("selsn")}[0], "groups") {
# Get the current member list
%_ = map { $FORM->param($_) => 1 } grep /^supgroup\d+sn$/, $FORM->param;
$_{$GET->param("selsn")} = 1;
@_ = sort { groupid $a cmp groupid $b } keys %_;
# Get the checked member list
%_ = map { $FORM->param($_ . "sn") => 1 }
grep /^supgroup\d+$/ && defined $FORM->param($_ . "sn"), $FORM->param;
$_{$GET->param("selsn")} = 1;
# Remove the old values
$FORM->delete(grep /^supgroup\d+/, $FORM->param);
# Add the current values
for ($_ = 0; $_ < @_; $_++) {
$FORM->param("supgroup$_" . "sn", $_[$_]);
$FORM->param("supgroup$_", 1) if exists $_{$_[$_]};
}
}
return;
}

View File

@@ -0,0 +1,211 @@
#! /usr/bin/perl -w
# History: Theory and Culture
# guestbook.cgi: The guestbook administration.
# Copyright (c) 2003-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: 2003-04-06
use 5.008;
use strict;
use warnings;
use lib $ENV{"DOCUMENT_ROOT"} . qw(/magicat/lib/perl5);
use Selima::htc;
local $SIG{"__DIE__"} = \&http_500;
my $d = new Selima::Destroy;
# Prototype declaration
sub main();
sub check_get();
sub check_post();
sub html_page($);
sub fetch_curitem();
initenv(-restricted => 1,
-this_table => "guestbook",
-dbi_lock => {"guestbook" => LOCK_EX},
-lastmod => 1,
-page_param => {"keywords" => N_("guestbook")});
main;
exit 0;
sub main() {
local ($_, %_);
my ($error, $success, $processor);
# If the request is a GET query
if ($ENV{"REQUEST_METHOD"} ne "POST") {
$error = check_get;
# If an error occurs
if (defined $error) {
html_page $error;
# Display the page
} else {
html_page retrieve_status;
}
# If a form was POSTed from the client
} else {
$error = check_post;
# If an error occurs
if (defined $error) {
error_redirect $error;
# Else, save the data
} else {
$processor = new Selima::Processor::Guestbook($POST);
$success = $processor->process;
success_redirect $success;
}
}
return;
}
# check_get: Check the GET arguments
sub check_get() {
local ($_, %_);
my $error;
# A form is requested
if (is_form) {
$_ = form_type;
# A form to create a new item
if ($_ eq "new") {
# Nothing to check on a new form
# A form to edit a current item
} elsif ($_ eq "cur") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;
# A form to delete a current item
} elsif ($_ eq "del") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;
# Not a valid form
} else {
return {"msg"=>N_("Incorrect form: [_1]."),
"margs"=>[$_],
"isform"=>0};
}
}
# List handler handles its own error
# OK
return;
}
# check_post: Check the POSTed form
sub check_post() {
local ($_, %_);
my ($checker, $error);
$_ = form_type;
# A form to create a new item
if ($_ eq "new") {
# Run the checker
$checker = new Selima::htc::Checker::Guestbook(curform);
$error = $checker->check(qw(name identity location
email url message));
return $error if defined $error;
# A form to edit a current item
} elsif ($_ eq "cur") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;
# Run the checker
$checker = new Selima::htc::Checker::Guestbook(curform);
$checker->redir(qw(del));
$error = $checker->check(qw(name identity location
email url message));
return $error if defined $error;
# A form to delete a current item
} elsif ($_ eq "del") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;;
# Run the checker
$checker = new Selima::htc::Checker::Guestbook(curform);
$checker->redir(qw(cancel));
# Not a valid form
} else {
return {"msg"=>N_("Incorrect form: [_1]."),
"margs"=>[$_],
"isform"=>0};
}
# OK
return;
}
# html_page: Display the page
sub html_page($) {
local ($_, %_);
my ($status, $LIST, $FORM);
$status = $_[0];
# A form is requested
if (is_form $status) {
$FORM = new Selima::htc::Form::Guestbook($status);
html_header $FORM->{"title"};
html_errmsg $status;
$FORM->html;
html_footer;
# List the available items
} else {
$LIST = new Selima::htc::List::Guestbook;
html_header $LIST->{"title"}, $LIST->page_param;
html_errmsg $status;
$LIST->html;
html_footer;
}
return;
}
##################################
# Subroutines to manage the data #
##################################
# fetch_curitem: Fetch the current item
sub fetch_curitem() {
local ($_, %_);
my ($sn, $FORM);
# Return if fetched before
return if scalar(keys %CURRENT) > 0;
# Obtain the current form
$FORM = curform;
# No item specified
return {"msg"=>N_("Please select the message."),
"isform"=>0}
if !defined $FORM->param("sn");
$sn = $FORM->param("sn");
# Find the record
%CURRENT = fetchrec $sn, $THIS_TABLE;
# If this record exist
return {"msg"=>N_("This message does not exist anymore. Please select another one."),
"isform"=>0}
if scalar(keys %CURRENT) == 0;
# OK
return;
}

View File

@@ -0,0 +1,292 @@
#! /usr/bin/perl -w
# History: Theory and Culture
# linkcat.cgi: The related-link category administration.
# Copyright (c) 2004-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: 2004-11-02
use 5.008;
use strict;
use warnings;
use lib $ENV{"DOCUMENT_ROOT"} . qw(/magicat/lib/perl5);
use Selima::htc;
local $SIG{"__DIE__"} = \&http_500;
my $d = new Selima::Destroy;
# Prototype declaration
sub main();
sub check_get();
sub check_post();
sub html_page($);
sub fetch_curitem();
sub import_selparent($);
initenv(-restricted => 1,
-this_table => "linkcat",
-dbi_lock => {"linkcat" => LOCK_EX,
"links" => LOCK_SH,
"linkcatz" => LOCK_SH},
-lastmod => 0,
-page_param => {"keywords" => N_("link categories")});
main;
exit 0;
sub main() {
local ($_, %_);
my ($error, $success, $processor);
# If the request is a GET query
if ($ENV{"REQUEST_METHOD"} ne "POST") {
$error = check_get;
# If an error occurs
if (defined $error) {
html_page $error;
# Display the page
} else {
html_page retrieve_status;
}
# If a form was POSTed from the client
} else {
$error = check_post;
# If an error occurs
if (defined $error) {
error_redirect $error;
# Else, save the data
} else {
$processor = new Selima::Processor::LinkCat($POST);
$success = $processor->process;
success_redirect $success;
}
}
return;
}
# check_get: Check the GET arguments
sub check_get() {
local ($_, %_);
my $error;
# A form is requested
if (is_form) {
$_ = form_type;
# A form to create a new item
if ($_ eq "new") {
# Nothing to check on a new form
# A form to edit a current item
} elsif ($_ eq "cur") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;
# A form to delete a current item
} elsif ($_ eq "del") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;
return {"msg"=>N_("This category has [numerate,_1,a subcategory,subcategories]. It cannot be deleted. To delete the category, [numerate,_1,its subcategory,all of its subcategories] must first be deleted."),
"margs"=>[$CURRENT{"scatcount"}],
"isform"=>0}
if $CURRENT{"scatcount"} > 0;
return {"msg"=>N_("This category has [numerate,_1,a link,links]. It cannot be deleted. To delete the category, [numerate,_1,its link,all of its links] must first be deleted."),
"margs"=>[$CURRENT{"linkcount"}],
"isform"=>0}
if $CURRENT{"linkcount"} > 0;
# Not a valid form
} else {
return {"msg"=>N_("Incorrect form: [_1]."),
"margs"=>[$_],
"isform"=>0};
}
}
# List handler handles its own error
# OK
return;
}
# check_post: Check the POSTed form
sub check_post() {
local ($_, %_);
my ($checker, $error);
$_ = form_type;
# A form to create a new item
if ($_ eq "new") {
# Run the checker
$checker = new Selima::Checker::LinkCat(curform);
$checker->redir(qw(selparent delparent));
$error = $checker->check(qw(parent id ord title kw));
return $error if defined $error;
# A form to edit a current item
} elsif ($_ eq "cur") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;
# Run the checker
$checker = new Selima::Checker::LinkCat(curform);
$checker->redir(qw(del selparent delparent));
$error = $checker->check(qw(parent id ord title kw));
return $error if defined $error;
# A form to delete a current item
} elsif ($_ eq "del") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;
# Run the checker
$checker = new Selima::Checker::LinkCat(curform);
$checker->redir(qw(cancel));
return {"msg"=>N_("This category has [numerate,_1,a subcategory,subcategories]. It cannot be deleted. To delete the category, [numerate,_1,its subcategory,all of its subcategories] must first be deleted."),
"margs"=>[$CURRENT{"scatcount"}],
"isform"=>0}
if $CURRENT{"scatcount"} > 0;
return {"msg"=>N_("This category has [numerate,_1,a link,links]. It cannot be deleted. To delete the category, [numerate,_1,its link,all of its links] must first be deleted."),
"margs"=>[$CURRENT{"linkcount"}],
"isform"=>0}
if $CURRENT{"linkcount"} > 0;
# Not a valid form
} else {
return {"msg"=>N_("Incorrect form: [_1]."),
"margs"=>[$_],
"isform"=>0};
}
# OK
return;
}
# html_page: Display the page
sub html_page($) {
local ($_, %_);
my ($status, $LIST, $FORM);
$status = $_[0];
# A form is requested
if (is_form $status) {
$FORM = new Selima::Form::LinkCat($status);
html_header $FORM->{"title"};
html_errmsg $status;
$FORM->html;
html_footer;
# List the available items
} else {
$LIST = new Selima::List::LinkCat;
html_header $LIST->{"title"}, $LIST->page_param;
html_errmsg $status;
$LIST->html;
html_footer;
}
return;
}
##################################
# Subroutines to manage the data #
##################################
# fetch_curitem: Fetch the current item
sub fetch_curitem() {
local ($_, %_);
my ($sn, $FORM, $sth, $sql, $row);
my ($lang, $lndb, $lndbdef, $langfile, $title);
# Return if fetched before
return if scalar(keys %CURRENT) > 0;
# Obtain the current form
$FORM = curform;
# No item specified
return {"msg"=>N_("Please select the category."),
"isform"=>0}
if !defined $FORM->param("sn");
$sn = $FORM->param("sn");
# Find the record
%CURRENT = fetchrec $sn, $THIS_TABLE;
# If this record exist
return {"msg"=>N_("This category does not exist anymore. Please select another one."),
"isform"=>0}
if scalar(keys %CURRENT) == 0;
$lang = getlang;
$lndb = getlang LN_DATABASE;
$lndbdef = ln $DEFAULT_LANG, LN_DATABASE;
$langfile = getlang LN_FILENAME;
# Obtain the belonging subcategories list
@_ = qw();
push @_, "sn AS sn";
if (@ALL_LINGUAS > 1) {
$title = $lang eq $DEFAULT_LANG? "title_$lndb":
"COALESCE(title_$lndb, title_$lndbdef)";
push @_, "linkcat_fulltitle('$lang', parent, $title) AS title";
} else {
push @_, "linkcat_fulltitle(parent, title) AS title";
}
push @_, $DBH->strcat("'/links'", "linkcat_path(sn, id, parent)")
. " AS url";
$sql = "SELECT " . join(", ", @_) . " FROM linkcat"
. " WHERE linkcat_ischild($sn, sn)"
. " ORDER BY linkcat_fullord(parent, ord);\n";
$sth = $DBH->prepare($sql);
$sth->execute;
$CURRENT{"scatcount"} = $sth->rows;
for ($_ = 0; $_ < $CURRENT{"scatcount"}; $_++) {
$row = $sth->fetchrow_hashref;
$CURRENT{"scat$_" . "sn"} = $$row{"sn"};
$CURRENT{"scat$_" . "title"} = $$row{"title"};
$CURRENT{"scat$_" . "url"} = $$row{"url"};
}
# Obtain the belonging links list
@_ = qw();
push @_, "links.sn AS sn";
push @_, "links.title AS title";
push @_, "url AS url";
$sql = "SELECT " . join(", ", @_) . " FROM links"
. " INNER JOIN linkcatz ON linkcatz.link=links.sn"
. " WHERE linkcatz.cat=$sn"
. " ORDER BY title;\n";
$sth = $DBH->prepare($sql);
$sth->execute;
$CURRENT{"linkcount"} = $sth->rows;
for ($_ = 0; $_ < $CURRENT{"linkcount"}; $_++) {
$row = $sth->fetchrow_hashref;
$CURRENT{"link$_" . "sn"} = $$row{"sn"};
$CURRENT{"link$_" . "title"} = $$row{"title"};
$CURRENT{"link$_" . "url"} = $$row{"url"};
}
# OK
return;
}
# import_selparent: Import the selected parent into the retrieved form
sub import_selparent($) {
local ($_, %_);
my $FORM;
$FORM = $_[0];
if ( defined $GET->param("selsn")
&& check_sn_in ${$GET->param_fetch("selsn")}[0], "linkcat") {
$FORM->param("parent", $GET->param("selsn"));
$FORM->param("topmost", "false");
}
return;
}

View File

@@ -0,0 +1,236 @@
#! /usr/bin/perl -w
# History: Theory and Culture
# linkcatz.cgi: The related-link category membership administration.
# Copyright (c) 2004-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: 2004-11-02
use 5.008;
use strict;
use warnings;
use lib $ENV{"DOCUMENT_ROOT"} . qw(/magicat/lib/perl5);
use Selima::htc;
local $SIG{"__DIE__"} = \&http_500;
my $d = new Selima::Destroy;
# Prototype declaration
sub main();
sub check_get();
sub check_post();
sub html_page($);
sub fetch_curitem();
sub import_selcat($);
sub import_sellink($);
initenv(-restricted => 1,
-this_table => "linkcatz",
-dbi_lock => {"linkcatz" => LOCK_EX,
"linkcat" => LOCK_SH,
"links" => LOCK_SH},
-lastmod => 1,
-page_param => {"keywords" => N_("link categorization")});
main;
exit 0;
sub main() {
local ($_, %_);
my ($error, $success, $processor);
# If the request is a GET query
if ($ENV{"REQUEST_METHOD"} ne "POST") {
$error = check_get;
# If an error occurs
if (defined $error) {
html_page $error;
# Display the page
} else {
html_page retrieve_status;
}
# If a form was POSTed from the client
} else {
$error = check_post;
# If an error occurs
if (defined $error) {
error_redirect $error;
# Else, save the data
} else {
$processor = new Selima::Processor::LinkCatz($POST);
$success = $processor->process;
success_redirect $success;
}
}
return;
}
# check_get: Check the GET arguments
sub check_get() {
local ($_, %_);
my $error;
# A form is requested
if (is_form) {
$_ = form_type;
# A form to create a new item
if ($_ eq "new") {
# Nothing to check on a new form
# A form to edit a current item
} elsif ($_ eq "cur") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;
# A form to delete a current item
} elsif ($_ eq "del") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;
# Not a valid form
} else {
return {"msg"=>N_("Incorrect form: [_1]."),
"margs"=>[$_],
"isform"=>0};
}
}
# List handler handles its own error
# OK
return;
}
# check_post: Check the POSTed form
sub check_post() {
local ($_, %_);
my ($checker, $error);
$_ = form_type;
# A form to create a new item
if ($_ eq "new") {
# Run the checker
$checker = new Selima::Checker::LinkCatz(curform);
$checker->redir(qw(selcat delcat sellink dellink));
$error = $checker->check(qw(cat link));
return $error if defined $error;
# A form to edit a current item
} elsif ($_ eq "cur") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;
# Run the checker
$checker = new Selima::Checker::LinkCatz(curform);
$checker->redir(qw(del selcat delcat sellink dellink));
$error = $checker->check(qw(cat link));
return $error if defined $error;
# A form to delete a current item
} elsif ($_ eq "del") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;;
# Run the checker
$checker = new Selima::Checker::LinkCatz(curform);
$checker->redir(qw(cancel));
# Not a valid form
} else {
return {"msg"=>N_("Incorrect form: [_1]."),
"margs"=>[$_],
"isform"=>0};
}
# OK
return;
}
# html_page: Display the page
sub html_page($) {
local ($_, %_);
my ($status, $LIST, $FORM);
$status = $_[0];
# A form is requested
if (is_form $status) {
$FORM = new Selima::Form::LinkCatz($status);
html_header $FORM->{"title"};
html_errmsg $status;
$FORM->html;
html_footer;
# List the available items
} else {
$LIST = new Selima::List::LinkCatz;
html_header $LIST->{"title"}, $LIST->page_param;
html_errmsg $status;
$LIST->html;
html_footer;
}
return;
}
##################################
# Subroutines to manage the data #
##################################
# fetch_curitem: Fetch the current item
sub fetch_curitem() {
local ($_, %_);
my ($sn, $FORM);
# Return if fetched before
return if scalar(keys %CURRENT) > 0;
# Obtain the current form
$FORM = curform;
# No item specified
return {"msg"=>N_("Please select the categorization record."),
"isform"=>0}
if !defined $FORM->param("sn");
$sn = $FORM->param("sn");
# Find the record
%CURRENT = fetchrec $sn, $THIS_TABLE;
# If this record exist
return {"msg"=>N_("This categorization record does not exist anymore. Please select another one."),
"isform"=>0}
if scalar(keys %CURRENT) == 0;
# OK
return;
}
# import_selcat: Import the selected category into the retrieved form
sub import_selcat($) {
local ($_, %_);
my $FORM;
$FORM = $_[0];
$FORM->param("cat", $GET->param("selsn"))
if defined $GET->param("selsn")
&& check_sn_in ${$GET->param_fetch("selsn")}[0], "linkcat";
return;
}
# import_sellink: Import the selected link into the retrieved form
sub import_sellink($) {
local ($_, %_);
my $FORM;
$FORM = $_[0];
$FORM->param("link", $GET->param("selsn"))
if defined $GET->param("selsn")
&& check_sn_in ${$GET->param_fetch("selsn")}[0], "links";
return $FORM;
}

View File

@@ -0,0 +1,240 @@
#! /usr/bin/perl -w
# History: Theory and Culture
# links.cgi: The related-link administration.
# Copyright (c) 2004-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: 2004-11-02
use 5.008;
use strict;
use warnings;
use lib $ENV{"DOCUMENT_ROOT"} . qw(/magicat/lib/perl5);
use Selima::htc;
local $SIG{"__DIE__"} = \&http_500;
my $d = new Selima::Destroy;
# Prototype declaration
sub main();
sub check_get();
sub check_post();
sub html_page($);
sub fetch_curitem();
initenv(-restricted => 1,
-this_table => "links",
-dbi_lock => {"links" => LOCK_EX,
"linkcatz" => LOCK_EX,
"linkcat" => LOCK_SH},
-lastmod => 1,
-page_param => {"keywords" => N_("related links")});
main;
exit 0;
sub main() {
local ($_, %_);
my ($error, $success, $processor);
# If the request is a GET query
if ($ENV{"REQUEST_METHOD"} ne "POST") {
$error = check_get;
# If an error occurs
if (defined $error) {
html_page $error;
# Display the page
} else {
html_page retrieve_status;
}
# If a form was POSTed from the client
} else {
$error = check_post;
# If an error occurs
if (defined $error) {
error_redirect $error;
# Else, save the data
} else {
$processor = new Selima::Processor::Link($POST);
$success = $processor->process;
success_redirect $success;
}
}
return;
}
# check_get: Check the GET arguments
sub check_get() {
local ($_, %_);
my $error;
# A form is requested
if (is_form) {
$_ = form_type;
# A form to create a new item
if ($_ eq "new") {
# A form to edit a current item
} elsif ($_ eq "cur") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;
# A form to delete a current item
} elsif ($_ eq "del") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;
# Not a valid form
} else {
return {"msg"=>N_("Incorrect form: [_1]."),
"margs"=>[$_],
"isform"=>0};
}
}
# List handler handles its own error
# OK
return;
}
# check_post: Check the POSTed form
sub check_post() {
local ($_, %_);
my ($checker, $error);
$_ = form_type;
# A form to create a new item
if ($_ eq "new") {
# Run the checker
$checker = new Selima::Checker::Link(curform);
$error = $checker->check(qw(title title_2ln url icon
email addr tel fax dsc cats));
return $error if defined $error;
# A form to edit a current item
} elsif ($_ eq "cur") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;
# Run the checker
$checker = new Selima::Checker::Link(curform);
$checker->redir(qw(del));
$error = $checker->check(qw(title title_2ln url icon
email addr tel fax dsc cats));
return $error if defined $error;
# A form to delete a current item
} elsif ($_ eq "del") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;;
# Run the checker
$checker = new Selima::Checker::Link(curform);
$checker->redir(qw(cancel));
# Not a valid form
} else {
return {"msg"=>N_("Incorrect form: [_1]."),
"margs"=>[$_],
"isform"=>0};
}
# OK
return;
}
# html_page: Display the page
sub html_page($) {
local ($_, %_);
my ($status, $LIST, $FORM);
$status = $_[0];
# A form is requested
if (is_form $status) {
$FORM = new Selima::Form::Link($status);
html_header $FORM->{"title"};
html_errmsg $status;
$FORM->html;
html_footer;
# List the available items
} else {
$LIST = new Selima::List::Links;
html_header $LIST->{"title"}, $LIST->page_param;
html_errmsg $status;
$LIST->html;
html_footer;
}
return;
}
##################################
# Subroutines to manage the data #
##################################
# fetch_curitem: Fetch the current item
sub fetch_curitem() {
local ($_, %_);
my ($sn, $FORM, $sth, $sql, $row);
my ($lang, $lndb, $lndbdef, $title);
# Return if fetched before
return if scalar(keys %CURRENT) > 0;
# Obtain the current form
$FORM = curform;
# No item specified
return {"msg"=>N_("Please select the related link."),
"isform"=>0}
if !defined $FORM->param("sn");
$sn = $FORM->param("sn");
# Find the record
%CURRENT = fetchrec $sn, $THIS_TABLE;
# If this record exist
return {"msg"=>N_("This related link does not exist anymore. Please select another one."),
"isform"=>0}
if scalar(keys %CURRENT) == 0;
$lang = getlang;
$lndb = getlang LN_DATABASE;
$lndbdef = ln $DEFAULT_LANG, LN_DATABASE;
# Obtain the parent categories list
@_ = qw();
push @_, "linkcat.sn AS sn";
if (@ALL_LINGUAS > 1) {
$title = $lang eq $DEFAULT_LANG? "linkcat.title_$lndb":
"COALESCE(linkcat.title_$lndb, linkcat.title_$lndbdef)";
push @_, "linkcat_fulltitle('$lang', linkcat.parent, $title) AS title";
} else {
push @_, "linkcat_fulltitle(linkcat.parent, linkcat.title) AS title";
}
$sql = "SELECT " . join(", ", @_) . " FROM linkcat"
. " INNER JOIN linkcatz ON linkcatz.cat=linkcat.sn"
. " WHERE linkcatz.link=$sn"
. " ORDER BY linkcat_fullord(linkcat.parent, linkcat.ord);\n";
$sth = $DBH->prepare($sql);
$sth->execute;
$CURRENT{"catcount"} = $sth->rows;
for ($_ = 0; $_ < $CURRENT{"catcount"}; $_++) {
$row = $sth->fetchrow_hashref;
$CURRENT{"cat$_"} = $$row{"sn"};
$CURRENT{"cat$_" . "title"} = $$row{"title"};
}
# OK
return;
}

View File

@@ -0,0 +1,158 @@
#! /usr/bin/perl -w
# History: Theory and Culture
# logout.cgi: The log-out script.
# Copyright (c) 2004-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: 2004-10-16
use 5.008;
use strict;
use warnings;
use lib $ENV{"DOCUMENT_ROOT"} . qw(/magicat/lib/perl5);
use Selima::htc;
local $SIG{"__DIE__"} = \&http_500;
my $d = new Selima::Destroy;
# Prototype declaration
sub main();
sub check_get();
sub check_post();
sub html_page($);
sub html_logoutform();
sub html_relogin();
initenv(-dbi => DBI_NONE,
-lastmod => 1,
-page_param => {"keywords" => N_("log out")});
main;
exit 0;
sub main() {
local ($_, %_);
my ($error, $success, $processor);
# If the request is a GET query
if ($ENV{"REQUEST_METHOD"} ne "POST") {
$error = check_get;
# If an error occurs
if (defined $error) {
html_page $error;
# Display the page
} else {
html_page retrieve_status;
}
# If a form was POSTed from the client
} else {
$error = check_post;
# If an error occurs
if (defined $error) {
error_redirect $error;
# Else, save the data
} else {
$processor = new Selima::Processor::LogOut($POST);
$success = $processor->process;
success_redirect $success;
}
}
return;
}
# check_get: Check the GET arguments
sub check_get() {
local ($_, %_);
my $status;
# There is a result to display
$status = retrieve_status;
# Successfully logged out
if ( defined $status
&& exists $$status{"status"}
&& $$status{"status"} eq "success") {
# Nothing to check
return;
}
# Check if this user has logged in
unauth unless defined get_login_sn;
# OK
return;
}
# check_post: Check the POSTed form
sub check_post() {
local ($_, %_);
# Check if this user has logged in
unauth unless defined get_login_sn;
# OK
return;
}
# html_page: Display the page
sub html_page($) {
local ($_, %_);
my $status;
$status = $_[0];
# Not logged out yet
if (defined get_login_sn) {
html_header __("Log Out");
html_errmsg $status;
html_logoutform;
html_footer;
# Logged out
} else {
html_header __("Log Out");
html_errmsg $status;
html_relogin;
html_footer;
}
return;
}
##################################
# Subroutines to manage the data #
##################################
# html_logoutform: Display a form to log out
sub html_logoutform() {
local ($_, %_);
my ($msg, $submit);
$msg = h(__("Are you sure you want to log out?"));
$submit = h(__("Log out"));
print << "EOT";
<form action="$REQUEST_FILE" method="post">
<div>
<p>$msg</p>
<input type="submit" value="$submit" />
</div>
</form>
EOT
return;
}
# html_relogin: Display links to log in again
sub html_relogin() {
local ($_, %_);
$_ = h(__("Log in again."));
print << "EOT";
<p><a href="/magicat/cgi-bin/login.cgi">$_</a></p>
EOT
return;
}

View File

@@ -0,0 +1,345 @@
#! /usr/bin/perl -w
# History: Theory and Culture
# newslets.cgi: The newsletter administration.
# 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-28
use 5.008;
use strict;
use warnings;
use lib $ENV{"DOCUMENT_ROOT"} . qw(/magicat/lib/perl5);
use Selima::htc;
local $SIG{"__DIE__"} = \&http_500;
my $d = new Selima::Destroy;
# Prototype declaration
sub main();
sub check_get();
sub check_post();
sub html_page($);
sub fetch_curitem();
sub fetch_index($$$);
use Date::Parse qw(str2time);
initenv(-restricted => 1,
-this_table => "newslets",
-dbi_lock => {"newslets" => LOCK_EX,
"nlindex" => LOCK_EX,
"nlarts" => LOCK_SH},
-lastmod => 1,
-page_param => {"keywords" => N_("newsletters")});
main;
exit 0;
sub main() {
local ($_, %_);
my ($error, $success, $processor);
# If the request is a GET query
if ($ENV{"REQUEST_METHOD"} ne "POST") {
$error = check_get;
# If an error occurs
if (defined $error) {
html_page $error;
# Display the page
} else {
html_page retrieve_status;
}
# If a form was POSTed from the client
} else {
$error = check_post;
# If an error occurs
if (defined $error) {
error_redirect $error;
# Else, save the data
} else {
$processor = new Selima::htc::Processor::Newslet($POST);
$success = $processor->process;
success_redirect $success;
}
}
return;
}
# check_get: Check the GET arguments
sub check_get() {
local ($_, %_);
my $error;
# A form is requested
if (is_form) {
$_ = form_type;
# A form to create a new item
if ($_ eq "new") {
# A form to edit a current item
} elsif ($_ eq "cur") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;
# A form to delete a current item
} elsif ($_ eq "del") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;
# A form to preview a submitted item
} elsif ($_ eq "preview") {
my ($sql, $sth, $count, $row, @allno);
# Check at fetch_preview()
$error = fetch_preview;
return $error if defined $error;
$PREVIEW{"path"} = sprintf "/newsletters/%03d/", $PREVIEW{"no"};
$PREVIEW{"date"} = str2time $PREVIEW{"date"};
$PREVIEW{"title"} = newslet_textno($PREVIEW{"no"}) . " " . $PREVIEW{"title"};
# Obtain all the pages
@_ = qw();
push @_, "sn!=" . $PREVIEW{"sn"} if exists $PREVIEW{"sn"};
push @_, "NOT hid";
$sql = "SELECT no FROM newslets"
. " WHERE " . join(" AND ", @_)
. " ORDER BY no;\n";
$sth = $DBH->prepare($sql);
$sth->execute;
$count = $sth->rows;
for (my $i = 0, @allno = qw(); $i < $count; $i++) {
push @allno, ${$sth->fetch}[0];
}
undef $sth;
# Insert this page
for ($_ = 0; $_ < @allno; $_++) {
last if $PREVIEW{"no"} < $allno[$_];
}
@allno = (
@allno[0..$_-1],
$PREVIEW{"no"},
@allno[$_..$#allno]);
$PREVIEW{"allno"} = [@allno];
# Not a valid form
} else {
return {"msg"=>N_("Incorrect form: [_1]."),
"margs"=>[$_],
"isform"=>0};
}
}
# List handler handles its own error
# OK
return;
}
# check_post: Check the POSTed form
sub check_post() {
local ($_, %_);
my ($checker, $error);
$_ = form_type;
# A form to create a new item
if ($_ eq "new") {
# Run the checker
$checker = new Selima::htc::Checker::Newslet(curform);
$checker->redir(qw(selndxart delndxart));
$error = $checker->check(qw(no date title credits kw));
return $error if defined $error;
# A form to edit a current item
} elsif ($_ eq "cur") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;
# Run the checker
$checker = new Selima::htc::Checker::Newslet(curform);
$checker->redir(qw(del selndxart delndxart));
$error = $checker->check(qw(no date title credits kw));
return $error if defined $error;
# A form to delete a current item
} elsif ($_ eq "del") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;;
# Run the checker
$checker = new Selima::htc::Checker::Newslet(curform);
$checker->redir(qw(cancel));
# Not a valid form
} else {
return {"msg"=>N_("Incorrect form: [_1]."),
"margs"=>[$_],
"isform"=>0};
}
# OK
return;
}
# html_page: Display the page
sub html_page($) {
local ($_, %_);
my ($status, $LIST, $FORM);
$status = $_[0];
# A form is requested
if (is_form $status) {
# A form to preview a submitted item
if (form_type eq "preview") {
html_preview;
} else {
$FORM = new Selima::htc::Form::Newslet($status);
html_header $FORM->{"title"};
html_errmsg $status;
$FORM->html;
html_footer;
}
# List the available items
} else {
$LIST = new Selima::htc::List::Newslets;
html_header $LIST->{"title"}, $LIST->page_param;
html_errmsg $status;
$LIST->html;
html_footer;
}
return;
}
##################################
# Subroutines to manage the data #
##################################
# fetch_curitem: Fetch the current item
sub fetch_curitem() {
local ($_, %_);
my ($sn, $FORM, $sth, $sql, $row);
# Return if fetched before
return if scalar(keys %CURRENT) > 0;
# Obtain the current form
$FORM = curform;
# No item specified
return {"msg"=>N_("Please select the newsletter."),
"isform"=>0}
if !defined $FORM->param("sn");
$sn = $FORM->param("sn");
# Find the record
%CURRENT = fetchrec $sn, $THIS_TABLE;
# If this record exist
return {"msg"=>N_("This newsletter does not exist anymore. Please select another one."),
"isform"=>0}
if scalar(keys %CURRENT) == 0;
# Obtain the date
$CURRENT{"date"} = fmtdate $CURRENT{"date"};
# Obtain the belonging index items list
@_ = qw();
push @_, "sn AS sn";
push @_, "art AS art";
push @_, "title AS title";
$sql = "SELECT " . join(", ", @_) . " FROM nlindex"
. " WHERE newslet=$sn"
. " AND parent IS NULL"
. " ORDER BY ord;\n";
$sth = $DBH->prepare($sql);
$sth->execute;
$CURRENT{"ndxcount"} = $sth->rows;
for ($_ = 0; $_ < $CURRENT{"ndxcount"}; $_++) {
$row = $sth->fetchrow_hashref;
$CURRENT{"ndx$_"} = 1;
$CURRENT{"ndx$_" . "sn"} = $$row{"sn"};
$CURRENT{"ndx$_" . "art"} = $$row{"art"};
$CURRENT{"ndx$_" . "title"} = $$row{"title"};
}
for ($_ = 0; $_ < $CURRENT{"ndxcount"}; $_++) {
fetch_index $sn, $CURRENT{"ndx$_" . "sn"}, "ndx$_" . "sub";
}
# Obtain the belonging articles list
@_ = qw();
push @_, "sn AS sn";
push @_, "title AS title";
$sql = "SELECT " . join(", ", @_) . " FROM nlarts"
. " WHERE newslet=$sn"
. " ORDER BY ord;\n";
$sth = $DBH->prepare($sql);
$sth->execute;
$CURRENT{"artcount"} = $sth->rows;
for ($_ = 0; $_ < $CURRENT{"artcount"}; $_++) {
$row = $sth->fetchrow_hashref;
$CURRENT{"art$_" . "sn"} = $$row{"sn"};
$CURRENT{"art$_" . "title"} = $$row{"title"};
}
# OK
return;
}
# fetch_index: Fetch the index of the current item
sub fetch_index($$$) {
local ($_, %_);
my ($sn, $parent, $prefix, $sql, $sth, $count, $row);
($sn, $parent, $prefix) = @_;
# Find the items
@_ = qw();
push @_, "sn AS sn";
push @_, "art AS art";
push @_, "title AS title";
$sql = "SELECT " . join(", ", @_) . " FROM nlindex"
. " WHERE newslet=$sn"
. " AND parent=$parent"
. " ORDER BY ord;\n";
$sth = $DBH->prepare($sql);
$sth->execute;
$count = $sth->rows;
return if $count == 0;
$CURRENT{$prefix} = 1;
$CURRENT{$prefix . "count"} = $count;
for ($_ = 0; $_ < $CURRENT{$prefix . "count"}; $_++) {
$row = $sth->fetchrow_hashref;
$CURRENT{"$prefix$_"} = 1;
$CURRENT{"$prefix$_" . "sn"} = $$row{"sn"};
$CURRENT{"$prefix$_" . "art"} = $$row{"art"};
$CURRENT{"$prefix$_" . "title"} = $$row{"title"};
}
undef $sth;
# Find the subitems
for ($_ = 0; $_ < $CURRENT{$prefix . "count"}; $_++) {
fetch_index $sn, $CURRENT{"$prefix$_" . "sn"}, "$prefix$_" . "sub";
}
return;
}
# import_selndxart: Import the selected index item article into the retrieved form
sub import_selndxart($) {
local ($_, %_);
my $FORM;
$FORM = $_[0];
$FORM->param($FORM->param("caller_index"), $GET->param("selsn"))
if defined $FORM->param("caller_index")
&& defined $GET->param("selsn")
&& check_sn_in ${$GET->param_fetch("selsn")}[0], "nlarts";
return;
}

View File

@@ -0,0 +1,226 @@
#! /usr/bin/perl -w
# History: Theory and Culture
# nlarts.cgi: The newsletter article administration.
# 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-30
use 5.008;
use strict;
use warnings;
use lib $ENV{"DOCUMENT_ROOT"} . qw(/magicat/lib/perl5);
use Selima::htc;
local $SIG{"__DIE__"} = \&http_500;
my $d = new Selima::Destroy;
# Prototype declaration
sub main();
sub check_get();
sub check_post();
sub html_page($);
sub fetch_curitem();
sub import_selparent($);
initenv(-restricted => 1,
-this_table => "nlarts",
-dbi_lock => {"nlarts" => LOCK_EX,
"newslets" => LOCK_SH,
"nlindex" => LOCK_SH},
-lastmod => 0,
-page_param => {"keywords" => N_("newsletter articles")});
main;
exit 0;
sub main() {
local ($_, %_);
my ($error, $success, $processor);
# If the request is a GET query
if ($ENV{"REQUEST_METHOD"} ne "POST") {
$error = check_get;
# If an error occurs
if (defined $error) {
html_page $error;
# Display the page
} else {
html_page retrieve_status;
}
# If a form was POSTed from the client
} else {
$error = check_post;
# If an error occurs
if (defined $error) {
error_redirect $error;
# Else, save the data
} else {
$processor = new Selima::htc::Processor::NLArt($POST);
$success = $processor->process;
success_redirect $success;
}
}
return;
}
# check_get: Check the GET arguments
sub check_get() {
local ($_, %_);
my $error;
# A form is requested
if (is_form) {
$_ = form_type;
# A form to create a new item
if ($_ eq "new") {
# Nothing to check on a new form
# A form to edit a current item
} elsif ($_ eq "cur") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;
# A form to delete a current item
} elsif ($_ eq "del") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;
# Not a valid form
} else {
return {"msg"=>N_("Incorrect form: [_1]."),
"margs"=>[$_],
"isform"=>0};
}
}
# List handler handles its own error
# OK
return;
}
# check_post: Check the POSTed form
sub check_post() {
local ($_, %_);
my ($checker, $error);
$_ = form_type;
# A form to create a new item
if ($_ eq "new") {
# Run the checker
$checker = new Selima::htc::Checker::NLArt(curform);
$checker->redir(qw(selnewslet delnewslet));
$error = $checker->check(qw(newslet ord title title_h author
email authors body annots kw));
return $error if defined $error;
# A form to edit a current item
} elsif ($_ eq "cur") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;
# Run the checker
$checker = new Selima::htc::Checker::NLArt(curform);
$checker->redir(qw(del selnewslet delnewslet));
$error = $checker->check(qw(newslet ord title title_h author
email authors body annots kw));
return $error if defined $error;
# A form to delete a current item
} elsif ($_ eq "del") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;
# Run the checker
$checker = new Selima::htc::Checker::NLArt(curform);
$checker->redir(qw(cancel));
# Not a valid form
} else {
return {"msg"=>N_("Incorrect form: [_1]."),
"margs"=>[$_],
"isform"=>0};
}
# OK
return;
}
# html_page: Display the page
sub html_page($) {
local ($_, %_);
my ($status, $LIST, $FORM);
$status = $_[0];
# A form is requested
if (is_form $status) {
$FORM = new Selima::htc::Form::NLArt($status);
html_header $FORM->{"title"};
html_errmsg $status;
$FORM->html;
html_footer;
# List the available items
} else {
$LIST = new Selima::htc::List::NLArts;
html_header $LIST->{"title"}, $LIST->page_param;
html_errmsg $status;
$LIST->html;
html_footer;
}
return;
}
##################################
# Subroutines to manage the data #
##################################
# fetch_curitem: Fetch the current item
sub fetch_curitem() {
local ($_, %_);
my ($sn, $FORM, $sth, $sql, $row);
# Return if fetched before
return if scalar(keys %CURRENT) > 0;
# Obtain the current form
$FORM = curform;
# No item specified
return {"msg"=>N_("Please select the article."),
"isform"=>0}
if !defined $FORM->param("sn");
$sn = $FORM->param("sn");
# Find the record
%CURRENT = fetchrec $sn, $THIS_TABLE;
# If this record exist
return {"msg"=>N_("This article does not exist anymore. Please select another one."),
"isform"=>0}
if scalar(keys %CURRENT) == 0;
# OK
return;
}
# import_selnewslet: Import the selected newsletter into the retrieved form
sub import_selnewslet($) {
local ($_, %_);
my $FORM;
$FORM = $_[0];
$FORM->param("newslet", $GET->param("selsn"))
if defined $GET->param("selsn")
&& check_sn_in ${$GET->param_fetch("selsn")}[0], "newslets";
return;
}

View File

@@ -0,0 +1,273 @@
#! /usr/bin/perl -w
# History: Theory and Culture
# nlindex.cgi: The newsletter index administration.
# Copyright (c) 2004-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: 2004-11-02
use 5.008;
use strict;
use warnings;
use lib $ENV{"DOCUMENT_ROOT"} . qw(/magicat/lib/perl5);
use Selima::htc;
local $SIG{"__DIE__"} = \&http_500;
my $d = new Selima::Destroy;
# Prototype declaration
sub main();
sub check_get();
sub check_post();
sub html_page($);
sub fetch_curitem();
sub import_selparent($);
initenv(-restricted => 1,
-this_table => "nlindex",
-dbi_lock => {"nlindex" => LOCK_EX,
"newslets" => LOCK_SH,
"nlarts" => LOCK_SH},
-lastmod => 0,
-page_param => {"keywords" => N_("newsletter indices")});
main;
exit 0;
sub main() {
local ($_, %_);
my ($error, $success, $processor);
# If the request is a GET query
if ($ENV{"REQUEST_METHOD"} ne "POST") {
$error = check_get;
# If an error occurs
if (defined $error) {
html_page $error;
# Display the page
} else {
html_page retrieve_status;
}
# If a form was POSTed from the client
} else {
$error = check_post;
# If an error occurs
if (defined $error) {
error_redirect $error;
# Else, save the data
} else {
$processor = new Selima::htc::Processor::NLIndex($POST);
$success = $processor->process;
success_redirect $success;
}
}
return;
}
# check_get: Check the GET arguments
sub check_get() {
local ($_, %_);
my $error;
# A form is requested
if (is_form) {
$_ = form_type;
# A form to create a new item
if ($_ eq "new") {
# Nothing to check on a new form
# A form to edit a current item
} elsif ($_ eq "cur") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;
# A form to delete a current item
} elsif ($_ eq "del") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;
return {"msg"=>N_("This index item has [numerate,_1,a subitem,subitems]. It cannot be deleted. To delete the index item, [numerate,_1,its subitem,all of its subitems] must first be deleted."),
"margs"=>[$CURRENT{"subitemcount"}],
"isform"=>0}
if $CURRENT{"subitemcount"} > 0;
# Not a valid form
} else {
return {"msg"=>N_("Incorrect form: [_1]."),
"margs"=>[$_],
"isform"=>0};
}
}
# List handler handles its own error
# OK
return;
}
# check_post: Check the POSTed form
sub check_post() {
local ($_, %_);
my ($checker, $error);
$_ = form_type;
# A form to create a new item
if ($_ eq "new") {
# Run the checker
$checker = new Selima::htc::Checker::NLIndex(curform);
$checker->redir(qw(selnewslet delnewslet selparent delparent selart delart));
$error = $checker->check(qw(newslet parent ord art title));
return $error if defined $error;
# A form to edit a current item
} elsif ($_ eq "cur") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;
# Run the checker
$checker = new Selima::htc::Checker::NLIndex(curform);
$checker->redir(qw(del selnewslet delnewslet selparent delparent selart delart));
$error = $checker->check(qw(newslet parent ord art title));
return $error if defined $error;
# A form to delete a current item
} elsif ($_ eq "del") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;
# Run the checker
$checker = new Selima::htc::Checker::NLIndex(curform);
$checker->redir(qw(cancel));
return {"msg"=>N_("This index item has [numerate,_1,a subitem,subitems]. It cannot be deleted. To delete the index item, [numerate,_1,its subitem,all of its subitems] must first be deleted."),
"margs"=>[$CURRENT{"subitemcount"}],
"isform"=>0}
if $CURRENT{"subitemcount"} > 0;
# Not a valid form
} else {
return {"msg"=>N_("Incorrect form: [_1]."),
"margs"=>[$_],
"isform"=>0};
}
# OK
return;
}
# html_page: Display the page
sub html_page($) {
local ($_, %_);
my ($status, $LIST, $FORM);
$status = $_[0];
# A form is requested
if (is_form $status) {
$FORM = new Selima::htc::Form::NLIndex($status);
html_header $FORM->{"title"};
html_errmsg $status;
$FORM->html;
html_footer;
# List the available items
} else {
$LIST = new Selima::htc::List::NLIndex;
html_header $LIST->{"title"}, $LIST->page_param;
html_errmsg $status;
$LIST->html;
html_footer;
}
return;
}
##################################
# Subroutines to manage the data #
##################################
# fetch_curitem: Fetch the current item
sub fetch_curitem() {
local ($_, %_);
my ($sn, $FORM, $sth, $sql, $row);
# Return if fetched before
return if scalar(keys %CURRENT) > 0;
# Obtain the current form
$FORM = curform;
# No item specified
return {"msg"=>N_("Please select the index item."),
"isform"=>0}
if !defined $FORM->param("sn");
$sn = $FORM->param("sn");
# Find the record
%CURRENT = fetchrec $sn, $THIS_TABLE;
# If this record exist
return {"msg"=>N_("This index item does not exist anymore. Please select another one."),
"isform"=>0}
if scalar(keys %CURRENT) == 0;
# Obtain the belonging subitems list
@_ = qw();
push @_, "nlindex.sn AS sn";
push @_, "nlindex_fulltitle(parent, COALESCE(nlindex.title, nlarts.title)) AS title";
$sql = "SELECT " . join(", ", @_) . " FROM nlindex"
. " LEFT JOIN nlarts ON nlindex.art=nlarts.sn"
. " WHERE nlindex_ischild($sn, nlindex.sn)"
. " ORDER BY nlindex_fullord(nlindex.parent, nlindex.ord);\n";
$sth = $DBH->prepare($sql);
$sth->execute;
$CURRENT{"subitemcount"} = $sth->rows;
for ($_ = 0; $_ < $CURRENT{"subitemcount"}; $_++) {
$row = $sth->fetchrow_hashref;
$CURRENT{"subitem$_" . "sn"} = $$row{"sn"};
$CURRENT{"subitem$_" . "title"} = $$row{"title"};
}
# OK
return;
}
# import_selnewslet: Import the selected newsletter into the retrieved form
sub import_selnewslet($) {
local ($_, %_);
my $FORM;
$FORM = $_[0];
$FORM->param("newslet", $GET->param("selsn"))
if defined $GET->param("selsn")
&& check_sn_in ${$GET->param_fetch("selsn")}[0], "newslets";
return;
}
# import_selparent: Import the selected parent into the retrieved form
sub import_selparent($) {
local ($_, %_);
my $FORM;
$FORM = $_[0];
if ( defined $GET->param("selsn")
&& check_sn_in ${$GET->param_fetch("selsn")}[0], "nlindex") {
$FORM->param("parent", $GET->param("selsn"));
$FORM->param("topmost", "false");
}
return;
}
# import_selart: Import the selected article into the retrieved form
sub import_selart($) {
local ($_, %_);
my $FORM;
$FORM = $_[0];
$FORM->param("art", $GET->param("selsn"))
if defined $GET->param("selsn")
&& check_sn_in ${$GET->param_fetch("selsn")}[0], "nlarts";
return;
}

View File

@@ -0,0 +1,221 @@
#! /usr/bin/perl -w
# History: Theory and Culture
# pages.cgi: The web page administration.
# 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-03
use 5.008;
use strict;
use warnings;
use lib $ENV{"DOCUMENT_ROOT"} . qw(/magicat/lib/perl5);
use Selima::htc;
local $SIG{"__DIE__"} = \&http_500;
my $d = new Selima::Destroy;
# Prototype declaration
sub main();
sub check_get();
sub check_post();
sub html_page($);
sub fetch_curitem();
initenv(-restricted => 1,
-this_table => "pages",
-dbi_lock => {"pages" => LOCK_EX},
-lastmod => 1,
-page_param => {"keywords" => N_("pages")});
main;
exit 0;
sub main() {
local ($_, %_);
my ($error, $success, $processor);
# If the request is a GET query
if ($ENV{"REQUEST_METHOD"} ne "POST") {
$error = check_get;
# If an error occurs
if (defined $error) {
html_page $error;
# Display the page
} else {
html_page retrieve_status;
}
# If a form was POSTed from the client
} else {
$error = check_post;
# If an error occurs
if (defined $error) {
error_redirect $error;
# Else, save the data
} else {
$processor = new Selima::Processor::Page($POST);
$success = $processor->process;
success_redirect $success;
}
}
return;
}
# check_get: Check the GET arguments
sub check_get() {
local ($_, %_);
my $error;
# A form is requested
if (is_form) {
$_ = form_type;
# A form to create a new item
if ($_ eq "new") {
# Nothing to check on a new form
# A form to edit a current item
} elsif ($_ eq "cur") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;
# A form to delete a current item
} elsif ($_ eq "del") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;
# A form to preview a submitted item
} elsif ($_ eq "preview") {
# Check at fetch_preview()
$error = fetch_preview;
return $error if defined $error;
# Not a valid form
} else {
return {"msg"=>N_("Incorrect form: [_1]."),
"margs"=>[$_],
"isform"=>0};
}
}
# List handler handles its own error
# OK
return;
}
# check_post: Check the POSTed form
sub check_post() {
local ($_, %_);
my ($checker, $error);
$_ = form_type;
# A form to create a new item
if ($_ eq "new") {
# Run the checker
$checker = new Selima::Checker::Page(curform);
$error = $checker->check(qw(path ord title body kw));
return $error if defined $error;
# A form to edit a current item
} elsif ($_ eq "cur") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;
# Run the checker
$checker = new Selima::Checker::Page(curform);
$checker->redir(qw(del));
$error = $checker->check(qw(path ord title body kw));
return $error if defined $error;
# A form to delete a current item
} elsif ($_ eq "del") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;;
# Run the checker
$checker = new Selima::Checker::Page(curform);
$checker->redir(qw(cancel));
# Not a valid form
} else {
return {"msg"=>N_("Incorrect form: [_1]."),
"margs"=>[$_],
"isform"=>0};
}
# OK
return;
}
# html_page: Display the page
sub html_page($) {
local ($_, %_);
my ($status, $LIST, $FORM);
$status = $_[0];
# A form is requested
if (is_form $status) {
# A form to preview a submitted item
if (form_type eq "preview") {
html_preview;
} else {
$FORM = new Selima::Form::Page($status);
html_header $FORM->{"title"};
html_errmsg $status;
$FORM->html;
html_footer;
}
# List the available items
} else {
$LIST = new Selima::List::Pages;
html_header $LIST->{"title"}, $LIST->page_param;
html_errmsg $status;
$LIST->html;
html_footer;
}
return;
}
##################################
# Subroutines to manage the data #
##################################
# fetch_curitem: Fetch the current item
sub fetch_curitem() {
local ($_, %_);
my ($sn, $FORM);
# Return if fetched before
return if scalar(keys %CURRENT) > 0;
# Obtain the current form
$FORM = curform;
# No item specified
return {"msg"=>N_("Please select the page."),
"isform"=>0}
if !defined $FORM->param("sn");
$sn = $FORM->param("sn");
# Find the record
%CURRENT = fetchrec $sn, $THIS_TABLE;
# If this record exist
return {"msg"=>N_("This page does not exist anymore. Please select another one."),
"isform"=>0}
if scalar(keys %CURRENT) == 0;
# OK
return;
}

View File

@@ -0,0 +1,105 @@
#! /usr/bin/perl -w
# History: Theory and Culture
# rebuild.cgi: The web page rebuilder.
# 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-04
use 5.008;
use strict;
use warnings;
use lib $ENV{"DOCUMENT_ROOT"} . qw(/magicat/lib/perl5);
use Selima::htc;
local $SIG{"__DIE__"} = \&http_500;
my $d = new Selima::Destroy;
# Prototype declaration
sub main();
sub check_get();
sub check_post();
sub html_page($);
initenv(-restricted => 1,
-lastmod => 1,
-page_param => {"keywords" => N_("rebuild pages")});
main;
exit 0;
sub main() {
local ($_, %_);
my ($error, $success, $processor);
# If the request is a GET query
if ($ENV{"REQUEST_METHOD"} ne "POST") {
$error = check_get;
# If an error occurs
if (defined $error) {
html_page $error;
# Display the page
} else {
html_page retrieve_status;
}
# If a form was POSTed from the client
} else {
$error = check_post;
# If an error occurs
if (defined $error) {
error_redirect $error;
# Else, save the data
} else {
$processor = new Selima::Processor::Rebuild($POST);
$success = $processor->process;
success_redirect $success;
}
}
return;
}
# check_get: Check the GET arguments
sub check_get() {
# Nothing to check here
# OK
return;
}
# check_post: Check the POSTed form
sub check_post() {
local ($_, %_);
my ($checker, $error);
# Run the checker
$checker = new Selima::Checker::Rebuild(curform);
$error = $checker->check(qw(type));
return $error if defined $error;
# OK
return;
}
# html_page: Display the page
sub html_page($) {
local ($_, %_);
my ($status, $FORM);
$status = $_[0];
$FORM = new Selima::Form::Rebuild($status);
html_header $FORM->{"title"};
html_errmsg $status;
$FORM->html;
html_footer;
return;
}

View File

@@ -0,0 +1,223 @@
#! /usr/bin/perl -w
# History: Theory and Culture
# scptpriv.cgi: The script privilege administration.
# Copyright (c) 2004-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: 2004-10-16
use 5.008;
use strict;
use warnings;
use lib $ENV{"DOCUMENT_ROOT"} . qw(/magicat/lib/perl5);
use Selima::htc;
local $SIG{"__DIE__"} = \&http_500;
my $d = new Selima::Destroy;
# Prototype declaration
sub main();
sub check_get();
sub check_post();
sub html_page($);
sub fetch_curitem();
sub import_selgrp($);
initenv(-restricted => 1,
-this_table => "scptpriv",
-dbi_lock => {"scptpriv" => LOCK_EX,
"groups" => LOCK_SH},
-lastmod => 1,
-page_param => {"keywords" => N_("script privilege")});
main;
exit 0;
sub main() {
local ($_, %_);
my ($error, $success, $processor);
# If the request is a GET query
if ($ENV{"REQUEST_METHOD"} ne "POST") {
$error = check_get;
# If an error occurs
if (defined $error) {
html_page $error;
# Display the page
} else {
html_page retrieve_status;
}
# If a form was POSTed from the client
} else {
$error = check_post;
# If an error occurs
if (defined $error) {
error_redirect $error;
# Else, save the data
} else {
$processor = new Selima::Processor::ScptPriv($POST);
$success = $processor->process;
success_redirect $success;
}
}
return;
}
# check_get: Check the GET arguments
sub check_get() {
local ($_, %_);
my $error;
# A form is requested
if (is_form) {
$_ = form_type;
# A form to create a new item
if ($_ eq "new") {
# Nothing to check on a new form
# A form to edit a current item
} elsif ($_ eq "cur") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;
# A form to delete a current item
} elsif ($_ eq "del") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;
# Not a valid form
} else {
return {"msg"=>N_("Incorrect form: [_1]."),
"margs"=>[$_],
"isform"=>0};
}
}
# List handler handles its own error
# OK
return;
}
# check_post: Check the POSTed form
sub check_post() {
local ($_, %_);
my ($checker, $error);
$_ = form_type;
# A form to create a new item
if ($_ eq "new") {
# Run the checker
$checker = new Selima::Checker::ScptPriv(curform);
$checker->redir(qw(selgrp delgrp));
$error = $checker->check(qw(script grp));
return $error if defined $error;
# A form to edit a current item
} elsif ($_ eq "cur") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;
# Run the checker
$checker = new Selima::Checker::ScptPriv(curform);
$checker->redir(qw(del selgrp delgrp));
$error = $checker->check(qw(script grp));
return $error if defined $error;
# A form to delete a current item
} elsif ($_ eq "del") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;;
# Run the checker
$checker = new Selima::Checker::ScptPriv(curform);
$checker->redir(qw(cancel));
# Not a valid form
} else {
return {"msg"=>N_("Incorrect form: [_1]."),
"margs"=>[$_],
"isform"=>0};
}
# OK
return;
}
# html_page: Display the page
sub html_page($) {
local ($_, %_);
my ($status, $LIST, $FORM);
$status = $_[0];
# A form is requested
if (is_form $status) {
$FORM = new Selima::Form::ScptPriv($status);
html_header $FORM->{"title"};
html_errmsg $status;
$FORM->html;
html_footer;
# List the available items
} else {
$LIST = new Selima::List::ScptPriv;
html_header $LIST->{"title"}, $LIST->page_param;
html_errmsg $status;
$LIST->html;
html_footer;
}
return;
}
##################################
# Subroutines to manage the data #
##################################
# fetch_curitem: Fetch the current item
sub fetch_curitem() {
local ($_, %_);
my ($sn, $FORM);
# Return if fetched before
return if scalar(keys %CURRENT) > 0;
# Obtain the current form
$FORM = curform;
# No item specified
return {"msg"=>N_("Please select the script privilege record."),
"isform"=>0}
if !defined $FORM->param("sn");
$sn = $FORM->param("sn");
# Find the record
%CURRENT = fetchrec $sn, $THIS_TABLE;
# If this record exist
return {"msg"=>N_("This script privilege record does not exist anymore. Please select another one."),
"isform"=>0}
if scalar(keys %CURRENT) == 0;
# OK
return;
}
# import_selgrp: Import the selected group into the retrieved form
sub import_selgrp($) {
local ($_, %_);
my $FORM;
$FORM = $_[0];
$FORM->param("grp", $GET->param("selsn"))
if defined $GET->param("selsn")
&& check_sn_in ${$GET->param_fetch("selsn")}[0], "groups";
return;
}

View File

@@ -0,0 +1,40 @@
#! /usr/bin/perl -w
# History: Theory and Culture
# test.cgi: The test script.
# Copyright (c) 2004-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: 2004-11-02
use 5.008;
use utf8;
use strict;
use warnings;
use lib $ENV{"DOCUMENT_ROOT"} . qw(/magicat/lib/perl5);
use Selima::htc;
local $SIG{"__DIE__"} = \&http_500;
my $r = shift;
my $d = new Selima::Destroy;
# Prototype declaration
use Time::HiRes qw();
initenv;
$CONTENT_TYPE = "text/plain";
printf "[%s] Done. %0.10f seconds elapsed.\n",
fmttime, Time::HiRes::time-$T_START;
exit 0;
no utf8;

View File

@@ -0,0 +1,236 @@
#! /usr/bin/perl -w
# History: Theory and Culture
# usermem.cgi: The user-to-group membership administration.
# Copyright (c) 2004-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: 2004-10-16
use 5.008;
use strict;
use warnings;
use lib $ENV{"DOCUMENT_ROOT"} . qw(/magicat/lib/perl5);
use Selima::htc;
local $SIG{"__DIE__"} = \&http_500;
my $d = new Selima::Destroy;
# Prototype declaration
sub main();
sub check_get();
sub check_post();
sub html_page($);
sub fetch_curitem();
sub import_selgrp($);
sub import_selmember($);
initenv(-restricted => 1,
-this_table => "usermem",
-dbi_lock => {"usermem" => LOCK_EX,
"groups" => LOCK_SH,
"users AS usrmembers" => LOCK_SH},
-lastmod => 1,
-page_param => {"keywords" => N_("user membership")});
main;
exit 0;
sub main() {
local ($_, %_);
my ($error, $success, $processor);
# If the request is a GET query
if ($ENV{"REQUEST_METHOD"} ne "POST") {
$error = check_get;
# If an error occurs
if (defined $error) {
html_page $error;
# Display the page
} else {
html_page retrieve_status;
}
# If a form was POSTed from the client
} else {
$error = check_post;
# If an error occurs
if (defined $error) {
error_redirect $error;
# Else, save the data
} else {
$processor = new Selima::Processor::UserMem($POST);
$success = $processor->process;
success_redirect $success;
}
}
return;
}
# check_get: Check the GET arguments
sub check_get() {
local ($_, %_);
my $error;
# A form is requested
if (is_form) {
$_ = form_type;
# A form to create a new item
if ($_ eq "new") {
# Nothing to check on a new form
# A form to edit a current item
} elsif ($_ eq "cur") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;
# A form to delete a current item
} elsif ($_ eq "del") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;
# Not a valid form
} else {
return {"msg"=>N_("Incorrect form: [_1]."),
"margs"=>[$_],
"isform"=>0};
}
}
# List handler handles its own error
# OK
return;
}
# check_post: Check the POSTed form
sub check_post() {
local ($_, %_);
my ($checker, $error);
$_ = form_type;
# A form to create a new item
if ($_ eq "new") {
# Run the checker
$checker = new Selima::Checker::UserMem(curform);
$checker->redir(qw(selgrp delgrp selmember delmember));
$error = $checker->check(qw(grp member));
return $error if defined $error;
# A form to edit a current item
} elsif ($_ eq "cur") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;
# Run the checker
$checker = new Selima::Checker::UserMem(curform);
$checker->redir(qw(del selgrp delgrp selmember delmember));
$error = $checker->check(qw(grp member));
return $error if defined $error;
# A form to delete a current item
} elsif ($_ eq "del") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;;
# Run the checker
$checker = new Selima::Checker::UserMem(curform);
$checker->redir(qw(cancel));
# Not a valid form
} else {
return {"msg"=>N_("Incorrect form: [_1]."),
"margs"=>[$_],
"isform"=>0};
}
# OK
return;
}
# html_page: Display the page
sub html_page($) {
local ($_, %_);
my ($status, $LIST, $FORM);
$status = $_[0];
# A form is requested
if (is_form $status) {
$FORM = new Selima::Form::UserMem($status);
html_header $FORM->{"title"};
html_errmsg $status;
$FORM->html;
html_footer;
# List the available items
} else {
$LIST = new Selima::List::UserMem;
html_header $LIST->{"title"}, $LIST->page_param;
html_errmsg $status;
$LIST->html;
html_footer;
}
return;
}
##################################
# Subroutines to manage the data #
##################################
# fetch_curitem: Fetch the current item
sub fetch_curitem() {
local ($_, %_);
my ($sn, $FORM);
# Return if fetched before
return if scalar(keys %CURRENT) > 0;
# Obtain the current form
$FORM = curform;
# No item specified
return {"msg"=>N_("Please select the membership record."),
"isform"=>0}
if !defined $FORM->param("sn");
$sn = $FORM->param("sn");
# Find the record
%CURRENT = fetchrec $sn, $THIS_TABLE;
# If this record exist
return {"msg"=>N_("This membership record does not exist anymore. Please select another one."),
"isform"=>0}
if scalar(keys %CURRENT) == 0;
# OK
return;
}
# import_selgrp: Import the selected group into the retrieved form
sub import_selgrp($) {
local ($_, %_);
my $FORM;
$FORM = $_[0];
$FORM->param("grp", $GET->param("selsn"))
if defined $GET->param("selsn")
&& check_sn_in ${$GET->param_fetch("selsn")}[0], "groups";
return;
}
# import_selmember: Import the selected user into the retrieved form
sub import_selmember($) {
local ($_, %_);
my $FORM;
$FORM = $_[0];
$FORM->param("member", $GET->param("selsn"))
if defined $GET->param("selsn")
&& check_sn_in ${$GET->param_fetch("selsn")}[0], "users AS usrmembers";
return $FORM;
}

View File

@@ -0,0 +1,225 @@
#! /usr/bin/perl -w
# History: Theory and Culture
# userpref.cgi: The user preference administration.
# Copyright (c) 2004-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: 2004-10-16
use 5.008;
use strict;
use warnings;
use lib $ENV{"DOCUMENT_ROOT"} . qw(/magicat/lib/perl5);
use Selima::htc;
local $SIG{"__DIE__"} = \&http_500;
my $d = new Selima::Destroy;
# Prototype declaration
sub main();
sub check_get();
sub check_post();
sub html_page($);
sub fetch_curitem();
sub import_selusr($);
initenv(-restricted => 1,
-this_table => "userpref",
-dbi_lock => {"userpref" => LOCK_EX,
"users" => LOCK_SH},
-lastmod => 1,
-page_param => {"keywords" => N_("user preference")});
main;
exit 0;
sub main() {
local ($_, %_);
my ($error, $success, $processor);
# If the request is a GET query
if ($ENV{"REQUEST_METHOD"} ne "POST") {
$error = check_get;
# If an error occurs
if (defined $error) {
html_page $error;
# Display the page
} else {
html_page retrieve_status;
}
# If a form was POSTed from the client
} else {
$error = check_post;
# If an error occurs
if (defined $error) {
error_redirect $error;
# Else, save the data
} else {
$processor = new Selima::Processor::UserPref($POST);
$success = $processor->process;
success_redirect $success;
}
}
return;
}
# check_get: Check the GET arguments
sub check_get() {
local ($_, %_);
my $error;
# A form is requested
if (is_form) {
$_ = form_type;
# A form to create a new item
if ($_ eq "new") {
# Nothing to check on a new form
# A form to edit a current item
} elsif ($_ eq "cur") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;
# A form to delete a current item
} elsif ($_ eq "del") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;
# Not a valid form
} else {
return {"msg"=>N_("Incorrect form: [_1]."),
"margs"=>[$_],
"isform"=>0};
}
}
# List handler handles its own error
# OK
return;
}
# check_post: Check the POSTed form
sub check_post() {
local ($_, %_);
my ($checker, $error);
$_ = form_type;
# A form to create a new item
if ($_ eq "new") {
# Run the checker
$checker = new Selima::Checker::UserPref(curform);
$checker->redir(qw(selusr delusr));
$error = $checker->check(qw(usr domain name value));
return $error if defined $error;
# A form to edit a current item
} elsif ($_ eq "cur") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;
# Run the checker
$checker = new Selima::Checker::UserPref(curform);
$checker->redir(qw(del selusr delusr));
$error = $checker->check(qw(usr domain name value));
return $error if defined $error;
# A form to delete a current item
} elsif ($_ eq "del") {
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;;
# Run the checker
$checker = new Selima::Checker::UserPref(curform);
$checker->redir(qw(cancel));
# Not a valid form
} else {
return {"msg"=>N_("Incorrect form: [_1]."),
"margs"=>[$_],
"isform"=>0};
}
# OK
return;
}
# html_page: Display the page
sub html_page($) {
local ($_, %_);
my ($status, $LIST, $FORM);
$status = $_[0];
# A form is requested
if (is_form $status) {
$FORM = new Selima::Form::UserPref($status);
html_header $FORM->{"title"};
html_errmsg $status;
$FORM->html;
html_footer;
# List the available items
} else {
$LIST = new Selima::List::UserPref;
html_header $LIST->{"title"}, $LIST->page_param;
html_errmsg $status;
$LIST->html;
html_footer;
}
return;
}
##################################
# Subroutines to manage the data #
##################################
# fetch_curitem: Fetch the current item
sub fetch_curitem() {
local ($_, %_);
my ($sn, $FORM);
# Return if fetched before
return if scalar(keys %CURRENT) > 0;
# Obtain the current form
$FORM = curform;
# No item specified
return {"msg"=>N_("Please select the user preference."),
"isform"=>0}
if !defined $FORM->param("sn");
$sn = $FORM->param("sn");
# Find the record
%CURRENT = fetchrec $sn, $THIS_TABLE;
# If this record exist
return {"msg"=>N_("This user preference does not exist anymore. Please select another one."),
"isform"=>0}
if scalar(keys %CURRENT) == 0;
# OK
return;
}
# import_selusr: Import the selected user into the retrieved form
sub import_selusr($) {
local ($_, %_);
my $FORM;
$FORM = $_[0];
if ( defined $GET->param("selsn")
&& check_sn_in ${$GET->param_fetch("selsn")}[0], "users") {
$FORM->param("usr", $GET->param("selsn"));
$FORM->param("everyone", "false");
}
return;
}

View File

@@ -0,0 +1,273 @@
#! /usr/bin/perl -w
# History: Theory and Culture
# users.cgi: The user account administration.
# Copyright (c) 2004-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: 2004-10-16
use 5.008;
use strict;
use warnings;
use lib $ENV{"DOCUMENT_ROOT"} . qw(/magicat/lib/perl5);
use Selima::htc;
local $SIG{"__DIE__"} = \&http_500;
my $d = new Selima::Destroy;
# Prototype declaration
sub main();
sub check_get();
sub check_post();
sub html_page($);
sub fetch_curitem();
initenv(-this_table => "users",
-dbi_lock => {"users" => LOCK_EX,
"usermem" => LOCK_EX,
"userpref" => LOCK_EX,
"groupmem" => LOCK_SH,
"groups" => LOCK_SH},
-lastmod => 1,
-page_param => {"keywords" => N_("users")});
main;
exit 0;
sub main() {
local ($_, %_);
my ($error, $success, $processor);
# If the request is a GET query
if ($ENV{"REQUEST_METHOD"} ne "POST") {
$error = check_get;
# If an error occurs
if (defined $error) {
html_page $error;
# Display the page
} else {
html_page retrieve_status;
}
# If a form was POSTed from the client
} else {
$error = check_post;
# If an error occurs
if (defined $error) {
# Password not saved
$POST->delete("passwd", "passwd2");
error_redirect $error;
# Else, save the data
} else {
$processor = new Selima::Processor::User($POST);
$success = $processor->process;
# Password not saved
$POST->delete("passwd", "passwd2");
success_redirect $success;
}
}
return;
}
# check_get: Check the GET arguments
sub check_get() {
local ($_, %_);
my ($error, $FORM, $sn);
# A form is requested
if (is_form) {
$_ = form_type;
# A form to create a new item
if ($_ eq "new") {
# Check the privilege to manage this table
unauth if !is_script_permitted;
# A form to edit a current item
} elsif ($_ eq "cur") {
# Check the privilege to manage this table
$FORM = curform;
$sn = defined $FORM->param("sn")? $FORM->param("sn"): -1;
unauth unless defined get_login_sn;
unauth unless is_script_permitted || $sn == get_login_sn;
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;
# A form to delete a current item
} elsif ($_ eq "del") {
# Check the privilege to manage this table
$FORM = curform;
$sn = defined $FORM->param("sn")? $FORM->param("sn"): -1;
unauth unless defined get_login_sn;
unauth unless is_script_permitted;
unauth if !is_su && (is_su $sn || $sn == get_login_sn);
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;
# Not a valid form
} else {
# Check the privilege to manage this table
unauth unless is_script_permitted;
return {"msg"=>N_("Incorrect form: [_1]."),
"margs"=>[$_],
"isform"=>0};
}
# List the available items
} else {
# Check the privilege to manage this table
unauth unless is_script_permitted;
# List handler handles its own error
}
# OK
return;
}
# check_post: Check the POSTed form
sub check_post() {
local ($_, %_);
my ($checker, $error, $FORM, $sn);
$_ = form_type;
# A form to create a new item
if ($_ eq "new") {
# Check the privilege to manage this table
unauth unless is_script_permitted;
# Run the checker
$checker = new Selima::Checker::User(curform);
$error = $checker->check(qw(id passwd name supgroup));
return $error if defined $error;
# A form to edit a current item
} elsif ($_ eq "cur") {
# Check the privilege to manage this table
$FORM = curform;
$sn = defined $FORM->param("sn")? $FORM->param("sn"): -1;
unauth unless defined get_login_sn;
unauth unless is_script_permitted || $sn == get_login_sn;
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;
# Run the checker
$checker = new Selima::Checker::User(curform);
$checker->redir(qw(del));
$error = $checker->check(qw(id passwd name supgroup));
return $error if defined $error;
# A form to delete a current item
} elsif ($_ eq "del") {
# Check the privilege to manage this table
$FORM = curform;
$sn = defined $FORM->param("sn")? $FORM->param("sn"): -1;
unauth unless defined get_login_sn;
unauth unless is_script_permitted;
unauth if !is_su && (is_su $sn || $sn == get_login_sn);
# Check at fetch_curitem()
$error = fetch_curitem;
return $error if defined $error;;
# Run the checker
$checker = new Selima::Checker::User(curform);
$checker->redir(qw(cancel));
# Not a valid form
} else {
# Check the privilege to manage this table
unauth unless is_script_permitted;
return {"msg"=>N_("Incorrect form: [_1]."),
"margs"=>[$_],
"isform"=>0};
}
# OK
return;
}
# html_page: Display the page
sub html_page($) {
local ($_, %_);
my ($status, $LIST, $FORM);
$status = $_[0];
# A form is requested
if (is_form $status) {
$FORM = new Selima::Form::User($status);
html_header $FORM->{"title"};
html_errmsg $status;
$FORM->html;
html_footer;
# List the available items
} else {
$LIST = new Selima::List::Users;
html_header $LIST->{"title"}, $LIST->page_param;
html_errmsg $status;
$LIST->html;
html_footer;
}
return;
}
##################################
# Subroutines to manage the data #
##################################
# fetch_curitem: Fetch the current item
sub fetch_curitem() {
local ($_, %_);
my ($sn, $FORM, $sth, $sql, $row);
# Return if fetched before
return if scalar(keys %CURRENT) > 0;
# Obtain the current form
$FORM = curform;
# No item specified
return {"msg"=>N_("Please select the user."),
"isform"=>0}
if !defined $FORM->param("sn");
$sn = $FORM->param("sn");
# Find the record
%CURRENT = fetchrec $sn, $THIS_TABLE;
# If this record exist
return {"msg"=>N_("This user does not exist anymore. Please select another one."),
"isform"=>0}
if scalar(keys %CURRENT) == 0;
# Obtain the belonging groups list
$sql = "SELECT groups.sn AS sn,"
. " groups.dsc AS title FROM usermem"
. " INNER JOIN groups ON usermem.grp=groups.sn"
. " WHERE usermem.member=$sn"
. " AND groups.id!=" . $DBH->quote(SU_GROUP)
. " AND groups.id!=" . $DBH->quote(ADMIN_GROUP)
. " AND groups.id!=" . $DBH->quote(ALLUSERS_GROUP)
. " ORDER BY groups.id;\n";
$sth = $DBH->prepare($sql);
$sth->execute;
$CURRENT{"supgroupcount"} = $sth->rows;
for ($_ = 0; $_ < $CURRENT{"supgroupcount"}; $_++) {
$row = $sth->fetchrow_hashref;
$CURRENT{"supgroup$_"} = 1;
$CURRENT{"supgroup$_" . "sn"} = $$row{"sn"};
$CURRENT{"supgroup$_" . "title"} = $$row{"title"};
}
# Get the admin flag
$CURRENT{"admin"} = is_admin($sn);
$CURRENT{"su"} = is_su($sn);
# OK
return;
}

View File

@@ -0,0 +1 @@
86476

View File

@@ -0,0 +1,31 @@
<hr />
<div id="footer" class="footer" title="頁尾區">
<div>
<a href="http://www.w3.org/Style/CSS/Buttons/"
title="CSS 樣式表說明" hreflang="en"><img
src="/images/w3c/mwcts" alt="以 CSS 樣式表製作" /></a>|<a
href="http://html-validator.imacat.idv.tw/check/referer"
title="本頁的 HTML 驗證結果" hreflang="en"><img
src="/images/w3c/vxhtml11" alt="XHTML 1.1 正確!" /></a>|<a
href="http://jigsaw.w3.org/css-validator/check/referer"
title="本頁的 CSS 驗證結果" hreflang="en"><img
src="/images/w3c/vcss" alt="CSS 正確!" /></a>|<a
href="http://www.w3.org/WAI/WCAG1AAA-Conformance"
title="無障礙三 A 級標準說明" hreflang="en"><img
src="/images/w3c/wcag1AAA"
alt="W3C 無障礙網頁規範 1.0 三 A 級標準標章" /></a>
<p>本頁符合 <a href="http://www.w3.org/TR/xhtml11/" hreflang="en"><abbr
title="Extensible HyperText Markup Language">XHTML</abbr> 1.1</a> /
<a href="http://www.w3.org/TR/CSS21/" hreflang="en"><abbr
title="Cascading Style Sheets">CSS</abbr> 2.1</a> /
<a href="http://www.w3.org/TR/WAI-WEBCONTENT/"
hreflang="en">無障礙網頁規範 1.0</a> 三 A 級標準</p>
</div>
<!--selima:perl-->
<div>
<p>版權所有 &copy; <!--selima:copyyear--> 歷史:理論與文化編輯群</p>
</div>
</div>

View File

@@ -0,0 +1,9 @@
<div class="navibar">
<span><a accesskey="1" href="/">首頁</a></span> |
<span><a href="/newsletters/">各期通訊</a></span> |
<span><a href="/wanted.html">稿約</a></span> |
<span><a href="/editors.html">編輯群</a></span> |
<span><a href="/cgi-bin/guestbook.cgi">留言板</a></span> |
<span><a href="/links/">相關連結</a></span> |
<span><a href="mailto:htc@mail.emandy.idv.tw"><em><acronym title="electronic mail">E-mail</acronym></em></a></span>
</div>

View File

@@ -0,0 +1 @@
index.html.xhtml

View File

@@ -0,0 +1,128 @@
<?xml version="1.0" encoding="Big5" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-tw">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<meta name="author" content="依瑪貓" />
<meta name="copyright" content="&copy; 2000-2012 歷史:理論與文化編輯群。歷史:理論與文化編輯群保有所有權利。" />
<meta name="keywords" content="網站管理, 內容管理" />
<link rel="start" type="application/xhtml+xml" href=".." />
<link rel="author" type="application/xhtml+xml" href="mailto:htc&#64;mail.emandy.idv.tw" />
<link rel="up" type="application/xhtml+xml" href=".." />
<link rel="stylesheet" type="text/css" href="../stylesheets/common.css" />
<link rel="shortcut icon" type="image/x-icon" href="../favicon.ico" />
<title>梅姬妳好 *^_^*</title>
</head>
<body>
<div id="topofpage" class="skiptobody">
<a accesskey="2" href="#body">跳到網頁內文區。</a>
</div>
<div id="nav" class="nav" title="導覽連結區">
<div class="accessguide"><a accesskey="L"
href="#nav" title="導覽連結區">:::</a></div>
<form action="../cgi-bin/search.cgi" method="get" accept-charset="Big5">
<div class="navibar">
<span><a href="..">首頁</a></span> |
<span><a href="../newsletters/">各期通訊</a></span> |
<span><a href="../wanted.html">稿約</a></span> |
<span><a href="../editors.html">編輯群</a></span> |
<span><a href="../cgi-bin/guestbook.cgi">留言板</a></span> |
<span><a href="../links/">相關連結</a></span> |
<span><a href="mailto:htc&#64;mail.emandy.idv.tw"><em><acronym title="electronic mail">E-mail</acronym></em></a></span> |
<label for="navquery">檢索:</label><input
id="navquery" class="text" type="text" name="query" value="" /><input
type="hidden" name="charset" value="Big5" /><input
type="submit" value="搜尋" />
</div>
</form>
</div>
<hr />
<div id="body" class="body" title="網頁內文區">
<div class="accessguide"><a accesskey="C"
href="#body" title="網頁內文區">:::</a></div>
<h1>我是梅姬,請多多指教 *^_^*</h1>
<address>訪客計數器 <img src="../cgi-bin/counter.cgi?ignoreme=1" alt="訪客計數器" /></address>
<div class="intro">
<p>妳好,我是梅姬,是歷史:理論與文化網站的守護精靈。妳要怎麼設定網站,請儘管吩咐我喔~!</p>
</div>
<h2>管理網站</h2>
<ul id="toc">
<li><a href="cgi-bin/guestbook.cgi">留言板</a></li>
<li><a href="cgi-bin/pages.cgi">網頁</a></li>
<li><a href="cgi-bin/links.cgi">連結</a></li>
<li><a href="cgi-bin/linkcat.cgi">連結分類</a></li>
<li><a href="cgi-bin/linkcatz.cgi">連結分類表</a></li>
<li><a href="cgi-bin/newslets.cgi">通訊</a></li>
<li><a href="cgi-bin/nlindex.cgi">通訊目錄</a></li>
<li><a href="cgi-bin/nlarts.cgi">通訊文章</a></li>
</ul>
<h2>管理帳號</h2>
<ul id="toc">
<li><a href="cgi-bin/users.cgi">帳號</a></li>
<li><a href="cgi-bin/groups.cgi">群組</a></li>
<li><a href="cgi-bin/usermem.cgi">使用者成員</a></li>
<li><a href="cgi-bin/groupmem.cgi">群組成員</a></li>
<li><a href="cgi-bin/userpref.cgi">使用者偏好</a></li>
<li><a href="cgi-bin/scptpriv.cgi">程式權限</a></li>
</ul>
<h2>其她</h2>
<ul id="toc">
<li><a href="cgi-bin/actlog.cgi">活動日誌</a></li>
<li><a href="cgi-bin/rebuild.cgi">重製網頁</a></li>
<li><a href="analog/">訪客統計</a></li>
<li><a href="cgi-bin/test.cgi">測試程式</a></li>
</ul>
</div>
<hr />
<div id="footer" class="footer" title="頁尾區">
<div>
<a href="http://www.w3.org/Style/CSS/Buttons/"
title="CSS 樣式表說明" hreflang="en"><img
src="../images/w3c/mwcts" alt="以 CSS 樣式表製作" /></a>|<a
href="http://html-validator.imacat.idv.tw/check/referer"
title="本頁的 HTML 驗證結果" hreflang="en"><img
src="../images/w3c/vxhtml11" alt="XHTML 1.1 正確!" /></a>|<a
href="http://jigsaw.w3.org/css-validator/check/referer"
title="本頁的 CSS 驗證結果" hreflang="en"><img
src="../images/w3c/vcss" alt="CSS 正確!" /></a>|<a
href="http://www.w3.org/WAI/WCAG1AAA-Conformance"
title="無障礙三 A 級標準說明" hreflang="en"><img
src="../images/w3c/wcag1AAA"
alt="W3C 無障礙網頁規範 1.0 三 A 級標準標章" /></a>
<p>本頁符合 <a href="http://www.w3.org/TR/xhtml11/" hreflang="en"><abbr
title="Extensible HyperText Markup Language">XHTML</abbr> 1.1</a> /
<a href="http://www.w3.org/TR/CSS21/" hreflang="en"><abbr
title="Cascading Style Sheets">CSS</abbr> 2.1</a> /
<a href="http://www.w3.org/TR/WAI-WEBCONTENT/"
hreflang="en">無障礙網頁規範 1.0</a> 三 A 級標準</p>
</div>
<div>
<p>版權所有 &copy; 2000-2004 歷史:理論與文化編輯群</p>
</div>
</div>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,70 @@
# History: Theory and Culture
# htc.pm: History: Theory and Culture
# Copyright (c) 2003-2018 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: 2003-04-06
package Selima::htc;
use 5.008;
use strict;
use warnings;
use base qw(Exporter);
use vars qw(@EXPORT @EXPORT_OK);
@EXPORT = qw();
# Import our site-specific subroutines
use Selima::htc::Config;
push @EXPORT, @Selima::htc::Config::EXPORT;
use Selima::htc::DataVars qw(:all);
push @EXPORT, @Selima::htc::DataVars::EXPORT_OK;
use Selima::htc::HTML;
push @EXPORT, @Selima::htc::HTML::EXPORT;
use Selima::htc::Items;
push @EXPORT, @Selima::htc::Items::EXPORT;
use Selima::htc::Rebuild;
push @EXPORT, @Selima::htc::Rebuild::EXPORT;
# Import our site-specific classess
use Selima::htc::Checker::Guestbook;
use Selima::htc::Checker::Guestbook::Public;
use Selima::htc::Checker::Newslet;
use Selima::htc::Checker::NLIndex;
use Selima::htc::Checker::NLArt;
use Selima::htc::Form::Guestbook;
use Selima::htc::Form::Guestbook::Public;
use Selima::htc::Form::Newslet;
use Selima::htc::Form::NLIndex;
use Selima::htc::Form::NLArt;
use Selima::htc::L10N;
use Selima::htc::List::Guestbook;
use Selima::htc::List::Guestbook::Public;
use Selima::htc::List::Newslets;
use Selima::htc::List::NLIndex;
use Selima::htc::List::NLArts;
use Selima::htc::List::Search;
use Selima::htc::Processor::Guestbook::Public;
use Selima::htc::Processor::Newslet;
use Selima::htc::Processor::NLIndex;
use Selima::htc::Processor::NLArt;
# Import our common modules
use Selima;
push @EXPORT, @Selima::EXPORT;
@EXPORT_OK = @EXPORT;
return 1;

View File

@@ -0,0 +1,54 @@
# History: Theory and Culture
# Guestbook.pm: The administrative guestbook form checker.
# Copyright (c) 2004-2018 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: 2004-10-24
package Selima::htc::Checker::Guestbook;
use 5.008;
use strict;
use warnings;
use base qw(Selima::Checker::Guestbook);
use Selima::ShortCut;
# _check_name: Check the name
sub _check_name : method {
# Run the parent checker
return $_[0]->SUPER::_check_name_req;
}
# _check_identity: Check the identity
sub _check_identity : method {
local ($_, %_);
my ($self, $form, $error);
$self = $_[0];
$form = $self->{"form"};
# Check if it exists
$error = $self->_missing("identity");
return $error if defined $error;
# Regularize it
$self->_trim("identity");
# Check the length
return {"msg"=>N_("This occupation is too long. (Max. length [#,_1])"),
"margs"=>[${$self->{"maxlens"}}{"identity"}]}
if length $form->param("identity") > ${$self->{"maxlens"}}{"identity"};
# OK
return;
}
return 1;

View File

@@ -0,0 +1,57 @@
# History: Theory and Culture
# Public.pm: The guestbook form checker.
# Copyright (c) 2004-2018 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: 2004-10-24
package Selima::htc::Checker::Guestbook::Public;
use 5.008;
use strict;
use warnings;
use base qw(Selima::Checker::Guestbook::Public);
use Selima::DataVars qw($DBH);
use Selima::HTTP;
use Selima::Logging;
use Selima::ShortCut;
# _check_name: Check the name
sub _check_name : method {
# Run the parent checker
return $_[0]->SUPER::_check_name_req;
}
# _check_identity: Check the identity
sub _check_identity : method {
local ($_, %_);
my ($self, $form, $error);
$self = $_[0];
$form = $self->{"form"};
# Check if it exists
$error = $self->_missing("identity");
return $error if defined $error;
# Regularize it
$self->_trim("identity");
# Check the length
return {"msg"=>N_("Your occupation is too long. (Max. length [#,_1])"),
"margs"=>[${$self->{"maxlens"}}{"identity"}]}
if length $form->param("identity") > ${$self->{"maxlens"}}{"identity"};
# OK
return;
}
return 1;

View File

@@ -0,0 +1,205 @@
# History: Theory and Culture
# NLArt.pm: The newsletter article form checker.
# Copyright (c) 2006-2018 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-30
package Selima::htc::Checker::NLArt;
use 5.008;
use strict;
use warnings;
use base qw(Selima::Checker);
use Email::Valid;
use Selima::CallForm;
use Selima::ChkFunc;
use Selima::ShortCut;
use Selima::htc::DataVars qw(:forms);
# new: Initialize the checker
sub new : method {
local ($_, %_);
my ($class, $self);
($class, @_) = @_;
$_[1] = "nlarts" if scalar(@_) < 2 || !defined $_[1];
$self = $class->SUPER::new(@_);
return $self;
}
# _check_annots: Check the annotations
sub _check_annots : method {
local ($_, %_);
my ($self, $form, $error);
$self = $_[0];
$form = $self->{"form"};
# Check if it exists
$error = $self->_missing("annots");
return $error if defined $error;
# Regularize it
$self->_trimtext("annots");
# Skip if it is not filled
$form->param("annots", "")
if $form->param("annots") eq __("Fill in the annotations here.");
return if $form->param("annots") eq "";
# Check the length
return {"msg"=>N_("This annotations list is too long. (Max. length [#,_1])"),
"margs"=>[${$self->{"maxlens"}}{"annots"}]}
if length $form->param("annots") > ${$self->{"maxlens"}}{"annots"};
# OK
return;
}
# _check_author: Check the author
sub _check_author : method {
local ($_, %_);
my ($self, $form, $error);
$self = $_[0];
$form = $self->{"form"};
# Check if it exists
$error = $self->_missing("author");
return $error if defined $error;
# Regularize it
$self->_trim("author");
# Skip if it is not filled
return if $form->param("author") eq "";
# Check the length
return {"msg"=>N_("This author is too long. (Max. length [#,_1])"),
"margs"=>[${$self->{"maxlens"}}{"author"}]}
if length $form->param("author") > ${$self->{"maxlens"}}{"author"};
# OK
return;
}
# _check_authors: Check the authors column
sub _check_authors : method {
local ($_, %_);
my ($self, $form, $error);
$self = $_[0];
$form = $self->{"form"};
# Check if it exists
$error = $self->_missing("authors");
return $error if defined $error;
# Regularize it
$self->_trimtext("authors");
# Skip if it is not filled
$form->param("authors", "")
if $form->param("authors") eq __("Fill in the authors column here.");
return if $form->param("authors") eq "";
# Check the length
return {"msg"=>N_("This authors column is too long. (Max. length [#,_1])"),
"margs"=>[${$self->{"maxlens"}}{"authors"}]}
if length $form->param("authors") > ${$self->{"maxlens"}}{"authors"};
# OK
return;
}
# _check_body: Check the content
# Use the default content checker
# _check_email: Check the e-mail
sub _check_email : method {
local ($_, %_);
my ($self, $form, $error);
$self = $_[0];
$form = $self->{"form"};
# Check if it exists
$error = $self->_missing("email");
return $error if defined $error;
# Regularize it
$self->_trim("email");
# Skip if it is not filled
return if $form->param("email") eq "";
# Check the length
return {"msg"=>N_("This e-mail is too long. (Max. length [#,_1])"),
"margs"=>[${$self->{"maxlens"}}{"email"}]}
if length $form->param("email") > ${$self->{"maxlens"}}{"email"};
# Check the e-mail validity
return {"msg"=>N_("Please fill in a valid e-mail address.")}
if !Email::Valid->rfc822($form->param("email"));
# OK
return;
}
# _check_newslet: Check the newsletter
sub _check_newslet : method {
local ($_, %_);
my ($self, $form, $error);
$self = $_[0];
$form = $self->{"form"};
# Check if it exists
$error = $self->_missing("newslet");
return $error if defined $error;
# Regularize it
$self->_trim("newslet");
# Check if it is filled
return {"msg"=>N_("Please select a newsletter.")}
if $form->param("newslet") eq "";
# Check if the newsletter exists
return {"msg"=>N_("This newsletter does not exist anymore. Please select another one.")}
if !check_sn_in ${$form->param_fetch("newslet")}[0], "newslets";
# OK
return;
}
# _check_title: Check the title
# Use the default title checker
# _check_title_h: Check the HTML title
sub _check_title_h : method {
local ($_, %_);
my ($self, $form, $error);
$self = $_[0];
$form = $self->{"form"};
# Check if it exists
$error = $self->_missing("title_h");
return $error if defined $error;
# Regularize it
$self->_trim("title_h");
# Skip if it is not filled
return if $form->param("title_h") eq "";
# Check the length
return {"msg"=>N_("This HTML title is too long. (Max. length [#,_1])"),
"margs"=>[${$self->{"maxlens"}}{"title_h"}]}
if length $form->param("title_h") > ${$self->{"maxlens"}}{"title_h"};
# OK
return;
}
# _redir_selnewslet: Suspend and move to the newsletter selection form
sub _redir_selnewslet : method {
local ($_, %_);
my $self;
$self = $_[0];
# Skip if not requested
return if $self->_missing("selnewslet");
call_form FORM_NEWSLETS, undef, "import_selnewslet";
}
# _redir_delnewslet: Remove the newsletter
sub _redir_delnewslet : method {
local ($_, %_);
my $self;
$self = $_[0];
# Skip if not requested
return if $self->_missing("delnewslet");
$self->{"form"}->delete("newslet");
success_redirect undef;
}
return 1;

View File

@@ -0,0 +1,200 @@
# History: Theory and Culture
# NLIndex.pm: The newsletter index form checker.
# Copyright (c) 2006-2018 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-29
package Selima::htc::Checker::NLIndex;
use 5.008;
use strict;
use warnings;
use base qw(Selima::Checker);
use Selima::CallForm;
use Selima::ChkFunc;
use Selima::DataVars qw($DBH :forms);
use Selima::ShortCut;
use Selima::htc::DataVars qw(:forms);
# new: Initialize the checker
sub new : method {
local ($_, %_);
my ($class, $self);
($class, @_) = @_;
$_[1] = "nlindex" if scalar(@_) < 2 || !defined $_[1];
$self = $class->SUPER::new(@_);
${$self->{"maxlens"}}{"ord"} = 2;
${$self->{"minlens"}}{"id"} = 2;
return $self;
}
# _check_newslet: Check the newsletter
sub _check_newslet : method {
local ($_, %_);
my ($self, $form, $error);
$self = $_[0];
$form = $self->{"form"};
# Check if it exists
$error = $self->_missing("newslet");
return $error if defined $error;
# Regularize it
$self->_trim("newslet");
# Check if it is filled
return {"msg"=>N_("Please select a newsletter.")}
if $form->param("newslet") eq "";
# Check if the newsletter exists
return {"msg"=>N_("This newsletter does not exist anymore. Please select another one.")}
if !check_sn_in ${$form->param_fetch("newslet")}[0], "newslets";
# OK
return;
}
# _check_parent: Check the parent index item
sub _check_parent : method {
local ($_, %_);
my ($self, $form, $error, $sth, $sql);
$self = $_[0];
$form = $self->{"form"};
# "topmost not set" has a different form context
return {"msg"=>N_("Please select a parent index item.")}
if $self->_missing("topmost");
# Regularize it
$self->_trim("topmost");
# Check the option value
return {"msg"=>N_("This option is invalid. Please select a proper parent index item.")}
unless $form->param("topmost") =~ /^(?:true|false)$/;
# Check the parent index item if not a topmost index item
if ($form->param("topmost") eq "false") {
# Check if it exists
$error = $self->_missing("parent");
return $error if defined $error;
# Regularize it
$self->_trim("parent");
# Check if it is filled
return {"msg"=>N_("Please select a parent index item.")}
if $form->param("parent") eq "";
# Check if this index item exists
return {"msg"=>N_("This parent index item does not exist anymore. Please select another one.")}
if !check_sn_in ${$form->param_fetch("parent")}[0], "nlindex";
if ($self->{"iscur"}) {
# Check if the parent index item is itself
return {"msg"=>N_("An index item cannot belong to itself. Please select another one.")}
if $form->param("parent") == $self->{"sn"};
# Check if the parent directory is its descendant
$sql = "SELECT nlindex_ischild(" . $self->{"sn"} . ", "
. $form->param("parent") . ") AS is_child;\n";
$sth = $DBH->prepare($sql);
$sth->execute;
return {"msg"=>N_("An index item cannot belong to its descendant. Please select another one.")}
if ${$sth->fetchrow_hashref}{"is_child"};
}
}
# OK
return;
}
# _check_art: Check the article
sub _check_art : method {
local ($_, %_);
my ($self, $form, $error);
$self = $_[0];
$form = $self->{"form"};
# Check if it exists
$error = $self->_missing("art");
return $error if defined $error;
# Regularize it
$self->_trim("art");
# Skip if it is not filled
return if $form->param("art") eq "";
# Check if the article exists
return {"msg"=>N_("This article does not exist anymore. Please select another one.")}
if !check_sn_in ${$form->param_fetch("art")}[0], "nlarts";
# OK
return;
}
# _check_title: The default title checker
sub _check_title : method {
local ($_, %_);
my ($self, $form, $error);
$self = $_[0];
$form = $self->{"form"};
# Check if it exists
$error = $self->_missing("title");
return $error if defined $error;
# Regularize it
$self->_trim("title");
# Check if it is filled
if ($form->param("title") eq "") {
# Title must be filled if there is no article
return {"msg"=>N_("Please fill in the title.")}
if !defined $form->param("art") || $form->param("art") eq "";
# OK
return;
}
# Check the length
return {"msg"=>N_("This title is too long. (Max. length [#,_1])"),
"margs"=>[${$self->{"maxlens"}}{"title"}]}
if length $form->param("title") > ${$self->{"maxlens"}}{"title"};
# OK
return;
}
# _redir_selnewslet: Suspend and move to the newsletter selection form
sub _redir_selnewslet : method {
local ($_, %_);
my $self;
$self = $_[0];
# Skip if not requested
return if $self->_missing("selnewslet");
call_form FORM_NEWSLETS, undef, "import_selnewslet";
}
# _redir_delnewslet: Remove the newsletter
sub _redir_delnewslet : method {
local ($_, %_);
my $self;
$self = $_[0];
# Skip if not requested
return if $self->_missing("delnewslet");
$self->{"form"}->delete("newslet");
success_redirect undef;
}
# _redir_selart: Suspend and move to the article selection form
sub _redir_selart : method {
local ($_, %_);
my $self;
$self = $_[0];
# Skip if not requested
return if $self->_missing("selart");
call_form FORM_NLARTS, undef, "import_selart";
}
# _redir_delart: Remove the article
sub _redir_delart : method {
local ($_, %_);
my $self;
$self = $_[0];
# Skip if not requested
return if $self->_missing("delart");
$self->{"form"}->delete("art");
success_redirect undef;
}
return 1;

View File

@@ -0,0 +1,140 @@
# History: Theory and Culture
# Newslet.pm: The newsletter form checker.
# Copyright (c) 2006-2018 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-28
package Selima::htc::Checker::Newslet;
use 5.008;
use strict;
use warnings;
use base qw(Selima::Checker);
use CGI qw();
use Selima::CallForm;
use Selima::ChkFunc;
use Selima::DataVars qw(:dataman);
use Selima::ShortCut;
use Selima::htc::DataVars qw(:forms);
use Selima::htc::Items;
# new: Initialize the checker
sub new : method {
local ($_, %_);
my ($class, $self);
($class, @_) = @_;
$_[1] = "newslets" if scalar(@_) < 2 || !defined $_[1];
$self = $class->SUPER::new(@_);
return $self;
}
# _check_no: Check the issue number
# Actually this is to set the issue number, but not to check it
sub _check_no : method {
local ($_, %_);
my $self;
$self = $_[0];
# Current form
if ($self->{"iscur"}) {
$self->{"form"}->param("no", $CURRENT{"no"});
return;
}
# Create a new issue for this new newsletter
$self->{"form"}->param("no", new_nl_no);
return;
}
# _check_date: Check the date
sub _check_date : method {
local ($_, %_);
my ($self, $form, $error);
$self = $_[0];
$form = $self->{"form"};
# Check if it exists
$error = $self->_missing("date");
return $error if defined $error;
# Regularize it
$self->_trim("date");
# Check if it is filled
return {"msg"=>N_("Please fill in the date.")}
if $form->param("date") eq "";
# Check the length
return {"msg"=>N_("Please fill in a valid date in YYYY-MM-DD format.")}
if length $form->param("date") != ${$self->{"maxlens"}}{"date"};
# Check the date format
return {"msg"=>N_("Please fill in a valid date in YYYY-MM-DD format.")}
if length $form->param("date") !~ /^(\d{4})-(\d{2})-(\d{2})$/;
return {"msg"=>N_("Please fill in a valid date in YYYY-MM-DD format.")}
unless defined check_date($1, $2, $3);
# OK
return;
}
# _check_credits: Check the credits
sub _check_credits : method {
local ($_, %_);
my ($self, $form, $error);
$self = $_[0];
$form = $self->{"form"};
# Check if it exists
$error = $self->_missing("credits");
return $error if defined $error;
# Regularize it
$self->_trimtext("credits");
# Skip if it is not filled
return if $form->param("credits") eq "";
# Check the length
return {"msg"=>N_("This credits information is too long. (Max. length [#,_1])"),
"margs"=>[${$self->{"maxlens"}}{"credits"}]}
if length $form->param("credits") > ${$self->{"maxlens"}}{"credits"};
# OK
return;
}
# _redir_selndxart: Suspend and move to the index item article selection form
sub _redir_selndxart : method {
local ($_, %_);
my ($self, $form);
$self = $_[0];
$form = $self->{"form"};
# Skip if not requested
@_ = grep /^selndx\d+(?:sub\d+)*art$/, sort $form->param;
return if @_ == 0;
$_ = $_[0];
s/^sel//;
$form->param("caller_index", $_);
call_form FORM_NLARTS, undef, "import_selndxart";
}
# _redir_delndxart: Remove the index item article
sub _redir_delndxart : method {
local ($_, %_);
my ($self, $form);
$self = $_[0];
$form = $self->{"form"};
# Skip if not requested
@_ = grep /^delndx\d+(?:sub\d+)*art$/, sort $form->param;
return if @_ == 0;
$_ = $_[0];
s/^del//;
$form->delete($_);
success_redirect undef;
}
return 1;

View File

@@ -0,0 +1,90 @@
# History: Theory and Culture
# Config.pm: The web site configuration.
# Copyright (c) 2003-2020 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: 2003-04-06
package Selima::htc::Config;
use 5.008;
use utf8;
use strict;
use warnings;
use base qw(Exporter);
use vars qw(@EXPORT @EXPORT_OK);
BEGIN {
@EXPORT = qw(siteconf page_replacements);
@EXPORT_OK = @EXPORT;
# Prototype declaration
sub siteconf();
sub page_replacements();
}
# Get into the public variable space and initialize them
use lib $ENV{"DOCUMENT_ROOT"} . qw(/../../lib/perl5);
use Selima::CopyYear;
use Selima::DataVars qw(:all);
use Selima::ShortCut;
use Selima::htc::DataVars qw(:all);
# siteconf: Subroutine to initialize site configuration
sub siteconf() {
local ($_, %_);
# The package name and the package title
$PACKAGE = "htc";
$SITENAME_ABBR = "HTC";
# The author and the copyright
$AUTHOR = "依瑪貓";
$COPYRIGHT = "&copy; <!--selima:copyyear--> 歷史:理論與文化編輯群。歷史:理論與文化編輯群保有所有權利。";
# Document root, the library and the l10n directories
$DOC_ROOT = $ENV{"DOCUMENT_ROOT"};
$SITE_LIBDIR = $DOC_ROOT . "/magicat/lib/perl5";
$LOCALEDIR = $DOC_ROOT . "/magicat/locale";
# Tables to lock when rebuilding pages
@REBUILD_TABLES = qw(linkcat links linkcatz);
# The languages
$DEFAULT_LANG = "zh-tw";
@ALL_LINGUAS = qw(zh-tw);
# The site data variables
$SCRIPTS{FORM_NEWSLETS()} = "/magicat/cgi-bin/newslets.cgi",
$SCRIPTS{FORM_NLINDEX()} = "/magicat/cgi-bin/nlindex.cgi",
$SCRIPTS{FORM_NLARTS()} = "/magicat/cgi-bin/nlarts.cgi",
return;
}
# page_replacements: Dynamic page elements to be replaced,
# but not part of the content. Used by xfupdate_template().
sub page_replacements() {
return {
"copyyear" => {
"pattern" => "2000(?:-\\d{4})?",
"content" => copyyear(2000),
},
"generator" => {
"pattern" => "Selima \\d+\\.\\d+",
"content" => "Selima $Selima::VERSION",
},
};
}
no utf8;
return 1;

View File

@@ -0,0 +1,60 @@
# History: Theory and Culture
# DataVars.pm: The site-wide constants and variables.
# Copyright (c) 2006-2018 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-29
package Selima::htc::DataVars;
use 5.008;
use strict;
use warnings;
use base qw(Exporter);
use vars qw(@EXPORT %EXPORT_TAGS @EXPORT_OK);
BEGIN {
@EXPORT = qw();
%EXPORT_TAGS = (
forms => [qw(FORM_NEWSLETS FORM_NLINDEX FORM_NLARTS)],
);
@EXPORT_OK = qw();
my %seen;
%seen = qw();
foreach my $tag (keys %EXPORT_TAGS) {
push @EXPORT_OK, grep !$seen{$_}++, @{$EXPORT_TAGS{$tag}};
}
$EXPORT_TAGS{"all"} = [@EXPORT_OK];
# Prototype declaration
sub clear();
}
use Selima::DataVars qw(:forms);
use constant FORM_NEWSLETS => 1001;
use constant FORM_NLINDEX => 1002;
use constant FORM_NLARTS => 1003;
# clear: Clear the data variables
sub clear() {
local ($_, %_);
delete $SCRIPTS{FORM_NEWSLETS()};
delete $SCRIPTS{FORM_NLINDEX()};
delete $SCRIPTS{FORM_NLARTS()};
return;
}
return 1;

View File

@@ -0,0 +1,40 @@
# History: Theory and Culture
# Guestbook.pm: The administrative guestbook form.
# Copyright (c) 2004-2018 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: 2004-10-24
package Selima::htc::Form::Guestbook;
use 5.008;
use strict;
use warnings;
use base qw(Selima::Form::Guestbook);
use Selima::MarkAbbr;
use Selima::ShortCut;
# _html_col_identity: The identity
sub _html_col_identity : method {
$_[0]->_html_coltmpl_text("identity", h_abbr(__("Occupation:")));
}
# _html_col_url: The website URL
sub _html_col_url : method {
$_[0]->_html_coltmpl_url("url", h_abbr(__("Website URL.:")));
}
return 1;

View File

@@ -0,0 +1,62 @@
# History: Theory and Culture
# Public.pm: The guestbook form.
# Copyright (c) 2004-2018 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: 2004-10-24
package Selima::htc::Form::Guestbook::Public;
use 5.008;
use strict;
use warnings;
use base qw(Selima::Form::Guestbook::Public);
use Selima::HTTP;
use Selima::MarkAbbr;
use Selima::ShortCut;
# _html_col_email: The e-mail
sub _html_col_email : method {
$_[0]->_html_coltmpl_text("email", h_abbr(__("E-mail")));
}
# _html_col_identity: The identity
sub _html_col_identity : method {
$_[0]->_html_coltmpl_text("identity", h_abbr(__("Occupation")));
}
# _html_col_location: The location
sub _html_col_location : method {
$_[0]->_html_coltmpl_text("location", h_abbr(__("Location")));
}
# _html_col_message: The message
sub _html_col_message : method {
$_[0]->_html_coltmpl_textarea("message", h_abbr(__("Message")),
h_abbr(__("Fill in your message here.")));
}
# _html_col_name: The name
sub _html_col_name : method {
$_[0]->_html_coltmpl_text("name", h_abbr(__("Signature")));
}
# _html_col_url: The website URL
sub _html_col_url : method {
$_[0]->_html_coltmpl_url("url", h_abbr(__("Website URL.")));
}
return 1;

View File

@@ -0,0 +1,124 @@
# History: Theory and Culture
# NLArt.pm: The newsletter article form.
# Copyright (c) 2006-2018 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-29
package Selima::htc::Form::NLArt;
use 5.008;
use strict;
use warnings;
use base qw(Selima::Form);
use Selima::CommText;
use Selima::DataVars qw(:dataman :requri);
use Selima::FormFunc;
use Selima::HTTP;
use Selima::MarkAbbr;
use Selima::ShortCut;
use Selima::htc::Items;
# new: Initialize the HTML form table displayer
sub new : method {
local ($_, %_);
my ($class, $status, $args, $self);
($class, $status, $args) = @_;
$args = {} if !defined $args;
# $args must be a hash reference
http_500 "type of argument 2 must be a hash reference"
if ref($args) ne "HASH";
$$args{"type"} = form_type
if !exists $$args{"type"};
$$args{"table"} = "nlarts"
if !exists $$args{"table"};
$$args{"deltext"} = __("Delete this article")
if !exists $$args{"deltext"};
if (!exists $$args{"summary"}) {
# A form to create a new item
if ($$args{"type"} eq "new") {
$$args{"summary"} = __("This table provides you a form to add a new article.");
# A form to edit a current item
} elsif ($$args{"type"} eq "cur") {
$$args{"summary"} = __("This table provides you a form to edit a current article.");
# A form to delete a current item
} elsif ($$args{"type"} eq "del") {
$$args{"summary"} = __("This table provides you a form to delete a article.");
}
}
if (!exists $$args{"cols"}) {
# A form to create a new item
if ($$args{"type"} eq "new") {
$$args{"cols"} = [qw(newslet ord title title_h author
email authors body annots kw html hid)];
# A form to edit a current item
# A form to delete a current item
} elsif ($$args{"type"} eq "cur" || $$args{"type"} eq "del") {
$$args{"cols"} = [qw(sn newslet ord title title_h author
email authors body annots kw html hid
created createdby updated updatedby)];
}
}
if (!exists $$args{"title"}) {
# A form to create a new item
if ($$args{"type"} eq "new") {
$$args{"title"} = __("Add a New Newsletter Article");
# A form to edit a current item
} elsif ($$args{"type"} eq "cur") {
$$args{"title"} = __("Edit a Current Newsletter Article");
# A form to delete a current item
} elsif ($$args{"type"} eq "del") {
$$args{"title"} = __("Delete a Newsletter Article");
}
}
if (!exists $$args{"preview"}) {
$$args{"preview"} = 1;
}
if ($$args{"preview"} && !exists $$args{"prevmsg"}) {
$$args{"prevmsg"} = __("Preview this article.");
}
$self = $class->SUPER::new($status, $args);
${$self->{"maxlens"}}{"ord"} = 2;
return $self;
}
# _html_col_newslet: The newsletter
sub _html_col_newslet : method {
$_[0]->_html_coltmpl_call("newslet", h_abbr(__("Newsletter:")), \&newslet_title);
}
# _html_col_title_h: The HTML title
sub _html_col_title_h : method {
$_[0]->_html_coltmpl_text("title_h", h_abbr(__("HTML title:")),
h_abbr(__("(Leave it blank if the same as the title.)")));
}
# _html_col_authors: The authors column
sub _html_col_authors : method {
$_[0]->_html_coltmpl_textarea("authors", h_abbr(__("Authors column:")),
h_abbr(__("Fill in the authors column here.")),
h_abbr(__("(Leave it blank if the same as the author.)")), 3);
}
# _html_col_annots: The annotations
sub _html_col_annots : method {
$_[0]->_html_coltmpl_textarea("annots", h_abbr(__("Annotations:")),
h_abbr(__("Fill in the annotations here.")));
}
return 1;

View File

@@ -0,0 +1,152 @@
# History: Theory and Culture
# NLIndex.pm: The newsletter index form.
# Copyright (c) 2006-2018 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-29
package Selima::htc::Form::NLIndex;
use 5.008;
use strict;
use warnings;
use base qw(Selima::Form);
use Selima::CommText;
use Selima::DataVars qw(:requri);
use Selima::FormFunc;
use Selima::HTTP;
use Selima::MarkAbbr;
use Selima::ShortCut;
use Selima::htc::Items;
# new: Initialize the HTML form table displayer
sub new : method {
local ($_, %_);
my ($class, $status, $args, $self);
($class, $status, $args) = @_;
$args = {} if !defined $args;
# $args must be a hash reference
http_500 "type of argument 2 must be a hash reference"
if ref($args) ne "HASH";
$$args{"type"} = form_type
if !exists $$args{"type"};
$$args{"table"} = "nlindex"
if !exists $$args{"table"};
$$args{"deltext"} = __("Delete this index item")
if !exists $$args{"deltext"};
if (!exists $$args{"summary"}) {
# A form to create a new item
if ($$args{"type"} eq "new") {
$$args{"summary"} = __("This table provides you a form to add a new index item.");
# A form to edit a current item
} elsif ($$args{"type"} eq "cur") {
$$args{"summary"} = __("This table provides you a form to edit a current index item.");
# A form to delete a current item
} elsif ($$args{"type"} eq "del") {
$$args{"summary"} = __("This table provides you a form to delete a index item.");
}
}
if (!exists $$args{"cols"}) {
# A form to create a new item
if ($$args{"type"} eq "new") {
$$args{"cols"} = [qw(newslet parent ord art title)];
# A form to edit a current item
# A form to delete a current item
} elsif ($$args{"type"} eq "cur" || $$args{"type"} eq "del") {
$$args{"cols"} = [qw(sn newslet parent ord art title subitems
created createdby updated updatedby)];
}
}
if (!exists $$args{"title"}) {
# A form to create a new item
if ($$args{"type"} eq "new") {
$$args{"title"} = __("Add a New Newsletter Index Item");
# A form to edit a current item
} elsif ($$args{"type"} eq "cur") {
$$args{"title"} = __("Edit a Current Newsletter Index Item");
# A form to delete a current item
} elsif ($$args{"type"} eq "del") {
$$args{"title"} = __("Delete a Newsletter Index Item");
}
}
$self = $class->SUPER::new($status, $args);
${$self->{"maxlens"}}{"ord"} = 2;
if ($self->{"type"} eq "cur") {
if (defined $self->{"cur"}->param("subitemcount") && $self->{"cur"}->param("subitemcount") > 0) {
$self->{"nodelete"} = 1;
push @{$self->{"prefmsg"}}, __("This index item has [numerate,_1,a subitem,subitems]. It cannot be deleted. To delete the index item, [numerate,_1,its subitem,all of its subitems] must first be deleted.", $self->{"cur"}->param("subitemcount"));
}
}
return $self;
}
# _html_col_art: The article
sub _html_col_art : method {
$_[0]->_html_coltmpl_call("art", h_abbr(__("Article:")), \&nlart_title);
}
# _html_col_newslet: The newsletter
sub _html_col_newslet : method {
$_[0]->_html_coltmpl_call("newslet", h_abbr(__("Newsletter:")), \&newslet_title);
}
# _html_col_parent: The parent
sub _html_col_parent : method {
$_[0]->_html_coltmpl_call_null("parent", h_abbr(__("Parent item:")),
"topmost", h_abbr(__("At the very top")), \&nlindex_title);
}
# _html_col_subitems: The subitems
sub _html_col_subitems : method {
local ($_, %_);
my ($self, $form, $current, $label, $url, $mark, $colspan, $thclass, $thcolspan);
$self = $_[0];
$form = $self->{"form"};
$current = $self->{"cur"};
$mark = $self->_mark("subitems");
$colspan = $self->_colspan;
$label = h_abbr(__("[numerate,_1,Subitem,Subitems]:", $current->param("subitemcount")));
# A current form span for 2 columns
$thclass = $self->{"type"} ne "cur"? " class=\"th\"": "";
$thcolspan = $self->{"type"} eq "cur"? " colspan=\"2\"": "";
print << "EOT";
<tr>
<th$thclass$thcolspan scope="row">$mark$label</th>
EOT
print " <td$colspan>";
@_ = qw();
for ($_ = 0; $_ < $current->param("subitemcount"); $_++) {
push @_, sprintf " <li><a href=\"%s\">%s</a></li>\n",
h($REQUEST_FILE . "?form=cur&sn=" . $current->param("subitem$_" . "sn")),
$self->_cval_text("subitem$_" . "title");
}
print @_ > 0? "<ol>" . join("", @_) . " </ol>\n ": h_abbr(t_none);
print << "EOT";
</td>
</tr>
EOT
}
# _html_col_title: The title
sub _html_col_title : method {
$_[0]->_html_coltmpl_text("title", h_abbr(__("Title:")),
h_abbr(__("(Leave it blank if the same as the article title.)")));
}
return 1;

View File

@@ -0,0 +1,396 @@
# History: Theory and Culture
# Newslet.pm: The newsletter form.
# Copyright (c) 2006-2018 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-28
package Selima::htc::Form::Newslet;
use 5.008;
use strict;
use warnings;
use base qw(Selima::Form);
use CGI qw();
use Selima::CallForm;
use Selima::CommText;
use Selima::FormFunc;
use Selima::HTTP;
use Selima::MarkAbbr;
use Selima::ShortCut;
use Selima::htc::Items;
# new: Initialize the HTML form table displayer
sub new : method {
local ($_, %_);
my ($class, $status, $args, $self);
($class, $status, $args) = @_;
$args = {} if !defined $args;
# $args must be a hash reference
http_500 "type of argument 2 must be a hash reference"
if ref($args) ne "HASH";
$$args{"type"} = form_type
if !exists $$args{"type"};
$$args{"table"} = "newslets"
if !exists $$args{"table"};
$$args{"deltext"} = __("Delete this newsletter")
if !exists $$args{"deltext"};
if (!exists $$args{"summary"}) {
# A form to create a new item
if ($$args{"type"} eq "new") {
$$args{"summary"} = __("This table provides you a form to add a new newsletter.");
# A form to edit a current item
} elsif ($$args{"type"} eq "cur") {
$$args{"summary"} = __("This table provides you a form to edit a current newsletter.");
# A form to delete a current item
} elsif ($$args{"type"} eq "del") {
$$args{"summary"} = __("This table provides you a form to delete a newsletter.");
}
}
if (!exists $$args{"cols"}) {
# A form to create a new item
if ($$args{"type"} eq "new") {
$$args{"cols"} = [qw(no date title credits kw hid
index arts)];
# A form to edit a current item
# A form to delete a current item
} elsif ($$args{"type"} eq "cur" || $$args{"type"} eq "del") {
$$args{"cols"} = [qw(sn no date title credits kw hid
index arts
created createdby updated updatedby)];
}
}
if (!exists $$args{"title"}) {
# A form to create a new item
if ($$args{"type"} eq "new") {
$$args{"title"} = __("Add a New Newsletter");
# A form to edit a current item
} elsif ($$args{"type"} eq "cur") {
$$args{"title"} = __("Edit a Current Newsletter");
# A form to delete a current item
} elsif ($$args{"type"} eq "del") {
$$args{"title"} = __("Delete a Newsletter");
}
}
if (!exists $$args{"preview"}) {
$$args{"preview"} = 1;
}
if ($$args{"preview"} && !exists $$args{"prevmsg"}) {
$$args{"prevmsg"} = __("Preview this newsletter.");
}
$self = $class->SUPER::new($status, $args);
# The columns -- we need $self->{"form"} to calculate it
@_ = grep /^ndx.+sub$/, sort $self->{"form"}->param;
$_ = 3;
$_ += 2 while (@_ = grep s/\d+sub$//, @_) > 0;
# Take the larger value
$self->{"colspan"} = $_ if $self->{"colspan"} < $_;
return $self;
}
# _html_col_arts: The articles
sub _html_col_arts : method {
local ($_, %_);
my ($self, $form, $current, $label, $url, $mark, $colspan, $thclass, $thcolspan);
$self = $_[0];
$form = $self->{"form"};
$current = $self->{"cur"};
$mark = $self->_mark("arts");
$colspan = $self->_colspan;
$label = h_abbr(__("[numerate,_1,Article,Articles]:", $current->param("artcount")));
# A current form span for 2 columns
$thclass = $self->{"type"} ne "cur"? " class=\"th\"": "";
$thcolspan = $self->{"type"} eq "cur"? " colspan=\"2\"": "";
print << "EOT";
<tr>
<th$thclass$thcolspan scope="row">$mark$label</th>
EOT
print " <td$colspan>";
@_ = qw();
for ($_ = 0; $_ < $current->param("artcount"); $_++) {
push @_, sprintf " <li><a href=\"%s\">%s</a></li>\n",
h("nlarts.cgi?form=cur&sn=" . $current->param("art$_" . "sn")),
$self->_cval_text("art$_" . "title");
}
print @_ > 0? "<ol>\n" . join("", @_) . " </ol>\n ": h_abbr(t_none);
print << "EOT";
</td>
</tr>
EOT
}
# _html_col_credits: The credits
sub _html_col_credits : method {
$_[0]->_html_coltmpl_textarea("credits", h_abbr(__("Credits:")),
h(__("Fill in the credits here.")));
}
# _html_col_hid: Hide?
sub _html_col_hid : method {
$_[0]->_html_coltmpl_bool("hid", h_abbr(__("Hide?")),
h_abbr(__("Hide this newsletter")), h_abbr(__("Show this newsletter")),
h_abbr(__("Hide this newsletter currently.")));
}
# _html_col_index: The index
sub _html_col_index : method {
local ($_, %_);
my ($self, $form, $current, $label, $orig, $new, $mark, $colspan);
my ($rowspan, $rows_new, $htmlsub);
$self = $_[0];
$form = $self->{"form"};
$current = $self->{"cur"};
$label = h_abbr(__("Index:"));
$mark = $self->_mark("poems");
$colspan = $self->_colspan;
# A form to create a new item
if ($self->{"type"} eq "new") {
($rowspan, $htmlsub) = $self->__html_col_index_form("ndx");
$rowspan = $rowspan > 1? " rowspan=\"" . h($rowspan) . "\"": "";
print << "EOT";
<tr>
<th class="th"$rowspan scope="row"><label for="ndx0">$mark$label</label></th>
EOT
print $htmlsub . "</tr>\n";
# A form to edit a current item
} elsif ($self->{"type"} eq "cur") {
($rows_new, $htmlsub) = $self->__html_col_index_form("ndx");
$rowspan = $rows_new + 1;
$rows_new = $rows_new > 1? " rowspan=\"" . h($rows_new) . "\"": "";
$rowspan = $rowspan > 1? " rowspan=\"" . h($rowspan) . "\"": "";
$orig = h_abbr(__("Original:"));
$new = h_abbr(__("New:"));
print << "EOT";
<tr>
<th class="th"$rowspan scope="row"><label for="ndx0">$mark$label</label></th>
<th class="oldnew" scope="row">$orig</th>
EOT
print " <td$colspan>";
print $current->param("ndxcount") > 0?
$self->__html_col_index_cur("ndx") . " ": h_abbr(t_none);
print << "EOT";
</td>
</tr>
<tr>
<th class="oldnew"$rows_new scope="row">$new</th>
EOT
print $htmlsub . "</tr>\n";
# A form to delete a current item
} else {
$label = h_abbr(__("Index:"));
print << "EOT";
<tr>
<th class="th" scope="row">$mark$label</th>
EOT
print " <td$colspan>";
print $current->param("ndxcount") > 0?
$self->__html_col_index_cur("ndx") . " ": h_abbr(t_none);
print << "EOT";
</td>
</tr>
EOT
}
return;
}
# _html_col_no: The issue number
sub _html_col_no : method {
local ($_, %_);
my ($self, $label, $cur, $mark, $colspan, $thclass, $thcolspan);
$self = $_[0];
$label = h_abbr(__("Issue:"));
$mark = $self->_mark("no");
$colspan = $self->_colspan;
# A form to create a new item
if ($self->{"type"} eq "new") {
$cur = h_abbr(newslet_textno new_nl_no);
print << "EOT"
<tr>
<th class="th" scope="row">$mark$label</th>
<td$colspan>$cur</td>
</tr>
EOT
# A current or delete form
} else {
# A current form span for 2 columns
$thclass = $self->{"type"} ne "cur"? " class=\"th\"": "";
$thcolspan = $self->{"type"} eq "cur"? " colspan=\"2\"": "";
$cur = h_abbr(newslet_textno scalar $self->{"cur"}->param("no"));
print << "EOT";
<tr>
<th$thclass$thcolspan scope="row">$mark$label</th>
<td$colspan>$cur</td>
</tr>
EOT
}
return;
}
# __html_col_index_cur: The current index
sub __html_col_index_cur : method {
local ($_, %_);
my ($self, $colpref, $current, $html, $linepref, $title);
($self, $colpref) = @_;
$current = $self->{"cur"};
($_, $linepref) = ($colpref, " ");
$linepref .= " " while s/^\D+\d+//;
for ($_ = 0, @_ = qw(); $_ < $current->param($colpref . "count"); $_++) {
$title = defined $current->param("$colpref$_" . "title")?
$current->param("$colpref$_" . "title"):
nlart_title($current->param("$colpref$_" . "art"));
if (defined $current->param("$colpref$_" . "sub")) {
push @_, sprintf("%1\$s<li>%2\$s\n%1\$s %3\$s%1\$s</li>\n", $linepref,
h($title), $self->__html_col_index_cur("$colpref$_" . "sub"));
} else {
push @_, sprintf("%s<li>%s</li>\n", $linepref,
h($title));
}
}
return "<ol>\n" . join("", @_) . "$linepref</ol>\n";
}
# __html_col_index_form: The index form
sub __html_col_index_form : method {
local ($_, %_);
my ($self, $colpref, $form, $rows, $colspan, $title, $htmlform);
my ($col, $val, $valartlabel, $textsub, $count, $choose, $delete);
my ($labelart, $labeltitle, $labelsub, $labelsubs);
my ($markart, $marktitle, $marksub, $marksubs);
($self, $colpref) = @_;
$form = $self->{"form"};
($_, $colspan) = ($colpref, -2);
$colspan -= 2 while s/^\D+\d+//;
$colspan = $self->_colspan($colspan);
$choose = h_abbr(__("Choose"));
$delete = h_abbr(__("Delete"));
$labelart = h_abbr(__("Article:"));
$labeltitle = h_abbr(__("Title:"));
$labelsub = h_abbr(__("Has subitems?"));
$labelsubs = h_abbr(__("Subitems:"));
$textsub = h(__("This item has subitems."));
$markart = $self->_mark("ndxart");
$marktitle = $self->_mark("ndxtitle");
$marksub = $self->_mark("ndxhassub");
$marksubs = $self->_mark("ndxsub");
# Find the last filled item
for ($_ = 0; defined $form->param("$colpref$_" . "art")
|| defined $form->param("$colpref$_" . "title"); $_++) {}
for ($_--; $_ >= 0
&& (!defined $form->param("$colpref$_" . "art")
|| $form->param("$colpref$_" . "art") eq "")
&& $form->param("$colpref$_" . "title") eq ""
&& !defined $form->param("$colpref$_" . "sub"); $_--) {}
$count = $_ + 1 + 2;
for ($_ = 0, $rows = 0, @_ = qw(); $_ < $count; $_++) {
my ($colart, $coltitle, $colsub, $colsub0, $valart, $valtitle, $valsub);
$col = "$colpref$_";
$val = $self->_val_check($col);
# "" means not selected yet
$form->delete($col . "art")
if defined $form->param($col . "art") && $form->param($col . "art") eq "";
$valart = $self->_val_text($col . "art");
$colart = h($col . "art");
$valartlabel = h(nlart_title $form->param($colart));
$valtitle = $self->_val_text($col . "title");
$coltitle = h_abbr($col . "title");
$valsub = $self->_val_check($col . "sub");
$colsub = h($col . "sub");
$colsub0 = h($col . "sub0");
$col = h($col);
# An index item that has subitems
if (defined $form->param("$colpref$_" . "sub")) {
my ($htmlsub, $rows_form, $rows_sub);
($rows_sub, $htmlsub) = $self->__html_col_index_form("$colpref$_" . "sub");
$rows_form = $rows_sub + 3;
$rows += $rows_form;
$rows_form = $rows_form > 1? " rowspan=\"" . h($rows_form) . "\"": "";
$rows_sub = $rows_sub > 1? " rowspan=\"" . h($rows_sub) . "\"": "";
$htmlform = "";
$htmlform .= << "EOT";
<td$rows_form><input id="$col" type="checkbox" name="$col"$val /></td>
<th class="th" scope="row"><label for="$colart">$markart$labelart</label></th>
<td$colspan><input type="hidden" name="$colart"$valart />
<label for="sel$colart">$valartlabel</label>
EOT
if (defined $form->param($col . "art")) {
$htmlform .= << "EOT";
<input id="del$colart" type="submit" name="del$colart" value="$delete" />
EOT
}
$htmlform .= << "EOT";
<input id="sel$colart" type="submit" name="sel$colart" value="$choose" />
</td>
</tr>
<tr>
<th class="th" scope="row"><label for="$coltitle">$marktitle$labeltitle</label></th>
<td$colspan><input id="$coltitle" class="text" type="text" name="$coltitle"$valtitle /></td>
</tr>
<tr>
<th class="th" scope="row"><label for="$colsub">$marksub$labelsub</label></th>
<td$colspan><input id="$colsub" type="checkbox" name="$colsub"$valsub />
<label for="$colsub">$textsub</label></td>
</tr>
<tr>
<th class="th"$rows_sub scope="row"><label for="$colsub0">$marksubs$labelsubs</label></th>
EOT
$htmlform .= $htmlsub;
# An end index item
} else {
$rows += 3;
$htmlform = "";
$htmlform .= << "EOT";
<td rowspan="3"><input id="$col" type="checkbox" name="$col"$val /></td>
<th class="th" scope="row"><label for="$colart">$markart$labelart</label></th>
<td$colspan><input type="hidden" name="$colart"$valart />
<label for="sel$colart">$valartlabel</label>
EOT
if (defined $form->param($col . "art")) {
$htmlform .= << "EOT";
<input id="del$colart" type="submit" name="del$colart" value="$delete" />
EOT
}
$htmlform .= << "EOT";
<input id="sel$colart" type="submit" name="sel$colart" value="$choose" />
</td>
</tr>
<tr>
<th class="th" scope="row"><label for="$coltitle">$marktitle$labeltitle</label></th>
<td$colspan><input id="$coltitle" class="text" type="text" name="$coltitle"$valtitle /></td>
</tr>
<tr>
<th class="th" scope="row"><label for="$colsub">$marksub$labelsub</label></th>
<td$colspan><input id="$colsub" type="checkbox" name="$colsub"$valsub />
<label for="$colsub">$textsub</label></td>
EOT
}
push @_, $htmlform;
}
return ($rows, join("</tr>\n<tr>\n", @_));
}
return 1;

View File

@@ -0,0 +1,684 @@
# History: Theory and Culture
# HTML.pm: The HTML web page parts.
# Copyright (c) 2003-2018 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: 2003-04-06
package Selima::htc::HTML;
use 5.008;
use strict;
use warnings;
use base qw(Exporter);
use vars qw(@EXPORT @EXPORT_OK);
BEGIN {
@EXPORT = qw();
push @EXPORT, qw(html_header html_title html_message);
push @EXPORT, qw(html_errmsg html_body html_links html_links_index html_footer);
@EXPORT_OK = @EXPORT;
# Prototype declaration
sub html_header($;$);
sub html_title($;$);
sub html_message($);
sub html_errmsg($);
sub html_nav(;$);
sub html_login(;$);
sub html_nav_admin(;$);
sub html_nav_page(;$);
sub html_body($;$);
sub html_links($;$);
sub html_links_index(\@;$);
sub html_footer(;$);
sub merged_tree($$;$);
}
use Cwd qw(realpath);
use File::Basename qw(dirname);
use File::Spec::Functions qw();
use IO::NestedCapture qw(CAPTURE_STDOUT);
use Selima::A2HTML;
use Selima::AddGet;
use Selima::AltLang;
use Selima::DataVars qw(:author :env :input :list :lninfo :requri :siteconf);
use Selima::ErrMsg;
use Selima::HTTPS;
use Selima::Links;
use Selima::LnInfo;
use Selima::LogIn;
use Selima::MarkAbbr;
use Selima::MungAddr;
use Selima::PageFunc;
use Selima::Preview;
use Selima::ScptPriv;
use Selima::ShortCut;
use Selima::Unicode;
use Selima::XFileIO;
use vars qw(@ADMIN_SCRIPTS %HEADER %FOOTER);
@ADMIN_SCRIPTS = (
{ "title" => N_("Manage Content"),
"sub" => [
{ "title" => N_("Guestbook"),
"path" => "/magicat/cgi-bin/guestbook.cgi" },
{ "title" => N_("Pages"),
"path" => "/magicat/cgi-bin/pages.cgi" },
{ "title" => N_("Links"),
"path" => "/magicat/cgi-bin/links.cgi" },
{ "title" => N_("Link Categories"),
"path" => "/magicat/cgi-bin/linkcat.cgi" },
{ "title" => N_("Link Categorization"),
"path" => "/magicat/cgi-bin/linkcatz.cgi" },
{ "title" => N_("Newsletters"),
"path" => "/magicat/cgi-bin/newslets.cgi" },
{ "title" => N_("Newsletter Indices"),
"path" => "/magicat/cgi-bin/nlindex.cgi" },
{ "title" => N_("Newsletter Articles"),
"path" => "/magicat/cgi-bin/nlarts.cgi" },
],
},
{ "title" => N_("Manage Accounts"),
"sub" => [
{ "title" => N_("Users"),
"path" => "/magicat/cgi-bin/users.cgi" },
{ "title" => N_("Groups"),
"path" => "/magicat/cgi-bin/groups.cgi" },
{ "title" => N_("User Membership"),
"path" => "/magicat/cgi-bin/usermem.cgi" },
{ "title" => N_("Group Membership"),
"path" => "/magicat/cgi-bin/groupmem.cgi" },
{ "title" => N_("User Preferences"),
"path" => "/magicat/cgi-bin/userpref.cgi" },
{ "title" => N_("Script Privileges"),
"path" => "/magicat/cgi-bin/scptpriv.cgi" },
],
},
{ "title" => N_("Miscellaneous"),
"sub" => [
{ "title" => N_("Activity Log"),
"path" => "/magicat/cgi-bin/actlog.cgi" },
{ "title" => N_("Rebuild Pages"),
"path" => "/magicat/cgi-bin/rebuild.cgi" },
{ "title" => N_("Analog"),
"path" => "/magicat/analog/" },
{ "title" => N_("Test Script"),
"path" => "/magicat/cgi-bin/test.cgi" },
],
},
);
# html_header: Display the page header
sub html_header($;$) {
local ($_, %_);
my ($title, $args, $guide);
my ($langname, $langfile);
my ($author, $copyright, $keywords, $copypage);
my ($stylesheets, $javascripts, $favicon, $class, $onload);
my ($titlelang, $skiptobody);
($title, $args) = @_;
# Obtain the page parameters
$args = page_param $args;
# Set the language
$langname = h(ln $$args{"lang"}, LN_NAME);
$langfile = ln($$args{"lang"}, LN_FILENAME);
# Misc
# The copyright message should be already HTML-escaped,
# for the copyright sign "&copy;".
$author = exists $$args{"author"}? h($$args{"author"}):
defined $AUTHOR? h($AUTHOR): undef;
$copyright = exists $$args{"copyright"}? $$args{"copyright"}:
defined $COPYRIGHT? $COPYRIGHT: undef;
$keywords = exists $$args{"keywords"}? h($$args{"keywords"}): undef;
$copypage = exists $$args{"copypage"}? h($$args{"copypage"}): undef;
# Style sheets
$stylesheets = [];
push @$stylesheets, "/stylesheets/common.css";
push @$stylesheets, @{$$args{"stylesheets"}}
if exists $$args{"stylesheets"};
# JavaScripts
$javascripts = [];
if (exists $$args{"javascripts"}) {
push @$javascripts, "/scripts/common.js";
push @$javascripts, "/scripts/lang.$langfile.js";
push @$javascripts, @{$$args{"javascripts"}};
}
# Favorite icon
$favicon = exists $$args{"favicon"}?
h($$args{"favicon"}): h("/favicon.ico");
# The class of body
$class = exists $$args{"class"}?
" class=\"" . h($$args{"class"}) . "\"": "";
# The onload JavaScript event handler
$onload = exists $$args{"onload"}?
" onload=\"" . h($$args{"onload"}) . "\"": "";
# The accessibility guide
$skiptobody = h(__("Skip to the page content area."));
$guide = h(__("Page Content Area"));
print << "EOT";
<?xml version="1.0" encoding="<!--selima:charset-->" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="$langname">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=<!--selima:charset-->" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
EOT
# Author, copyright and keywords
print "<meta name=\"author\" content=\"$author\" />\n"
if defined $author;
print "<meta name=\"copyright\" content=\"$copyright\" />\n"
if defined $copyright;
print "<meta name=\"keywords\" content=\"$keywords\" />\n"
if defined $keywords;
print "<meta name=\"generator\" content=\"<!--selima:generator-->\" />\n"
if $$args{"static"};
# The home page
print "<link rel=\"start\" type=\"application/xhtml+xml\" href=\"/\" />\n";
# The copyright page
print "<link rel=\"copyright\" type=\"application/xhtml+xml\""
. " href=\"$copypage\" />\n"
if defined $copypage;
# The author contact information
print "<link rel=\"author\" href=\"mailto:htc\@mail.emandy.idv.tw\" />\n";
# Revelent pages
print "<link rel=\"up\" type=\"application/xhtml+xml\""
. " href=\"" . h($$args{"up"}) . "\" />\n"
if exists $$args{"up"};
print "<link rel=\"first\" type=\"application/xhtml+xml\""
. " href=\"" . h($$args{"first"}) . "\" />\n"
if exists $$args{"first"};
print "<link rel=\"prev\" type=\"application/xhtml+xml\""
. " href=\"" . h($$args{"prev"}) . "\" />\n"
if exists $$args{"prev"};
print "<link rel=\"next\" type=\"application/xhtml+xml\""
. " href=\"" . h($$args{"next"}) . "\" />\n"
if exists $$args{"next"};
print "<link rel=\"last\" type=\"application/xhtml+xml\""
. " href=\"" . h($$args{"last"}) . "\" />\n"
if exists $$args{"last"};
print "<link rel=\"contents\" type=\"application/xhtml+xml\""
. " href=\"" . h($$args{"toc"}) . "\" />\n"
if exists $$args{"toc"};
# Style sheets
print "<link rel=\"stylesheet\" type=\"text/css\""
. " href=\"" . h($_) . "\" />\n"
foreach @$stylesheets;
# JavaScripts
print "<script type=\"text/javascript\" src=\""
. h($_) . "\"></script>\n"
foreach @$javascripts;
# Favorite Icon
print "<link rel=\"shortcut icon\" type=\"image/x-icon\""
. " href=\"$favicon\" />\n";
# The title
$titlelang = $$args{"title_lang"} eq $$args{"lang"}? "":
" xml:lang=\"" . h(ln $$args{"title_lang"}, LN_NAME) . "\"";
print "<title" . $titlelang . ">" . h($title) . "</title>\n";
print << "EOT";
</head>
<body$class$onload>
<div id="topofpage" class="skiptobody">
<a accesskey="2" href="#body">$skiptobody</a>
</div>
EOT
# Show the navigation area
html_nav $args;
# Embrace the content
print << "EOT";
<div id="body" class="body" title="$guide">
<div class="accessguide"><a accesskey="C"
href="#body" title="$guide">:::</a></div>
EOT
# Display the title
html_title $title, $args unless $$args{"no_auto_title"};
return;
}
# html_title: Print an HTML title
sub html_title($;$) {
local ($_, %_);
my ($title, $args, $h);
($title, $args) = @_;
$h = << "EOT";
<h1>%s</h1>
EOT
printf $h, h_abbr($title);
return;
}
# html_message: Print an HTML message
sub html_message($) {
local ($_, %_);
$_ = $_[0];
return if !defined $_ || $_ eq "";
$_ = h_abbr($_);
print << "EOT";
<p class="message">$_</p>
EOT
return;
}
# html_errmsg: Print an HTML error message, a wrapper to html_message()
sub html_errmsg($) {
local ($_, %_);
$_ = $_[0];
return if !defined $_;
html_message(err2msg $_);
return;
}
# html_nav: Print the HTML navigation bar
sub html_nav(;$) {
local ($_, %_);
my ($args, $lang, $guide, $FD, @sections);
$args = $_[0];
# Obtain the page parameters
$args = page_param $args;
$lang = $$args{"lang"};
# The accessibility guide
$guide = h(__("Navigation Links Area"));
@sections = qw();
# Print the primary navigation bar
$HEADER{"file"} = sprintf("%s/magicat/include/header.html", $DOC_ROOT)
if !exists $HEADER{"file"};
undef $_;
if ( !exists $HEADER{"content"}
|| !exists $HEADER{"date"}
|| $HEADER{"date"} < ($_ = (stat $HEADER{"file"})[9])) {
$_ = (stat $HEADER{"file"})[9] if !defined $_;
$HEADER{"date"} = $_;
$HEADER{"content"} = hcref_decode ln($lang, LN_CHARSET), xfread $HEADER{"file"};
}
push @sections, $HEADER{"content"};
# Print the log-in information
IO::NestedCapture->start(CAPTURE_STDOUT);
binmode IO::NestedCapture->instance->{"STDOUT_current"}[-1], ":utf8";
html_login $args;
IO::NestedCapture->stop(CAPTURE_STDOUT);
$FD = IO::NestedCapture->get_last_out;
$_ = join "", <$FD>;
push @sections, $_ if $_ ne "";
# Print the section-specific navigation bar
IO::NestedCapture->start(CAPTURE_STDOUT);
binmode IO::NestedCapture->instance->{"STDOUT_current"}[-1], ":utf8";
if ($$args{"admin"}) {
html_nav_admin $args;
} else {
html_nav_page $args;
}
IO::NestedCapture->stop(CAPTURE_STDOUT);
$FD = IO::NestedCapture->get_last_out;
$_ = join "", <$FD>;
push @sections, $_ if $_ ne "";
# Embrace the navigation links
print << "EOT";
<div id="nav" class="nav" title="$guide">
<div class="accessguide"><a accesskey="L"
href="#nav" title="$guide">:::</a></div>
EOT
# Print each navigation sections
print join "<hr />\n\n", @sections;
# Embrace the navigation links
print << "EOT";
</div>
<hr />
EOT
return;
}
# html_login: Print the HTML log-in information
sub html_login(;$) {
local ($_, %_);
my ($args, $msg, $modify, $submit);
$args = $_[0];
# Skip if not logged-in
return if !defined get_login_sn;
# Obtain the page parameters
$args = page_param $args;
# No log-in bar for static pages
return if $$args{"static"};
# The message
$modify = "/magicat/cgi-bin/users.cgi?form=cur&sn=" . get_login_sn;
$msg = sprintf __("Welcome, %s. (<span><a href=\"%s\">Modify</a></span>)"),
h(get_login_name), h($modify);
$submit = h(__("Log out"));
print << "EOT";
<form class="login" action="/magicat/cgi-bin/logout.cgi" method="post">
<div class="navibar">
$msg <input
type="submit" name="confirm" value="$submit" />
</div>
</form>
EOT
return;
}
# html_nav_admin: Print the HTML administrative navigation bar
sub html_nav_admin(;$) {
local ($_, %_);
my ($args, $cgidir, $path, $title);
$args = $_[0];
# Obtain the page parameters
$args = page_param $args;
# Find the current CGI directory
$cgidir = "cgi-bin";
$cgidir = $1 if $REQUEST_PATH =~ /\/(cgi-[a-z0-9]+)\/[a-z0-9]+\.cgi$/;
# Output them
foreach my $cat (@ADMIN_SCRIPTS) {
@_ = qw();
foreach (@{$$cat{"sub"}}) {
next unless is_script_permitted $$_{"path"};
($path, $title) = ($$_{"path"}, $$_{"title"});
# Fix the path to use the same cgi-* directory alias
$path =~ s/\/cgi-[a-z0-9]+\/([a-z0-9]+\.cgi)$/\/$cgidir\/$1/;
# Fix the path of the HTTPS scripts to use HTTPS
$path = "https://" . https_host . "/$PACKAGE$path"
if exists $$_{"https"} && $$_{"https"} && !is_https;
push @_, sprintf(" <span><a href=\"%s\">%s</a></span>",
h($path), h_abbr(__($title)));
}
next if @_ == 0;
$title = $$cat{"title"};
$_ = sprintf(__("%s:"), h_abbr(__($title)));
print "<div class=\"navibar\">\n"
. $_ . "\n" . join(" |\n", @_) . "\n"
. "</div>\n"
if @_ > 0;
}
return;
}
# html_nav_page: Print the HTML page navigation bar
sub html_nav_page(;$) {
local ($_, %_);
my ($args, $tree);
$args = $_[0];
# Obtain the page parameters
$args = page_param $args;
# Obtain the page tree
$tree = merged_tree $$args{"path"}, $$args{"lang"}, $$args{"preview"};
# Bounce for nothing
return if !defined $tree
|| !exists $$tree{"pages"}
|| !defined $$tree{"pages"}
|| @{$$tree{"pages"}} <= 1;
# Output them
print << "EOT";
<div class="navibar">
EOT
@_ = qw();
foreach (@{$$tree{"pages"}}) {
push @_, " <span><a href=\"" . h($$_{"path"}) . "\">"
. h($$_{"title"}) . "</a></span>";
}
print join(" |\n", @_) . "\n";
print << "EOT";
</div>
EOT
return;
}
# html_body: Print the HTML body
sub html_body($;$) {
local ($_, %_);
my ($page, $args);
($page, $args) = @_;
# Obtain page parameters
$args = page_param $args;
# Output the picture
# To be done
# Output the content
print "" . (!exists $$page{"html"} || !$$page{"html"}?
a2html($$page{"body"}): $$page{"body"}) . "\n\n";
return;
}
# html_links: Print the HTML links list
sub html_links($;$) {
local ($_, %_);
my ($page, $args);
($page, $args) = @_;
# Obtain page parameters
$args = page_param $args;
# Output the breadcrumb trai
@_ = qw();
push @_, "<a href=\"/links/\">" . h(__("Related Links")) . "</a>";
foreach my $parent (@{$$page{"parents"}}) {
push @_, "<a href=\"" . h($$parent{"path"}) . "\">"
. h($$parent{"title"}) . "</a>";
}
push @_, h($$page{"title"});
print "<div class=\"breadcrumb\">\n"
. join(" /\n", @_) . "\n</div>\n\n";
# Output the subcategories
if (@{$$page{"scats"}} > 0) {
print "<h2>" . h(__("Subcategories:")) . "</h2>\n\n<ol>\n";
foreach my $cat (@{$$page{"scats"}}) {
$_ = h($$cat{"title"});
$_ .= " <span class=\"note\">("
. h($$cat{"links"}) . ")</span>"
if $$cat{"links"} > 0;
print "<li><a href=\"" . h($$cat{"path"}) . "\">"
. "$_</a></li>\n";
}
print "</ol>\n\n";
}
# Output the links
if (@{$$page{"links"}} > 0) {
my $emailalt;
$emailalt = h(__("E-mail"));
print "<ol class=\"linkslist\">\n";
foreach my $link (@{$$page{"links"}}) {
my ($url, $title, $ctitle, $dsc);
$url = h($$link{"url"});
$title = h($$link{"title"});
print "<li>\n";
print "<form action=\"/cgi-bin/mailto.cgi\" method=\"post\">\n<div>\n"
if defined $$link{"email"};
# Output the link icon
print "<a href=\"$url\"><img class=\"linkicon\"\n"
. " src=\"" . h($$link{"icon"}) . "\"\n"
. " alt=\"$title\" /></a><br />\n"
if defined $$link{"icon"};
# Output the site title
$ctitle = is_usascii_printable($$link{"title"})?
"<span class=\"en\" xml:lang=\"en\">$title</span>": $title;
if (defined $$link{"title_2ln"}) {
$_ = h($$link{"title_2ln"});
$_ = "<span class=\"en\" xml:lang=\"en\">$_</span>"
if is_usascii_printable($$link{"title_2ln"});
$ctitle .= " $_";
}
print "<cite>$ctitle</cite><br />\n";
# Output the URL
print __("URL:") . " <a href=\"$url\">$url</a><br />\n";
# Output other information
if (defined $$link{"email"}) {
print __("E-mail:") . " ";
print "<input type=\"hidden\" name=\"email\" value=\""
. h(mung_address_at($$link{"email"})) . "\" />\n";
print "<input type=\"image\" src=\"/images/email\" alt=\"$emailalt\" />\n";
print mung_email_span(h($$link{"email"})) . "<br />\n";
}
print __("Address:") . " " . h($$link{"addr"}) . "<br />\n"
if defined $$link{"addr"};
print __("Tel.:") . " " . h($$link{"tel"}) . "<br />\n"
if defined $$link{"tel"};
print __("Fax.:") . " " . h($$link{"fax"}) . "<br />\n"
if defined $$link{"fax"};
# Output the description
$dsc = $$link{"dsc"};
print h($dsc) . "<br />\n";
print "</div>\n</form>\n" if defined $$link{"email"};
print "</li>\n\n";
}
print "</ol>\n\n";
}
return;
}
# html_links_index: Print the HTML link categories index
sub html_links_index(\@;$) {
local ($_, %_);
my ($cats, $args);
($cats, $args) = @_;
# Obtain page parameters
$args = page_param $args;
# Bounce for nothing
if (@$cats == 0) {
print "<p>" . h(__("The database is empty.")) . "</p>\n\n";
return;
}
# Output the root categories
print << "EOT";
<ul class="toc" id="toc">
EOT
foreach my $cat (@$cats) {
$_ = h($$cat{"title"});
$_ .= " <span class=\"note\">("
. h($$cat{"links"}) . ")</span>"
if $$cat{"links"} > 0;
print "<li><a href=\"" . h($$cat{"path"}) . "\">"
. "$_</a></li>\n";
}
print << "EOT";
</ul>
EOT
return;
}
# html_footer: Print the HTML footer
sub html_footer(;$) {
local ($_, %_);
my ($args, $lang);
$args = $_[0];
# Obtain the page parameters
$args = page_param $args;
$lang = $$args{"lang"};
# Embrace the content
print << "EOT";
</div>
EOT
# Print the section-specific navigation bar
print "<hr />\n" . $$args{"footer_html_nav"} . "\n\n"
if exists $$args{"footer_html_nav"};
# Print the common footer
$FOOTER{"file"} = sprintf("%s/magicat/include/footer.html", $DOC_ROOT)
if !exists $FOOTER{"file"};
undef $_;
if ( !exists $FOOTER{"content"}
|| !exists $FOOTER{"date"}
|| $FOOTER{"date"} < ($_ = (stat $FOOTER{"file"})[9])) {
$_ = (stat $FOOTER{"file"})[9] if !defined $_;
$FOOTER{"date"} = $_;
$FOOTER{"content"} = hcref_decode ln($lang, LN_CHARSET), xfread $FOOTER{"file"};
}
$_ = $FOOTER{"content"};
$FOOTER{"perl"} = {} if !exists $FOOTER{"perl"};
if ($$args{"static"}) {
s/\n+<!--selima:perl-->\n+/\n\n/;
} elsif ($IS_MODPERL) {
if (!exists ${$FOOTER{"perl"}}{"modperl"}) {
${$FOOTER{"perl"}}{"modperl"} = << "EOT";
<div class="modperl">
<a href="http://perl.apache.org/"><img
src="/images/modperl" alt="%s" /></a>
<p>%s</p>
</div>
EOT
${$FOOTER{"perl"}}{"modperl"} = sprintf(${$FOOTER{"perl"}}{"modperl"},
h(__("mod_perl -- Speed, Power, Scalability")),
__("This script is written in <a href=\"http://www.perl.com/\"><acronym title=\"Practical Extraction and Reporting Language\">Perl</acronym></a> and optimized for <a href=\"http://perl.apache.org/\">mod_perl</a>."));
${$FOOTER{"perl"}}{"modperl"} =~ s/(<a href=".+?")(>)/$1 hreflang="en"$2/g
if $lang ne "en";
}
s/<!--selima:perl-->\n/${$FOOTER{"perl"}}{"modperl"}/;
} else {
if (!exists ${$FOOTER{"perl"}}{"cgi"}) {
${$FOOTER{"perl"}}{"cgi"} = << "EOT";
<div>
<p>%s</p>
</div>
EOT
${$FOOTER{"perl"}}{"cgi"} = sprintf(${$FOOTER{"perl"}}{"cgi"},
__("This script is written in <a href=\"http://www.perl.com/\"><acronym title=\"Practical Extraction and Reporting Language\">Perl</acronym></a>."));
${$FOOTER{"perl"}}{"cgi"} =~ s/(<a href=".+?")(>)/$1 hreflang="en"$2/g
if $lang ne "en";
}
s/<!--selima:perl-->\n/${$FOOTER{"perl"}}{"cgi"}/;
}
print $_;
# Show the HTML preview mark
html_preview_mark $args;
print "\n</body>\n</html>\n";
return;
}
# merged_tree: Get the page tree in a directory
sub merged_tree($$;$) {
local ($_, %_);
my ($path, $lang, $preview);
($path, $lang, $preview) = @_;
# Return special areas
if ($path =~ /^\/links\//) {
return link_tree($path, $lang, $preview);
# Non-pages (scripts... etc)
} else {
return {};
}
}
return 1;

View File

@@ -0,0 +1,174 @@
# History: Theory and Culture
# Items.pm: The data record related subroutines.
# Copyright (c) 2006-2018 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-28
package Selima::htc::Items;
use 5.008;
use utf8;
use strict;
use warnings;
use base qw(Exporter);
use vars qw(@EXPORT @EXPORT_OK);
BEGIN {
@EXPORT = qw();
push @EXPORT, qw(new_nl_no newslet_textno newslet_title newslet_no);
push @EXPORT, qw(nlindex_title nlart_title);
@EXPORT_OK = @EXPORT;
# Prototype declaration
sub new_nl_no();
sub newslet_textno($);
sub newslet_title($);
sub newslet_no($);
sub nlindex_title($);
sub nlart_title($);
}
use Encode qw(encode);
use Lingua::ZH::Numbers;
use Selima::ChkFunc;
use Selima::CommText;
use Selima::DataVars qw($DBH);
# new_nl_no: Get the issue number for a new newsletter
sub new_nl_no() {
local ($_, %_);
my ($sql, $sth);
$sql = "SELECT no FROM newslets"
. " ORDER BY no DESC LIMIT 1;\n";
$sth = $DBH->prepare($sql);
$sth->execute;
return 1 if $sth->rows < 1;
return ${$sth->fetch}[0] + 1;
}
# newslet_textno: Obtain the text representation of the issue number
sub newslet_textno($) {
local ($_, %_);
$_ = $_[0];
# Invalid - returned "as is"
return $_ if !defined $_ || /\D/ || $_ < 0;
# First issue
return "創刊號" if $_ == 1;
Lingua::ZH::Numbers->charset("traditional");
return "第" . number_to_zh($_) . "期";
}
# newslet_title: Obtain a newsletter title
sub newslet_title($) {
local ($_, %_);
my ($sn, $sql, $sth, $row);
$sn = $_[0];
# Bounce if there is any problem with $sn
return t_notset if !defined $sn;
# Check the serial number first
return t_na if !check_sn $sn;
# Query
$sql = "SELECT no, title FROM newslets"
. " WHERE sn=$sn;\n";
$sth = $DBH->prepare($sql);
$sth->execute;
# Not found
return t_na unless $sth->rows == 1;
# Found
$row = $sth->fetchrow_hashref;
$_ = newslet_textno $$row{"no"};
$_ .= ":「" . $$row{"title"} . "」專號" if defined $$row{"title"};
return $_;
}
# newslet_no: Obtain a newsletter number
sub newslet_no($) {
local ($_, %_);
my ($sn, $sql, $sth);
$sn = $_[0];
# Bounce if there is any problem with $sn
return t_notset if !defined $sn;
# Check the serial number first
return t_na if !check_sn $sn;
# Query
$sql = "SELECT no FROM newslets"
. " WHERE sn=$sn;\n";
$sth = $DBH->prepare($sql);
$sth->execute;
# Not found
return t_na unless $sth->rows == 1;
# Found
return ${$sth->fetch}[0];
}
# nlindex_title: Obtain a newsletter index item title
sub nlindex_title($) {
local ($_, %_);
my ($sn, $sql, $sth);
$sn = $_[0];
# Bounce if there is any problem with $sn
return t_notset if !defined $sn;
# Check the serial number first
return t_na if !check_sn $sn;
# Query
$sql = "SELECT nlindex_fulltitle(parent, COALESCE(nlindex.title, nlarts.title)) AS title FROM nlindex"
. " LEFT JOIN nlarts ON nlindex.art=nlarts.sn"
. " WHERE nlindex.sn=$sn;\n";
$sth = $DBH->prepare($sql);
$sth->execute;
# Not found
return t_na unless $sth->rows == 1;
# Found
return ${$sth->fetch}[0];
}
# nlart_title: Obtain a newsletter article title
sub nlart_title($) {
local ($_, %_);
my ($sn, $sql, $sth);
$sn = $_[0];
# Bounce if there is any problem with $sn
return t_notset if !defined $sn;
# Check the serial number first
return t_na if !check_sn $sn;
# Query
$sql = "SELECT title FROM nlarts"
. " WHERE sn=$sn;\n";
$sth = $DBH->prepare($sql);
$sth->execute;
# Not found
return t_na unless $sth->rows == 1;
# Found
return ${$sth->fetch}[0];
}
no utf8;
return 1;

View File

@@ -0,0 +1,38 @@
# History: Theory and Culture
# L10N.pm: The localization class.
# Copyright (c) 2003-2018 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: 2003-04-26
package Selima::htc::L10N;
use 5.008;
use strict;
use warnings;
use base qw(Locale::Maketext::Gettext);
return 1;
# The Chinese (Taiwan) localized messages.
package Selima::htc::L10N::zh_tw;
use 5.008;
use strict;
use warnings;
use base qw(Locale::Maketext::Gettext);
sub numerate : method { $_[2] }
return 1;

View File

@@ -0,0 +1,47 @@
# History: Theory and Culture
# Guestbook.pm: The administrative guestbook message list.
# Copyright (c) 2004-2018 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: 2004-10-24
package Selima::htc::List::Guestbook;
use 5.008;
use strict;
use warnings;
use base qw(Selima::List::Guestbook);
use Selima::ShortCut;
# new: Initialize the handler
sub new : method {
local ($_, %_);
my ($self, $class);
($class, @_) = @_;
$_[1] = "guestbook" if !defined $_[1];
$self = $class->SUPER::new(@_);
# The page title
$self->{"title"} = $self->{"is_called_form"}?
__("Select a Message"):
__("Manage the Guestbook");
# Column labels
$self->col_labels(
"identity" => __("Occupation"),
);
return $self;
}
return 1;

View File

@@ -0,0 +1,36 @@
# History: Theory and Culture
# Public.pm: The guestbook message list.
# Copyright (c) 2004-2018 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: 2004-10-24
package Selima::htc::List::Guestbook::Public;
use 5.008;
use strict;
use warnings;
use base qw(Selima::List::Guestbook::Public);
# new: Initialize the handler
sub new : method {
local ($_, %_);
my ($class, $self);
($class, @_) = @_;
$self = $class->SUPER::new(@_);
return $self;
}
return 1;

View File

@@ -0,0 +1,98 @@
# History: Theory and Culture
# NLArts.pm: The newsletter article list.
# Copyright (c) 2006-2018 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-28
package Selima::htc::List::NLArts;
use 5.008;
use strict;
use warnings;
use base qw(Selima::List);
use Selima::ShortCut;
# new: Initialize the handler
sub new : method {
local ($_, %_);
my ($self, $class);
($class, @_) = @_;
$_[1] = "nlarts" if !defined $_[1];
$self = $class->SUPER::new(@_);
# The page title
$self->{"title"} = $self->{"is_called_form"}?
__("Select a Newsletter Article"):
__("Manage Newsletter Articles");
# Columns that should display its brief instead
push @{$self->{"COLS_BRIEF"}}, qw(body annots);
# Column labels
$self->col_labels(
"newslet" => __("Newsletter"),
"title_h" => __("HTML title"),
"author" => __("Author"),
"authors" => __("Authors column"),
"annots" => __("Annotations"),
);
return $self;
}
# html_newlink: Display a link to add a new item
sub html_newlink : method {
# Run the parent method
return $_[0]->SUPER::html_newlink(__("Add a new article."));
}
# html_search: Display the search box
sub html_search : method {
# Run the parent method
return $_[0]->SUPER::html_search(__("Search for an article:"));
}
# liststat_message: Return the current list statistics message
sub liststat_message : method {
local ($_, %_);
my $self;
$self = $_[0];
# No record to list
if ($self->{"total"} == 0) {
# Inherit the empty list statistics message
return $self->SUPER::liststat_message;
# Fit in one page
} elsif ($self->{"total"} <= $self->{"pagesize"}) {
# Result comes from a query
if (defined $self->{"query"}) {
return __("Your query found [*,_1,article].", $self->{"total"});
# List result
} else {
return __("[*,_1,article].", $self->{"total"});
}
# More than one page
} else {
# Result comes from a query
if (defined $self->{"query"}) {
return __("Your query found [*,_1,article], listing [#,_2] to [#,_3].",
$self->{"total"}, $self->{"startno"}+1, $self->{"endno"}+1);
# List result
} else {
return __("[*,_1,article], listing [#,_2] to [#,_3].",
$self->{"total"}, $self->{"startno"}+1, $self->{"endno"}+1);
}
}
}
return 1;

View File

@@ -0,0 +1,93 @@
# History: Theory and Culture
# NLIndex.pm: The newsletter index list.
# Copyright (c) 2006-2018 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-28
package Selima::htc::List::NLIndex;
use 5.008;
use strict;
use warnings;
use base qw(Selima::List);
use Selima::ShortCut;
# new: Initialize the handler
sub new : method {
local ($_, %_);
my ($self, $class);
($class, @_) = @_;
$_[1] = "nlindex" if !defined $_[1];
$self = $class->SUPER::new(@_);
# The page title
$self->{"title"} = $self->{"is_called_form"}?
__("Select a Newsletter Index Item"):
__("Manage Newsletter Index");
# Column labels
$self->col_labels(
"newslet" => __("Newsletter"),
"art" => __("Article"),
);
return $self;
}
# html_newlink: Display a link to add a new item
sub html_newlink : method {
# Run the parent method
return $_[0]->SUPER::html_newlink(__("Add a new index item."));
}
# html_search: Display the search box
sub html_search : method {
# Run the parent method
return $_[0]->SUPER::html_search(__("Search for an index item:"));
}
# liststat_message: Return the current list statistics message
sub liststat_message : method {
local ($_, %_);
my $self;
$self = $_[0];
# No record to list
if ($self->{"total"} == 0) {
# Inherit the empty list statistics message
return $self->SUPER::liststat_message;
# Fit in one page
} elsif ($self->{"total"} <= $self->{"pagesize"}) {
# Result comes from a query
if (defined $self->{"query"}) {
return __("Your query found [*,_1,index item].", $self->{"total"});
# List result
} else {
return __("[*,_1,index item].", $self->{"total"});
}
# More than one page
} else {
# Result comes from a query
if (defined $self->{"query"}) {
return __("Your query found [*,_1,index item], listing [#,_2] to [#,_3].",
$self->{"total"}, $self->{"startno"}+1, $self->{"endno"}+1);
# List result
} else {
return __("[*,_1,index item], listing [#,_2] to [#,_3].",
$self->{"total"}, $self->{"startno"}+1, $self->{"endno"}+1);
}
}
}
return 1;

View File

@@ -0,0 +1,97 @@
# History: Theory and Culture
# Newslets.pm: The newsletter list.
# Copyright (c) 2006-2018 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-28
package Selima::htc::List::Newslets;
use 5.008;
use strict;
use warnings;
use base qw(Selima::List);
use Selima::ShortCut;
# new: Initialize the handler
sub new : method {
local ($_, %_);
my ($self, $class);
($class, @_) = @_;
$_[1] = "newslets" if !defined $_[1];
$self = $class->SUPER::new(@_);
# The page title
$self->{"title"} = $self->{"is_called_form"}?
__("Select a Newsletter"):
__("Manage Newsletters");
# The default sort order
$self->{"DEFAULT_SORTBY"} = "-no";
# Columns that should display its brief instead
push @{$self->{"COLS_BRIEF"}}, qw(credits);
# Column labels
$self->col_labels(
"no" => __("Issue"),
"credits" => __("Credits"),
);
return $self;
}
# html_newlink: Display a link to add a new item
sub html_newlink : method {
# Run the parent method
return $_[0]->SUPER::html_newlink(__("Add a new newsletter."));
}
# html_search: Display the search box
sub html_search : method {
# Run the parent method
return $_[0]->SUPER::html_search(__("Search for a newsletter:"));
}
# liststat_message: Return the current list statistics message
sub liststat_message : method {
local ($_, %_);
my $self;
$self = $_[0];
# No record to list
if ($self->{"total"} == 0) {
# Inherit the empty list statistics message
return $self->SUPER::liststat_message;
# Fit in one page
} elsif ($self->{"total"} <= $self->{"pagesize"}) {
# Result comes from a query
if (defined $self->{"query"}) {
return __("Your query found [*,_1,newsletter].", $self->{"total"});
# List result
} else {
return __("[*,_1,newsletter].", $self->{"total"});
}
# More than one page
} else {
# Result comes from a query
if (defined $self->{"query"}) {
return __("Your query found [*,_1,newsletter], listing [#,_2] to [#,_3].",
$self->{"total"}, $self->{"startno"}+1, $self->{"endno"}+1);
# List result
} else {
return __("[*,_1,newsletter], listing [#,_2] to [#,_3].",
$self->{"total"}, $self->{"startno"}+1, $self->{"endno"}+1);
}
}
}
return 1;

View File

@@ -0,0 +1,181 @@
# History: Theory and Culture
# Search.pm: The web site full-text search result list.
# Copyright (c) 2006-2018 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-28
package Selima::htc::List::Search;
use 5.008;
use strict;
use warnings;
use base qw(Selima::List);
use Selima::Logging;
use Selima::ShortCut;
# new: Initialize the handler
sub new : method {
local ($_, %_);
my ($self, $class);
($class, @_) = @_;
$self = $class->SUPER::new(@_);
# The page title
if (!defined $self->{"query"}) {
$self->{"title"} = __("Full Text Search");
} else {
$self->{"title"} = __("Search Result");
}
$self->{"view"} = "search_list";
$self->{"COLS_NO_SEARCH"} = [qw(section path date html)];
return $self;
}
# fetch: Fetch the current list
sub fetch : method {
local ($_, %_);
my $self;
$self = $_[0];
# No search specified
if (!defined $self->{"query"}) {
$self->{"total"} = undef;
return $self->{"error"};
}
# Check the query phrase
# Regularize it
$self->{"query"} =~ s/^\s*(.*?)\s*$/$1/;
# Check if it is filled
if ($self->{"query"} eq"") {
$self->{"total"} = undef;
$self->{"error"} = {"msg"=>N_("Please fill in your query.")};
return $self->{"error"};
}
# Run the parent method
$self->SUPER::fetch;
# Add an activity log record
actlog("Query with phrase \"" . $self->{"query"} . "\".");
# Done
return $self->{"error"};
}
# sql_orderby: Get the SQL ORDER BY phase
# Always return nothing
sub sql_orderby : method { return ""; }
# html_newlink: Display a link to add a new item
# Make it a null function
sub html_newlink : method {}
# html_search: Display the search box
sub html_search : method {
# Run the parent method
return $_[0]->SUPER::html_search(__("Search in the website:"));
}
# liststat_message: Return the current list statistics message
sub liststat_message : method {
local ($_, %_);
my $self;
$self = $_[0];
# No record to list
if ($self->{"total"} == 0) {
# Inherit the empty list statistics message
return $self->SUPER::liststat_message;
# Fit in one page
} elsif ($self->{"total"} <= $self->{"pagesize"}) {
# Result comes from a query
if (defined $self->{"query"}) {
return __("Your query found [*,_1,article].", $self->{"total"});
# List result
} else {
return __("[*,_1,article].", $self->{"total"});
}
# More than one page
} else {
# Result comes from a query
if (defined $self->{"query"}) {
return __("Your query found [*,_1,article], listing [#,_2] to [#,_3].",
$self->{"total"}, $self->{"startno"}+1, $self->{"endno"}+1);
# List result
} else {
return __("[*,_1,article], listing [#,_2] to [#,_3].",
$self->{"total"}, $self->{"startno"}+1, $self->{"endno"}+1);
}
}
}
# html_list: List the items
sub html_list : method {
local ($_, %_);
my ($self);
$self = $_[0];
# Do not show the list
return if !defined $self->{"total"};
# No record to be listed
return if $self->{"total"} == 0;
print << "EOT";
<ol class="searchresult">
EOT
# Print each record
foreach my $current (@{$self->{"current"}}) {
my ($url, $abstract);
$url = h($$current{"path"});
$abstract = $self->query_abstract($current);
if ($$current{"section"} eq "pages") {
my $title;
$title = h($$current{"title"});
print << "EOT";
<li><h3><a href="$url">$title</a></h3>
EOT
} elsif ($$current{"section"} eq "links") {
my ($title, $sectitle);
$title = h($$current{"title"});
$sectitle = h(__("Related Links"));
print << "EOT";
<li><h3><a href="$url">$title</a></h3>
<address><a href="/links/">$sectitle</a></address>
EOT
} elsif ($$current{"section"} eq "guestbook") {
my ($author, $title, $sectitle);
$author = defined $$current{"author"}?
" <span class=\"note\">" . h($$current{"author"}) . "</span>": "";
$title = h(__("Guestbook Message on [_1]", $$current{"date"}));
$sectitle = h(__("Guestbook"));
print << "EOT";
<li><h3><a href="$url">$title</a>$author</h3>
<address><a href="/cgi-bin/guestbook.cgi">$sectitle</a></address>
EOT
}
print "\n<p>$abstract</p>\n" if defined $abstract;
print << "EOT";
</li>
EOT
}
print << "EOT";
</ol>
EOT
return;
}
return 1;

View File

@@ -0,0 +1,141 @@
# History: Theory and Culture
# Public.pm: The guestbook data processor.
# Copyright (c) 2006-2018 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-03-19
package Selima::htc::Processor::Guestbook::Public;
use 5.008;
use utf8;
use strict;
use warnings;
use base qw(Selima::Processor::Guestbook);
use Selima::Country;
use Selima::DataVars qw(:env :input :scptconf);
use Selima::Format;
use Selima::Guest;
use Selima::GeoIP;
use Selima::RemoHost;
use Selima::Unicode;
# new: Initialize the processor
sub new : method {
local ($_, %_);
my ($self, $class);
($class, @_) = @_;
$_[0]->param("form", "new");
$_[0]->param("confirm", 1);
$self = $class->SUPER::new(@_);
$self->{"notify"} = 1;
$self->{"debug"} = 1;
return $self;
}
# _save_cols: Save the column deposit
sub _save_cols : method {
local ($_, %_);
my $self;
($self, @_) = @_;
$self->SUPER::_save_cols(@_);
$self->{"cols"}->{"login"} = 723676436;
return;
}
# _other_tasks: Perform tasks other than column updates
sub _other_tasks : method {
local ($_, %_);
my ($self, $form);
my ($mail, $body, $charset);
$self = $_[0];
return unless $self->{"notify"};
$form = $self->{"form"};
# Compose the mail body
$body = "";
$body .= "若要編輯或刪除這則留言,請連上以下網址:\n";
$body .= "http://" . $ENV{"SERVER_NAME"} . "/magicat/cgi-bin/guestbook.cgi"
. "?form=cur&sn=" . $self->{"sn"} . "\n\n";
$body .= "日期: " . fmttime . "\n";
@_ = qw();
push @_, ctname_zhtw country_lookup;
push @_, remote_host if defined remote_host;
$body .= "來自: " . $ENV{"REMOTE_ADDR"}
. " (" . join(", ", @_) . ")\n";
$body .= "簽名: " . $form->param("name") . "\n"
if $form->param("name") ne "";
$body .= "職業: " . $form->param("identity") . "\n"
if $form->param("identity") ne "";
$body .= "所在地: " . $form->param("location") . "\n"
if $form->param("location") ne "";
$body .= "E-mail " . $form->param("email") . "\n"
if $form->param("email") ne "";
$body .= "網站網址: " . $form->param("url") . "\n"
if $form->param("url") ne "" && $form->param("url") ne "http://";
$body .= "留言:\n\n" . $form->param("message") . "\n\n";
$body .= "原始內容:\n" . $USER_INPUT{"POST_RAWDATA"} . "\n";
# Collecting Debugging infomation
if ($self->{"debug"}) {
$body .= "\n";
$body .= "===== Start Debugging Infomation =====\n";
if ($IS_MODPERL) {
$_ = $IS_MP2? Apache2::RequestUtil->request->as_string:
Apache->request->as_string;
s/^X-Selima-[^\n]+\n//mg;
s/^((?:[^\n]+\n)+).+?$/$1/s;
$body .= $_;
} else {
foreach (sort grep !/^HTTP_X_SELIMA_/, grep /^HTTP_/, keys %ENV) {
my $hname;
$hname = $_;
$hname =~ s/^HTTP_//;
$hname =~ s/_/-/g;
$hname =~ s/(\w)(\w+)/$1 . lc $2/ge;
$body .= "$hname: $ENV{$_}\n";
}
}
$body .= "===== End Debugging Infomation =====\n";
}
# Set the best appropriate output character set
$charset = is_charset($body, "Big5")? "Big5": "UTF-8";
# Compose the mail
$mail = new Selima::Mail;
$mail->charset($charset);
$mail->from($THIS_FILE . "\@" . $ENV{"SERVER_NAME"}, "歷史:理論與文化網站留言板");
$mail->to("htc\@mail.emandy.idv.tw", "歷史:理論與文化編輯");
$mail->subject("[HTC] 留言板留言通知 " . fmtdate);
$mail->body($body);
# Send it
$mail->send;
return;
}
# _actlog: Log the activity
sub _actlog : method {
local ($_, %_);
my $self;
$self = $_[0];
# A form to create a new item
return gactlog "Post a new message on " . fmtdate($self->{"date"})
. " with s/n " . $self->{"sn"} . ".";
}
no utf8;
return 1;

View File

@@ -0,0 +1,132 @@
# History: Theory and Culture
# NLArt.pm: The newsletter article processor.
# Copyright (c) 2006-2018 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-30
package Selima::htc::Processor::NLArt;
use 5.008;
use strict;
use warnings;
use base qw(Selima::Processor);
use Selima::DataVars qw(:addcol);
use Selima::Guest;
use Selima::ShortCut;
use Selima::htc::Items;
use Selima::htc::Rebuild;
# new: Initialize the processor
sub new : method {
local ($_, %_);
my ($self, $class);
($class, @_) = @_;
$_[1] = "nlarts" if @_ < 2;
$self = $class->SUPER::new(@_);
return $self;
}
# _save_cols: Save the column deposit
sub _save_cols : method {
local ($_, %_);
my ($self, $form, $cur);
$self = $_[0];
($form, $cur) = ($self->{"form"}, $self->{"cur"});
# A form to create a new item
if ($self->{"type"} eq "new") {
$self->{"sn"} = $self->_new_sn;
$self->{"cols"} = new Selima::AddCol($self->{"table"}, ADDCOL_INSERT);
$self->{"cols"}->addnum("sn", $self->{"sn"});
$self->{"cols"}->addnum("newslet", $self->_form("newslet"));
$self->{"cols"}->addnum("ord", $self->_form("ord"));
$self->{"cols"}->addstr("title", $self->_form("title"));
$self->{"cols"}->addstr("title_h", $self->_form("title_h"));
$self->{"cols"}->addstr("author", $self->_form("author"));
$self->{"cols"}->addstr("email", $self->_form("email"));
$self->{"cols"}->addstr("authors", $self->_form("authors"));
$self->{"cols"}->addstr("body", $self->_form("body"));
$self->{"cols"}->addstr("annots", $self->_form("annots"));
$self->{"cols"}->addstr("kw", $self->_form("kw"));
$self->{"cols"}->addbool("html", $self->_form("html"));
$self->{"cols"}->addbool("hid", $self->_form("hid"));
# A form to edit a current item
} elsif ($self->{"type"} eq "cur") {
$self->{"cols"} = new Selima::AddCol($self->{"table"}, ADDCOL_UPDATE);
$self->{"cols"}->addnum("newslet", $self->_form("newslet"), scalar $cur->param("newslet"));
$self->{"cols"}->addnum("ord", $self->_form("ord"), scalar $cur->param("ord"));
$self->{"cols"}->addstr("title", $self->_form("title"), scalar $cur->param("title"));
$self->{"cols"}->addstr("title_h", $self->_form("title_h"), scalar $cur->param("title_h"));
$self->{"cols"}->addstr("author", $self->_form("author"), scalar $cur->param("author"));
$self->{"cols"}->addstr("email", $self->_form("email"), scalar $cur->param("email"));
$self->{"cols"}->addstr("authors", $self->_form("authors"), scalar $cur->param("authors"));
$self->{"cols"}->addstr("body", $self->_form("body"), scalar $cur->param("body"));
$self->{"cols"}->addstr("annots", $self->_form("annots"), scalar $cur->param("annots"));
$self->{"cols"}->addstr("kw", $self->_form("kw"), scalar $cur->param("kw"));
$self->{"cols"}->addbool("html", $self->_form("html"), scalar $cur->param("html"));
$self->{"cols"}->addbool("hid", $self->_form("hid"), scalar $cur->param("hid"));
}
return;
}
# _actlog: Log the activity
sub _actlog : method {
local ($_, %_);
my ($self, $form, $cur);
$self = $_[0];
($form, $cur) = ($self->{"form"}, $self->{"cur"});
# A form to create a new item
return gactlog "Create a newsletter article " . $form->param("title")
. " in newsletter No. " . newslet_no($form->param("newslet"))
. " with s/n " . $self->{"sn"} . "."
if $self->{"type"} eq "new";
# A form to edit a current item
return gactlog "Update the newsletter article " . $form->param("title")
. " in newsletter No. " . newslet_no($form->param("newslet"))
. " with s/n " . $self->{"sn"} . "."
if $self->{"type"} eq "cur";
# A form to delete a current item
return gactlog "Delete the newsletter article " . $cur->param("title")
. " in newsletter No. " . newslet_no($cur->param("newslet"))
. " with s/n " . $self->{"sn"} . "."
if $self->{"type"} eq "del";
}
# _ret_status: Return the process status
sub _ret_status : method {
local ($_, %_);
my $self;
$self = $_[0];
return {"msg"=>N_("This article was not modified."),
"isform"=>0}
if !$self->_modified;
# A form to create a new item
return {"msg"=>N_("This article has been successfully added."),
"isform"=>0}
if $self->{"type"} eq "new";
# A form to edit a current item
return {"msg"=>N_("This article has been successfully updated."),
"isform"=>0}
if $self->{"type"} eq "cur";
# A form to delete a current item
return {"msg"=>N_("This article has been successfully deleted."),
"isform"=>0}
if $self->{"type"} eq "del";
}
return 1;

View File

@@ -0,0 +1,122 @@
# History: Theory and Culture
# NLIndex.pm: The newsletter index data processor.
# Copyright (c) 2006-2018 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-29
package Selima::htc::Processor::NLIndex;
use 5.008;
use strict;
use warnings;
use base qw(Selima::Processor);
use Selima::DataVars qw(:addcol);
use Selima::Guest;
use Selima::ShortCut;
use Selima::htc::Items;
# new: Initialize the processor
sub new : method {
local ($_, %_);
my ($self, $class);
($class, @_) = @_;
$_[1] = "nlindex" if @_ < 2;
$self = $class->SUPER::new(@_);
return $self;
}
# _save_cols: Save the column deposit
sub _save_cols : method {
local ($_, %_);
my ($self, $form, $cur, $o);
$self = $_[0];
($form, $cur) = ($self->{"form"}, $self->{"cur"});
if ($self->{"type"} ne "del") {
# Set the "topmost" parent
$form->delete("parent") if defined $form->param("topmost")
&& $form->param("topmost") eq "true";
}
# A form to create a new item
if ($self->{"type"} eq "new") {
$self->{"sn"} = $self->_new_sn;
$self->{"cols"} = new Selima::AddCol($self->{"table"}, ADDCOL_INSERT);
$self->{"cols"}->addnum("sn", $self->{"sn"});
$self->{"cols"}->addnum("newslet", $self->_form("newslet"));
$self->{"cols"}->addnum("parent", $self->_form("parent"));
$self->{"cols"}->addnum("ord", $self->_form("ord"));
$self->{"cols"}->addnum("art", $self->_form("art"));
$self->{"cols"}->addstr("title", $self->_form("title"));
# A form to edit a current item
} elsif ($self->{"type"} eq "cur") {
$self->{"cols"} = new Selima::AddCol($self->{"table"}, ADDCOL_UPDATE);
$self->{"cols"}->addnum("newslet", $self->_form("newslet"), scalar $cur->param("newslet"));
$self->{"cols"}->addnum("parent", $self->_form("parent"), scalar $cur->param("parent"));
$self->{"cols"}->addnum("ord", $self->_form("ord"), scalar $cur->param("ord"));
$self->{"cols"}->addnum("art", $self->_form("art"), scalar $cur->param("art"));
$self->{"cols"}->addstr("title", $self->_form("title"), scalar $cur->param("title"));
}
return;
}
# _actlog: Log the activity
sub _actlog : method {
local ($_, %_);
my ($self, $form, $cur);
$self = $_[0];
($form, $cur) = ($self->{"form"}, $self->{"cur"});
# A form to create a new item
return gactlog "Create a newsletter index item " . $form->param("title")
. " for newsletter No. " . newslet_no($form->param("newslet"))
. " with s/n " . $self->{"sn"} . "."
if $self->{"type"} eq "new";
# A form to edit a current item
return gactlog "Update the newsletter index item " . $form->param("title")
. " for newsletter No. " . newslet_no($form->param("newslet"))
. " with s/n " . $self->{"sn"} . "."
if $self->{"type"} eq "cur";
# A form to delete a current item
return gactlog "Delete the newsletter index item " . $cur->param("title")
. " for newsletter No. " . newslet_no($cur->param("newslet"))
. " with s/n " . $self->{"sn"} . "."
if $self->{"type"} eq "del";
}
# _ret_status: Return the process status
sub _ret_status : method {
local ($_, %_);
my $self;
$self = $_[0];
return {"msg"=>N_("This index item was not modified."),
"isform"=>0}
if !$self->_modified;
# A form to create a new item
return {"msg"=>N_("This index item has been successfully added."),
"isform"=>0}
if $self->{"type"} eq "new";
# A form to edit a current item
return {"msg"=>N_("This index item has been successfully updated."),
"isform"=>0}
if $self->{"type"} eq "cur";
# A form to delete a current item
return {"msg"=>N_("This index item has been successfully deleted."),
"isform"=>0}
if $self->{"type"} eq "del";
}
return 1;

View File

@@ -0,0 +1,121 @@
# History: Theory and Culture
# Newslet.pm: The newsletter data processor.
# Copyright (c) 2006-2018 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-29
package Selima::htc::Processor::Newslet;
use 5.008;
use strict;
use warnings;
use base qw(Selima::Processor);
use Selima::DataVars qw(:addcol);
use Selima::Guest;
use Selima::ShortCut;
# new: Initialize the processor
sub new : method {
local ($_, %_);
my ($self, $class);
($class, @_) = @_;
$_[1] = "newslets" if @_ < 2;
$self = $class->SUPER::new(@_);
return $self;
}
# _save_cols: Save the column deposit
sub _save_cols : method {
local ($_, %_);
my ($self, $form, $cur, $o);
$self = $_[0];
($form, $cur) = ($self->{"form"}, $self->{"cur"});
# A form to create a new item
if ($self->{"type"} eq "new") {
$self->{"sn"} = $self->_new_sn;
$self->{"cols"} = new Selima::AddCol($self->{"table"}, ADDCOL_INSERT);
$self->{"cols"}->addnum("sn", $self->{"sn"});
$self->{"cols"}->addnum("no", $self->_form("no"));
$self->{"cols"}->adddate("date", $self->_form("date"));
$self->{"cols"}->addstr("title", $self->_form("title"));
$self->{"cols"}->addstr("credits", $self->_form("credits"));
$self->{"cols"}->addstr("kw", $self->_form("kw"));
$self->{"cols"}->addbool("hid", $self->_form("hid"));
# A form to edit a current item
} elsif ($self->{"type"} eq "cur") {
$self->{"cols"} = new Selima::AddCol($self->{"table"}, ADDCOL_UPDATE);
$self->{"cols"}->addnum("no", $self->_form("no"), scalar $cur->param("no"));
$self->{"cols"}->adddate("date", $self->_form("date"), scalar $cur->param("date"));
$self->{"cols"}->addstr("title", $self->_form("title"), scalar $cur->param("title"));
$self->{"cols"}->addstr("credits", $self->_form("credits"), scalar $cur->param("credits"));
$self->{"cols"}->addstr("kw", $self->_form("kw"), scalar $cur->param("kw"));
$self->{"cols"}->addbool("hid", $self->_form("hid"), scalar $cur->param("hid"));
# A form to delete a current item
} elsif ($self->{"type"} eq "del") {
# Find the changed items
$_ = new CGI("");
$_->param("cond", "newslet=" . $self->{"sn"});
push @{$self->{"subs"}}, new Selima::Processor::Deletion($_, "nlarts");
}
return;
}
# _actlog: Log the activity
sub _actlog : method {
local ($_, %_);
my ($self, $form, $cur);
$self = $_[0];
($form, $cur) = ($self->{"form"}, $self->{"cur"});
# A form to create a new item
return gactlog "Create a newsletter No. " . $form->param("no")
. " with s/n " . $self->{"sn"} . "."
if $self->{"type"} eq "new";
# A form to edit a current item
return gactlog "Update the newsletter No. " . $form->param("no")
. " with s/n " . $self->{"sn"} . "."
if $self->{"type"} eq "cur";
# A form to delete a current item
return gactlog "Delete the newsletter No. " . $cur->param("no")
. " with s/n " . $self->{"sn"} . "."
if $self->{"type"} eq "del";
}
# _ret_status: Return the process status
sub _ret_status : method {
local ($_, %_);
my $self;
$self = $_[0];
return {"msg"=>N_("This newsletter was not modified."),
"isform"=>0}
if !$self->_modified;
# A form to create a new item
return {"msg"=>N_("This newsletter has been successfully added."),
"isform"=>0}
if $self->{"type"} eq "new";
# A form to edit a current item
return {"msg"=>N_("This newsletter has been successfully updated."),
"isform"=>0}
if $self->{"type"} eq "cur";
# A form to delete a current item
return {"msg"=>N_("This newsletter has been successfully deleted."),
"isform"=>0}
if $self->{"type"} eq "del";
}
return 1;

View File

@@ -0,0 +1,290 @@
# History: Theory and Culture
# Rebuild.pm: The subroutines to rebuild the web pages.
# Copyright (c) 2004-2018 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: 2004-11-02
package Selima::htc::Rebuild;
use 5.008;
use strict;
use warnings;
use base qw(Exporter);
use vars qw(@EXPORT @EXPORT_OK);
BEGIN {
@EXPORT = qw(rebuild_all rebuild_pages rebuild_links rebuild_newslets compose_page);
@EXPORT_OK = @EXPORT;
# Prototype declaration
sub rebuild_all();
sub rebuild_pages(;$);
sub rebuild_links(;$);
sub rebuild_newslets(@);
sub compose_page($;$);
}
use Data::Dumper qw();
use Fcntl qw(:flock);
use IO::NestedCapture qw(CAPTURE_STDOUT);
use Selima::DataVars qw($DBH :output :rebuild);
use Selima::GetLang;
use Selima::Guest;
use Selima::PageFunc;
use Selima::ShortCut;
use Selima::htc::HTML;
use vars qw($PKGL10N);
# rebuild_all: Rebuild everything
sub rebuild_all() {
local ($_, %_);
# Lock the required tables
$DBH->lock(map { $_ => LOCK_SH } @REBUILD_TABLES);
# Rebuild the pages
rebuild_pages;
# Rebuild the links
rebuild_links;
# Rebuild the index
# To be done
#rebuild_index;
return;
}
# rebuild_pages: Rebuild the pages
sub rebuild_pages(;$) {
local ($_, %_);
my ($sql, $sth, $count, $rebuild_everything);
my $lang;
$sql = $_[0];
$lang = getlang;
# Rebuild everything
$rebuild_everything = !defined $sql;
if ($rebuild_everything) {
$sql = "SELECT * FROM pages"
. " WHERE NOT hid;\n";
}
$sth = $DBH->prepare($sql);
$sth->execute;
$count = $sth->rows;
# Bounce if no pages to build on a partial rebuild
# This prevents needless sitemap rebuilding
return if !$rebuild_everything && $count == 0;
# Build each page
for (my $i = 0; $i < $count; $i++) {
my ($page, $html);
$page = $sth->fetchrow_hashref;
# Read the picture into the picture deposit
# To be done
$html = compose_page($page, $lang);
goutpage $html, $$page{"path"}, $lang
if defined $html;
# Output related pictures only when rebuilding everything
# To be done
}
return;
}
# rebuild_links: Rebuild the links
sub rebuild_links(;$) {
local ($_, %_);
my ($sql, $sth, $count, $FD, $rebuild_everything);
my ($lang, $args, $html);
$sql = $_[0];
$lang = getlang;
# Rebuild everything
$rebuild_everything = !defined $sql;
if ($rebuild_everything) {
@_ = $DBH->cols("linkcat");
push @_, $DBH->strcat("'/links'", "linkcat_path(sn, id, parent)")
. " AS path";
$sql = "SELECT " . join(", ", @_) . " FROM linkcat"
. " WHERE linkcat_isshown(sn, hid, parent);\n";
}
$sth = $DBH->prepare($sql);
$sth->execute;
$count = $sth->rows;
for (my $i = 0; $i < $count; $i++) {
my ($page, $sql1, $sth1, $count1, $row1);
$page = $sth->fetchrow_hashref;
# Find the ancesters
@_ = $DBH->cols("linkcat");
push @_, $DBH->strcat("'/links'", "linkcat_path(sn, id, parent)")
. " AS path";
$sql1 = "SELECT " . join(", ", @_) . " FROM linkcat"
. " WHERE linkcat_ischild(sn, " . $$page{"sn"} . ")"
. " ORDER BY linkcat_fullord(parent, ord);\n";
$sth1 = $DBH->prepare($sql1);
$sth1->execute;
$count1 = $sth1->rows;
for (my $i = 0, $$page{"parents"} = []; $i < $count1; $i++) {
push @{$$page{"parents"}}, $sth1->fetchrow_hashref;
}
# Find the subcategories
@_ = $DBH->cols("linkcat");
push @_, $DBH->strcat("'/links'", "linkcat_path(sn, id, parent)")
. " AS path";
$sql1 = "SELECT " . join(", ", @_) . " FROM linkcat"
. " WHERE parent=" . $$page{"sn"}
. " AND linkcat_isshown(sn, hid, parent)"
. " ORDER BY ord;\n";
$sth1 = $DBH->prepare($sql1);
$sth1->execute;
$count1 = $sth1->rows;
for (my $i = 0, $$page{"scats"} = []; $i < $count1; $i++) {
my ($sql2, $sth2, $row2);
$row1 = $sth1->fetchrow_hashref;
# Find the belonging links
$sql2 = "SELECT count(linkcatz.sn) AS count FROM linkcatz"
. " INNER JOIN links ON linkcatz.link=links.sn"
. " INNER JOIN linkcat ON linkcatz.cat=linkcat.sn"
. " WHERE linkcatz.cat=" . $$row1{"sn"}
. " AND NOT links.hid;\n";
$sth2 = $DBH->prepare($sql2);
$sth2->execute;
$row2 = $sth2->fetchrow_hashref;
$$row1{"links"} = $$row2{"count"};
push @{$$page{"scats"}}, $row1;
}
# Find the belonging links
@_ = map "links.$_", $DBH->cols("links");
$sql1 = "SELECT " . join(", ", @_) . " FROM links"
. " INNER JOIN linkcatz ON linkcatz.link=links.sn"
. " WHERE linkcatz.cat=" . $$page{"sn"}
. " AND NOT links.hid;\n";
$sth1 = $DBH->prepare($sql1);
$sth1->execute;
$count1 = $sth1->rows;
for (my $i = 0, $$page{"links"} = []; $i < $count1; $i++) {
push @{$$page{"links"}}, $sth1->fetchrow_hashref;
}
$html = compose_page($page, $lang);
goutpage $html, $$page{"path"}, $lang
if defined $html;
}
# Build the root index page
@_ = $DBH->cols("linkcat");
push @_, $DBH->strcat("'/links'", "linkcat_path(sn, id, parent)")
. " AS path";
$sql = "SELECT " . join(", ", @_) . " FROM linkcat"
. " WHERE parent IS NULL"
. " AND linkcat_isshown(sn, hid, parent)"
. " ORDER BY ord;\n";
$sth = $DBH->prepare($sql);
$sth->execute;
$count = $sth->rows;
for ($_ = 0, @_ = qw(); $_ < $count; $_++) {
my ($cat, $sql1, $sth1, $count1);
$cat = $sth->fetchrow_hashref;
# Find the belonging links
$sql1 = "SELECT count(linkcatz.sn) AS count FROM linkcatz"
. " INNER JOIN links ON linkcatz.link=links.sn"
. " INNER JOIN linkcat ON linkcatz.cat=linkcat.sn"
. " WHERE linkcatz.cat=" . $$cat{"sn"}
. " AND NOT links.hid;\n";
$sth1 = $DBH->prepare($sql1);
$sth1->execute;
$$cat{"links"} = ${$sth1->fetch}[0];
push @_, $cat;
}
$ALT_PAGE_PARAM = {
"path" => "/links/",
"lang" => $lang,
"keywords" => __("related links"),
"class" => "links",
"static" => 1,
"all_linguas" => [$lang]};
$args = page_param;
# Obtain the page
IO::NestedCapture->start(CAPTURE_STDOUT);
binmode IO::NestedCapture->instance->{"STDOUT_current"}[-1], ":utf8";
html_header __("Related Links"), $args;
html_links_index @_, $args;
html_footer $args;
IO::NestedCapture->stop(CAPTURE_STDOUT);
$FD = IO::NestedCapture->get_last_out;
$html = join "", <$FD>;
undef $ALT_PAGE_PARAM;
goutpage $html, "/links/", $lang;
return;
}
# rebuild_newslets: Rebuild the newsletters
sub rebuild_newslets(@) {
local ($_, %_);
return;
}
# compose_page: Compose a page
sub compose_page($;$) {
local ($_, %_);
my ($page, $lang, $args, $FD);
($page, $lang) = @_;
$lang = getlang if !defined $lang;
$ALT_PAGE_PARAM = {
"path" => $$page{"path"},
"lang" => $lang,
"keywords" => $$page{"kw"},
"static" => 1,
"all_linguas" => [$lang]};
$$ALT_PAGE_PARAM{"preview"} = $page
if exists $$page{"preview"};
if (exists $$page{"class"} && defined $$page{"class"} && $$page{"class"} ne "") {
$$ALT_PAGE_PARAM{"class"} = $$page{"class"};
} elsif ($$page{"path"} =~ /^\/links\//) {
$$ALT_PAGE_PARAM{"class"} = "links";
}
$args = page_param;
# Obtain the page
IO::NestedCapture->start(CAPTURE_STDOUT);
binmode IO::NestedCapture->instance->{"STDOUT_current"}[-1], ":utf8";
html_header $$page{"title"}, $args;
if ($$page{"path"} =~ /^\/links\/$/) {
#html_links_index $page, $args;
} elsif ($$page{"path"} =~ /^\/links\/.+$/) {
html_links $page, $args;
} else {
html_body $page, $args;
}
html_footer $args;
IO::NestedCapture->stop(CAPTURE_STDOUT);
$FD = IO::NestedCapture->get_last_out;
$_ = join "", <$FD>;
undef $ALT_PAGE_PARAM;
return $_;
}
return 1;

Binary file not shown.

View File

@@ -0,0 +1,44 @@
# Possible make targets:
# all: Compile the PO files and copy the binary MO files
# into the appropriate directories
# xgettext: Obtain the newest PO template file $(PACKAGE).pot
# from the source programs
# msgmerge: Compare the template $(PACKAGE).pot and the existing
# PO files and get the newest POX files to work with.
PACKAGE = htc
ALLLINGUAS = zh_TW
PKGROOT = ../..
PODIR = magicat/po
LOCALEDIR = $(PKGROOT)/magicat/locale
CATEGORY = LC_MESSAGES
PROGRAMS = cgi-bin/*.cgi magicat/cgi-bin/*.cgi magicat/lib/perl5/*/*.pm magicat/lib/perl5/*/*/*.pm magicat/lib/perl5/*/*/*/*.pm magicat/lib/perl5/*/*/*/*/*.pm
all:
for ln in $(ALLLINGUAS); do \
msgfmt $$ln.po -o $$ln.gmo; \
test -d $(LOCALEDIR) || \
(rm -rf $(LOCALEDIR) && \
mkdir $(LOCALEDIR)); \
test -d $(LOCALEDIR)/$$ln || \
(rm -rf $(LOCALEDIR)/$$ln && \
mkdir $(LOCALEDIR)/$$ln); \
test -d $(LOCALEDIR)/$$ln/$(CATEGORY) || \
(rm -rf $(LOCALEDIR)/$$ln/$(CATEGORY) && \
mkdir $(LOCALEDIR)/$$ln/$(CATEGORY)); \
rm -f $(LOCALEDIR)/$$ln/$(CATEGORY)/$(PACKAGE).mo; \
cp $$ln.gmo $(LOCALEDIR)/$$ln/$(CATEGORY)/$(PACKAGE).mo; \
done
xgettext:
cd $(PKGROOT); \
xgettext --keyword=__ --keyword=N_ -p $(PODIR)/ -o $(PACKAGE).pot \
--language=c $(PROGRAMS); \
cd $(PODIR); \
for ln in $(ALLLINGUAS); do \
msgmerge $$ln.po $(PACKAGE).pot > $$ln.pox; \
done
clean:
rm -f *.gmo

View File

@@ -0,0 +1,963 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-02-17 17:01+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: cgi-bin/guestbook.cgi:25 magicat/cgi-bin/guestbook.cgi:26
msgid "guestbook"
msgstr ""
#: cgi-bin/guestbook.cgi:95 magicat/lib/perl5/Selima/htc/HTML.pm:61
#: magicat/lib/perl5/Selima/htc/List/Search.pm:147
msgid "Guestbook"
msgstr ""
#: cgi-bin/search.cgi:26
msgid "search, query, full text search"
msgstr ""
#: magicat/cgi-bin/actlog.cgi:22
msgid "activity, logs"
msgstr ""
#: magicat/cgi-bin/groupmem.cgi:30
msgid "group membership"
msgstr ""
#: magicat/cgi-bin/groupmem.cgi:94 magicat/cgi-bin/groupmem.cgi:139
#: magicat/cgi-bin/groups.cgi:102 magicat/cgi-bin/groups.cgi:151
#: magicat/cgi-bin/guestbook.cgi:90 magicat/cgi-bin/guestbook.cgi:136
#: magicat/cgi-bin/linkcat.cgi:101 magicat/cgi-bin/linkcat.cgi:154
#: magicat/cgi-bin/linkcatz.cgi:94 magicat/cgi-bin/linkcatz.cgi:139
#: magicat/cgi-bin/links.cgi:91 magicat/cgi-bin/links.cgi:137
#: magicat/cgi-bin/newslets.cgi:128 magicat/cgi-bin/newslets.cgi:173
#: magicat/cgi-bin/nlarts.cgi:93 magicat/cgi-bin/nlarts.cgi:140
#: magicat/cgi-bin/nlindex.cgi:97 magicat/cgi-bin/nlindex.cgi:146
#: magicat/cgi-bin/pages.cgi:96 magicat/cgi-bin/pages.cgi:140
#: magicat/cgi-bin/scptpriv.cgi:92 magicat/cgi-bin/scptpriv.cgi:137
#: magicat/cgi-bin/usermem.cgi:94 magicat/cgi-bin/usermem.cgi:139
#: magicat/cgi-bin/userpref.cgi:92 magicat/cgi-bin/userpref.cgi:137
#: magicat/cgi-bin/users.cgi:111 magicat/cgi-bin/users.cgi:175
msgid "Incorrect form: [_1]."
msgstr ""
#: magicat/cgi-bin/groupmem.cgi:186 magicat/cgi-bin/usermem.cgi:186
msgid "Please select the membership record."
msgstr ""
#: magicat/cgi-bin/groupmem.cgi:194 magicat/cgi-bin/usermem.cgi:194
msgid ""
"This membership record does not exist anymore. Please select another one."
msgstr ""
#: magicat/cgi-bin/groups.cgi:34
msgid "groups"
msgstr ""
#: magicat/cgi-bin/groups.cgi:198
msgid "Please select the group."
msgstr ""
#: magicat/cgi-bin/groups.cgi:206
msgid "This group does not exist anymore. Please select another one."
msgstr ""
#: magicat/cgi-bin/guestbook.cgi:183
msgid "Please select the message."
msgstr ""
#: magicat/cgi-bin/guestbook.cgi:191
msgid "This message does not exist anymore. Please select another one."
msgstr ""
#: magicat/cgi-bin/linkcat.cgi:29
msgid "link categories"
msgstr ""
#: magicat/cgi-bin/linkcat.cgi:90 magicat/cgi-bin/linkcat.cgi:143
msgid ""
"This category has [numerate,_1,a subcategory,subcategories]. It cannot be "
"deleted. To delete the category, [numerate,_1,its subcategory,all of its "
"subcategories] must first be deleted."
msgstr ""
#: magicat/cgi-bin/linkcat.cgi:94 magicat/cgi-bin/linkcat.cgi:147
msgid ""
"This category has [numerate,_1,a link,links]. It cannot be deleted. To "
"delete the category, [numerate,_1,its link,all of its links] must first be "
"deleted."
msgstr ""
#: magicat/cgi-bin/linkcat.cgi:202
msgid "Please select the category."
msgstr ""
#: magicat/cgi-bin/linkcat.cgi:210
msgid "This category does not exist anymore. Please select another one."
msgstr ""
#: magicat/cgi-bin/linkcatz.cgi:30
msgid "link categorization"
msgstr ""
#: magicat/cgi-bin/linkcatz.cgi:186
msgid "Please select the categorization record."
msgstr ""
#: magicat/cgi-bin/linkcatz.cgi:194
msgid ""
"This categorization record does not exist anymore. Please select another "
"one."
msgstr ""
#: magicat/cgi-bin/links.cgi:28 magicat/lib/perl5/Selima/htc/Rebuild.pm:208
msgid "related links"
msgstr ""
#: magicat/cgi-bin/links.cgi:185
msgid "Please select the related link."
msgstr ""
#: magicat/cgi-bin/links.cgi:193
msgid "This related link does not exist anymore. Please select another one."
msgstr ""
#: magicat/cgi-bin/logout.cgi:25
msgid "log out"
msgstr ""
#: magicat/cgi-bin/logout.cgi:98 magicat/cgi-bin/logout.cgi:105
msgid "Log Out"
msgstr ""
#: magicat/cgi-bin/logout.cgi:121
msgid "Are you sure you want to log out?"
msgstr ""
#: magicat/cgi-bin/logout.cgi:122 magicat/lib/perl5/Selima/htc/HTML.pm:361
msgid "Log out"
msgstr ""
#: magicat/cgi-bin/logout.cgi:138
msgid "Log in again."
msgstr ""
#: magicat/cgi-bin/newslets.cgi:31
msgid "newsletters"
msgstr ""
#: magicat/cgi-bin/newslets.cgi:226
msgid "Please select the newsletter."
msgstr ""
#: magicat/cgi-bin/newslets.cgi:234
#: magicat/lib/perl5/Selima/htc/Checker/NLArt.pm:140
#: magicat/lib/perl5/Selima/htc/Checker/NLIndex.pm:47
msgid "This newsletter does not exist anymore. Please select another one."
msgstr ""
#: magicat/cgi-bin/nlarts.cgi:29
msgid "newsletter articles"
msgstr ""
#: magicat/cgi-bin/nlarts.cgi:187
msgid "Please select the article."
msgstr ""
#: magicat/cgi-bin/nlarts.cgi:195
#: magicat/lib/perl5/Selima/htc/Checker/NLIndex.pm:111
msgid "This article does not exist anymore. Please select another one."
msgstr ""
#: magicat/cgi-bin/nlindex.cgi:29
msgid "newsletter indices"
msgstr ""
#: magicat/cgi-bin/nlindex.cgi:90 magicat/cgi-bin/nlindex.cgi:139
#: magicat/lib/perl5/Selima/htc/Form/NLIndex.pm:78
msgid ""
"This index item has [numerate,_1,a subitem,subitems]. It cannot be "
"deleted. To delete the index item, [numerate,_1,its subitem,all of its "
"subitems] must first be deleted."
msgstr ""
#: magicat/cgi-bin/nlindex.cgi:193
msgid "Please select the index item."
msgstr ""
#: magicat/cgi-bin/nlindex.cgi:201
msgid "This index item does not exist anymore. Please select another one."
msgstr ""
#: magicat/cgi-bin/pages.cgi:26
msgid "pages"
msgstr ""
#: magicat/cgi-bin/pages.cgi:193
msgid "Please select the page."
msgstr ""
#: magicat/cgi-bin/pages.cgi:201
msgid "This page does not exist anymore. Please select another one."
msgstr ""
#: magicat/cgi-bin/rebuild.cgi:23
msgid "rebuild pages"
msgstr ""
#: magicat/cgi-bin/scptpriv.cgi:28
msgid "script privilege"
msgstr ""
#: magicat/cgi-bin/scptpriv.cgi:184
msgid "Please select the script privilege record."
msgstr ""
#: magicat/cgi-bin/scptpriv.cgi:192
msgid ""
"This script privilege record does not exist anymore. Please select another "
"one."
msgstr ""
#: magicat/cgi-bin/usermem.cgi:30
msgid "user membership"
msgstr ""
#: magicat/cgi-bin/userpref.cgi:28
msgid "user preference"
msgstr ""
#: magicat/cgi-bin/userpref.cgi:184
msgid "Please select the user preference."
msgstr ""
#: magicat/cgi-bin/userpref.cgi:192
msgid ""
"This user preference does not exist anymore. Please select another one."
msgstr ""
#: magicat/cgi-bin/users.cgi:29
msgid "users"
msgstr ""
#: magicat/cgi-bin/users.cgi:222
msgid "Please select the user."
msgstr ""
#: magicat/cgi-bin/users.cgi:230
msgid "This user does not exist anymore. Please select another one."
msgstr ""
#: magicat/lib/perl5/Selima/htc/HTML.pm:59
msgid "Manage Content"
msgstr ""
#: magicat/lib/perl5/Selima/htc/HTML.pm:63
msgid "Pages"
msgstr ""
#: magicat/lib/perl5/Selima/htc/HTML.pm:65
msgid "Links"
msgstr ""
#: magicat/lib/perl5/Selima/htc/HTML.pm:67
msgid "Link Categories"
msgstr ""
#: magicat/lib/perl5/Selima/htc/HTML.pm:69
msgid "Link Categorization"
msgstr ""
#: magicat/lib/perl5/Selima/htc/HTML.pm:71
msgid "Newsletters"
msgstr ""
#: magicat/lib/perl5/Selima/htc/HTML.pm:73
msgid "Newsletter Indices"
msgstr ""
#: magicat/lib/perl5/Selima/htc/HTML.pm:75
msgid "Newsletter Articles"
msgstr ""
#: magicat/lib/perl5/Selima/htc/HTML.pm:79
msgid "Manage Accounts"
msgstr ""
#: magicat/lib/perl5/Selima/htc/HTML.pm:81
msgid "Users"
msgstr ""
#: magicat/lib/perl5/Selima/htc/HTML.pm:83
msgid "Groups"
msgstr ""
#: magicat/lib/perl5/Selima/htc/HTML.pm:85
msgid "User Membership"
msgstr ""
#: magicat/lib/perl5/Selima/htc/HTML.pm:87
msgid "Group Membership"
msgstr ""
#: magicat/lib/perl5/Selima/htc/HTML.pm:89
msgid "User Preferences"
msgstr ""
#: magicat/lib/perl5/Selima/htc/HTML.pm:91
msgid "Script Privileges"
msgstr ""
#: magicat/lib/perl5/Selima/htc/HTML.pm:95
msgid "Miscellaneous"
msgstr ""
#: magicat/lib/perl5/Selima/htc/HTML.pm:97
msgid "Activity Log"
msgstr ""
#: magicat/lib/perl5/Selima/htc/HTML.pm:99
msgid "Rebuild Pages"
msgstr ""
#: magicat/lib/perl5/Selima/htc/HTML.pm:101
msgid "Analog"
msgstr ""
#: magicat/lib/perl5/Selima/htc/HTML.pm:103
msgid "Test Script"
msgstr ""
#: magicat/lib/perl5/Selima/htc/HTML.pm:154
msgid "Skip to the page content area."
msgstr ""
#: magicat/lib/perl5/Selima/htc/HTML.pm:155
msgid "Page Content Area"
msgstr ""
#: magicat/lib/perl5/Selima/htc/HTML.pm:288
msgid "Navigation Links Area"
msgstr ""
#: magicat/lib/perl5/Selima/htc/HTML.pm:359
#, c-format
msgid "Welcome, %s. (<span><a href=\"%s\">Modify</a></span>)"
msgstr ""
#: magicat/lib/perl5/Selima/htc/HTML.pm:401
#, c-format
msgid "%s:"
msgstr ""
#: magicat/lib/perl5/Selima/htc/HTML.pm:471
#: magicat/lib/perl5/Selima/htc/Rebuild.pm:216
#: magicat/lib/perl5/Selima/htc/List/Search.pm:136
msgid "Related Links"
msgstr ""
#: magicat/lib/perl5/Selima/htc/HTML.pm:482
msgid "Subcategories:"
msgstr ""
#: magicat/lib/perl5/Selima/htc/HTML.pm:497
#: magicat/lib/perl5/Selima/htc/Form/Guestbook/Public.pm:19
msgid "E-mail"
msgstr ""
#: magicat/lib/perl5/Selima/htc/HTML.pm:522
msgid "URL:"
msgstr ""
#: magicat/lib/perl5/Selima/htc/HTML.pm:525
msgid "E-mail:"
msgstr ""
#: magicat/lib/perl5/Selima/htc/HTML.pm:531
msgid "Address:"
msgstr ""
#: magicat/lib/perl5/Selima/htc/HTML.pm:533
msgid "Tel.:"
msgstr ""
#: magicat/lib/perl5/Selima/htc/HTML.pm:535
msgid "Fax.:"
msgstr ""
#: magicat/lib/perl5/Selima/htc/HTML.pm:560
msgid "The database is empty."
msgstr ""
#: magicat/lib/perl5/Selima/htc/HTML.pm:626
msgid "mod_perl -- Speed, Power, Scalability"
msgstr ""
#: magicat/lib/perl5/Selima/htc/HTML.pm:627
msgid ""
"This script is written in <a href=\"http://www.perl.com/\"><acronym title="
"\"Practical Extraction and Reporting Language\">Perl</acronym></a> and "
"optimized for <a href=\"http://perl.apache.org/\">mod_perl</a>."
msgstr ""
#: magicat/lib/perl5/Selima/htc/HTML.pm:640
msgid ""
"This script is written in <a href=\"http://www.perl.com/\"><acronym title="
"\"Practical Extraction and Reporting Language\">Perl</acronym></a>."
msgstr ""
#: magicat/lib/perl5/Selima/htc/Checker/Guestbook.pm:33
msgid "This occupation is too long. (Max. length [#,_1])"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Checker/Newslet.pm:61
msgid "Please fill in the date."
msgstr ""
#: magicat/lib/perl5/Selima/htc/Checker/Newslet.pm:64
#: magicat/lib/perl5/Selima/htc/Checker/Newslet.pm:67
#: magicat/lib/perl5/Selima/htc/Checker/Newslet.pm:69
msgid "Please fill in a valid date in YYYY-MM-DD format."
msgstr ""
#: magicat/lib/perl5/Selima/htc/Checker/Newslet.pm:89
msgid "This credits information is too long. (Max. length [#,_1])"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Checker/NLArt.pm:44
#: magicat/lib/perl5/Selima/htc/Form/NLArt.pm:107
msgid "Fill in the annotations here."
msgstr ""
#: magicat/lib/perl5/Selima/htc/Checker/NLArt.pm:47
msgid "This annotations list is too long. (Max. length [#,_1])"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Checker/NLArt.pm:68
msgid "This author is too long. (Max. length [#,_1])"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Checker/NLArt.pm:88
#: magicat/lib/perl5/Selima/htc/Form/NLArt.pm:100
msgid "Fill in the authors column here."
msgstr ""
#: magicat/lib/perl5/Selima/htc/Checker/NLArt.pm:91
msgid "This authors column is too long. (Max. length [#,_1])"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Checker/NLArt.pm:115
msgid "This e-mail is too long. (Max. length [#,_1])"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Checker/NLArt.pm:119
msgid "Please fill in a valid e-mail address."
msgstr ""
#: magicat/lib/perl5/Selima/htc/Checker/NLArt.pm:137
#: magicat/lib/perl5/Selima/htc/Checker/NLIndex.pm:44
msgid "Please select a newsletter."
msgstr ""
#: magicat/lib/perl5/Selima/htc/Checker/NLArt.pm:163
msgid "This HTML title is too long. (Max. length [#,_1])"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Checker/NLIndex.pm:60
#: magicat/lib/perl5/Selima/htc/Checker/NLIndex.pm:75
msgid "Please select a parent index item."
msgstr ""
#: magicat/lib/perl5/Selima/htc/Checker/NLIndex.pm:65
msgid "This option is invalid. Please select a proper parent index item."
msgstr ""
#: magicat/lib/perl5/Selima/htc/Checker/NLIndex.pm:78
msgid ""
"This parent index item does not exist anymore. Please select another one."
msgstr ""
#: magicat/lib/perl5/Selima/htc/Checker/NLIndex.pm:82
msgid "An index item cannot belong to itself. Please select another one."
msgstr ""
#: magicat/lib/perl5/Selima/htc/Checker/NLIndex.pm:89
msgid ""
"An index item cannot belong to its descendant. Please select another one."
msgstr ""
#: magicat/lib/perl5/Selima/htc/Checker/NLIndex.pm:131
msgid "Please fill in the title."
msgstr ""
#: magicat/lib/perl5/Selima/htc/Checker/NLIndex.pm:137
msgid "This title is too long. (Max. length [#,_1])"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/Guestbook.pm:18
msgid "Occupation:"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/Guestbook.pm:23
msgid "Website URL.:"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:38
msgid "Delete this newsletter"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:43
msgid "This table provides you a form to add a new newsletter."
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:46
msgid "This table provides you a form to edit a current newsletter."
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:49
msgid "This table provides you a form to delete a newsletter."
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:68
msgid "Add a New Newsletter"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:71
msgid "Edit a Current Newsletter"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:74
msgid "Delete a Newsletter"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:81
msgid "Preview this newsletter."
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:102
msgid "[numerate,_1,Article,Articles]:"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:127
msgid "Credits:"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:128
msgid "Fill in the credits here."
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:133
msgid "Hide?"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:134
msgid "Hide this newsletter"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:134
msgid "Show this newsletter"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:135
msgid "Hide this newsletter currently."
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:146
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:186
msgid "Index:"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:166
msgid "Original:"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:167
msgid "New:"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:207
msgid "Issue:"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:273
msgid "Choose"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:274
msgid "Delete"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:275
#: magicat/lib/perl5/Selima/htc/Form/NLIndex.pm:86
msgid "Article:"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:276
#: magicat/lib/perl5/Selima/htc/Form/NLIndex.pm:134
msgid "Title:"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:277
msgid "Has subitems?"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:278
msgid "Subitems:"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:279
msgid "This item has subitems."
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/NLArt.pm:36
msgid "Delete this article"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/NLArt.pm:41
msgid "This table provides you a form to add a new article."
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/NLArt.pm:44
msgid "This table provides you a form to edit a current article."
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/NLArt.pm:47
msgid "This table provides you a form to delete a article."
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/NLArt.pm:66
msgid "Add a New Newsletter Article"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/NLArt.pm:69
msgid "Edit a Current Newsletter Article"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/NLArt.pm:72
msgid "Delete a Newsletter Article"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/NLArt.pm:79
msgid "Preview this article."
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/NLArt.pm:88
#: magicat/lib/perl5/Selima/htc/Form/NLIndex.pm:91
msgid "Newsletter:"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/NLArt.pm:93
msgid "HTML title:"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/NLArt.pm:94
msgid "(Leave it blank if the same as the title.)"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/NLArt.pm:99
msgid "Authors column:"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/NLArt.pm:101
msgid "(Leave it blank if the same as the author.)"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/NLArt.pm:106
msgid "Annotations:"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/NLIndex.pm:36
msgid "Delete this index item"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/NLIndex.pm:41
msgid "This table provides you a form to add a new index item."
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/NLIndex.pm:44
msgid "This table provides you a form to edit a current index item."
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/NLIndex.pm:47
msgid "This table provides you a form to delete a index item."
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/NLIndex.pm:64
msgid "Add a New Newsletter Index Item"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/NLIndex.pm:67
msgid "Edit a Current Newsletter Index Item"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/NLIndex.pm:70
msgid "Delete a Newsletter Index Item"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/NLIndex.pm:96
msgid "Parent item:"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/NLIndex.pm:97
msgid "At the very top"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/NLIndex.pm:109
msgid "[numerate,_1,Subitem,Subitems]:"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/NLIndex.pm:135
msgid "(Leave it blank if the same as the article title.)"
msgstr ""
#: magicat/lib/perl5/Selima/htc/List/Guestbook.pm:24
msgid "Select a Message"
msgstr ""
#: magicat/lib/perl5/Selima/htc/List/Guestbook.pm:25
msgid "Manage the Guestbook"
msgstr ""
#: magicat/lib/perl5/Selima/htc/List/Guestbook.pm:28
#: magicat/lib/perl5/Selima/htc/Form/Guestbook/Public.pm:24
msgid "Occupation"
msgstr ""
#: magicat/lib/perl5/Selima/htc/List/Newslets.pm:24
msgid "Select a Newsletter"
msgstr ""
#: magicat/lib/perl5/Selima/htc/List/Newslets.pm:25
msgid "Manage Newsletters"
msgstr ""
#: magicat/lib/perl5/Selima/htc/List/Newslets.pm:32
msgid "Issue"
msgstr ""
#: magicat/lib/perl5/Selima/htc/List/Newslets.pm:33
msgid "Credits"
msgstr ""
#: magicat/lib/perl5/Selima/htc/List/Newslets.pm:41
msgid "Add a new newsletter."
msgstr ""
#: magicat/lib/perl5/Selima/htc/List/Newslets.pm:47
msgid "Search for a newsletter:"
msgstr ""
#: magicat/lib/perl5/Selima/htc/List/Newslets.pm:64
msgid "Your query found [*,_1,newsletter]."
msgstr ""
#: magicat/lib/perl5/Selima/htc/List/Newslets.pm:67
msgid "[*,_1,newsletter]."
msgstr ""
#: magicat/lib/perl5/Selima/htc/List/Newslets.pm:73
msgid "Your query found [*,_1,newsletter], listing [#,_2] to [#,_3]."
msgstr ""
#: magicat/lib/perl5/Selima/htc/List/Newslets.pm:77
msgid "[*,_1,newsletter], listing [#,_2] to [#,_3]."
msgstr ""
#: magicat/lib/perl5/Selima/htc/List/NLArts.pm:24
msgid "Select a Newsletter Article"
msgstr ""
#: magicat/lib/perl5/Selima/htc/List/NLArts.pm:25
msgid "Manage Newsletter Articles"
msgstr ""
#: magicat/lib/perl5/Selima/htc/List/NLArts.pm:30
#: magicat/lib/perl5/Selima/htc/List/NLIndex.pm:28
msgid "Newsletter"
msgstr ""
#: magicat/lib/perl5/Selima/htc/List/NLArts.pm:31
msgid "HTML title"
msgstr ""
#: magicat/lib/perl5/Selima/htc/List/NLArts.pm:32
msgid "Author"
msgstr ""
#: magicat/lib/perl5/Selima/htc/List/NLArts.pm:33
msgid "Authors column"
msgstr ""
#: magicat/lib/perl5/Selima/htc/List/NLArts.pm:34
msgid "Annotations"
msgstr ""
#: magicat/lib/perl5/Selima/htc/List/NLArts.pm:42
msgid "Add a new article."
msgstr ""
#: magicat/lib/perl5/Selima/htc/List/NLArts.pm:48
msgid "Search for an article:"
msgstr ""
#: magicat/lib/perl5/Selima/htc/List/NLArts.pm:65
#: magicat/lib/perl5/Selima/htc/List/Search.pm:88
msgid "Your query found [*,_1,article]."
msgstr ""
#: magicat/lib/perl5/Selima/htc/List/NLArts.pm:68
#: magicat/lib/perl5/Selima/htc/List/Search.pm:91
msgid "[*,_1,article]."
msgstr ""
#: magicat/lib/perl5/Selima/htc/List/NLArts.pm:74
#: magicat/lib/perl5/Selima/htc/List/Search.pm:97
msgid "Your query found [*,_1,article], listing [#,_2] to [#,_3]."
msgstr ""
#: magicat/lib/perl5/Selima/htc/List/NLArts.pm:78
#: magicat/lib/perl5/Selima/htc/List/Search.pm:101
msgid "[*,_1,article], listing [#,_2] to [#,_3]."
msgstr ""
#: magicat/lib/perl5/Selima/htc/List/NLIndex.pm:24
msgid "Select a Newsletter Index Item"
msgstr ""
#: magicat/lib/perl5/Selima/htc/List/NLIndex.pm:25
msgid "Manage Newsletter Index"
msgstr ""
#: magicat/lib/perl5/Selima/htc/List/NLIndex.pm:29
msgid "Article"
msgstr ""
#: magicat/lib/perl5/Selima/htc/List/NLIndex.pm:37
msgid "Add a new index item."
msgstr ""
#: magicat/lib/perl5/Selima/htc/List/NLIndex.pm:43
msgid "Search for an index item:"
msgstr ""
#: magicat/lib/perl5/Selima/htc/List/NLIndex.pm:60
msgid "Your query found [*,_1,index item]."
msgstr ""
#: magicat/lib/perl5/Selima/htc/List/NLIndex.pm:63
msgid "[*,_1,index item]."
msgstr ""
#: magicat/lib/perl5/Selima/htc/List/NLIndex.pm:69
msgid "Your query found [*,_1,index item], listing [#,_2] to [#,_3]."
msgstr ""
#: magicat/lib/perl5/Selima/htc/List/NLIndex.pm:73
msgid "[*,_1,index item], listing [#,_2] to [#,_3]."
msgstr ""
#: magicat/lib/perl5/Selima/htc/List/Search.pm:24
msgid "Full Text Search"
msgstr ""
#: magicat/lib/perl5/Selima/htc/List/Search.pm:26
msgid "Search Result"
msgstr ""
#: magicat/lib/perl5/Selima/htc/List/Search.pm:49
msgid "Please fill in your query."
msgstr ""
#: magicat/lib/perl5/Selima/htc/List/Search.pm:71
msgid "Search in the website:"
msgstr ""
#: magicat/lib/perl5/Selima/htc/List/Search.pm:146
msgid "Guestbook Message on [_1]"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Processor/Newslet.pm:90
msgid "This newsletter was not modified."
msgstr ""
#: magicat/lib/perl5/Selima/htc/Processor/Newslet.pm:94
msgid "This newsletter has been successfully added."
msgstr ""
#: magicat/lib/perl5/Selima/htc/Processor/Newslet.pm:98
msgid "This newsletter has been successfully updated."
msgstr ""
#: magicat/lib/perl5/Selima/htc/Processor/Newslet.pm:102
msgid "This newsletter has been successfully deleted."
msgstr ""
#: magicat/lib/perl5/Selima/htc/Processor/NLArt.pm:101
msgid "This article was not modified."
msgstr ""
#: magicat/lib/perl5/Selima/htc/Processor/NLArt.pm:105
msgid "This article has been successfully added."
msgstr ""
#: magicat/lib/perl5/Selima/htc/Processor/NLArt.pm:109
msgid "This article has been successfully updated."
msgstr ""
#: magicat/lib/perl5/Selima/htc/Processor/NLArt.pm:113
msgid "This article has been successfully deleted."
msgstr ""
#: magicat/lib/perl5/Selima/htc/Processor/NLIndex.pm:91
msgid "This index item was not modified."
msgstr ""
#: magicat/lib/perl5/Selima/htc/Processor/NLIndex.pm:95
msgid "This index item has been successfully added."
msgstr ""
#: magicat/lib/perl5/Selima/htc/Processor/NLIndex.pm:99
msgid "This index item has been successfully updated."
msgstr ""
#: magicat/lib/perl5/Selima/htc/Processor/NLIndex.pm:103
msgid "This index item has been successfully deleted."
msgstr ""
#: magicat/lib/perl5/Selima/htc/Checker/Guestbook/Public.pm:36
msgid "Your occupation is too long. (Max. length [#,_1])"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/Guestbook/Public.pm:29
msgid "Location"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/Guestbook/Public.pm:34
msgid "Message"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/Guestbook/Public.pm:35
msgid "Fill in your message here."
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/Guestbook/Public.pm:40
msgid "Signature"
msgstr ""
#: magicat/lib/perl5/Selima/htc/Form/Guestbook/Public.pm:45
msgid "Website URL."
msgstr ""

Binary file not shown.

View File

@@ -0,0 +1,969 @@
# Traditional Chinese PO file for the HTC website
# Copyright (C) 2004-2018 imacat
# This file is distributed under the same license as the htc package.
# imacat <imacat@mail.imacat.idv.tw>, 2004-2018.
#
msgid ""
msgstr ""
"Project-Id-Version: htc 1.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-02-17 17:01+0800\n"
"PO-Revision-Date: 2018-11-02 00:56+0800\n"
"Last-Translator: imacat <imacat@mail.imacat.idv.tw>\n"
"Language-Team: Traditional Chinese <imacat@mail.imacat.idv.tw>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: cgi-bin/guestbook.cgi:25 magicat/cgi-bin/guestbook.cgi:26
msgid "guestbook"
msgstr "留言板"
#: cgi-bin/guestbook.cgi:95 magicat/lib/perl5/Selima/htc/HTML.pm:61
#: magicat/lib/perl5/Selima/htc/List/Search.pm:147
msgid "Guestbook"
msgstr "留言板"
#: cgi-bin/search.cgi:26
msgid "search, query, full text search"
msgstr "搜尋, 檢索, 全文檢索"
#: magicat/cgi-bin/actlog.cgi:22
msgid "activity, logs"
msgstr "活動, 記錄, 日誌"
#: magicat/cgi-bin/groupmem.cgi:30
msgid "group membership"
msgstr "群組成員"
#: magicat/cgi-bin/groupmem.cgi:94 magicat/cgi-bin/groupmem.cgi:139
#: magicat/cgi-bin/groups.cgi:102 magicat/cgi-bin/groups.cgi:151
#: magicat/cgi-bin/guestbook.cgi:90 magicat/cgi-bin/guestbook.cgi:136
#: magicat/cgi-bin/linkcat.cgi:101 magicat/cgi-bin/linkcat.cgi:154
#: magicat/cgi-bin/linkcatz.cgi:94 magicat/cgi-bin/linkcatz.cgi:139
#: magicat/cgi-bin/links.cgi:91 magicat/cgi-bin/links.cgi:137
#: magicat/cgi-bin/newslets.cgi:128 magicat/cgi-bin/newslets.cgi:173
#: magicat/cgi-bin/nlarts.cgi:93 magicat/cgi-bin/nlarts.cgi:140
#: magicat/cgi-bin/nlindex.cgi:97 magicat/cgi-bin/nlindex.cgi:146
#: magicat/cgi-bin/pages.cgi:96 magicat/cgi-bin/pages.cgi:140
#: magicat/cgi-bin/scptpriv.cgi:92 magicat/cgi-bin/scptpriv.cgi:137
#: magicat/cgi-bin/usermem.cgi:94 magicat/cgi-bin/usermem.cgi:139
#: magicat/cgi-bin/userpref.cgi:92 magicat/cgi-bin/userpref.cgi:137
#: magicat/cgi-bin/users.cgi:111 magicat/cgi-bin/users.cgi:175
msgid "Incorrect form: [_1]."
msgstr "查無此表格: [_1] 。"
#: magicat/cgi-bin/groupmem.cgi:186 magicat/cgi-bin/usermem.cgi:186
msgid "Please select the membership record."
msgstr "請選擇成員關係。"
#: magicat/cgi-bin/groupmem.cgi:194 magicat/cgi-bin/usermem.cgi:194
msgid ""
"This membership record does not exist anymore. Please select another one."
msgstr "查無此成員關係,請重新選擇。"
#: magicat/cgi-bin/groups.cgi:34
msgid "groups"
msgstr "群組"
#: magicat/cgi-bin/groups.cgi:198
msgid "Please select the group."
msgstr "請選擇群組。"
#: magicat/cgi-bin/groups.cgi:206
msgid "This group does not exist anymore. Please select another one."
msgstr "查無此群組,請重新選擇。"
#: magicat/cgi-bin/guestbook.cgi:183
msgid "Please select the message."
msgstr "請選擇要設定的留言。"
#: magicat/cgi-bin/guestbook.cgi:191
msgid "This message does not exist anymore. Please select another one."
msgstr "查無該留言,請改選其她留言。"
#: magicat/cgi-bin/linkcat.cgi:29
msgid "link categories"
msgstr "相關連結分類"
#: magicat/cgi-bin/linkcat.cgi:90 magicat/cgi-bin/linkcat.cgi:143
msgid ""
"This category has [numerate,_1,a subcategory,subcategories]. It cannot be "
"deleted. To delete the category, [numerate,_1,its subcategory,all of its "
"subcategories] must first be deleted."
msgstr "本分類下有子類,不可直接刪除。要刪除本分類,請先刪除其下的子類。"
#: magicat/cgi-bin/linkcat.cgi:94 magicat/cgi-bin/linkcat.cgi:147
msgid ""
"This category has [numerate,_1,a link,links]. It cannot be deleted. To "
"delete the category, [numerate,_1,its link,all of its links] must first be "
"deleted."
msgstr "本分類下有連結,不可直接刪除。要刪除本分類,請先刪除其下的連結。"
#: magicat/cgi-bin/linkcat.cgi:202
msgid "Please select the category."
msgstr "請選擇分類。"
#: magicat/cgi-bin/linkcat.cgi:210
msgid "This category does not exist anymore. Please select another one."
msgstr "查無此分類,請重新選擇。"
#: magicat/cgi-bin/linkcatz.cgi:30
msgid "link categorization"
msgstr "連結分類表"
#: magicat/cgi-bin/linkcatz.cgi:186
msgid "Please select the categorization record."
msgstr "請選擇分類資料。"
#: magicat/cgi-bin/linkcatz.cgi:194
msgid ""
"This categorization record does not exist anymore. Please select another "
"one."
msgstr "查無此分類資料,請重新選擇。"
#: magicat/cgi-bin/links.cgi:28 magicat/lib/perl5/Selima/htc/Rebuild.pm:208
msgid "related links"
msgstr "相關連結"
#: magicat/cgi-bin/links.cgi:185
msgid "Please select the related link."
msgstr "請選擇要設定的相關連結。"
#: magicat/cgi-bin/links.cgi:193
msgid "This related link does not exist anymore. Please select another one."
msgstr "查無該相關連結,請改選其她相關連結。"
#: magicat/cgi-bin/logout.cgi:25
msgid "log out"
msgstr "登出"
#: magicat/cgi-bin/logout.cgi:98 magicat/cgi-bin/logout.cgi:105
msgid "Log Out"
msgstr "登出"
#: magicat/cgi-bin/logout.cgi:121
msgid "Are you sure you want to log out?"
msgstr "妳確定要登出嗎?"
#: magicat/cgi-bin/logout.cgi:122 magicat/lib/perl5/Selima/htc/HTML.pm:361
msgid "Log out"
msgstr "登出"
#: magicat/cgi-bin/logout.cgi:138
msgid "Log in again."
msgstr "重新登入。"
#: magicat/cgi-bin/newslets.cgi:31
msgid "newsletters"
msgstr "通訊"
#: magicat/cgi-bin/newslets.cgi:226
msgid "Please select the newsletter."
msgstr "請選擇通訊。"
#: magicat/cgi-bin/newslets.cgi:234
#: magicat/lib/perl5/Selima/htc/Checker/NLArt.pm:140
#: magicat/lib/perl5/Selima/htc/Checker/NLIndex.pm:47
msgid "This newsletter does not exist anymore. Please select another one."
msgstr "查無此通訊,請重新選擇。"
#: magicat/cgi-bin/nlarts.cgi:29
msgid "newsletter articles"
msgstr "通訊文章"
#: magicat/cgi-bin/nlarts.cgi:187
msgid "Please select the article."
msgstr "請選擇文章。"
#: magicat/cgi-bin/nlarts.cgi:195
#: magicat/lib/perl5/Selima/htc/Checker/NLIndex.pm:111
msgid "This article does not exist anymore. Please select another one."
msgstr "查無該文,請改選其她文章。"
#: magicat/cgi-bin/nlindex.cgi:29
msgid "newsletter indices"
msgstr "通訊目錄"
#: magicat/cgi-bin/nlindex.cgi:90 magicat/cgi-bin/nlindex.cgi:139
#: magicat/lib/perl5/Selima/htc/Form/NLIndex.pm:78
msgid ""
"This index item has [numerate,_1,a subitem,subitems]. It cannot be "
"deleted. To delete the index item, [numerate,_1,its subitem,all of its "
"subitems] must first be deleted."
msgstr ""
"本目錄項目下有子項,不可直接刪除。要刪除本目錄項目,請先刪除其下的子項。"
#: magicat/cgi-bin/nlindex.cgi:193
msgid "Please select the index item."
msgstr "請選擇目錄項目。"
#: magicat/cgi-bin/nlindex.cgi:201
msgid "This index item does not exist anymore. Please select another one."
msgstr "查無此目錄項目,請重新選擇。"
#: magicat/cgi-bin/pages.cgi:26
msgid "pages"
msgstr "網頁"
#: magicat/cgi-bin/pages.cgi:193
msgid "Please select the page."
msgstr "請選擇網頁。"
#: magicat/cgi-bin/pages.cgi:201
msgid "This page does not exist anymore. Please select another one."
msgstr "查無此頁,請改選其她網頁。"
#: magicat/cgi-bin/rebuild.cgi:23
msgid "rebuild pages"
msgstr "重製網頁"
#: magicat/cgi-bin/scptpriv.cgi:28
msgid "script privilege"
msgstr "程式權限"
#: magicat/cgi-bin/scptpriv.cgi:184
msgid "Please select the script privilege record."
msgstr "請選擇程式權限。"
#: magicat/cgi-bin/scptpriv.cgi:192
msgid ""
"This script privilege record does not exist anymore. Please select another "
"one."
msgstr "查無該程式權限,請重新選擇。"
#: magicat/cgi-bin/usermem.cgi:30
msgid "user membership"
msgstr "使用者成員"
#: magicat/cgi-bin/userpref.cgi:28
msgid "user preference"
msgstr "使用者偏好"
#: magicat/cgi-bin/userpref.cgi:184
msgid "Please select the user preference."
msgstr "請選擇使用者偏好。"
#: magicat/cgi-bin/userpref.cgi:192
msgid ""
"This user preference does not exist anymore. Please select another one."
msgstr "查無該使用者偏好,請重新選擇。"
#: magicat/cgi-bin/users.cgi:29
msgid "users"
msgstr "帳號"
#: magicat/cgi-bin/users.cgi:222
msgid "Please select the user."
msgstr "請選擇使用者。"
#: magicat/cgi-bin/users.cgi:230
msgid "This user does not exist anymore. Please select another one."
msgstr "查無此人,請重新選擇。"
#: magicat/lib/perl5/Selima/htc/HTML.pm:59
msgid "Manage Content"
msgstr "管理網站"
#: magicat/lib/perl5/Selima/htc/HTML.pm:63
msgid "Pages"
msgstr "網頁"
#: magicat/lib/perl5/Selima/htc/HTML.pm:65
msgid "Links"
msgstr "連結"
#: magicat/lib/perl5/Selima/htc/HTML.pm:67
msgid "Link Categories"
msgstr "連結分類"
#: magicat/lib/perl5/Selima/htc/HTML.pm:69
msgid "Link Categorization"
msgstr "連結分類表"
#: magicat/lib/perl5/Selima/htc/HTML.pm:71
msgid "Newsletters"
msgstr "通訊"
#: magicat/lib/perl5/Selima/htc/HTML.pm:73
msgid "Newsletter Indices"
msgstr "通訊目錄"
#: magicat/lib/perl5/Selima/htc/HTML.pm:75
msgid "Newsletter Articles"
msgstr "通訊文章"
#: magicat/lib/perl5/Selima/htc/HTML.pm:79
msgid "Manage Accounts"
msgstr "管理帳號"
#: magicat/lib/perl5/Selima/htc/HTML.pm:81
msgid "Users"
msgstr "帳號"
#: magicat/lib/perl5/Selima/htc/HTML.pm:83
msgid "Groups"
msgstr "群組"
#: magicat/lib/perl5/Selima/htc/HTML.pm:85
msgid "User Membership"
msgstr "使用者成員"
#: magicat/lib/perl5/Selima/htc/HTML.pm:87
msgid "Group Membership"
msgstr "群組成員"
#: magicat/lib/perl5/Selima/htc/HTML.pm:89
msgid "User Preferences"
msgstr "使用者偏好"
#: magicat/lib/perl5/Selima/htc/HTML.pm:91
msgid "Script Privileges"
msgstr "程式權限"
#: magicat/lib/perl5/Selima/htc/HTML.pm:95
msgid "Miscellaneous"
msgstr "雜項"
#: magicat/lib/perl5/Selima/htc/HTML.pm:97
msgid "Activity Log"
msgstr "活動日誌"
#: magicat/lib/perl5/Selima/htc/HTML.pm:99
msgid "Rebuild Pages"
msgstr "重製網頁"
#: magicat/lib/perl5/Selima/htc/HTML.pm:101
msgid "Analog"
msgstr "訪客統計"
#: magicat/lib/perl5/Selima/htc/HTML.pm:103
msgid "Test Script"
msgstr "測試程式"
#: magicat/lib/perl5/Selima/htc/HTML.pm:154
msgid "Skip to the page content area."
msgstr "跳到網頁內文區。"
#: magicat/lib/perl5/Selima/htc/HTML.pm:155
msgid "Page Content Area"
msgstr "網頁內文區"
#: magicat/lib/perl5/Selima/htc/HTML.pm:288
msgid "Navigation Links Area"
msgstr "導覽連結區"
#: magicat/lib/perl5/Selima/htc/HTML.pm:359
#, c-format
msgid "Welcome, %s. (<span><a href=\"%s\">Modify</a></span>)"
msgstr "%s妳好<span><a href=\"%s\">修改資料</a></span>"
#: magicat/lib/perl5/Selima/htc/HTML.pm:401
#, c-format
msgid "%s:"
msgstr "%s"
#: magicat/lib/perl5/Selima/htc/HTML.pm:471
#: magicat/lib/perl5/Selima/htc/Rebuild.pm:216
#: magicat/lib/perl5/Selima/htc/List/Search.pm:136
msgid "Related Links"
msgstr "相關連結"
#: magicat/lib/perl5/Selima/htc/HTML.pm:482
msgid "Subcategories:"
msgstr "子類:"
#: magicat/lib/perl5/Selima/htc/HTML.pm:497
#: magicat/lib/perl5/Selima/htc/Form/Guestbook/Public.pm:19
msgid "E-mail"
msgstr "E-mail"
#: magicat/lib/perl5/Selima/htc/HTML.pm:522
msgid "URL:"
msgstr "網址:"
#: magicat/lib/perl5/Selima/htc/HTML.pm:525
msgid "E-mail:"
msgstr "E-mail "
#: magicat/lib/perl5/Selima/htc/HTML.pm:531
msgid "Address:"
msgstr "地址:"
#: magicat/lib/perl5/Selima/htc/HTML.pm:533
msgid "Tel.:"
msgstr "電話:"
#: magicat/lib/perl5/Selima/htc/HTML.pm:535
msgid "Fax.:"
msgstr "傳真:"
#: magicat/lib/perl5/Selima/htc/HTML.pm:560
msgid "The database is empty."
msgstr "現無任何資料。"
#: magicat/lib/perl5/Selima/htc/HTML.pm:626
msgid "mod_perl -- Speed, Power, Scalability"
msgstr "mod_perl -- 速度,動力,無限可能"
#: magicat/lib/perl5/Selima/htc/HTML.pm:627
msgid ""
"This script is written in <a href=\"http://www.perl.com/\"><acronym title="
"\"Practical Extraction and Reporting Language\">Perl</acronym></a> and "
"optimized for <a href=\"http://perl.apache.org/\">mod_perl</a>."
msgstr ""
"本程式以 <a href=\"http://www.perl.com/\"><acronym title=\"Practical "
"Extraction and Reporting Language\">Perl</acronym></a> 撰寫,專為 <a href="
"\"http://perl.apache.org/\">mod_perl</a> 設計強化"
#: magicat/lib/perl5/Selima/htc/HTML.pm:640
msgid ""
"This script is written in <a href=\"http://www.perl.com/\"><acronym title="
"\"Practical Extraction and Reporting Language\">Perl</acronym></a>."
msgstr ""
"本程式以 <a href=\"http://www.perl.com/\"><acronym title=\"Practical "
"Extraction and Reporting Language\">Perl</acronym></a> 撰寫"
#: magicat/lib/perl5/Selima/htc/Checker/Guestbook.pm:33
msgid "This occupation is too long. (Max. length [#,_1])"
msgstr "職業太長了。(最長 [#,_1] "
#: magicat/lib/perl5/Selima/htc/Checker/Newslet.pm:61
msgid "Please fill in the date."
msgstr "請填上日期。"
#: magicat/lib/perl5/Selima/htc/Checker/Newslet.pm:64
#: magicat/lib/perl5/Selima/htc/Checker/Newslet.pm:67
#: magicat/lib/perl5/Selima/htc/Checker/Newslet.pm:69
msgid "Please fill in a valid date in YYYY-MM-DD format."
msgstr "日期請以 YYYY-MM-DD 格式填寫。"
#: magicat/lib/perl5/Selima/htc/Checker/Newslet.pm:89
msgid "This credits information is too long. (Max. length [#,_1])"
msgstr "發行欄太長了。(最長 [#,_1] "
#: magicat/lib/perl5/Selima/htc/Checker/NLArt.pm:44
#: magicat/lib/perl5/Selima/htc/Form/NLArt.pm:107
msgid "Fill in the annotations here."
msgstr "請填上註釋。"
#: magicat/lib/perl5/Selima/htc/Checker/NLArt.pm:47
msgid "This annotations list is too long. (Max. length [#,_1])"
msgstr "註釋太長了。(最長 [#,_1] "
#: magicat/lib/perl5/Selima/htc/Checker/NLArt.pm:68
msgid "This author is too long. (Max. length [#,_1])"
msgstr "作者太長了。(最長 [#,_1] "
#: magicat/lib/perl5/Selima/htc/Checker/NLArt.pm:88
#: magicat/lib/perl5/Selima/htc/Form/NLArt.pm:100
msgid "Fill in the authors column here."
msgstr "請填上作者欄。"
#: magicat/lib/perl5/Selima/htc/Checker/NLArt.pm:91
msgid "This authors column is too long. (Max. length [#,_1])"
msgstr "作者欄太長了。(最長 [#,_1] "
#: magicat/lib/perl5/Selima/htc/Checker/NLArt.pm:115
msgid "This e-mail is too long. (Max. length [#,_1])"
msgstr "E-mail 太長了。(最長 [#,_1] "
#: magicat/lib/perl5/Selima/htc/Checker/NLArt.pm:119
msgid "Please fill in a valid e-mail address."
msgstr "請填上正確的 E-mail 信箱。"
#: magicat/lib/perl5/Selima/htc/Checker/NLArt.pm:137
#: magicat/lib/perl5/Selima/htc/Checker/NLIndex.pm:44
msgid "Please select a newsletter."
msgstr "請選擇通訊。"
#: magicat/lib/perl5/Selima/htc/Checker/NLArt.pm:163
msgid "This HTML title is too long. (Max. length [#,_1])"
msgstr "HTML 標題太長了。(最長 [#,_1] "
#: magicat/lib/perl5/Selima/htc/Checker/NLIndex.pm:60
#: magicat/lib/perl5/Selima/htc/Checker/NLIndex.pm:75
msgid "Please select a parent index item."
msgstr "請選擇所屬的大項。"
#: magicat/lib/perl5/Selima/htc/Checker/NLIndex.pm:65
msgid "This option is invalid. Please select a proper parent index item."
msgstr "查無此大項,請重新選擇。"
#: magicat/lib/perl5/Selima/htc/Checker/NLIndex.pm:78
msgid ""
"This parent index item does not exist anymore. Please select another one."
msgstr "查無此大項,請重新選擇。"
#: magicat/lib/perl5/Selima/htc/Checker/NLIndex.pm:82
msgid "An index item cannot belong to itself. Please select another one."
msgstr "目錄項目不可屬於自己本身,請重新選擇。"
#: magicat/lib/perl5/Selima/htc/Checker/NLIndex.pm:89
msgid ""
"An index item cannot belong to its descendant. Please select another one."
msgstr "目錄項目不可屬於自己的子項,請重新選擇。"
#: magicat/lib/perl5/Selima/htc/Checker/NLIndex.pm:131
msgid "Please fill in the title."
msgstr "請填上標題。"
#: magicat/lib/perl5/Selima/htc/Checker/NLIndex.pm:137
msgid "This title is too long. (Max. length [#,_1])"
msgstr "標題太長了。(最長 [#,_1] "
#: magicat/lib/perl5/Selima/htc/Form/Guestbook.pm:18
msgid "Occupation:"
msgstr "職業:"
#: magicat/lib/perl5/Selima/htc/Form/Guestbook.pm:23
msgid "Website URL.:"
msgstr "網站網址:"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:38
msgid "Delete this newsletter"
msgstr "刪掉這期通訊"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:43
msgid "This table provides you a form to add a new newsletter."
msgstr "本表提供建新通訊的表單。"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:46
msgid "This table provides you a form to edit a current newsletter."
msgstr "本表提供編輯通訊的表單。"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:49
msgid "This table provides you a form to delete a newsletter."
msgstr "本表提供刪除通訊的表單。"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:68
msgid "Add a New Newsletter"
msgstr "建新通訊"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:71
msgid "Edit a Current Newsletter"
msgstr "編輯通訊"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:74
msgid "Delete a Newsletter"
msgstr "刪除通訊"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:81
msgid "Preview this newsletter."
msgstr "預覽這期通訊。"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:102
msgid "[numerate,_1,Article,Articles]:"
msgstr "文章:"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:127
msgid "Credits:"
msgstr "發行欄:"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:128
msgid "Fill in the credits here."
msgstr "請填上發行欄。"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:133
msgid "Hide?"
msgstr "隱藏?"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:134
msgid "Hide this newsletter"
msgstr "隱藏這期通訊"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:134
msgid "Show this newsletter"
msgstr "秀出這期通訊"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:135
msgid "Hide this newsletter currently."
msgstr "暫勿秀出這期通訊。"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:146
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:186
msgid "Index:"
msgstr "目錄:"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:166
msgid "Original:"
msgstr "原:"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:167
msgid "New:"
msgstr "新:"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:207
msgid "Issue:"
msgstr "期數:"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:273
msgid "Choose"
msgstr "選擇"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:274
msgid "Delete"
msgstr "刪除"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:275
#: magicat/lib/perl5/Selima/htc/Form/NLIndex.pm:86
msgid "Article:"
msgstr "文章:"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:276
#: magicat/lib/perl5/Selima/htc/Form/NLIndex.pm:134
msgid "Title:"
msgstr "標題:"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:277
msgid "Has subitems?"
msgstr "有子項?"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:278
msgid "Subitems:"
msgstr "子項:"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:279
msgid "This item has subitems."
msgstr "這個項目下有子項。"
#: magicat/lib/perl5/Selima/htc/Form/NLArt.pm:36
msgid "Delete this article"
msgstr "刪掉這篇文章"
#: magicat/lib/perl5/Selima/htc/Form/NLArt.pm:41
msgid "This table provides you a form to add a new article."
msgstr "本表提供建新文章的表單。"
#: magicat/lib/perl5/Selima/htc/Form/NLArt.pm:44
msgid "This table provides you a form to edit a current article."
msgstr "本表提供編輯文章的表單。"
#: magicat/lib/perl5/Selima/htc/Form/NLArt.pm:47
msgid "This table provides you a form to delete a article."
msgstr "本表提供刪除文章的表單。"
#: magicat/lib/perl5/Selima/htc/Form/NLArt.pm:66
msgid "Add a New Newsletter Article"
msgstr "建新通訊文章"
#: magicat/lib/perl5/Selima/htc/Form/NLArt.pm:69
msgid "Edit a Current Newsletter Article"
msgstr "編輯通訊文章"
#: magicat/lib/perl5/Selima/htc/Form/NLArt.pm:72
msgid "Delete a Newsletter Article"
msgstr "刪除通訊文章"
#: magicat/lib/perl5/Selima/htc/Form/NLArt.pm:79
msgid "Preview this article."
msgstr "預覽這篇文章。"
#: magicat/lib/perl5/Selima/htc/Form/NLArt.pm:88
#: magicat/lib/perl5/Selima/htc/Form/NLIndex.pm:91
msgid "Newsletter:"
msgstr "通訊:"
#: magicat/lib/perl5/Selima/htc/Form/NLArt.pm:93
msgid "HTML title:"
msgstr "HTML 標題:"
#: magicat/lib/perl5/Selima/htc/Form/NLArt.pm:94
msgid "(Leave it blank if the same as the title.)"
msgstr "(若與標題相同,請留白。)"
#: magicat/lib/perl5/Selima/htc/Form/NLArt.pm:99
msgid "Authors column:"
msgstr "作者欄:"
#: magicat/lib/perl5/Selima/htc/Form/NLArt.pm:101
msgid "(Leave it blank if the same as the author.)"
msgstr "(若與作者相同,請留白。)"
#: magicat/lib/perl5/Selima/htc/Form/NLArt.pm:106
msgid "Annotations:"
msgstr "註釋:"
#: magicat/lib/perl5/Selima/htc/Form/NLIndex.pm:36
msgid "Delete this index item"
msgstr "刪掉這項目錄項目"
#: magicat/lib/perl5/Selima/htc/Form/NLIndex.pm:41
msgid "This table provides you a form to add a new index item."
msgstr "本表提供建新目錄項目的表單。"
#: magicat/lib/perl5/Selima/htc/Form/NLIndex.pm:44
msgid "This table provides you a form to edit a current index item."
msgstr "本表提供編輯目錄項目的表單。"
#: magicat/lib/perl5/Selima/htc/Form/NLIndex.pm:47
msgid "This table provides you a form to delete a index item."
msgstr "本表提供刪除目錄項目的表單。"
#: magicat/lib/perl5/Selima/htc/Form/NLIndex.pm:64
msgid "Add a New Newsletter Index Item"
msgstr "建新通訊目錄項目"
#: magicat/lib/perl5/Selima/htc/Form/NLIndex.pm:67
msgid "Edit a Current Newsletter Index Item"
msgstr "編輯通訊目錄項目"
#: magicat/lib/perl5/Selima/htc/Form/NLIndex.pm:70
msgid "Delete a Newsletter Index Item"
msgstr "刪除通訊目錄項目"
#: magicat/lib/perl5/Selima/htc/Form/NLIndex.pm:96
msgid "Parent item:"
msgstr "大項:"
#: magicat/lib/perl5/Selima/htc/Form/NLIndex.pm:97
msgid "At the very top"
msgstr "最上層"
#: magicat/lib/perl5/Selima/htc/Form/NLIndex.pm:109
msgid "[numerate,_1,Subitem,Subitems]:"
msgstr "子項:"
#: magicat/lib/perl5/Selima/htc/Form/NLIndex.pm:135
msgid "(Leave it blank if the same as the article title.)"
msgstr "(若與文章標題相同,請留白。)"
#: magicat/lib/perl5/Selima/htc/List/Guestbook.pm:24
msgid "Select a Message"
msgstr "選擇留言"
#: magicat/lib/perl5/Selima/htc/List/Guestbook.pm:25
msgid "Manage the Guestbook"
msgstr "管理留言板"
#: magicat/lib/perl5/Selima/htc/List/Guestbook.pm:28
#: magicat/lib/perl5/Selima/htc/Form/Guestbook/Public.pm:24
msgid "Occupation"
msgstr "職業"
#: magicat/lib/perl5/Selima/htc/List/Newslets.pm:24
msgid "Select a Newsletter"
msgstr "選擇通訊"
#: magicat/lib/perl5/Selima/htc/List/Newslets.pm:25
msgid "Manage Newsletters"
msgstr "管理通訊"
#: magicat/lib/perl5/Selima/htc/List/Newslets.pm:32
msgid "Issue"
msgstr "期數"
#: magicat/lib/perl5/Selima/htc/List/Newslets.pm:33
msgid "Credits"
msgstr "發行欄"
#: magicat/lib/perl5/Selima/htc/List/Newslets.pm:41
msgid "Add a new newsletter."
msgstr "建新通訊。"
#: magicat/lib/perl5/Selima/htc/List/Newslets.pm:47
msgid "Search for a newsletter:"
msgstr "搜尋通訊:"
#: magicat/lib/perl5/Selima/htc/List/Newslets.pm:64
msgid "Your query found [*,_1,newsletter]."
msgstr "共 [#,_1] 期相符的通訊。"
#: magicat/lib/perl5/Selima/htc/List/Newslets.pm:67
msgid "[*,_1,newsletter]."
msgstr "共 [#,_1] 期通訊。"
#: magicat/lib/perl5/Selima/htc/List/Newslets.pm:73
msgid "Your query found [*,_1,newsletter], listing [#,_2] to [#,_3]."
msgstr "共 [#,_1] 期相符的通訊,列出第 [#,_2] 期到第 [#,_3] 期。"
#: magicat/lib/perl5/Selima/htc/List/Newslets.pm:77
msgid "[*,_1,newsletter], listing [#,_2] to [#,_3]."
msgstr "共 [#,_1] 期通訊,列出第 [#,_2] 期到第 [#,_3] 期。"
#: magicat/lib/perl5/Selima/htc/List/NLArts.pm:24
msgid "Select a Newsletter Article"
msgstr "選擇通訊文章"
#: magicat/lib/perl5/Selima/htc/List/NLArts.pm:25
msgid "Manage Newsletter Articles"
msgstr "管理通訊文章"
#: magicat/lib/perl5/Selima/htc/List/NLArts.pm:30
#: magicat/lib/perl5/Selima/htc/List/NLIndex.pm:28
msgid "Newsletter"
msgstr "通訊"
#: magicat/lib/perl5/Selima/htc/List/NLArts.pm:31
msgid "HTML title"
msgstr "HTML 標題"
#: magicat/lib/perl5/Selima/htc/List/NLArts.pm:32
msgid "Author"
msgstr "作者"
#: magicat/lib/perl5/Selima/htc/List/NLArts.pm:33
msgid "Authors column"
msgstr "作者欄"
#: magicat/lib/perl5/Selima/htc/List/NLArts.pm:34
msgid "Annotations"
msgstr "註釋"
#: magicat/lib/perl5/Selima/htc/List/NLArts.pm:42
msgid "Add a new article."
msgstr "建新文章。"
#: magicat/lib/perl5/Selima/htc/List/NLArts.pm:48
msgid "Search for an article:"
msgstr "搜尋文章:"
#: magicat/lib/perl5/Selima/htc/List/NLArts.pm:65
#: magicat/lib/perl5/Selima/htc/List/Search.pm:88
msgid "Your query found [*,_1,article]."
msgstr "共 [#,_1] 篇相符的文章。"
#: magicat/lib/perl5/Selima/htc/List/NLArts.pm:68
#: magicat/lib/perl5/Selima/htc/List/Search.pm:91
msgid "[*,_1,article]."
msgstr "共 [#,_1] 篇文章。"
#: magicat/lib/perl5/Selima/htc/List/NLArts.pm:74
#: magicat/lib/perl5/Selima/htc/List/Search.pm:97
msgid "Your query found [*,_1,article], listing [#,_2] to [#,_3]."
msgstr "共 [#,_1] 篇相符的文章,列出第 [#,_2] 篇到第 [#,_3] 篇。"
#: magicat/lib/perl5/Selima/htc/List/NLArts.pm:78
#: magicat/lib/perl5/Selima/htc/List/Search.pm:101
msgid "[*,_1,article], listing [#,_2] to [#,_3]."
msgstr "共 [#,_1] 篇文章,列出第 [#,_2] 篇到第 [#,_3] 篇。"
#: magicat/lib/perl5/Selima/htc/List/NLIndex.pm:24
msgid "Select a Newsletter Index Item"
msgstr "選擇通訊目錄項目"
#: magicat/lib/perl5/Selima/htc/List/NLIndex.pm:25
msgid "Manage Newsletter Index"
msgstr "管理通訊目錄"
#: magicat/lib/perl5/Selima/htc/List/NLIndex.pm:29
msgid "Article"
msgstr "文章"
#: magicat/lib/perl5/Selima/htc/List/NLIndex.pm:37
msgid "Add a new index item."
msgstr "建新目錄項目。"
#: magicat/lib/perl5/Selima/htc/List/NLIndex.pm:43
msgid "Search for an index item:"
msgstr "搜尋目錄項目:"
#: magicat/lib/perl5/Selima/htc/List/NLIndex.pm:60
msgid "Your query found [*,_1,index item]."
msgstr "共 [#,_1] 項相符的目錄項目。"
#: magicat/lib/perl5/Selima/htc/List/NLIndex.pm:63
msgid "[*,_1,index item]."
msgstr "共 [#,_1] 項目錄項目。"
#: magicat/lib/perl5/Selima/htc/List/NLIndex.pm:69
msgid "Your query found [*,_1,index item], listing [#,_2] to [#,_3]."
msgstr "共 [#,_1] 項相符的目錄項目,列出第 [#,_2] 項到第 [#,_3] 項。"
#: magicat/lib/perl5/Selima/htc/List/NLIndex.pm:73
msgid "[*,_1,index item], listing [#,_2] to [#,_3]."
msgstr "共 [#,_1] 項目錄項目,列出第 [#,_2] 項到第 [#,_3] 項。"
#: magicat/lib/perl5/Selima/htc/List/Search.pm:24
msgid "Full Text Search"
msgstr "全文檢索"
#: magicat/lib/perl5/Selima/htc/List/Search.pm:26
msgid "Search Result"
msgstr "搜尋結果"
#: magicat/lib/perl5/Selima/htc/List/Search.pm:49
msgid "Please fill in your query."
msgstr "請填上檢索的辭彙。"
#: magicat/lib/perl5/Selima/htc/List/Search.pm:71
msgid "Search in the website:"
msgstr "網站檢索:"
#: magicat/lib/perl5/Selima/htc/List/Search.pm:146
msgid "Guestbook Message on [_1]"
msgstr "[_1] 留言"
#: magicat/lib/perl5/Selima/htc/Processor/Newslet.pm:90
msgid "This newsletter was not modified."
msgstr "通訊未異動。"
#: magicat/lib/perl5/Selima/htc/Processor/Newslet.pm:94
msgid "This newsletter has been successfully added."
msgstr "通訊建好了。"
#: magicat/lib/perl5/Selima/htc/Processor/Newslet.pm:98
msgid "This newsletter has been successfully updated."
msgstr "通訊存好了。"
#: magicat/lib/perl5/Selima/htc/Processor/Newslet.pm:102
msgid "This newsletter has been successfully deleted."
msgstr "通訊刪掉了。"
#: magicat/lib/perl5/Selima/htc/Processor/NLArt.pm:101
msgid "This article was not modified."
msgstr "文章未異動。"
#: magicat/lib/perl5/Selima/htc/Processor/NLArt.pm:105
msgid "This article has been successfully added."
msgstr "文章建好了。"
#: magicat/lib/perl5/Selima/htc/Processor/NLArt.pm:109
msgid "This article has been successfully updated."
msgstr "文章存好了。"
#: magicat/lib/perl5/Selima/htc/Processor/NLArt.pm:113
msgid "This article has been successfully deleted."
msgstr "文章刪掉了。"
#: magicat/lib/perl5/Selima/htc/Processor/NLIndex.pm:91
msgid "This index item was not modified."
msgstr "目錄項目未異動。"
#: magicat/lib/perl5/Selima/htc/Processor/NLIndex.pm:95
msgid "This index item has been successfully added."
msgstr "目錄項目建好了。"
#: magicat/lib/perl5/Selima/htc/Processor/NLIndex.pm:99
msgid "This index item has been successfully updated."
msgstr "目錄項目存好了。"
#: magicat/lib/perl5/Selima/htc/Processor/NLIndex.pm:103
msgid "This index item has been successfully deleted."
msgstr "目錄項目刪掉了。"
#: magicat/lib/perl5/Selima/htc/Checker/Guestbook/Public.pm:36
msgid "Your occupation is too long. (Max. length [#,_1])"
msgstr "妳的職業太長了。(最長 [#,_1] "
#: magicat/lib/perl5/Selima/htc/Form/Guestbook/Public.pm:29
msgid "Location"
msgstr "所在地"
#: magicat/lib/perl5/Selima/htc/Form/Guestbook/Public.pm:34
msgid "Message"
msgstr "留言"
#: magicat/lib/perl5/Selima/htc/Form/Guestbook/Public.pm:35
msgid "Fill in your message here."
msgstr "請填上妳的留言。"
#: magicat/lib/perl5/Selima/htc/Form/Guestbook/Public.pm:40
msgid "Signature"
msgstr "簽名"
#: magicat/lib/perl5/Selima/htc/Form/Guestbook/Public.pm:45
msgid "Website URL."
msgstr "網站網址"

View File

@@ -0,0 +1,969 @@
# Traditional Chinese PO file for the HTC website
# Copyright (C) 2004-2018 imacat
# This file is distributed under the same license as the htc package.
# imacat <imacat@mail.imacat.idv.tw>, 2004-2018.
#
msgid ""
msgstr ""
"Project-Id-Version: htc 1.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-02-17 17:01+0800\n"
"PO-Revision-Date: 2012-02-17 17:00+0800\n"
"Last-Translator: imacat <imacat@mail.imacat.idv.tw>\n"
"Language-Team: Traditional Chinese <imacat@mail.imacat.idv.tw>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: cgi-bin/guestbook.cgi:25 magicat/cgi-bin/guestbook.cgi:26
msgid "guestbook"
msgstr "留言板"
#: cgi-bin/guestbook.cgi:95 magicat/lib/perl5/Selima/htc/HTML.pm:61
#: magicat/lib/perl5/Selima/htc/List/Search.pm:147
msgid "Guestbook"
msgstr "留言板"
#: cgi-bin/search.cgi:26
msgid "search, query, full text search"
msgstr "搜尋, 檢索, 全文檢索"
#: magicat/cgi-bin/actlog.cgi:22
msgid "activity, logs"
msgstr "活動, 記錄, 日誌"
#: magicat/cgi-bin/groupmem.cgi:30
msgid "group membership"
msgstr "群組成員"
#: magicat/cgi-bin/groupmem.cgi:94 magicat/cgi-bin/groupmem.cgi:139
#: magicat/cgi-bin/groups.cgi:102 magicat/cgi-bin/groups.cgi:151
#: magicat/cgi-bin/guestbook.cgi:90 magicat/cgi-bin/guestbook.cgi:136
#: magicat/cgi-bin/linkcat.cgi:101 magicat/cgi-bin/linkcat.cgi:154
#: magicat/cgi-bin/linkcatz.cgi:94 magicat/cgi-bin/linkcatz.cgi:139
#: magicat/cgi-bin/links.cgi:91 magicat/cgi-bin/links.cgi:137
#: magicat/cgi-bin/newslets.cgi:128 magicat/cgi-bin/newslets.cgi:173
#: magicat/cgi-bin/nlarts.cgi:93 magicat/cgi-bin/nlarts.cgi:140
#: magicat/cgi-bin/nlindex.cgi:97 magicat/cgi-bin/nlindex.cgi:146
#: magicat/cgi-bin/pages.cgi:96 magicat/cgi-bin/pages.cgi:140
#: magicat/cgi-bin/scptpriv.cgi:92 magicat/cgi-bin/scptpriv.cgi:137
#: magicat/cgi-bin/usermem.cgi:94 magicat/cgi-bin/usermem.cgi:139
#: magicat/cgi-bin/userpref.cgi:92 magicat/cgi-bin/userpref.cgi:137
#: magicat/cgi-bin/users.cgi:111 magicat/cgi-bin/users.cgi:175
msgid "Incorrect form: [_1]."
msgstr "查無此表格: [_1] 。"
#: magicat/cgi-bin/groupmem.cgi:186 magicat/cgi-bin/usermem.cgi:186
msgid "Please select the membership record."
msgstr "請選擇成員關係。"
#: magicat/cgi-bin/groupmem.cgi:194 magicat/cgi-bin/usermem.cgi:194
msgid ""
"This membership record does not exist anymore. Please select another one."
msgstr "查無此成員關係,請重新選擇。"
#: magicat/cgi-bin/groups.cgi:34
msgid "groups"
msgstr "群組"
#: magicat/cgi-bin/groups.cgi:198
msgid "Please select the group."
msgstr "請選擇群組。"
#: magicat/cgi-bin/groups.cgi:206
msgid "This group does not exist anymore. Please select another one."
msgstr "查無此群組,請重新選擇。"
#: magicat/cgi-bin/guestbook.cgi:183
msgid "Please select the message."
msgstr "請選擇要設定的留言。"
#: magicat/cgi-bin/guestbook.cgi:191
msgid "This message does not exist anymore. Please select another one."
msgstr "查無該留言,請改選其她留言。"
#: magicat/cgi-bin/linkcat.cgi:29
msgid "link categories"
msgstr "相關連結分類"
#: magicat/cgi-bin/linkcat.cgi:90 magicat/cgi-bin/linkcat.cgi:143
msgid ""
"This category has [numerate,_1,a subcategory,subcategories]. It cannot be "
"deleted. To delete the category, [numerate,_1,its subcategory,all of its "
"subcategories] must first be deleted."
msgstr "本分類下有子類,不可直接刪除。要刪除本分類,請先刪除其下的子類。"
#: magicat/cgi-bin/linkcat.cgi:94 magicat/cgi-bin/linkcat.cgi:147
msgid ""
"This category has [numerate,_1,a link,links]. It cannot be deleted. To "
"delete the category, [numerate,_1,its link,all of its links] must first be "
"deleted."
msgstr "本分類下有連結,不可直接刪除。要刪除本分類,請先刪除其下的連結。"
#: magicat/cgi-bin/linkcat.cgi:202
msgid "Please select the category."
msgstr "請選擇分類。"
#: magicat/cgi-bin/linkcat.cgi:210
msgid "This category does not exist anymore. Please select another one."
msgstr "查無此分類,請重新選擇。"
#: magicat/cgi-bin/linkcatz.cgi:30
msgid "link categorization"
msgstr "連結分類表"
#: magicat/cgi-bin/linkcatz.cgi:186
msgid "Please select the categorization record."
msgstr "請選擇分類資料。"
#: magicat/cgi-bin/linkcatz.cgi:194
msgid ""
"This categorization record does not exist anymore. Please select another "
"one."
msgstr "查無此分類資料,請重新選擇。"
#: magicat/cgi-bin/links.cgi:28 magicat/lib/perl5/Selima/htc/Rebuild.pm:208
msgid "related links"
msgstr "相關連結"
#: magicat/cgi-bin/links.cgi:185
msgid "Please select the related link."
msgstr "請選擇要設定的相關連結。"
#: magicat/cgi-bin/links.cgi:193
msgid "This related link does not exist anymore. Please select another one."
msgstr "查無該相關連結,請改選其她相關連結。"
#: magicat/cgi-bin/logout.cgi:25
msgid "log out"
msgstr "登出"
#: magicat/cgi-bin/logout.cgi:98 magicat/cgi-bin/logout.cgi:105
msgid "Log Out"
msgstr "登出"
#: magicat/cgi-bin/logout.cgi:121
msgid "Are you sure you want to log out?"
msgstr "妳確定要登出嗎?"
#: magicat/cgi-bin/logout.cgi:122 magicat/lib/perl5/Selima/htc/HTML.pm:361
msgid "Log out"
msgstr "登出"
#: magicat/cgi-bin/logout.cgi:138
msgid "Log in again."
msgstr "重新登入。"
#: magicat/cgi-bin/newslets.cgi:31
msgid "newsletters"
msgstr "通訊"
#: magicat/cgi-bin/newslets.cgi:226
msgid "Please select the newsletter."
msgstr "請選擇通訊。"
#: magicat/cgi-bin/newslets.cgi:234
#: magicat/lib/perl5/Selima/htc/Checker/NLArt.pm:140
#: magicat/lib/perl5/Selima/htc/Checker/NLIndex.pm:47
msgid "This newsletter does not exist anymore. Please select another one."
msgstr "查無此通訊,請重新選擇。"
#: magicat/cgi-bin/nlarts.cgi:29
msgid "newsletter articles"
msgstr "通訊文章"
#: magicat/cgi-bin/nlarts.cgi:187
msgid "Please select the article."
msgstr "請選擇文章。"
#: magicat/cgi-bin/nlarts.cgi:195
#: magicat/lib/perl5/Selima/htc/Checker/NLIndex.pm:111
msgid "This article does not exist anymore. Please select another one."
msgstr "查無該文,請改選其她文章。"
#: magicat/cgi-bin/nlindex.cgi:29
msgid "newsletter indices"
msgstr "通訊目錄"
#: magicat/cgi-bin/nlindex.cgi:90 magicat/cgi-bin/nlindex.cgi:139
#: magicat/lib/perl5/Selima/htc/Form/NLIndex.pm:78
msgid ""
"This index item has [numerate,_1,a subitem,subitems]. It cannot be "
"deleted. To delete the index item, [numerate,_1,its subitem,all of its "
"subitems] must first be deleted."
msgstr ""
"本目錄項目下有子項,不可直接刪除。要刪除本目錄項目,請先刪除其下的子項。"
#: magicat/cgi-bin/nlindex.cgi:193
msgid "Please select the index item."
msgstr "請選擇目錄項目。"
#: magicat/cgi-bin/nlindex.cgi:201
msgid "This index item does not exist anymore. Please select another one."
msgstr "查無此目錄項目,請重新選擇。"
#: magicat/cgi-bin/pages.cgi:26
msgid "pages"
msgstr "網頁"
#: magicat/cgi-bin/pages.cgi:193
msgid "Please select the page."
msgstr "請選擇網頁。"
#: magicat/cgi-bin/pages.cgi:201
msgid "This page does not exist anymore. Please select another one."
msgstr "查無此頁,請改選其她網頁。"
#: magicat/cgi-bin/rebuild.cgi:23
msgid "rebuild pages"
msgstr "重製網頁"
#: magicat/cgi-bin/scptpriv.cgi:28
msgid "script privilege"
msgstr "程式權限"
#: magicat/cgi-bin/scptpriv.cgi:184
msgid "Please select the script privilege record."
msgstr "請選擇程式權限。"
#: magicat/cgi-bin/scptpriv.cgi:192
msgid ""
"This script privilege record does not exist anymore. Please select another "
"one."
msgstr "查無該程式權限,請重新選擇。"
#: magicat/cgi-bin/usermem.cgi:30
msgid "user membership"
msgstr "使用者成員"
#: magicat/cgi-bin/userpref.cgi:28
msgid "user preference"
msgstr "使用者偏好"
#: magicat/cgi-bin/userpref.cgi:184
msgid "Please select the user preference."
msgstr "請選擇使用者偏好。"
#: magicat/cgi-bin/userpref.cgi:192
msgid ""
"This user preference does not exist anymore. Please select another one."
msgstr "查無該使用者偏好,請重新選擇。"
#: magicat/cgi-bin/users.cgi:29
msgid "users"
msgstr "帳號"
#: magicat/cgi-bin/users.cgi:222
msgid "Please select the user."
msgstr "請選擇使用者。"
#: magicat/cgi-bin/users.cgi:230
msgid "This user does not exist anymore. Please select another one."
msgstr "查無此人,請重新選擇。"
#: magicat/lib/perl5/Selima/htc/HTML.pm:59
msgid "Manage Content"
msgstr "管理網站"
#: magicat/lib/perl5/Selima/htc/HTML.pm:63
msgid "Pages"
msgstr "網頁"
#: magicat/lib/perl5/Selima/htc/HTML.pm:65
msgid "Links"
msgstr "連結"
#: magicat/lib/perl5/Selima/htc/HTML.pm:67
msgid "Link Categories"
msgstr "連結分類"
#: magicat/lib/perl5/Selima/htc/HTML.pm:69
msgid "Link Categorization"
msgstr "連結分類表"
#: magicat/lib/perl5/Selima/htc/HTML.pm:71
msgid "Newsletters"
msgstr "通訊"
#: magicat/lib/perl5/Selima/htc/HTML.pm:73
msgid "Newsletter Indices"
msgstr "通訊目錄"
#: magicat/lib/perl5/Selima/htc/HTML.pm:75
msgid "Newsletter Articles"
msgstr "通訊文章"
#: magicat/lib/perl5/Selima/htc/HTML.pm:79
msgid "Manage Accounts"
msgstr "管理帳號"
#: magicat/lib/perl5/Selima/htc/HTML.pm:81
msgid "Users"
msgstr "帳號"
#: magicat/lib/perl5/Selima/htc/HTML.pm:83
msgid "Groups"
msgstr "群組"
#: magicat/lib/perl5/Selima/htc/HTML.pm:85
msgid "User Membership"
msgstr "使用者成員"
#: magicat/lib/perl5/Selima/htc/HTML.pm:87
msgid "Group Membership"
msgstr "群組成員"
#: magicat/lib/perl5/Selima/htc/HTML.pm:89
msgid "User Preferences"
msgstr "使用者偏好"
#: magicat/lib/perl5/Selima/htc/HTML.pm:91
msgid "Script Privileges"
msgstr "程式權限"
#: magicat/lib/perl5/Selima/htc/HTML.pm:95
msgid "Miscellaneous"
msgstr "雜項"
#: magicat/lib/perl5/Selima/htc/HTML.pm:97
msgid "Activity Log"
msgstr "活動日誌"
#: magicat/lib/perl5/Selima/htc/HTML.pm:99
msgid "Rebuild Pages"
msgstr "重製網頁"
#: magicat/lib/perl5/Selima/htc/HTML.pm:101
msgid "Analog"
msgstr "訪客統計"
#: magicat/lib/perl5/Selima/htc/HTML.pm:103
msgid "Test Script"
msgstr "測試程式"
#: magicat/lib/perl5/Selima/htc/HTML.pm:154
msgid "Skip to the page content area."
msgstr "跳到網頁內文區。"
#: magicat/lib/perl5/Selima/htc/HTML.pm:155
msgid "Page Content Area"
msgstr "網頁內文區"
#: magicat/lib/perl5/Selima/htc/HTML.pm:288
msgid "Navigation Links Area"
msgstr "導覽連結區"
#: magicat/lib/perl5/Selima/htc/HTML.pm:359
#, c-format
msgid "Welcome, %s. (<span><a href=\"%s\">Modify</a></span>)"
msgstr "%s妳好<span><a href=\"%s\">修改資料</a></span>"
#: magicat/lib/perl5/Selima/htc/HTML.pm:401
#, c-format
msgid "%s:"
msgstr "%s"
#: magicat/lib/perl5/Selima/htc/HTML.pm:471
#: magicat/lib/perl5/Selima/htc/Rebuild.pm:216
#: magicat/lib/perl5/Selima/htc/List/Search.pm:136
msgid "Related Links"
msgstr "相關連結"
#: magicat/lib/perl5/Selima/htc/HTML.pm:482
msgid "Subcategories:"
msgstr "子類:"
#: magicat/lib/perl5/Selima/htc/HTML.pm:497
#: magicat/lib/perl5/Selima/htc/Form/Guestbook/Public.pm:19
msgid "E-mail"
msgstr "E-mail"
#: magicat/lib/perl5/Selima/htc/HTML.pm:522
msgid "URL:"
msgstr "網址:"
#: magicat/lib/perl5/Selima/htc/HTML.pm:525
msgid "E-mail:"
msgstr "E-mail "
#: magicat/lib/perl5/Selima/htc/HTML.pm:531
msgid "Address:"
msgstr "地址:"
#: magicat/lib/perl5/Selima/htc/HTML.pm:533
msgid "Tel.:"
msgstr "電話:"
#: magicat/lib/perl5/Selima/htc/HTML.pm:535
msgid "Fax.:"
msgstr "傳真:"
#: magicat/lib/perl5/Selima/htc/HTML.pm:560
msgid "The database is empty."
msgstr "現無任何資料。"
#: magicat/lib/perl5/Selima/htc/HTML.pm:626
msgid "mod_perl -- Speed, Power, Scalability"
msgstr "mod_perl -- 速度,動力,無限可能"
#: magicat/lib/perl5/Selima/htc/HTML.pm:627
msgid ""
"This script is written in <a href=\"http://www.perl.com/\"><acronym title="
"\"Practical Extraction and Reporting Language\">Perl</acronym></a> and "
"optimized for <a href=\"http://perl.apache.org/\">mod_perl</a>."
msgstr ""
"本程式以 <a href=\"http://www.perl.com/\"><acronym title=\"Practical "
"Extraction and Reporting Language\">Perl</acronym></a> 撰寫,專為 <a href="
"\"http://perl.apache.org/\">mod_perl</a> 設計強化"
#: magicat/lib/perl5/Selima/htc/HTML.pm:640
msgid ""
"This script is written in <a href=\"http://www.perl.com/\"><acronym title="
"\"Practical Extraction and Reporting Language\">Perl</acronym></a>."
msgstr ""
"本程式以 <a href=\"http://www.perl.com/\"><acronym title=\"Practical "
"Extraction and Reporting Language\">Perl</acronym></a> 撰寫"
#: magicat/lib/perl5/Selima/htc/Checker/Guestbook.pm:33
msgid "This occupation is too long. (Max. length [#,_1])"
msgstr "職業太長了。(最長 [#,_1] "
#: magicat/lib/perl5/Selima/htc/Checker/Newslet.pm:61
msgid "Please fill in the date."
msgstr "請填上日期。"
#: magicat/lib/perl5/Selima/htc/Checker/Newslet.pm:64
#: magicat/lib/perl5/Selima/htc/Checker/Newslet.pm:67
#: magicat/lib/perl5/Selima/htc/Checker/Newslet.pm:69
msgid "Please fill in a valid date in YYYY-MM-DD format."
msgstr "日期請以 YYYY-MM-DD 格式填寫。"
#: magicat/lib/perl5/Selima/htc/Checker/Newslet.pm:89
msgid "This credits information is too long. (Max. length [#,_1])"
msgstr "發行欄太長了。(最長 [#,_1] "
#: magicat/lib/perl5/Selima/htc/Checker/NLArt.pm:44
#: magicat/lib/perl5/Selima/htc/Form/NLArt.pm:107
msgid "Fill in the annotations here."
msgstr "請填上註釋。"
#: magicat/lib/perl5/Selima/htc/Checker/NLArt.pm:47
msgid "This annotations list is too long. (Max. length [#,_1])"
msgstr "註釋太長了。(最長 [#,_1] "
#: magicat/lib/perl5/Selima/htc/Checker/NLArt.pm:68
msgid "This author is too long. (Max. length [#,_1])"
msgstr "作者太長了。(最長 [#,_1] "
#: magicat/lib/perl5/Selima/htc/Checker/NLArt.pm:88
#: magicat/lib/perl5/Selima/htc/Form/NLArt.pm:100
msgid "Fill in the authors column here."
msgstr "請填上作者欄。"
#: magicat/lib/perl5/Selima/htc/Checker/NLArt.pm:91
msgid "This authors column is too long. (Max. length [#,_1])"
msgstr "作者欄太長了。(最長 [#,_1] "
#: magicat/lib/perl5/Selima/htc/Checker/NLArt.pm:115
msgid "This e-mail is too long. (Max. length [#,_1])"
msgstr "E-mail 太長了。(最長 [#,_1] "
#: magicat/lib/perl5/Selima/htc/Checker/NLArt.pm:119
msgid "Please fill in a valid e-mail address."
msgstr "請填上正確的 E-mail 信箱。"
#: magicat/lib/perl5/Selima/htc/Checker/NLArt.pm:137
#: magicat/lib/perl5/Selima/htc/Checker/NLIndex.pm:44
msgid "Please select a newsletter."
msgstr "請選擇通訊。"
#: magicat/lib/perl5/Selima/htc/Checker/NLArt.pm:163
msgid "This HTML title is too long. (Max. length [#,_1])"
msgstr "HTML 標題太長了。(最長 [#,_1] "
#: magicat/lib/perl5/Selima/htc/Checker/NLIndex.pm:60
#: magicat/lib/perl5/Selima/htc/Checker/NLIndex.pm:75
msgid "Please select a parent index item."
msgstr "請選擇所屬的大項。"
#: magicat/lib/perl5/Selima/htc/Checker/NLIndex.pm:65
msgid "This option is invalid. Please select a proper parent index item."
msgstr "查無此大項,請重新選擇。"
#: magicat/lib/perl5/Selima/htc/Checker/NLIndex.pm:78
msgid ""
"This parent index item does not exist anymore. Please select another one."
msgstr "查無此大項,請重新選擇。"
#: magicat/lib/perl5/Selima/htc/Checker/NLIndex.pm:82
msgid "An index item cannot belong to itself. Please select another one."
msgstr "目錄項目不可屬於自己本身,請重新選擇。"
#: magicat/lib/perl5/Selima/htc/Checker/NLIndex.pm:89
msgid ""
"An index item cannot belong to its descendant. Please select another one."
msgstr "目錄項目不可屬於自己的子項,請重新選擇。"
#: magicat/lib/perl5/Selima/htc/Checker/NLIndex.pm:131
msgid "Please fill in the title."
msgstr "請填上標題。"
#: magicat/lib/perl5/Selima/htc/Checker/NLIndex.pm:137
msgid "This title is too long. (Max. length [#,_1])"
msgstr "標題太長了。(最長 [#,_1] "
#: magicat/lib/perl5/Selima/htc/Form/Guestbook.pm:18
msgid "Occupation:"
msgstr "職業:"
#: magicat/lib/perl5/Selima/htc/Form/Guestbook.pm:23
msgid "Website URL.:"
msgstr "網站網址:"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:38
msgid "Delete this newsletter"
msgstr "刪掉這期通訊"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:43
msgid "This table provides you a form to add a new newsletter."
msgstr "本表提供建新通訊的表單。"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:46
msgid "This table provides you a form to edit a current newsletter."
msgstr "本表提供編輯通訊的表單。"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:49
msgid "This table provides you a form to delete a newsletter."
msgstr "本表提供刪除通訊的表單。"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:68
msgid "Add a New Newsletter"
msgstr "建新通訊"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:71
msgid "Edit a Current Newsletter"
msgstr "編輯通訊"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:74
msgid "Delete a Newsletter"
msgstr "刪除通訊"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:81
msgid "Preview this newsletter."
msgstr "預覽這期通訊。"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:102
msgid "[numerate,_1,Article,Articles]:"
msgstr "文章:"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:127
msgid "Credits:"
msgstr "發行欄:"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:128
msgid "Fill in the credits here."
msgstr "請填上發行欄。"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:133
msgid "Hide?"
msgstr "隱藏?"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:134
msgid "Hide this newsletter"
msgstr "隱藏這期通訊"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:134
msgid "Show this newsletter"
msgstr "秀出這期通訊"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:135
msgid "Hide this newsletter currently."
msgstr "暫勿秀出這期通訊。"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:146
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:186
msgid "Index:"
msgstr "目錄:"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:166
msgid "Original:"
msgstr "原:"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:167
msgid "New:"
msgstr "新:"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:207
msgid "Issue:"
msgstr "期數:"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:273
msgid "Choose"
msgstr "選擇"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:274
msgid "Delete"
msgstr "刪除"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:275
#: magicat/lib/perl5/Selima/htc/Form/NLIndex.pm:86
msgid "Article:"
msgstr "文章:"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:276
#: magicat/lib/perl5/Selima/htc/Form/NLIndex.pm:134
msgid "Title:"
msgstr "標題:"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:277
msgid "Has subitems?"
msgstr "有子項?"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:278
msgid "Subitems:"
msgstr "子項:"
#: magicat/lib/perl5/Selima/htc/Form/Newslet.pm:279
msgid "This item has subitems."
msgstr "這個項目下有子項。"
#: magicat/lib/perl5/Selima/htc/Form/NLArt.pm:36
msgid "Delete this article"
msgstr "刪掉這篇文章"
#: magicat/lib/perl5/Selima/htc/Form/NLArt.pm:41
msgid "This table provides you a form to add a new article."
msgstr "本表提供建新文章的表單。"
#: magicat/lib/perl5/Selima/htc/Form/NLArt.pm:44
msgid "This table provides you a form to edit a current article."
msgstr "本表提供編輯文章的表單。"
#: magicat/lib/perl5/Selima/htc/Form/NLArt.pm:47
msgid "This table provides you a form to delete a article."
msgstr "本表提供刪除文章的表單。"
#: magicat/lib/perl5/Selima/htc/Form/NLArt.pm:66
msgid "Add a New Newsletter Article"
msgstr "建新通訊文章"
#: magicat/lib/perl5/Selima/htc/Form/NLArt.pm:69
msgid "Edit a Current Newsletter Article"
msgstr "編輯通訊文章"
#: magicat/lib/perl5/Selima/htc/Form/NLArt.pm:72
msgid "Delete a Newsletter Article"
msgstr "刪除通訊文章"
#: magicat/lib/perl5/Selima/htc/Form/NLArt.pm:79
msgid "Preview this article."
msgstr "預覽這篇文章。"
#: magicat/lib/perl5/Selima/htc/Form/NLArt.pm:88
#: magicat/lib/perl5/Selima/htc/Form/NLIndex.pm:91
msgid "Newsletter:"
msgstr "通訊:"
#: magicat/lib/perl5/Selima/htc/Form/NLArt.pm:93
msgid "HTML title:"
msgstr "HTML 標題:"
#: magicat/lib/perl5/Selima/htc/Form/NLArt.pm:94
msgid "(Leave it blank if the same as the title.)"
msgstr "(若與標題相同,請留白。)"
#: magicat/lib/perl5/Selima/htc/Form/NLArt.pm:99
msgid "Authors column:"
msgstr "作者欄:"
#: magicat/lib/perl5/Selima/htc/Form/NLArt.pm:101
msgid "(Leave it blank if the same as the author.)"
msgstr "(若與作者相同,請留白。)"
#: magicat/lib/perl5/Selima/htc/Form/NLArt.pm:106
msgid "Annotations:"
msgstr "註釋:"
#: magicat/lib/perl5/Selima/htc/Form/NLIndex.pm:36
msgid "Delete this index item"
msgstr "刪掉這項目錄項目"
#: magicat/lib/perl5/Selima/htc/Form/NLIndex.pm:41
msgid "This table provides you a form to add a new index item."
msgstr "本表提供建新目錄項目的表單。"
#: magicat/lib/perl5/Selima/htc/Form/NLIndex.pm:44
msgid "This table provides you a form to edit a current index item."
msgstr "本表提供編輯目錄項目的表單。"
#: magicat/lib/perl5/Selima/htc/Form/NLIndex.pm:47
msgid "This table provides you a form to delete a index item."
msgstr "本表提供刪除目錄項目的表單。"
#: magicat/lib/perl5/Selima/htc/Form/NLIndex.pm:64
msgid "Add a New Newsletter Index Item"
msgstr "建新通訊目錄項目"
#: magicat/lib/perl5/Selima/htc/Form/NLIndex.pm:67
msgid "Edit a Current Newsletter Index Item"
msgstr "編輯通訊目錄項目"
#: magicat/lib/perl5/Selima/htc/Form/NLIndex.pm:70
msgid "Delete a Newsletter Index Item"
msgstr "刪除通訊目錄項目"
#: magicat/lib/perl5/Selima/htc/Form/NLIndex.pm:96
msgid "Parent item:"
msgstr "大項:"
#: magicat/lib/perl5/Selima/htc/Form/NLIndex.pm:97
msgid "At the very top"
msgstr "最上層"
#: magicat/lib/perl5/Selima/htc/Form/NLIndex.pm:109
msgid "[numerate,_1,Subitem,Subitems]:"
msgstr "子項:"
#: magicat/lib/perl5/Selima/htc/Form/NLIndex.pm:135
msgid "(Leave it blank if the same as the article title.)"
msgstr "(若與文章標題相同,請留白。)"
#: magicat/lib/perl5/Selima/htc/List/Guestbook.pm:24
msgid "Select a Message"
msgstr "選擇留言"
#: magicat/lib/perl5/Selima/htc/List/Guestbook.pm:25
msgid "Manage the Guestbook"
msgstr "管理留言板"
#: magicat/lib/perl5/Selima/htc/List/Guestbook.pm:28
#: magicat/lib/perl5/Selima/htc/Form/Guestbook/Public.pm:24
msgid "Occupation"
msgstr "職業"
#: magicat/lib/perl5/Selima/htc/List/Newslets.pm:24
msgid "Select a Newsletter"
msgstr "選擇通訊"
#: magicat/lib/perl5/Selima/htc/List/Newslets.pm:25
msgid "Manage Newsletters"
msgstr "管理通訊"
#: magicat/lib/perl5/Selima/htc/List/Newslets.pm:32
msgid "Issue"
msgstr "期數"
#: magicat/lib/perl5/Selima/htc/List/Newslets.pm:33
msgid "Credits"
msgstr "發行欄"
#: magicat/lib/perl5/Selima/htc/List/Newslets.pm:41
msgid "Add a new newsletter."
msgstr "建新通訊。"
#: magicat/lib/perl5/Selima/htc/List/Newslets.pm:47
msgid "Search for a newsletter:"
msgstr "搜尋通訊:"
#: magicat/lib/perl5/Selima/htc/List/Newslets.pm:64
msgid "Your query found [*,_1,newsletter]."
msgstr "共 [#,_1] 期相符的通訊。"
#: magicat/lib/perl5/Selima/htc/List/Newslets.pm:67
msgid "[*,_1,newsletter]."
msgstr "共 [#,_1] 期通訊。"
#: magicat/lib/perl5/Selima/htc/List/Newslets.pm:73
msgid "Your query found [*,_1,newsletter], listing [#,_2] to [#,_3]."
msgstr "共 [#,_1] 期相符的通訊,列出第 [#,_2] 期到第 [#,_3] 期。"
#: magicat/lib/perl5/Selima/htc/List/Newslets.pm:77
msgid "[*,_1,newsletter], listing [#,_2] to [#,_3]."
msgstr "共 [#,_1] 期通訊,列出第 [#,_2] 期到第 [#,_3] 期。"
#: magicat/lib/perl5/Selima/htc/List/NLArts.pm:24
msgid "Select a Newsletter Article"
msgstr "選擇通訊文章"
#: magicat/lib/perl5/Selima/htc/List/NLArts.pm:25
msgid "Manage Newsletter Articles"
msgstr "管理通訊文章"
#: magicat/lib/perl5/Selima/htc/List/NLArts.pm:30
#: magicat/lib/perl5/Selima/htc/List/NLIndex.pm:28
msgid "Newsletter"
msgstr "通訊"
#: magicat/lib/perl5/Selima/htc/List/NLArts.pm:31
msgid "HTML title"
msgstr "HTML 標題"
#: magicat/lib/perl5/Selima/htc/List/NLArts.pm:32
msgid "Author"
msgstr "作者"
#: magicat/lib/perl5/Selima/htc/List/NLArts.pm:33
msgid "Authors column"
msgstr "作者欄"
#: magicat/lib/perl5/Selima/htc/List/NLArts.pm:34
msgid "Annotations"
msgstr "註釋"
#: magicat/lib/perl5/Selima/htc/List/NLArts.pm:42
msgid "Add a new article."
msgstr "建新文章。"
#: magicat/lib/perl5/Selima/htc/List/NLArts.pm:48
msgid "Search for an article:"
msgstr "搜尋文章:"
#: magicat/lib/perl5/Selima/htc/List/NLArts.pm:65
#: magicat/lib/perl5/Selima/htc/List/Search.pm:88
msgid "Your query found [*,_1,article]."
msgstr "共 [#,_1] 篇相符的文章。"
#: magicat/lib/perl5/Selima/htc/List/NLArts.pm:68
#: magicat/lib/perl5/Selima/htc/List/Search.pm:91
msgid "[*,_1,article]."
msgstr "共 [#,_1] 篇文章。"
#: magicat/lib/perl5/Selima/htc/List/NLArts.pm:74
#: magicat/lib/perl5/Selima/htc/List/Search.pm:97
msgid "Your query found [*,_1,article], listing [#,_2] to [#,_3]."
msgstr "共 [#,_1] 篇相符的文章,列出第 [#,_2] 篇到第 [#,_3] 篇。"
#: magicat/lib/perl5/Selima/htc/List/NLArts.pm:78
#: magicat/lib/perl5/Selima/htc/List/Search.pm:101
msgid "[*,_1,article], listing [#,_2] to [#,_3]."
msgstr "共 [#,_1] 篇文章,列出第 [#,_2] 篇到第 [#,_3] 篇。"
#: magicat/lib/perl5/Selima/htc/List/NLIndex.pm:24
msgid "Select a Newsletter Index Item"
msgstr "選擇通訊目錄項目"
#: magicat/lib/perl5/Selima/htc/List/NLIndex.pm:25
msgid "Manage Newsletter Index"
msgstr "管理通訊目錄"
#: magicat/lib/perl5/Selima/htc/List/NLIndex.pm:29
msgid "Article"
msgstr "文章"
#: magicat/lib/perl5/Selima/htc/List/NLIndex.pm:37
msgid "Add a new index item."
msgstr "建新目錄項目。"
#: magicat/lib/perl5/Selima/htc/List/NLIndex.pm:43
msgid "Search for an index item:"
msgstr "搜尋目錄項目:"
#: magicat/lib/perl5/Selima/htc/List/NLIndex.pm:60
msgid "Your query found [*,_1,index item]."
msgstr "共 [#,_1] 項相符的目錄項目。"
#: magicat/lib/perl5/Selima/htc/List/NLIndex.pm:63
msgid "[*,_1,index item]."
msgstr "共 [#,_1] 項目錄項目。"
#: magicat/lib/perl5/Selima/htc/List/NLIndex.pm:69
msgid "Your query found [*,_1,index item], listing [#,_2] to [#,_3]."
msgstr "共 [#,_1] 項相符的目錄項目,列出第 [#,_2] 項到第 [#,_3] 項。"
#: magicat/lib/perl5/Selima/htc/List/NLIndex.pm:73
msgid "[*,_1,index item], listing [#,_2] to [#,_3]."
msgstr "共 [#,_1] 項目錄項目,列出第 [#,_2] 項到第 [#,_3] 項。"
#: magicat/lib/perl5/Selima/htc/List/Search.pm:24
msgid "Full Text Search"
msgstr "全文檢索"
#: magicat/lib/perl5/Selima/htc/List/Search.pm:26
msgid "Search Result"
msgstr "搜尋結果"
#: magicat/lib/perl5/Selima/htc/List/Search.pm:49
msgid "Please fill in your query."
msgstr "請填上檢索的辭彙。"
#: magicat/lib/perl5/Selima/htc/List/Search.pm:71
msgid "Search in the website:"
msgstr "網站檢索:"
#: magicat/lib/perl5/Selima/htc/List/Search.pm:146
msgid "Guestbook Message on [_1]"
msgstr "[_1] 留言"
#: magicat/lib/perl5/Selima/htc/Processor/Newslet.pm:90
msgid "This newsletter was not modified."
msgstr "通訊未異動。"
#: magicat/lib/perl5/Selima/htc/Processor/Newslet.pm:94
msgid "This newsletter has been successfully added."
msgstr "通訊建好了。"
#: magicat/lib/perl5/Selima/htc/Processor/Newslet.pm:98
msgid "This newsletter has been successfully updated."
msgstr "通訊存好了。"
#: magicat/lib/perl5/Selima/htc/Processor/Newslet.pm:102
msgid "This newsletter has been successfully deleted."
msgstr "通訊刪掉了。"
#: magicat/lib/perl5/Selima/htc/Processor/NLArt.pm:101
msgid "This article was not modified."
msgstr "文章未異動。"
#: magicat/lib/perl5/Selima/htc/Processor/NLArt.pm:105
msgid "This article has been successfully added."
msgstr "文章建好了。"
#: magicat/lib/perl5/Selima/htc/Processor/NLArt.pm:109
msgid "This article has been successfully updated."
msgstr "文章存好了。"
#: magicat/lib/perl5/Selima/htc/Processor/NLArt.pm:113
msgid "This article has been successfully deleted."
msgstr "文章刪掉了。"
#: magicat/lib/perl5/Selima/htc/Processor/NLIndex.pm:91
msgid "This index item was not modified."
msgstr "目錄項目未異動。"
#: magicat/lib/perl5/Selima/htc/Processor/NLIndex.pm:95
msgid "This index item has been successfully added."
msgstr "目錄項目建好了。"
#: magicat/lib/perl5/Selima/htc/Processor/NLIndex.pm:99
msgid "This index item has been successfully updated."
msgstr "目錄項目存好了。"
#: magicat/lib/perl5/Selima/htc/Processor/NLIndex.pm:103
msgid "This index item has been successfully deleted."
msgstr "目錄項目刪掉了。"
#: magicat/lib/perl5/Selima/htc/Checker/Guestbook/Public.pm:36
msgid "Your occupation is too long. (Max. length [#,_1])"
msgstr "妳的職業太長了。(最長 [#,_1] "
#: magicat/lib/perl5/Selima/htc/Form/Guestbook/Public.pm:29
msgid "Location"
msgstr "所在地"
#: magicat/lib/perl5/Selima/htc/Form/Guestbook/Public.pm:34
msgid "Message"
msgstr "留言"
#: magicat/lib/perl5/Selima/htc/Form/Guestbook/Public.pm:35
msgid "Fill in your message here."
msgstr "請填上妳的留言。"
#: magicat/lib/perl5/Selima/htc/Form/Guestbook/Public.pm:40
msgid "Signature"
msgstr "簽名"
#: magicat/lib/perl5/Selima/htc/Form/Guestbook/Public.pm:45
msgid "Website URL."
msgstr "網站網址"