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,120 @@
#! /usr/bin/perl -w
# History: Theory and Culture
# 1-guestbook.cgi: The guestbook.
# 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($);
initenv(-session => 0,
-this_table => "guestbook",
-dbi_lock => {"guestbook" => LOCK_EX},
-lastmod => 1,
-page_param => {"keywords" => N_("guestbook"),
"class" => "guestbook",
"javascripts" => [qw(/scripts/guestbook.js)]});
main;
exit 0;
sub main() {
local ($_, %_);
my ($error, $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::Guestbook::Public($POST);
$processor->process;
http_303 $REQUEST_FILE;
}
}
return;
}
# check_get: Check the GET arguments
sub check_get() {
local ($_, %_);
# Old styled page number
http_301 $REQUEST_FILE if defined $GET->param("no");
# List handler handles its own error
return;
}
# check_post: Check the POSTed form
sub check_post() {
local ($_, %_);
my ($checker, $error);
# Run the checker
$checker = new Selima::htc::Checker::Guestbook::Public(curform);
$error = $checker->check(qw(message name identity location
email url flood dup spam));
return $error if defined $error;
# OK
return;
}
# html_page: Display the page
sub html_page($) {
local ($_, %_);
my ($status, $LIST, $FORM, $args);
$status = $_[0];
$FORM = new Selima::htc::Form::Guestbook::Public($status);
$LIST = new Selima::htc::List::Guestbook::Public;
$args = $LIST->page_param;
html_header __("Guestbook"), $args;
html_errmsg $status;
$FORM->html;
$LIST->html;
html_footer $args;
return;
}
##################################
# Subroutines to manage the data #
##################################

219
htdocs/htc/cgi-bin/counter.cgi Executable file
View File

@@ -0,0 +1,219 @@
#! /usr/bin/perl -w
# History: Theory and Culture
# counter.cgi: The visitor counter.
# 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-07
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 dont_update();
sub read_counter();
sub update_counter();
sub log_visitor($);
sub counter_cookie();
sub html_image($);
use Fcntl qw(:seek);
use Date::Format qw(time2str);
use GD;
use IO::NestedCapture qw(CAPTURE_STDOUT);
use Net::CIDR::Lite qw();
use constant DATA_FILE => $ENV{"DOCUMENT_ROOT"} . "/magicat/data/counter.dat";
use constant LOG_FILE => "/var/log/apache2/htc/counter.log";
use vars qw($OUR_NETWORKS @FGCOLOR @BGCOLOR $FONT);
# People in our networks will not be counted
$OUR_NETWORKS = Net::CIDR::Lite->new(
qw(127.0.0.1/8 10.0.0.0/8 211.20.30.96/29));
@FGCOLOR = (0, 0, 0); # #000000 Black
@BGCOLOR = (255, 255, 255); # #FFFFFF White
$FONT = gdLargeFont;
use constant TRANSPARENT => 1;
use constant COOKIE_NAME => "counter";
use constant COUNT_ARG => "countme";
use constant IGNORE_ARG => "ignoreme";
initenv( -allowed => [qw(GET HEAD)],
-session => 0,
-dbi => DBI_NONE,
-lastmod => 0,
-multilang => 0);
main;
exit 0;
sub main() {
local ($_, %_);
# If we should not update the counter
if (dont_update) {
# Check last-modified here
my (@tables, @files);
@tables = qw();
@files = (DATA_FILE);
http_304 if not_modified @tables, @files;
html_image read_counter;
# Update the counter
} else {
$_ = html_image update_counter;
# Log the visitor
log_visitor $_;
}
# Set the counter cookie
$NEWCOOKIES{COOKIE_NAME()} = $_ if defined ($_ = counter_cookie);
return;
}
# dont_update: If we should not update the counter
sub dont_update() {
local ($_, %_);
# Find any reason that we should not update the counter
# If this visitor came from our own network
return 1 if $OUR_NETWORKS->find($ENV{"REMOTE_ADDR"});
# If this visitor had been counted
return 1 if exists $COOKIES{COOKIE_NAME()};
# If we are not told to count this visitor
return 1 if !defined $GET->param(COUNT_ARG);
# Well, update it
return 0;
}
# read_counter: Read the counter
sub read_counter() {
return -s DATA_FILE? xfread DATA_FILE: 0;
}
# update_counter: Update the counter
sub update_counter() {
local ($_, %_);
# File exists
if (-s DATA_FILE) {
my $FH;
open $FH, "+<", DATA_FILE or http_500 DATA_FILE . ": $!";
flock $FH, LOCK_EX or http_500 DATA_FILE . ": $!";
$_ = <$FH>;
$_++;
seek $FH, 0, SEEK_SET or http_500 DATA_FILE . ": $!";
truncate $FH, 0 or http_500 DATA_FILE . ": $!";
print $FH $_ or http_500 DATA_FILE . ": $!";
flock $FH, LOCK_UN or http_500 DATA_FILE . ": $!";
close $FH or http_500 DATA_FILE . ": $!";
# Not exists or zero sized -- create a new one
} else {
xfwrite DATA_FILE, ($_ = 1);
}
return $_;
}
# log_visitor: Log the visitor
sub log_visitor($) {
local ($_, %_);
my ($host, $user, $date, $uri, $size, $referer, $ua, $langs, $FD);
$size = $_[0];
# Gather the infomation to log
$host = (defined remote_host)? remote_host: $ENV{"REMOTE_ADDR"};
$user = (exists $ENV{"REMOTE_USER"} && $ENV{"REMOTE_USER"} ne "")?
$ENV{"REMOTE_USER"}: "-";
$date = time2str("%d/%b/%Y:%T %z", time);
$uri = $REQUEST_URI;
$referer = (exists $ENV{"HTTP_REFERER"} && $ENV{"HTTP_REFERER"} ne "")?
$ENV{"HTTP_REFERER"}: "-";
$ua = (exists $ENV{"HTTP_USER_AGENT"} && $ENV{"HTTP_USER_AGENT"} ne "")?
$ENV{"HTTP_USER_AGENT"}: "=";
$langs = (exists $ENV{"HTTP_ACCEPT_LANGUAGE"} && $ENV{"HTTP_ACCEPT_LANGUAGE"} ne "")?
$ENV{"HTTP_ACCEPT_LANGUAGE"}: "-";
# Compose the log record 組合紀錄行
$_ = sprintf "%s - %s [%s] \"%s %s %s\" 200 %s \"%s\" \"%s\" \"%s\" %s %s\n",
$host, $user, $date, $ENV{"REQUEST_METHOD"}, $uri,
$ENV{"SERVER_PROTOCOL"}, $size, $referer, $ua, $langs,
$ENV{"REMOTE_ADDR"}, country_lookup($ENV{"REMOTE_ADDR"});
# Save the log record 儲存記錄
xfappend LOG_FILE, $_;
return;
}
# counter_cookie: Set the counter cookie
sub counter_cookie() {
local ($_, %_);
# Leave our network alone
return if $OUR_NETWORKS->find($ENV{"REMOTE_ADDR"});
# Already set
return if exists $COOKIES{COOKIE_NAME()};
# Count me
return new CGI::Cookie( -name=>COOKIE_NAME,
-value=>"counted",
-path=>$REQUEST_PATH)
if defined $GET->param(COUNT_ARG);
# Ignore me
return new CGI::Cookie( -name=>COOKIE_NAME,
-value=>"ignored",
-path=>$REQUEST_PATH)
if defined $GET->param(IGNORE_ARG);
# Leave it alone
return;
}
# html_image: Make the image from the counter value
sub html_image($) {
local $_;
my ($counter, $image, $width, $height, $fgcolor, $bgcolor);
$counter = $_[0];
# Group the counter with commas at thousand digits.
$counter = fmtno($counter);
# Initialize the image object
# Get the width and height
$width = $FONT->width * (length $counter);
$height = $FONT->height;
# Create an image object
$image = GD::Image->new($width, $height);
# Create the forground/background color objects
$fgcolor = $image->colorAllocate(@FGCOLOR);
$bgcolor = $image->colorAllocate(@BGCOLOR);
# Draw the image
# Set the transparent background
$image->transparent($bgcolor) if TRANSPARENT;
# Paint the background
$image->filledRectangle(0, 0, $width, $height, $bgcolor);
# Write the text
$image->string($FONT, 0, 0, $counter, $fgcolor);
# Output
$CONTENT_TYPE = "image/png";
binmode IO::NestedCapture->instance->{"STDOUT_current"}[-1], ":raw";
$_ = $image->png;
print $_;
return length $_;
}

View File

@@ -0,0 +1,142 @@
#! /usr/bin/perl -w
# History: Theory and Culture
# last_update.cgi: The last-update date of the whole web site.
# 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-09
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 find_files_in(\@\@);
sub fmttime_local($);
sub html_image($);
use File::Spec;
use GD;
use IO::NestedCapture qw(CAPTURE_STDOUT);
use vars qw(@DIREXCS %RDIREXCS @FGCOLOR @BGCOLOR $FONT);
# Directories to be excluded (no leading and trailing slashes)
@DIREXCS = qw(magicat);
@FGCOLOR = (0, 0, 0); # #000000 Black
@BGCOLOR = (255, 255, 255); # #FFFFFF White
$FONT = gdLargeFont;
use constant TRANSPARENT => 1;
initenv( -allowed => [qw(GET HEAD)],
-session => 0,
-dbi => DBI_NONE,
-lastmod => 0,
-multilang => 0);
%RDIREXCS = map { File::Spec->catfile($DOC_ROOT, $_) => 1 } @DIREXCS;
main;
exit 0;
sub main() {
local ($_, %_);
my (@tables, @files);
@tables = qw();
@files = qw();
@_ = ($DOC_ROOT);
find_files_in(@files, @_);
http_304 if not_modified @tables, @files;
html_image($LAST_MODIFIED);
return;
}
# find_files_in: an easy file finder
sub find_files_in(\@\@) {
local ($_, %_);
my ($files, $dirs, @subdirs, $DH, $ent);
($files, $dirs) = @_;
# Bounce for nothing
return if scalar(@$dirs) == 0;
# Look in these directories
@subdirs = qw();
foreach my $dir (@$dirs) {
$dir =~ s/\/$//;
opendir $DH, $dir or die "$dir: $!";
while (defined($_ = readdir $DH)) {
next if /^\./;
# Using catfile() is better, but a lot slower
$ent = File::Spec->catfile($dir, $_);
#$ent = "$dir/$_";
if (-f $ent) {
push @$files, $ent;
} elsif (-d $ent) {
push @subdirs, $ent
if !exists $RDIREXCS{$ent};
}
}
closedir $DH or die "$dir: $!";
}
# Look in the subdirectories
find_files_in @$files, @subdirs;
return;
}
# fmttime_local: Format the time using my own format
sub fmttime_local($) {
@_ = localtime $_[0];
return sprintf "%d.%d.'%02d", $_[4]+1, $_[3], ($_[5]+1900) % 100;
}
# html_image: Make the image from the last-update value
sub html_image($) {
local $_;
my ($last_update, $image, $width, $height, $fgcolor, $bgcolor);
$last_update = $_[0];
# Format the date to my preferred format
$last_update = fmttime_local($last_update);
# Initialize the image object
# Get the width and height
$width = $FONT->width * (length $last_update);
$height = $FONT->height;
# Create an image object
$image = GD::Image->new($width, $height);
# Create the forground/background color objects
$fgcolor = $image->colorAllocate(@FGCOLOR);
$bgcolor = $image->colorAllocate(@BGCOLOR);
# Draw the image
# Set the transparent background
$image->transparent($bgcolor) if TRANSPARENT;
# Paint the background
$image->filledRectangle(0, 0, $width, $height, $bgcolor);
# Write the text
$image->string($FONT, 0, 0, $last_update, $fgcolor);
# Output
$CONTENT_TYPE = "image/png";
binmode IO::NestedCapture->instance->{"STDOUT_current"}[-1], ":raw";
print $image->png;
return;
}

70
htdocs/htc/cgi-bin/mailto.cgi Executable file
View File

@@ -0,0 +1,70 @@
#! /usr/bin/perl -w
# History: Theory and Culture
# mailto.cgi: The e-mail hyperlink redirector.
# 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-05-13
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_post();
use Fcntl qw(:seek);
initenv(-allowed => [qw(POST)],
-session => 0,
-dbi => DBI_NONE,
-lastmod => 0);
main;
exit 0;
sub main() {
local ($_, %_);
my $error;
# Only POSTed forms are allowed
$error = check_post;
# If an error occurs
if (defined $error) {
http_400;
# Else, save the data
} else {
http_303 "mailto:" . $POST->param("email");
}
return;
}
# check_post: Check the POSTed form
sub check_post() {
local ($_, %_);
my ($checker, $error);
# Run the checker
$checker = new Selima::Checker::MailTo(curform);
$error = $checker->check(qw(email));
return $error if defined $error;
# OK
return;
}

55
htdocs/htc/cgi-bin/search.cgi Executable file
View File

@@ -0,0 +1,55 @@
#! /usr/bin/perl -w
# History: Theory and Culture
# search.cgi: The web site full-text search.
# Copyright (c) 2006-2021 imacat.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Author: imacat <imacat@mail.imacat.idv.tw>
# First written: 2006-04-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();
use Fcntl qw(:seek);
initenv(-allowed => [qw(GET HEAD)],
-session => 0,
-dbi_lock => {"pages" => LOCK_SH,
"links" => LOCK_SH,
"guestbook" => LOCK_SH},
-lastmod => 1,
-page_param => {"keywords" => N_("search, query, full text search"),
"class" => "search"});
main;
exit 0;
sub main() {
local ($_, %_);
my $LIST;
# List handler handles its own error
$LIST = new Selima::htc::List::Search;
html_header $LIST->{"title"}, $LIST->page_param;
$LIST->html;
html_footer;
return;
}

View File

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

View File

@@ -0,0 +1,98 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!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-2018 歷史:理論與文化編輯群。歷史:理論與文化編輯群保有所有權利。" />
<meta name="keywords" content="歷史:理論與文化, 關於" />
<meta name="generator" content="Selima 3.10" />
<link rel="start" type="application/xhtml+xml" href="." />
<link rel="author" 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>
<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&#64;mail.emandy.idv.tw"><em><acronym title="electronic mail">E-mail</acronym></em></a></span>
</div>
</div>
<hr />
<div id="body" class="body" title="網頁內文區">
<div class="accessguide"><a accesskey="C"
href="#body" title="網頁內文區">:::</a></div>
<h1>編輯群</h1>
<p>本刊《歷史:理論與文化》創刊於一九九八年夏,由一群輔仁大學歷史學研究所在學或畢業的青年所共同發起,是一份關於西洋史研究的通訊刊物。</p>
<p>我們歡迎任何關心臺灣西洋史研究的人士之共同參與,並期待您能參加我們所舉辦的活動。</p>
<h2>《歷史:理論與文化》的編輯群:</h2>
<ul class="editors">
<li><a href="mailto:mandy&#64;mail.emandy.idv.tw">吳燕秋</a></li>
<li><a href="mailto:olivier1217&#64;yahoo.com.tw">徐文路</a></li>
<li><a href="mailto:demachen&#64;hotmail.com">陳思仁</a></li>
<li><a href="mailto:karl.sheng&#64;msa.hinet.net">盛少輝</a></li>
<li><a href="mailto:may5025&#64;ms28.hinet.net">黃明田</a></li>
<li><a href="mailto:panxx048&#64;tc.umn.edu">潘宗億</a></li>
<li><a href="mailto:dcshaw&#64;ms18.url.com.tw">蕭道中</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-2018 歷史:理論與文化編輯群</p>
</div>
</div>
</body>
</html>

View File

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

View File

@@ -0,0 +1,83 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!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-2018 歷史:理論與文化編輯群。歷史:理論與文化編輯群保有所有權利。" />
<meta name="keywords" content="網址已遷" />
<meta name="generator" content="Selima 3.10" />
<link rel="start" type="application/xhtml+xml" href="/" />
<link rel="author" href="mailto:htc&#64;mail.emandy.idv.tw" />
<link rel="stylesheet" type="text/css" href="/stylesheets/common.css" />
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
<title>HTTP 301 網址已遷</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>
<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&#64;mail.emandy.idv.tw"><em><acronym title="electronic mail">E-mail</acronym></em></a></span>
</div>
</div>
<hr />
<div id="body" class="body" title="網頁內文區">
<div class="accessguide"><a accesskey="C"
href="#body" title="網頁內文區">:::</a></div>
<h1><abbr title="HyperText Transfer Protocol">HTTP</abbr> 301 網址已遷</h1>
<p>本頁已遷址,日後請更新妳的書籤或妳的最愛,並改往<a href="$url">新址</a></p>
</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-2018 歷史:理論與文化編輯群</p>
</div>
</div>
</body>
</html>

View File

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

View File

@@ -0,0 +1,83 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!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-2018 歷史:理論與文化編輯群。歷史:理論與文化編輯群保有所有權利。" />
<meta name="keywords" content="續往下址" />
<meta name="generator" content="Selima 3.10" />
<link rel="start" type="application/xhtml+xml" href="/" />
<link rel="author" href="mailto:htc&#64;mail.emandy.idv.tw" />
<link rel="stylesheet" type="text/css" href="/stylesheets/common.css" />
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
<title>HTTP 303 續往下址</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>
<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&#64;mail.emandy.idv.tw"><em><acronym title="electronic mail">E-mail</acronym></em></a></span>
</div>
</div>
<hr />
<div id="body" class="body" title="網頁內文區">
<div class="accessguide"><a accesskey="C"
href="#body" title="網頁內文區">:::</a></div>
<h1><abbr title="HyperText Transfer Protocol">HTTP</abbr> 303 續往下址</h1>
<p>請續往<a href="$url">後續的網址</a></p>
</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-2018 歷史:理論與文化編輯群</p>
</div>
</div>
</body>
</html>

View File

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

View File

@@ -0,0 +1,83 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!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-2018 歷史:理論與文化編輯群。歷史:理論與文化編輯群保有所有權利。" />
<meta name="keywords" content="網址暫移" />
<meta name="generator" content="Selima 3.10" />
<link rel="start" type="application/xhtml+xml" href="/" />
<link rel="author" href="mailto:htc&#64;mail.emandy.idv.tw" />
<link rel="stylesheet" type="text/css" href="/stylesheets/common.css" />
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
<title>HTTP 307 網址暫移</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>
<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&#64;mail.emandy.idv.tw"><em><acronym title="electronic mail">E-mail</acronym></em></a></span>
</div>
</div>
<hr />
<div id="body" class="body" title="網頁內文區">
<div class="accessguide"><a accesskey="C"
href="#body" title="網頁內文區">:::</a></div>
<h1><abbr title="HyperText Transfer Protocol">HTTP</abbr> 307 網址暫移</h1>
<p>請參閱本頁<a href="$url">目前的網址</a></p>
</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-2018 歷史:理論與文化編輯群</p>
</div>
</div>
</body>
</html>

View File

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

View File

@@ -0,0 +1,87 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!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-2018 歷史:理論與文化編輯群。歷史:理論與文化編輯群保有所有權利。" />
<meta name="keywords" content="語法錯誤" />
<meta name="generator" content="Selima 3.10" />
<link rel="start" type="application/xhtml+xml" href="/" />
<link rel="author" href="mailto:htc&#64;mail.emandy.idv.tw" />
<link rel="stylesheet" type="text/css" href="/stylesheets/common.css" />
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
<title>HTTP 400 語法錯誤</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>
<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&#64;mail.emandy.idv.tw"><em><acronym title="electronic mail">E-mail</acronym></em></a></span>
</div>
</div>
<hr />
<div id="body" class="body" title="網頁內文區">
<div class="accessguide"><a accesskey="C"
href="#body" title="網頁內文區">:::</a></div>
<h1><abbr title="HyperText Transfer Protocol">HTTP</abbr> 400 語法錯誤</h1>
<!-- errmsg -->
<p>很抱歉,妳的要求語法錯誤,網站看不懂妳的要求。這可能是瀏覽器的問題,或妳輸入的網址有筆誤。請更正妳的筆誤,或請回<a href="/">歷史:理論與文化首頁</a>重新瀏覽。</p>
<p>若有任何問題,請<a href="mailto:htc&#64;mail.emandy.idv.tw">來信告訴我們</a></p>
</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-2018 歷史:理論與文化編輯群</p>
</div>
</div>
</body>
</html>

View File

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

View File

@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!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-2018 歷史:理論與文化編輯群。歷史:理論與文化編輯群保有所有權利。" />
<meta name="keywords" content="非請莫入" />
<meta name="generator" content="Selima 3.10" />
<link rel="start" type="application/xhtml+xml" href="/" />
<link rel="author" href="mailto:htc&#64;mail.emandy.idv.tw" />
<link rel="stylesheet" type="text/css" href="/stylesheets/common.css" />
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
<title>HTTP 401 非請莫入</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>
<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&#64;mail.emandy.idv.tw"><em><acronym title="electronic mail">E-mail</acronym></em></a></span>
</div>
</div>
<hr />
<div id="body" class="body" title="網頁內文區">
<div class="accessguide"><a accesskey="C"
href="#body" title="網頁內文區">:::</a></div>
<h1><abbr title="HyperText Transfer Protocol">HTTP</abbr> 401 非請莫入</h1>
<p>很抱歉,本頁非請莫入,請回<a href="/">歷史:理論與文化首頁</a>重新瀏覽。</p>
<p>若有任何問題,請<a href="mailto:htc&#64;mail.emandy.idv.tw">來信告訴我們</a></p>
</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-2018 歷史:理論與文化編輯群</p>
</div>
</div>
</body>
</html>

View File

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

View File

@@ -0,0 +1,87 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!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-2018 歷史:理論與文化編輯群。歷史:理論與文化編輯群保有所有權利。" />
<meta name="keywords" content="禁止進入" />
<meta name="generator" content="Selima 3.10" />
<link rel="start" type="application/xhtml+xml" href="/" />
<link rel="author" href="mailto:htc&#64;mail.emandy.idv.tw" />
<link rel="stylesheet" type="text/css" href="/stylesheets/common.css" />
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
<title>HTTP 403 禁止進入</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>
<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&#64;mail.emandy.idv.tw"><em><acronym title="electronic mail">E-mail</acronym></em></a></span>
</div>
</div>
<hr />
<div id="body" class="body" title="網頁內文區">
<div class="accessguide"><a accesskey="C"
href="#body" title="網頁內文區">:::</a></div>
<h1><abbr title="HyperText Transfer Protocol">HTTP</abbr> 403 禁止進入</h1>
<!-- errmsg -->
<p>很抱歉,本頁禁止進入,請回<a href="/">歷史:理論與文化首頁</a>重新瀏覽。</p>
<p>若有任何問題,請<a href="mailto:htc&#64;mail.emandy.idv.tw">來信告訴我們</a></p>
</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-2018 歷史:理論與文化編輯群</p>
</div>
</div>
</body>
</html>

View File

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

View File

@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!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-2018 歷史:理論與文化編輯群。歷史:理論與文化編輯群保有所有權利。" />
<meta name="keywords" content="找不到網頁" />
<meta name="generator" content="Selima 3.10" />
<link rel="start" type="application/xhtml+xml" href="/" />
<link rel="author" href="mailto:htc&#64;mail.emandy.idv.tw" />
<link rel="stylesheet" type="text/css" href="/stylesheets/common.css" />
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
<title>HTTP 404 找不到網頁</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>
<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&#64;mail.emandy.idv.tw"><em><acronym title="electronic mail">E-mail</acronym></em></a></span>
</div>
</div>
<hr />
<div id="body" class="body" title="網頁內文區">
<div class="accessguide"><a accesskey="C"
href="#body" title="網頁內文區">:::</a></div>
<h1><abbr title="HyperText Transfer Protocol">HTTP</abbr> 404 找不到網頁</h1>
<p>很抱歉,找不到妳想連的那一頁。請檢查妳的網址是否有誤。若妳是由其它地方連上這裡,請<a href="mailto:htc&#64;mail.emandy.idv.tw">來信告訴我們</a></p>
<p>妳可以回到<a href="/">歷史:理論與文化首頁</a>重新瀏覽。</p>
</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-2018 歷史:理論與文化編輯群</p>
</div>
</div>
</body>
</html>

View File

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

View File

@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!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-2018 歷史:理論與文化編輯群。歷史:理論與文化編輯群保有所有權利。" />
<meta name="keywords" content="要求方式無效" />
<meta name="generator" content="Selima 3.10" />
<link rel="start" type="application/xhtml+xml" href="/" />
<link rel="author" href="mailto:htc&#64;mail.emandy.idv.tw" />
<link rel="stylesheet" type="text/css" href="/stylesheets/common.css" />
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
<title>HTTP 405 要求方式無效</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>
<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&#64;mail.emandy.idv.tw"><em><acronym title="electronic mail">E-mail</acronym></em></a></span>
</div>
</div>
<hr />
<div id="body" class="body" title="網頁內文區">
<div class="accessguide"><a accesskey="C"
href="#body" title="網頁內文區">:::</a></div>
<h1><abbr title="HyperText Transfer Protocol">HTTP</abbr> 405 要求方式無效</h1>
<p>很抱歉,無法用這個方式連到此頁。請改用以下方式: $allowed 。</p>
<p>若有任何問題,請<a href="mailto:htc&#64;mail.emandy.idv.tw">來信告訴我們</a></p>
</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-2018 歷史:理論與文化編輯群</p>
</div>
</div>
</body>
</html>

View File

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

View File

@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!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-2018 歷史:理論與文化編輯群。歷史:理論與文化編輯群保有所有權利。" />
<meta name="keywords" content="已刪除, HTTP 410" />
<meta name="generator" content="Selima 3.10" />
<link rel="start" type="application/xhtml+xml" href="/" />
<link rel="author" href="mailto:htc&#64;mail.emandy.idv.tw" />
<link rel="stylesheet" type="text/css" href="/stylesheets/common.css" />
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
<title>HTTP 410 已刪</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>
<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&#64;mail.emandy.idv.tw"><em><acronym title="electronic mail">E-mail</acronym></em></a></span>
</div>
</div>
<hr />
<div id="body" class="body" title="網頁內文區">
<div class="accessguide"><a accesskey="C"
href="#body" title="網頁內文區">:::</a></div>
<h1><abbr title="HyperText Transfer Protocol">HTTP</abbr> 410 已刪</h1>
<p>本頁內容已刪,造成不便請見諒。</p>
<p>妳可以回到<a href="/">歷史:理論與文化首頁</a>重新瀏覽。</p>
</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-2018 歷史:理論與文化編輯群</p>
</div>
</div>
</body>
</html>

View File

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

View File

@@ -0,0 +1,87 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!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-2018 歷史:理論與文化編輯群。歷史:理論與文化編輯群保有所有權利。" />
<meta name="keywords" content="網站執行錯誤" />
<meta name="generator" content="Selima 3.10" />
<link rel="start" type="application/xhtml+xml" href="/" />
<link rel="author" href="mailto:htc&#64;mail.emandy.idv.tw" />
<link rel="stylesheet" type="text/css" href="/stylesheets/common.css" />
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
<title>HTTP 500 網站執行錯誤</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>
<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&#64;mail.emandy.idv.tw"><em><acronym title="electronic mail">E-mail</acronym></em></a></span>
</div>
</div>
<hr />
<div id="body" class="body" title="網頁內文區">
<div class="accessguide"><a accesskey="C"
href="#body" title="網頁內文區">:::</a></div>
<h1><abbr title="HyperText Transfer Protocol">HTTP</abbr> 500 網站執行錯誤</h1>
<!-- errmsg -->
<p>很抱歉,網站發生錯誤。這通常是 <abbr title="Common Gateway Interface">CGI</abbr> 程式設計問題,請<a href="mailto:htc&#64;mail.emandy.idv.tw">來信告訴我們</a></p>
<p>妳可以回到<a href="/">歷史:理論與文化首頁</a>重新瀏覽。</p>
</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-2018 歷史:理論與文化編輯群</p>
</div>
</div>
</body>
</html>

View File

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

View File

@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!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-2018 歷史:理論與文化編輯群。歷史:理論與文化編輯群保有所有權利。" />
<meta name="keywords" content="網站暫停服務, HTTP 503" />
<meta name="generator" content="Selima 3.10" />
<link rel="start" type="application/xhtml+xml" href="/" />
<link rel="author" href="mailto:htc&#64;mail.emandy.idv.tw" />
<link rel="stylesheet" type="text/css" href="/stylesheets/common.css" />
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
<title>HTTP 503 網站暫停服務</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>
<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&#64;mail.emandy.idv.tw"><em><acronym title="electronic mail">E-mail</acronym></em></a></span>
</div>
</div>
<hr />
<div id="body" class="body" title="網頁內文區">
<div class="accessguide"><a accesskey="C"
href="#body" title="網頁內文區">:::</a></div>
<h1><abbr title="HyperText Transfer Protocol">HTTP</abbr> 503 網站暫停服務</h1>
<!-- errmsg -->
<p>很抱歉,網站暫時停止服務。我們正在更新網站,大約要花一個小時左右。請晚點再來,謝謝。</p>
</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-2018 歷史:理論與文化編輯群</p>
</div>
</div>
</body>
</html>

BIN
htdocs/htc/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
htdocs/htc/images/email.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 B

BIN
htdocs/htc/images/email.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 191 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 783 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

1
htdocs/htc/index.html.html Symbolic link
View File

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

126
htdocs/htc/index.html.xhtml Normal file
View File

@@ -0,0 +1,126 @@
<?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="stylesheet" type="text/css" href="stylesheets/common.css" />
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
<title>歷史:理論與文化</title>
</head>
<body>
<div class="covertoc">
<h2>西洋史研究通訊-----</h2>
<h1>歷史:理論與文化</h1>
<ul>
<li><h2><a href="#preface">發刊辭</a></h2></li>
<li><h2><a href="newsletters/">各期通訊</a></h2></li>
<li><h2><a href="wanted.html">稿約</a></h2></li>
<li><h2><a href="editors.html">編輯群</a></h2></li>
<li><h2><a href="cgi-bin/guestbook.cgi">留言板</a></h2></li>
<li><h2><a href="links/">相關網站</a></h2></li>
<li><h2><a href="mailto:htc&#64;mail.emandy.idv.tw"><acronym title="electronic mail">E-mail</acronym></a></h2></li>
</ul>
</div>
<hr />
<h1 id="preface">發刊辭</h1>
<p>荷蘭歷史學家赫伊津哈 (Johan Huizinga) 說道:<q>對於歷史而言,問題永遠是:往何處去?</q>過去二十年來,台灣西洋史學界偶有西洋史研究危機的呼聲。但這些零星的呼聲卻如入池的小石,激不起太大的波瀾。對於年輕的西洋史初學者而言,心中所懸念地是:下一步往何處去?在如此疑惑不安的情緒中,我們認為台灣的西洋史研究正處於一個深刻的危機狀態。<q>危機</q>,標識了一個過渡的階段;吾人將從中恢復過來,抑或是僵死過去,端視於我們如何去回應此一危機!</p>
<p>論者每謂台灣西洋史研究的危機在於基礎研究的欠缺。黃俊傑與邢義田先生早先在有關於研究西洋史應站在<q>西洋史</q><q>世界史</q>立場的論辯時(一九八一),兩人皆同意基本研究的欠缺確是西洋史研究的重大難題;近來,楊肅獻先生回顧台灣的西洋史研究狀況時,此一現象仍未有多大地改變(一九九七)。</p>
<p>我們想指出:西洋史研究的危機不在於基礎研究的欠缺;而在於對此一危機性質的誤解!同時,這當中也關涉了對歷史學性質的不同見解。</p>
<p>無可諱言,基礎研究的欠缺確實是台灣西洋史學界所面臨的重大問題。史料的欠缺與文化的隔閡都加深了研究工作的困難,但是,這卻不應該是構成西洋史研究停滯不前的藉口。可以預見地,台灣的西洋史研究所面臨的限制與窘境不會有太大的改善。果若如此,則西洋史研究者豈不皆坐以待斃!</p>
<p>這誠然是一個消極的態度;我們可以更積極的態度來面對。這當中牽涉了我們對歷史學性質的一種新的理解。近年來人文科學界中的語言學轉向 (the linguistic turn) ,打破了人們對語言再現實在的透明性的信賴。語言並非一全然透明之物,單純地反映所接受的感覺與料;歷史的認知並非史家被動的接受、蒐集事實,它同時是史家心靈力量的展現。因此,在歷史研究中,事實的歸屬與綜合是同時進行地。</p>
<p>我們再次地強調:西洋史研究的基礎工作是必須的;但這並非西洋史研究開展的充要條件。西洋史研究工作的進行並非等待基礎研究完成後才能起步。所謂<q>唯有待基礎研究工作完成後,我們才能對西洋史或世界史有屬於我們自己的理解</q>的說法,這是十九世紀西方實證史學的說辭。實證史學假定只有當所有的證據都蒐集完成,才能作進一步的綜合工作。西洋史研究者對基礎研究不振的現象感到憂慮,從而猶豫不前,這樣的學風是受到中央研究院史語所傅斯年先生所謂<q>史學即史料學</q>的影響。令人惋惜地是,台灣的西洋史研究者並未以其對西方史學發展的了解,對此有所匡正,反受其遺毒所害,延擱了西洋史研究工作的進展。</p>
<p>因此,西洋史研究的危機與其說是基礎研究的欠缺,不如說是大部分的研究者誤解了此一危機的性質。換言之,危機的本身即是西洋史研究者以為危機存在於基礎研究的闕如。</p>
<p>但在此之下,尚隱藏了更深刻的危機,即歷史研究與現時的脫離。史學無法切合現代人的認知需求。相較於西方學術<q>歷史化</q> (always historicise!) 的呼聲,台灣的歷史研究仍囿於它學科的門牆之內。它既缺乏對歷史學科本身的反省,亦即對歷史學在快速變動的社會中,它自身性質的轉變;同時也缺乏對現實的反省,亦即歷史學如何去回應現代社會的需求。</p>
<p>台灣歷史學界對於歷史理論向來缺乏深刻的反省。多數的學者以為對理論的偏好是望空為高,對實際研究缺乏正面的功能與效用。黃進興先生晚近的告白正是此種心態的反應(一九九二)。對黃進興而言,理論與方法論是屬於<q>第二序</q> (second-order) 的語言,終究無法取代<q>第一序</q> (first-order) 的實質研究。歷經早年對理論的酷愛,黃進興回歸到經典與史料本身。這種反理論的心態不僅使台灣史學界對歷史理論欠缺反省;同時,也無力肆應當今的後現代情境。</p>
<p>在歷經幾番躊蹴猶豫底自我懷疑與認同危機後,一群西洋史的初學者共同創造了一個台灣西洋史研究的園地。他們希望透過行動與理論的反省,回應西洋史研究所面臨的窘況,同時催生西洋史研究的蓬勃發展。</p>
<p>行動之首要,在於創造出一個公開從事學術討論的場域。我們認為,一個公開研究討論與知識交流的園地,是現代學術合法性的一個必要條件,其意義與宗教活動中的儀式並無二致。自去秋(一九九七)伊始,我們在輔仁大學歷史學研究所以<q>歷史學與後現代</q><q>歷史與文化</q>等為題舉辦了一系列的討論會。希冀透過密集、多樣的小型討論會,提供一個西洋史研究的交流園地。</p>
<p>進一步,我們將出版一份屬於同仁刊物性質的研究通訊,將諸次討論會的內容化為文字,結集出刊;並提供近來西洋史研究的新動態。以此做為連繫、凝聚西洋史研究的同好,並供各方批評、指教的場所。此份通訊─《歷史:理論與文化》─即是彙聚多次討論會的成果。</p>
<p>展望未來,我們希望能建立一份屬於台灣西洋史研究者的專業期刊。</p>
<p>我們要再次地強調學術刊物所具有的公開討論與競技場之功能,是學術合法化與不斷進步的確證,也是本刊《歷史:理論與文化》所欲申張的宗旨。</p>
<p>在此,我們試擬幾個台灣西洋史學研究方向之芻議。如刊物的標題《歷史:理論與文化》所示,我們認為台灣的西洋史研究可以朝以下方向進行:歷史理論、史學史與文化史。這同時也表明了我們的立場,我們希望透過所揭櫫的西洋史研究綱領引導台灣歷史研究的走向。換言之,它所欲達成的不僅是台灣西洋史研究水準的提昇;同時,我們也希望西洋史工作者能對台灣的中國或本土歷史的研究有所獻替。藉著西方學術的引介,達成更新學術內容的目的。台灣的西洋史研究者所扮演的即是此種文化媒介的角色,這也是西洋史工作者的自我繪像、自我認同。</p>
<p>首先,我們強調歷史理論的重要性。史學總是不斷地反省著現時、反省著自身。台灣史學界對於當今所謂的<q>後現代情境</q>欠缺了解。今日,在西方所謂的後結構主義 (post-structuralism) 、解構 (deconstruction) 、修辭轉向 (rhetoric turn) 與視覺化理論 (visual theory) 對歷史學性質的反省起了重大的影響。在這一方面海登‧懷特 (Hayden White) 、安克斯密 (F. R. Ankersmit) 、梅驥 (Allan Megill) 、史帝芬‧班恩 (Stephen Bann) 等人的著作頗值得借鏡。</p>
<p>其次,是著重史學史的研究。在此,所謂的史學史不僅指涉對史家、史著、史學思想、觀念的研究;它同時意指對重要的歷史問題的歷史的研究,也就是所謂的<q>學術史</q>的研究。前者現有的成果已頗有可觀;後者則仍有待努力。</p>
<p>在新近重出於世的手稿中,柯靈烏 (R. G. Collingwood) 說道:<q>對任何一個歷史問題的研究,首先須掌握的是這一個問題本身的歷史。</q>透過史學史的認知,每一個專門的歷史專論或著作都與普遍史聯繫在一起。因此,西洋史研究中史料上的限制,或可以透過對每一個歷史問題的專門著作的掌握來解決。</p>
<p>我們的建議是:西洋史研究者應通力合作編輯相關的入門書與工具書,針對討論西洋史中的重大問題的相關著作作一番研究,彙編成冊,做為後學進一步研究的基礎。例如,有關<q>文藝復興</q> (Renaissance) 、<q>十七世紀的普遍危機</q> (the general crisis of seventeenth-century) 、<q>法國大革命</q> (the French Revolution) …等的各家解釋。</p>
<p>近年來,文化史研究的盛行反應了史家反省自身在群眾社會中的位置。俗民文化成了頗受重視的研究主題。這反應了史家反省他們與下層群眾的關係。史家成為弱勢者的代言人,起著揭露<q>權力</q>如何壓迫、壓抑弱勢者的批判底功能。史家們同時也注意到社會各階層所具有的自主性。</p>
<p>二十世紀西方史學的發展歷經了世紀初對傳統以政治史為導向的歷史研究的反動後,在六十年代開啟了社會史經濟史的研究熱潮。<q>新史學</q> (new histories) 在擺脫了大人物傳記寫作的同時,芸芸大眾並未從中獲得解放,反而陷入了結構的牢籠。活生生的個體為抽象的數字、統計圖表所掩蓋。個體的自由意志被無形、非人化的牢籠所圍囿。</p>
<p>現今的史家則注意到了下層群眾每個人的日常生活經驗。七十年代後出現的新文化史 (the new cultural history) 、日常生活史 (Alltagesgeschichte, history of everyday life) 代表了此一新的取向。這些新的研究取向注重歷史中具體、個別的個體經驗。階級 (class) 、性別 (gender) 、種族 (ethnicity) 成了歷史研究中重要的範疇;而婦女、少數民族及其他弱勢族群成了新興的研究主題。多元的觀點、聲音反映了後現代情境中多元化的現象,也符應多元文化 (multi-culture) 的趨向。</p>
<p>一九九七年秋,我們一群年輕的西洋史研究者從自我認同的危機出走,繪出台灣西洋史研究的新路徑。誠然,或許我們的思慮未臻周延、文字尚顯生澀,但因為年輕、因為滿懷的理想,我們衷心地期盼:所有的西洋史研究者能重拾自信與認同,扮好媒介者的角色,對台灣歷史研究的進展有所獻替,成為學術創新的源頭活水!</p>
<hr />
<div id="footer" class="footer" title="頁尾區">
<div>
<p>上次更新日期 <img src="cgi-bin/last_update.cgi"
alt="上次更新日期" /> ,妳是第 <img src="cgi-bin/counter.cgi?countme=1"
alt="訪客計數器" /> 位訪客。</p>
</div>
<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>
<a href="http://www.wov.idv.tw/"><img
src="http://www.wov.idv.tw/images/icon.gif" alt="女聲" /></a>|<a
href="http://www.imacat.idv.tw/"><img
src="http://www.imacat.idv.tw/images/icon.gif" alt="旅舍依瑪" /></a>
<p>感謝<a href="mailto:imacat&#64;mail.imacat.idv.tw">依瑪貓</a>對本站留言版及相關網站提供的技術支援。</p>
</div>
</div>
</body>
</html>

View File

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

View File

@@ -0,0 +1,121 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!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-2018 歷史:理論與文化編輯群。歷史:理論與文化編輯群保有所有權利。" />
<meta name="keywords" content="檔案庫" />
<meta name="generator" content="Selima 3.10" />
<link rel="start" type="application/xhtml+xml" href=".." />
<link rel="author" 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 class="links">
<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>
<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=".">相關連結</a></span> |
<span><a href="mailto:htc&#64;mail.emandy.idv.tw"><em><acronym title="electronic mail">E-mail</acronym></em></a></span>
</div>
<hr />
<div class="navibar">
<span><a href="sechand.html">二手書店</a></span> |
<span><a href="archives.html">史料檔案</a></span> |
<span><a href="misc.html">其它網站</a></span> |
<span><a href="women.html">婦女史</a></span> |
<span><a href="journals.html">期刊</a></span> |
<span><a href="scholars.html">學者</a></span> |
<span><a href="institut.html">學術組織</a></span> |
<span><a href="medicine.html">醫學史</a></span>
</div>
</div>
<hr />
<div id="body" class="body" title="網頁內文區">
<div class="accessguide"><a accesskey="C"
href="#body" title="網頁內文區">:::</a></div>
<h1>史料檔案</h1>
<div class="breadcrumb">
<a href=".">相關連結</a> /
史料檔案
</div>
<ol class="linkslist">
<li>
<cite><span class="en" xml:lang="en">American Women's History: A Research Guide</span></cite><br />
網址: <a href="http://www.mtsu.edu/~kmiddlet/history/women.html">http://www.mtsu.edu/~kmiddlet/history/women.html</a><br />
(待撰寫)<br />
</li>
<li>
<form action="../cgi-bin/mailto.cgi" method="post">
<div>
<cite><span class="en" xml:lang="en">History of Biomedicine</span></cite><br />
網址: <a href="http://www.mic.ki.se/History.html">http://www.mic.ki.se/History.html</a><br />
E-mail <input type="hidden" name="email" value="Tor.Ahlenius at kib.ki.se" />
<input type="image" src="../images/email" alt="E-mail" />
Tor.Ahlenius<span>&#64;</span>kib.ki.se<br />
(待撰寫)<br />
</div>
</form>
</li>
</ol>
</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-2018 歷史:理論與文化編輯群</p>
</div>
</div>
</body>
</html>

View File

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

View File

@@ -0,0 +1,93 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!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-2018 歷史:理論與文化編輯群。歷史:理論與文化編輯群保有所有權利。" />
<meta name="keywords" content="相關連結" />
<meta name="generator" content="Selima 3.10" />
<link rel="start" type="application/xhtml+xml" href=".." />
<link rel="author" 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 class="links">
<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>
<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=".">相關連結</a></span> |
<span><a href="mailto:htc&#64;mail.emandy.idv.tw"><em><acronym title="electronic mail">E-mail</acronym></em></a></span>
</div>
</div>
<hr />
<div id="body" class="body" title="網頁內文區">
<div class="accessguide"><a accesskey="C"
href="#body" title="網頁內文區">:::</a></div>
<h1>相關連結</h1>
<ul class="toc" id="toc">
<li><a href="sechand.html">二手書店 <span class="note">(5)</span></a></li>
<li><a href="archives.html">史料檔案 <span class="note">(2)</span></a></li>
<li><a href="misc.html">其它網站 <span class="note">(1)</span></a></li>
<li><a href="women.html">婦女史 <span class="note">(3)</span></a></li>
<li><a href="journals.html">期刊 <span class="note">(9)</span></a></li>
<li><a href="scholars.html">學者 <span class="note">(5)</span></a></li>
<li><a href="institut.html">學術組織 <span class="note">(9)</span></a></li>
<li><a href="medicine.html">醫學史 <span class="note">(4)</span></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-2018 歷史:理論與文化編輯群</p>
</div>
</div>
</body>
</html>

View File

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

View File

@@ -0,0 +1,225 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!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-2018 歷史:理論與文化編輯群。歷史:理論與文化編輯群保有所有權利。" />
<meta name="keywords" content="學術組織" />
<meta name="generator" content="Selima 3.10" />
<link rel="start" type="application/xhtml+xml" href=".." />
<link rel="author" 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 class="links">
<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>
<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=".">相關連結</a></span> |
<span><a href="mailto:htc&#64;mail.emandy.idv.tw"><em><acronym title="electronic mail">E-mail</acronym></em></a></span>
</div>
<hr />
<div class="navibar">
<span><a href="sechand.html">二手書店</a></span> |
<span><a href="archives.html">史料檔案</a></span> |
<span><a href="misc.html">其它網站</a></span> |
<span><a href="women.html">婦女史</a></span> |
<span><a href="journals.html">期刊</a></span> |
<span><a href="scholars.html">學者</a></span> |
<span><a href="institut.html">學術組織</a></span> |
<span><a href="medicine.html">醫學史</a></span>
</div>
</div>
<hr />
<div id="body" class="body" title="網頁內文區">
<div class="accessguide"><a accesskey="C"
href="#body" title="網頁內文區">:::</a></div>
<h1>學術組織</h1>
<div class="breadcrumb">
<a href=".">相關連結</a> /
學術組織
</div>
<ol class="linkslist">
<li>
<form action="../cgi-bin/mailto.cgi" method="post">
<div>
<a href="http://www.michael-oakeshott-association.org/"><img class="linkicon"
src="http://www.michael-oakeshott-association.org/MOA_photo_small.jpg"
alt="Philosophy: Michael Oakeshott Association" /></a><br />
<cite><span class="en" xml:lang="en">Philosophy: Michael Oakeshott Association</span></cite><br />
網址: <a href="http://www.michael-oakeshott-association.org/">http://www.michael-oakeshott-association.org/</a><br />
E-mail <input type="hidden" name="email" value="michael-oakeshott-association at cwcom.net" />
<input type="image" src="../images/email" alt="E-mail" />
michael-oakeshott-association<span>&#64;</span>cwcom.net<br />
地址: 872 Massachusetts Avenue, Suite 2-1, Cambridge, MA 02139 , U.S.A.<br />
電話: 617/868-3510<br />
傳真: 617/868-7916<br />
(待撰寫)<br />
</div>
</form>
</li>
<li>
<form action="../cgi-bin/mailto.cgi" method="post">
<div>
<cite><span class="en" xml:lang="en">R G Collingwood Society</span></cite><br />
網址: <a href="http://www.swan.ac.uk/poli/coll/collingwood.html">http://www.swan.ac.uk/poli/coll/collingwood.html</a><br />
E-mail <input type="hidden" name="email" value="PLIRVING at swan.ac.uk &lt;PLIRVING at swan.ac.uk&gt;" />
<input type="image" src="../images/email" alt="E-mail" />
PLIRVING<span>&#64;</span>swan.ac.uk &lt;PLIRVING<span>&#64;</span>swan.ac.uk&gt;<br />
(待撰寫)<br />
</div>
</form>
</li>
<li>
<form action="../cgi-bin/mailto.cgi" method="post">
<div>
<cite><span class="en" xml:lang="en">The American Historical Association</span></cite><br />
網址: <a href="http://www.theaha.org/">http://www.theaha.org/</a><br />
E-mail <input type="hidden" name="email" value="aha at theaha.org" />
<input type="image" src="../images/email" alt="E-mail" />
aha<span>&#64;</span>theaha.org<br />
地址: 400 A Street, SE, Washington, DC 20003-3889<br />
電話: (202) 544-2422<br />
傳真: (202) 544-8307<br />
(待撰寫)<br />
</div>
</form>
</li>
<li>
<cite>「文本分析」研讀會</cite><br />
網址: <a href="http://benz.nchu.edu.tw/~chenlin/qindex.htm">http://benz.nchu.edu.tw/~chenlin/qindex.htm</a><br />
(待撰寫)<br />
</li>
<li>
<form action="../cgi-bin/mailto.cgi" method="post">
<div>
<cite>史學連線</cite><br />
網址: <a href="http://saturn.ihp.sinica.edu.tw/~liutk/shih/">http://saturn.ihp.sinica.edu.tw/~liutk/shih/</a><br />
E-mail <input type="hidden" name="email" value="liutk at pluto.ihp.sinica.edu.tw" />
<input type="image" src="../images/email" alt="E-mail" />
liutk<span>&#64;</span>pluto.ihp.sinica.edu.tw<br />
(待撰寫)<br />
</div>
</form>
</li>
<li>
<form action="../cgi-bin/mailto.cgi" method="post">
<div>
<cite>歷史意識重要著作研讀會 <span class="en" xml:lang="en">Workshop on Historical Consciousness</span></cite><br />
網址: <a href="http://www.nchu.edu.tw/history/whc/index.htm">http://www.nchu.edu.tw/history/whc/index.htm</a><br />
E-mail <input type="hidden" name="email" value="history at dragon.nchu.edu.tw" />
<input type="image" src="../images/email" alt="E-mail" />
history<span>&#64;</span>dragon.nchu.edu.tw<br />
(待撰寫)<br />
</div>
</form>
</li>
<li>
<form action="../cgi-bin/mailto.cgi" method="post">
<div>
<a href="http://www.mailbase.ac.uk/lists/collingwood/"><img class="linkicon"
src="http://www.mailbase.ac.uk/images/logo-80.gif"
alt="Collingwood Discussion List" /></a><br />
<cite><span class="en" xml:lang="en">Collingwood Discussion List</span></cite><br />
網址: <a href="http://www.mailbase.ac.uk/lists/collingwood/">http://www.mailbase.ac.uk/lists/collingwood/</a><br />
E-mail <input type="hidden" name="email" value="collingwood-request at mailbase.ac.uk" />
<input type="image" src="../images/email" alt="E-mail" />
collingwood-request<span>&#64;</span>mailbase.ac.uk<br />
This list supports critical and scholarly discussion, reflection and research on the life and works of the historian and philosopher R.G. Collingwood<br />
</div>
</form>
</li>
<li>
<form action="../cgi-bin/mailto.cgi" method="post">
<div>
<cite><span class="en" xml:lang="en">Collingwood and British Idealism Centre Main page</span></cite><br />
網址: <a href="http://www.cf.ac.uk/euros/collingwood/collingwood.html">http://www.cf.ac.uk/euros/collingwood/collingwood.html</a><br />
E-mail <input type="hidden" name="email" value="marshalseaf at cf.ac.uk" />
<input type="image" src="../images/email" alt="E-mail" />
marshalseaf<span>&#64;</span>cf.ac.uk<br />
(待撰寫)<br />
</div>
</form>
</li>
<li>
<form action="../cgi-bin/mailto.cgi" method="post">
<div>
<cite>新史學</cite><br />
網址: <a href="http://saturn.ihp.sinica.edu.tw/~huangkc/nhist/">http://saturn.ihp.sinica.edu.tw/~huangkc/nhist/</a><br />
E-mail <input type="hidden" name="email" value="tangli at gate.sinica.edu.tw" />
<input type="image" src="../images/email" alt="E-mail" />
tangli<span>&#64;</span>gate.sinica.edu.tw<br />
地址: (115)臺北南港郵政1-44號信箱<br />
待撰寫。<br />
</div>
</form>
</li>
</ol>
</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-2018 歷史:理論與文化編輯群</p>
</div>
</div>
</body>
</html>

View File

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

View File

@@ -0,0 +1,207 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!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-2018 歷史:理論與文化編輯群。歷史:理論與文化編輯群保有所有權利。" />
<meta name="keywords" content="期刊, 刊物, 通訊" />
<meta name="generator" content="Selima 3.10" />
<link rel="start" type="application/xhtml+xml" href=".." />
<link rel="author" 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 class="links">
<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>
<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=".">相關連結</a></span> |
<span><a href="mailto:htc&#64;mail.emandy.idv.tw"><em><acronym title="electronic mail">E-mail</acronym></em></a></span>
</div>
<hr />
<div class="navibar">
<span><a href="sechand.html">二手書店</a></span> |
<span><a href="archives.html">史料檔案</a></span> |
<span><a href="misc.html">其它網站</a></span> |
<span><a href="women.html">婦女史</a></span> |
<span><a href="journals.html">期刊</a></span> |
<span><a href="scholars.html">學者</a></span> |
<span><a href="institut.html">學術組織</a></span> |
<span><a href="medicine.html">醫學史</a></span>
</div>
</div>
<hr />
<div id="body" class="body" title="網頁內文區">
<div class="accessguide"><a accesskey="C"
href="#body" title="網頁內文區">:::</a></div>
<h1>期刊</h1>
<div class="breadcrumb">
<a href=".">相關連結</a> /
期刊
</div>
<ol class="linkslist">
<li>
<cite><span class="en" xml:lang="en">Journal of the History of Ideas - JHU Press</span></cite><br />
網址: <a href="http://www.press.jhu.edu/press/journals/jhi/jhi.html">http://www.press.jhu.edu/press/journals/jhi/jhi.html</a><br />
(待撰寫)<br />
</li>
<li>
<cite><span class="en" xml:lang="en">Social History of Medicine</span></cite><br />
網址: <a href="http://www3.oup.co.uk/sochis/">http://www3.oup.co.uk/sochis/</a><br />
(待撰寫)<br />
</li>
<li>
<form action="../cgi-bin/mailto.cgi" method="post">
<div>
<a href="http://www.indiana.edu/~ahr/"><img class="linkicon"
src="http://www.theaha.org/art/ahr-logo.gif"
alt="American Historical Review" /></a><br />
<cite><span class="en" xml:lang="en">American Historical Review</span></cite><br />
網址: <a href="http://www.indiana.edu/~ahr/">http://www.indiana.edu/~ahr/</a><br />
E-mail <input type="hidden" name="email" value="ahr at indiana.edu" />
<input type="image" src="../images/email" alt="E-mail" />
ahr<span>&#64;</span>indiana.edu<br />
地址: 914 Atwater Street Bloomington, Indiana 47401<br />
電話: 812-855-7609<br />
傳真: (812) 855-5827<br />
(待撰寫)<br />
</div>
</form>
</li>
<li>
<form action="../cgi-bin/mailto.cgi" method="post">
<div>
<a href="http://www.ipfw.edu/engl/dept/cleo.html"><img class="linkicon"
src="http://www.ipfw.edu/engl/images/clio2.jpg"
alt="Clio: A Journal of Literature, History and the Philosophy of History" /></a><br />
<cite><span class="en" xml:lang="en">Clio: A Journal of Literature, History and the Philosophy of History</span></cite><br />
網址: <a href="http://www.ipfw.edu/engl/dept/cleo.html">http://www.ipfw.edu/engl/dept/cleo.html</a><br />
E-mail <input type="hidden" name="email" value="webmaster at ipfw.edu" />
<input type="image" src="../images/email" alt="E-mail" />
webmaster<span>&#64;</span>ipfw.edu<br />
(待撰寫)<br />
</div>
</form>
</li>
<li>
<form action="../cgi-bin/mailto.cgi" method="post">
<div>
<cite><span class="en" xml:lang="en">History and Theory</span></cite><br />
網址: <a href="http://www.historyandtheory.org/">http://www.historyandtheory.org/</a><br />
E-mail <input type="hidden" name="email" value="jperkins at wesleyan.edu" />
<input type="image" src="../images/email" alt="E-mail" />
jperkins<span>&#64;</span>wesleyan.edu<br />
電話: (860) 685 3292<br />
傳真: (860) 685 2491<br />
(待撰寫)<br />
</div>
</form>
</li>
<li>
<a href="http://www.elsevier.nl/inca/publications/store/6/0/5/"><img class="linkicon"
src="http://www.elsevier.nl/inca/covers/store/605.gif"
alt="History of European Ideas" /></a><br />
<cite><span class="en" xml:lang="en">History of European Ideas</span></cite><br />
網址: <a href="http://www.elsevier.nl/inca/publications/store/6/0/5/">http://www.elsevier.nl/inca/publications/store/6/0/5/</a><br />
(待撰寫)<br />
</li>
<li>
<form action="../cgi-bin/mailto.cgi" method="post">
<div>
<cite><span class="en" xml:lang="en">History of Historiography - Histoire de l'Historiographie -Geschichte der Geschichtsschreibung</span></cite><br />
網址: <a href="http://www.cisi.unito.it/stor/home.htm">http://www.cisi.unito.it/stor/home.htm</a><br />
E-mail <input type="hidden" name="email" value="STORSTOR at cisi.unito.it" />
<input type="image" src="../images/email" alt="E-mail" />
STORSTOR<span>&#64;</span>cisi.unito.it<br />
傳真: (011) 8174911<br />
(待撰寫)<br />
</div>
</form>
</li>
<li>
<form action="../cgi-bin/mailto.cgi" method="post">
<div>
<cite>新史學</cite><br />
網址: <a href="http://saturn.ihp.sinica.edu.tw/~huangkc/nhist/">http://saturn.ihp.sinica.edu.tw/~huangkc/nhist/</a><br />
E-mail <input type="hidden" name="email" value="tangli at gate.sinica.edu.tw" />
<input type="image" src="../images/email" alt="E-mail" />
tangli<span>&#64;</span>gate.sinica.edu.tw<br />
地址: (115)臺北南港郵政1-44號信箱<br />
待撰寫。<br />
</div>
</form>
</li>
<li>
<cite><span class="en" xml:lang="en">Bulletin of the History of Medicine</span></cite><br />
網址: <a href="http://muse.jhu.edu/journals/bulletin_of_the_history_of_medicine/">http://muse.jhu.edu/journals/bulletin_of_the_history_of_medicine/</a><br />
待撰寫。<br />
</li>
</ol>
</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-2018 歷史:理論與文化編輯群</p>
</div>
</div>
</body>
</html>

View File

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

View File

@@ -0,0 +1,140 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!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-2018 歷史:理論與文化編輯群。歷史:理論與文化編輯群保有所有權利。" />
<meta name="keywords" content="醫學史" />
<meta name="generator" content="Selima 3.10" />
<link rel="start" type="application/xhtml+xml" href=".." />
<link rel="author" 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 class="links">
<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>
<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=".">相關連結</a></span> |
<span><a href="mailto:htc&#64;mail.emandy.idv.tw"><em><acronym title="electronic mail">E-mail</acronym></em></a></span>
</div>
<hr />
<div class="navibar">
<span><a href="sechand.html">二手書店</a></span> |
<span><a href="archives.html">史料檔案</a></span> |
<span><a href="misc.html">其它網站</a></span> |
<span><a href="women.html">婦女史</a></span> |
<span><a href="journals.html">期刊</a></span> |
<span><a href="scholars.html">學者</a></span> |
<span><a href="institut.html">學術組織</a></span> |
<span><a href="medicine.html">醫學史</a></span>
</div>
</div>
<hr />
<div id="body" class="body" title="網頁內文區">
<div class="accessguide"><a accesskey="C"
href="#body" title="網頁內文區">:::</a></div>
<h1>醫學史</h1>
<div class="breadcrumb">
<a href=".">相關連結</a> /
醫學史
</div>
<ol class="linkslist">
<li>
<form action="../cgi-bin/mailto.cgi" method="post">
<div>
<cite><span class="en" xml:lang="en">Lesley Hall's Web Pages</span></cite><br />
網址: <a href="http://www.lesleyahall.net/">http://www.lesleyahall.net/</a><br />
E-mail <input type="hidden" name="email" value="lesleyah at primex.co.uk" />
<input type="image" src="../images/email" alt="E-mail" />
lesleyah<span>&#64;</span>primex.co.uk<br />
(待撰寫)<br />
</div>
</form>
</li>
<li>
<cite><span class="en" xml:lang="en">Social History of Medicine</span></cite><br />
網址: <a href="http://www3.oup.co.uk/sochis/">http://www3.oup.co.uk/sochis/</a><br />
(待撰寫)<br />
</li>
<li>
<form action="../cgi-bin/mailto.cgi" method="post">
<div>
<cite><span class="en" xml:lang="en">History of Biomedicine</span></cite><br />
網址: <a href="http://www.mic.ki.se/History.html">http://www.mic.ki.se/History.html</a><br />
E-mail <input type="hidden" name="email" value="Tor.Ahlenius at kib.ki.se" />
<input type="image" src="../images/email" alt="E-mail" />
Tor.Ahlenius<span>&#64;</span>kib.ki.se<br />
(待撰寫)<br />
</div>
</form>
</li>
<li>
<cite><span class="en" xml:lang="en">Bulletin of the History of Medicine</span></cite><br />
網址: <a href="http://muse.jhu.edu/journals/bulletin_of_the_history_of_medicine/">http://muse.jhu.edu/journals/bulletin_of_the_history_of_medicine/</a><br />
待撰寫。<br />
</li>
</ol>
</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-2018 歷史:理論與文化編輯群</p>
</div>
</div>
</body>
</html>

View File

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

View File

@@ -0,0 +1,115 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!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-2018 歷史:理論與文化編輯群。歷史:理論與文化編輯群保有所有權利。" />
<meta name="keywords" content="其它網站" />
<meta name="generator" content="Selima 3.10" />
<link rel="start" type="application/xhtml+xml" href=".." />
<link rel="author" 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 class="links">
<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>
<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=".">相關連結</a></span> |
<span><a href="mailto:htc&#64;mail.emandy.idv.tw"><em><acronym title="electronic mail">E-mail</acronym></em></a></span>
</div>
<hr />
<div class="navibar">
<span><a href="sechand.html">二手書店</a></span> |
<span><a href="archives.html">史料檔案</a></span> |
<span><a href="misc.html">其它網站</a></span> |
<span><a href="women.html">婦女史</a></span> |
<span><a href="journals.html">期刊</a></span> |
<span><a href="scholars.html">學者</a></span> |
<span><a href="institut.html">學術組織</a></span> |
<span><a href="medicine.html">醫學史</a></span>
</div>
</div>
<hr />
<div id="body" class="body" title="網頁內文區">
<div class="accessguide"><a accesskey="C"
href="#body" title="網頁內文區">:::</a></div>
<h1>其它網站</h1>
<div class="breadcrumb">
<a href=".">相關連結</a> /
其它網站
</div>
<ol class="linkslist">
<li>
<form action="../cgi-bin/mailto.cgi" method="post">
<div>
<cite>中西思想與文化史研究線上指南 <span class="en" xml:lang="en">On-Line Guide to the Study of Chinese &amp; Western Intellectual &amp; Culture History</span></cite><br />
網址: <a href="http://www-ms.cc.ntu.edu.tw/~history/professor/Wu/ATT00125.htm#top">http://www-ms.cc.ntu.edu.tw/~history/professor/Wu/ATT00125.htm#top</a><br />
E-mail <input type="hidden" name="email" value="wuchan at ccms.ntu.edu.tw" />
<input type="image" src="../images/email" alt="E-mail" />
wuchan<span>&#64;</span>ccms.ntu.edu.tw<br />
(待撰寫)<br />
</div>
</form>
</li>
</ol>
</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-2018 歷史:理論與文化編輯群</p>
</div>
</div>
</body>
</html>

View File

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

View File

@@ -0,0 +1,162 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!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-2018 歷史:理論與文化編輯群。歷史:理論與文化編輯群保有所有權利。" />
<meta name="keywords" content="學者" />
<meta name="generator" content="Selima 3.10" />
<link rel="start" type="application/xhtml+xml" href=".." />
<link rel="author" 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 class="links">
<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>
<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=".">相關連結</a></span> |
<span><a href="mailto:htc&#64;mail.emandy.idv.tw"><em><acronym title="electronic mail">E-mail</acronym></em></a></span>
</div>
<hr />
<div class="navibar">
<span><a href="sechand.html">二手書店</a></span> |
<span><a href="archives.html">史料檔案</a></span> |
<span><a href="misc.html">其它網站</a></span> |
<span><a href="women.html">婦女史</a></span> |
<span><a href="journals.html">期刊</a></span> |
<span><a href="scholars.html">學者</a></span> |
<span><a href="institut.html">學術組織</a></span> |
<span><a href="medicine.html">醫學史</a></span>
</div>
</div>
<hr />
<div id="body" class="body" title="網頁內文區">
<div class="accessguide"><a accesskey="C"
href="#body" title="網頁內文區">:::</a></div>
<h1>學者</h1>
<div class="breadcrumb">
<a href=".">相關連結</a> /
學者
</div>
<ol class="linkslist">
<li>
<form action="../cgi-bin/mailto.cgi" method="post">
<div>
<cite><span class="en" xml:lang="en">Lesley Hall's Web Page</span></cite><br />
網址: <a href="http://homepages.primex.co.uk/~lesleyah/">http://homepages.primex.co.uk/~lesleyah/</a><br />
E-mail <input type="hidden" name="email" value="lesleyah at primex.co.uk" />
<input type="image" src="../images/email" alt="E-mail" />
lesleyah<span>&#64;</span>primex.co.uk<br />
(待撰寫)<br />
</div>
</form>
</li>
<li>
<form action="../cgi-bin/mailto.cgi" method="post">
<div>
<cite><span class="en" xml:lang="en">RuG-Frank Ankersmit</span></cite><br />
網址: <a href="http://odur.let.rug.nl/history/members/ankersmi.htm">http://odur.let.rug.nl/history/members/ankersmi.htm</a><br />
E-mail <input type="hidden" name="email" value="F.R.Ankersmit at let.rug.nl" />
<input type="image" src="../images/email" alt="E-mail" />
F.R.Ankersmit<span>&#64;</span>let.rug.nl<br />
電話: +31 (0)50 363 5984 (office)<br />
傳真: +31 (0)50 363 7253<br />
(待撰寫)<br />
</div>
</form>
</li>
<li>
<form action="../cgi-bin/mailto.cgi" method="post">
<div>
<cite><span class="en" xml:lang="en">The Untimely Past</span></cite><br />
網址: <a href="http://ourworld.compuserve.com/homepages/jeffreyhearn/home~1.htm">http://ourworld.compuserve.com/homepages/jeffreyhearn/home~1.htm</a><br />
E-mail <input type="hidden" name="email" value="jeffreyhearn at compuserve.com" />
<input type="image" src="../images/email" alt="E-mail" />
jeffreyhearn<span>&#64;</span>compuserve.com<br />
(待撰寫)<br />
</div>
</form>
</li>
<li>
<form action="../cgi-bin/mailto.cgi" method="post">
<div>
<cite><span class="en" xml:lang="en">Allan Megill's Homepage</span></cite><br />
網址: <a href="http://www.people.virginia.edu/~adm9e/">http://www.people.virginia.edu/~adm9e/</a><br />
E-mail <input type="hidden" name="email" value="megill at virginia.edu" />
<input type="image" src="../images/email" alt="E-mail" />
megill<span>&#64;</span>virginia.edu<br />
Professor of History at the University of Virginia<br />
</div>
</form>
</li>
<li>
<cite><span class="en" xml:lang="en">Giambattista Vico Home Page</span></cite><br />
網址: <a href="http://www.connix.com/~gapinton/index.html">http://www.connix.com/~gapinton/index.html</a><br />
(待撰寫)<br />
</li>
</ol>
</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-2018 歷史:理論與文化編輯群</p>
</div>
</div>
</body>
</html>

View File

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

View File

@@ -0,0 +1,173 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!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-2018 歷史:理論與文化編輯群。歷史:理論與文化編輯群保有所有權利。" />
<meta name="keywords" content="二手書店" />
<meta name="generator" content="Selima 3.10" />
<link rel="start" type="application/xhtml+xml" href=".." />
<link rel="author" 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 class="links">
<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>
<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=".">相關連結</a></span> |
<span><a href="mailto:htc&#64;mail.emandy.idv.tw"><em><acronym title="electronic mail">E-mail</acronym></em></a></span>
</div>
<hr />
<div class="navibar">
<span><a href="sechand.html">二手書店</a></span> |
<span><a href="archives.html">史料檔案</a></span> |
<span><a href="misc.html">其它網站</a></span> |
<span><a href="women.html">婦女史</a></span> |
<span><a href="journals.html">期刊</a></span> |
<span><a href="scholars.html">學者</a></span> |
<span><a href="institut.html">學術組織</a></span> |
<span><a href="medicine.html">醫學史</a></span>
</div>
</div>
<hr />
<div id="body" class="body" title="網頁內文區">
<div class="accessguide"><a accesskey="C"
href="#body" title="網頁內文區">:::</a></div>
<h1>二手書店</h1>
<div class="breadcrumb">
<a href=".">相關連結</a> /
二手書店
</div>
<ol class="linkslist">
<li>
<form action="../cgi-bin/mailto.cgi" method="post">
<div>
<cite><span class="en" xml:lang="en">Powell's Books - Used, New, and Out of Print</span></cite><br />
網址: <a href="http://www.powells.com/">http://www.powells.com/</a><br />
E-mail <input type="hidden" name="email" value="help at powells.com" />
<input type="image" src="../images/email" alt="E-mail" />
help<span>&#64;</span>powells.com<br />
地址: 40 NW 10th Avenue, Portland, OR 97209<br />
電話: (800) 291-9676<br />
(待撰寫)<br />
</div>
</form>
</li>
<li>
<form action="../cgi-bin/mailto.cgi" method="post">
<div>
<cite><span class="en" xml:lang="en">Abebooks.com</span></cite><br />
網址: <a href="http://www.abebooks.com/">http://www.abebooks.com/</a><br />
E-mail <input type="hidden" name="email" value="personnel at abebooks.com" />
<input type="image" src="../images/email" alt="E-mail" />
personnel<span>&#64;</span>abebooks.com<br />
地址: Suite 2, 415 Dunedin Street, Victoria, BC, Canada, V8T 5G8<br />
電話: (250) 475-6013<br />
The world's largest source of out-of-print books!<br />
</div>
</form>
</li>
<li>
<form action="../cgi-bin/mailto.cgi" method="post">
<div>
<a href="http://www.bibliofind.com/"><img class="linkicon"
src="http://images.bookfinder.com/images/link/logo_88x31.gif"
alt="BookFinder.com" /></a><br />
<cite><span class="en" xml:lang="en">BookFinder.com</span></cite><br />
網址: <a href="http://www.bibliofind.com/">http://www.bibliofind.com/</a><br />
E-mail <input type="hidden" name="email" value="admin at bibliofind.com" />
<input type="image" src="../images/email" alt="E-mail" />
admin<span>&#64;</span>bibliofind.com<br />
Search for New, Out of Print and Used Books<br />
</div>
</form>
</li>
<li>
<cite><span class="en" xml:lang="en">Borders.com</span></cite><br />
網址: <a href="http://www.borders.com/">http://www.borders.com/</a><br />
(待撰寫)<br />
</li>
<li>
<form action="../cgi-bin/mailto.cgi" method="post">
<div>
<a href="http://www.yabook.com.tw/"><img class="linkicon"
src="http://www.yabook.com.tw/Img/Logo.gif"
alt="雅博客二手書店" /></a><br />
<cite>雅博客二手書店</cite><br />
網址: <a href="http://www.yabook.com.tw/">http://www.yabook.com.tw/</a><br />
E-mail <input type="hidden" name="email" value="ec at yabook.com.tw" />
<input type="image" src="../images/email" alt="E-mail" />
ec<span>&#64;</span>yabook.com.tw<br />
地址: 234 台北縣永和市保平路30巷12號1樓<br />
電話: 02-8923-5366<br />
傳真: 02-8923-5366<br />
台灣網路二手書店營業內容涵蓋『二手書』、『cd』、『黑膠』流通服務。<br />
</div>
</form>
</li>
</ol>
</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-2018 歷史:理論與文化編輯群</p>
</div>
</div>
</body>
</html>

View File

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

View File

@@ -0,0 +1,127 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!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-2018 歷史:理論與文化編輯群。歷史:理論與文化編輯群保有所有權利。" />
<meta name="keywords" content="婦女" />
<meta name="generator" content="Selima 3.10" />
<link rel="start" type="application/xhtml+xml" href=".." />
<link rel="author" 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 class="links">
<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>
<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=".">相關連結</a></span> |
<span><a href="mailto:htc&#64;mail.emandy.idv.tw"><em><acronym title="electronic mail">E-mail</acronym></em></a></span>
</div>
<hr />
<div class="navibar">
<span><a href="sechand.html">二手書店</a></span> |
<span><a href="archives.html">史料檔案</a></span> |
<span><a href="misc.html">其它網站</a></span> |
<span><a href="women.html">婦女史</a></span> |
<span><a href="journals.html">期刊</a></span> |
<span><a href="scholars.html">學者</a></span> |
<span><a href="institut.html">學術組織</a></span> |
<span><a href="medicine.html">醫學史</a></span>
</div>
</div>
<hr />
<div id="body" class="body" title="網頁內文區">
<div class="accessguide"><a accesskey="C"
href="#body" title="網頁內文區">:::</a></div>
<h1>婦女史</h1>
<div class="breadcrumb">
<a href=".">相關連結</a> /
婦女史
</div>
<ol class="linkslist">
<li>
<form action="../cgi-bin/mailto.cgi" method="post">
<div>
<cite><span class="en" xml:lang="en">Lesley Hall's Web Pages</span></cite><br />
網址: <a href="http://www.lesleyahall.net/">http://www.lesleyahall.net/</a><br />
E-mail <input type="hidden" name="email" value="lesleyah at primex.co.uk" />
<input type="image" src="../images/email" alt="E-mail" />
lesleyah<span>&#64;</span>primex.co.uk<br />
(待撰寫)<br />
</div>
</form>
</li>
<li>
<cite><span class="en" xml:lang="en">American Women's History: A Research Guide</span></cite><br />
網址: <a href="http://www.mtsu.edu/~kmiddlet/history/women.html">http://www.mtsu.edu/~kmiddlet/history/women.html</a><br />
(待撰寫)<br />
</li>
<li>
<cite><span class="en" xml:lang="en">Gender &amp; History</span></cite><br />
網址: <a href="http://www.blackwellpublishing.com/journal.asp?ref=0953-5233&amp;site=1">http://www.blackwellpublishing.com/journal.asp?ref=0953-5233&amp;site=1</a><br />
待撰寫<br />
</li>
</ol>
</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-2018 歷史:理論與文化編輯群</p>
</div>
</div>
</body>
</html>

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;

Some files were not shown because too many files have changed in this diff Show More