1 |
#!/usr/bin/perl |
#!/usr/bin/perl |
2 |
use lib "../lib"; |
# wiki.cgi - This is YukiWiki, yet another Wiki clone. |
3 |
use CGI::Carp 'fatalsToBrowser'; |
# |
4 |
use Algorithm::Diff qw(traverse_sequences); |
# This program is free software; you can redistribute it and/or |
5 |
# use strict; |
# modify it under the same terms as Perl itself. |
6 |
# |
|
7 |
# yukiwiki.cgi - Yet another WikiWikiWeb clone. |
use strict; |
8 |
# |
use lib qw(./lib); |
9 |
# Copyright (C) 2000,2001 by Hiroshi Yuki. |
use CGI::Carp qw(fatalsToBrowser); |
10 |
# <hyuki@hyuki.com> |
our $VERSION = do{my @r=(q$Revision$=~/\d+/g);sprintf "%d."."%02d" x $#r,@r}; |
11 |
# http://www.hyuki.com/yukiwiki/ |
binmode STDOUT; binmode STDIN; |
12 |
# |
require 'wikidata/suikawiki-config.ph'; |
13 |
# This program is free software; you can redistribute it and/or modify |
use Fcntl; |
14 |
# it under the terms of the GNU General Public License as published by |
############################## |
15 |
# the Free Software Foundation; either version 2 of the License, or |
our %fmt; ## formatter objects |
16 |
# (at your option) any later version. |
our %embed_command = ( |
17 |
# |
searched => '^\[\[#searched:([^\]]+)\]\]$', |
18 |
# This program is distributed in the hope that it will be useful, |
form => qr/\[\[\#form(?:\(([A-Za-z0-9-]+)\))?:'((?:[^'\\]|\\.)*)':'((?:[^'\\]|\\.)*)'(?::'((?:[^'\\]|\\.)*)')?\]\]/, |
19 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
); |
20 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
our ($modifier_dbtype,$url_cgi,%uri,%PathTo,$use_exists); |
21 |
# GNU General Public License for more details. |
our (%PageName,$kanjicode,$lang,%ViewDefinition); |
22 |
# |
|
23 |
# $Id$ |
############################## |
24 |
############################## |
my %form; |
25 |
my $version = "1.6.6"; |
our %database; |
26 |
############################## |
our $database = bless {}, 'wiki::dummy'; |
27 |
# ñ�ȥƥ��ȤΤȤ��ˤ� 1 �ˤ��롣 |
my %interwiki; |
28 |
my $testing = 0; |
############################## |
29 |
############################## |
my %command_do = ( |
30 |
# �����饤�֥�� |
read => \&do_view, |
31 |
my $jcodelib = 'jcode.pl'; |
adminchangepassword => \&do_adminchangepassword, |
32 |
############################## |
write => \&do_write, |
33 |
# ��¸��ɽ���δ��������� |
searchform => \&do_searchform, |
34 |
my $kanjicode = 'euc'; # 'sjis' 'euc' |
comment => \&do_comment, |
35 |
my $charset = 'euc-jisx0213'; # 'Shift_JIS' 'EUC-JP' |
RandomJump => \&do_random_jump, |
36 |
############################## |
wikiform => \&do_wikiform, |
37 |
# dbmopen���Ȥ���ʤ�1���Ȥ��ʤ��ʤ�0 |
); |
38 |
my $dbmopen = 0; |
my $UA = ''; ## User agent name |
39 |
############################## |
$| = 1; |
40 |
# �ǡ����١���̾��.pag, .dir, .db�ʤɤ����ס� |
############################## |
41 |
# $dbmopen = 1�ΤȤ��ϥǡ����١���̾�� |
|
42 |
# $dbmopen = 0�ΤȤ��ϥǥ��쥯�ȥ�̾�ˤʤ롣 |
sub main { |
43 |
my $dbname = './wikidata'; |
$UA = $main::ENV{HTTP_USER_AGENT}; |
44 |
my $diffdbname = './wikidiff'; |
&open_db; |
45 |
############################## |
&init_form; |
46 |
# �����Ԥλ�̾�ʼ�ͳ���ѹ����Ƥ��������� |
if ($command_do{$form{mycmd}}) { |
47 |
my $modifier = 'suika'; |
&{$command_do{$form{mycmd}}}; |
48 |
############################## |
} else { |
49 |
# �����Ԥ�Web�ڡ����ʼ�ͳ���ѹ����Ƥ��������� |
&{$command_do{read}}; |
50 |
my $modifierlink = 'http://suika.fam.cx/'; |
} |
51 |
############################## |
&close_db; |
52 |
# ���Υڡ�����URL |
} |
53 |
my $thisurl = 'wiki'; |
|
54 |
############################## |
sub do_view { |
55 |
# ���ϥڡ���̾ |
my $content = $database{$form{mypage}}; |
56 |
my $toppage = 'HomePage'; |
my $lm = $database->mtime ($form{mypage}); |
57 |
############################## |
wiki::referer::add ($form{mypage}, $ENV{HTTP_REFERER}); |
58 |
# �ǽ������ڡ���̾ |
wiki::useragent::add ($ENV{HTTP_USER_AGENT}); |
59 |
my $whatsnew = 'RecentChanges'; |
&load_formatter ('view'); |
60 |
############################## |
my $view = $form{mycmd}; |
61 |
# �ǽ������˷Ǻܤ���ڡ����� |
if ($view eq 'edit') { |
62 |
my $maxnew = 50; |
$view = 'adminedit' if $form{admin}; |
63 |
############################## |
} elsif ($view =~ /[^0-9A-Za-z]/) { |
64 |
# ��������ե�����̾�ʥ��顼�ǡ� |
$view = 'view' |
65 |
my $iconfile = ''; |
} |
66 |
############################## |
my ($magic, $content) = &SuikaWiki::Plugin::magic_and_content (undef, $content); |
67 |
# ��������ե�����̾�ʥ�Υ����ǡ� |
$magic ||= '#?SuikaWiki/0.9'; |
68 |
# my $iconfile = ''; |
my $o = bless {param => \%form, page => $form{mypage}, toc => [], |
69 |
############################## |
magic => $magic, content => $content, |
70 |
# �ڡ������ѹ������Ȥ���touch����ե������''�ʤ鲿�⤷�ʤ��� |
formatter => $fmt{view}, &_compatible_options ()}, 'SuikaWiki::Plugin'; |
71 |
my $touchfile = 'touch.txt'; |
if (!ref $ViewDefinition{$view} || !&{$ViewDefinition{$view}->{check}} ($o)) { |
72 |
############################## |
print "Status: 406 Unsupported Media Type\n"; |
73 |
# �ץ�ӥ塼�Ѥ��طʿ� |
$view = '-UnsupportedMediaType'; |
74 |
my $preview_color = '#FFCCCC'; |
} |
75 |
############################## |
my $media = $ViewDefinition{$view}->{media}; |
76 |
# ���ڡ����Υ������� |
if ($ViewDefinition{$view}->{xmedia} && $UA =~ /Gecko/) { |
77 |
my $style = <<'EOD'; |
$media = $ViewDefinition{$view}->{xmedia}; |
78 |
pre, dl, ul, ol, p, blockquote { line-height:120%; } |
$o->{media} = $media; |
79 |
a { text-decoration: none; } |
} |
80 |
a:link { color: #0000FF; background-color: #FFFFFF; } |
if ($magic =~ m!^\#\?SuikaWiki/0.9!) { |
81 |
a:visited { color: #9900CC; background-color: #FFFFFF; } |
&print_header ($form{mypage}, -last_modified => ($magic =~ /interactive="yes"/ ? $lm : time), |
82 |
a:hover { text-decoration: underline; } |
-expires => ($magic =~ /interactive="yes"/ ? 1 : undef), o => $o, |
83 |
EOD |
-media => $media, -magic => $magic, content => $content); |
84 |
############################## |
} else { |
85 |
# �ƥ�����������ʬ���礭�� |
&print_header($form{mypage}, -media => $media, |
86 |
my $cols = 80; |
-magic => $magic, -last_modified => $lm, o => $o); |
87 |
my $rows = 20; |
} |
88 |
############################## |
print $fmt{view}->replace ($ViewDefinition{$view}->{template} => $o); |
89 |
my %form = (); |
} |
90 |
my %database = (); |
|
91 |
my %diffbase = (); |
sub _do_view_msg (%) { |
92 |
my $diff_text = ''; |
my %option = @_; |
93 |
my @diff_added = (); |
&load_formatter ('view'); |
94 |
my @diff_deleted = (); |
my $o = bless {param => \%form, page => $option{-page}, toc => [], condition => \%option, |
95 |
my $msgrefA; |
formatter => $fmt{view}, &_compatible_options ()}, 'SuikaWiki::Plugin'; |
96 |
my $msgrefB; |
unless (&{$ViewDefinition{$option{-view}}->{check}} ($o)) { |
97 |
############################## |
print "Status: 406 Unsupported Media Type\n"; |
98 |
# �Խ��Բĥڡ���̾���� |
$option{-view} = '-UnsupportedMediaType'; |
99 |
my @uneditable = ( $whatsnew ); |
} |
100 |
############################## |
my $media = $ViewDefinition{$option{-view}}->{media}; |
101 |
# ����Ѥ�����ɽ�� |
if ($ViewDefinition{$option{-view}}->{xmedia} && $UA =~ /Gecko/) { |
102 |
# YukiWiki�Υ��2���ढ�롣 |
$media = $ViewDefinition{$option{-view}}->{xmedia}; |
103 |
# |
$o->{media} = $media; |
104 |
# (1) WikiName (RecentChanges�Ȥ�FrontPage�Τ褦�ʤ��) |
} |
105 |
# (2) BracketName ([[����]]�Ȥ�[[�ȥ�֥륷�塼��]]�Τ褦�ʤ��) |
&print_header($option{-page}, -media => $media, o => $o, -goto => $option{-goto}); |
106 |
# |
print $fmt{view}->replace ($ViewDefinition{$option{-view}}->{template} => $o); |
107 |
# �����ե�JIS��2�Х����ܤˤ� ']' ���褦��Τǡ� |
} |
108 |
# ʸ��']'��1��¿���Ȥ�褦�ˤ��Ƥ��롣 |
|
109 |
# |
sub id_and_name ($) { |
110 |
my $WikiName = '([A-Z][a-z]+([A-Z][a-z]+)+)'; |
my $name = shift; |
111 |
my $BracketName = '\[\[([^>\x09]+?\]?)\]\]'; |
if ($UA =~ m#Mozilla/[12]\.|Microsoft Internet Explorer#) { |
112 |
|
qq{id="$name"><a name="$name"></a}; |
113 |
# ����������ʬ�Υ��� |
} else { |
114 |
my $IconTag = ''; #<<"EOD"; |
qq{id="$name"}; |
115 |
#<a href="http://www.hyuki.com/yukiwiki/"><img src="$iconfile" |
} |
116 |
# border="0" width="80" height="80" alt="[YukiWiki]" /></a> |
} |
117 |
#EOD |
|
118 |
|
sub do_adminchangepassword { |
119 |
require "$jcodelib"; |
if ($form{mynewpassword} ne $form{mynewpassword2}) { |
120 |
|
&_do_view_msg (-view => '-error', -page => $form{mypage}, |
121 |
&init_form($kanjicode); |
error_message => &Resource ('Error:PasswordMismatch')); |
122 |
|
return; |
123 |
if ($testing) { |
} |
124 |
%form = ( |
my ($validpassword_crypt) = $database->meta (AdminPassword => $PageName{AdminSpecialPage}); |
125 |
# 'mycmd' => 'write', |
if ($validpassword_crypt) { |
126 |
'mycmd' => 'read', |
if (not &valid_password($form{myoldpassword})) { |
127 |
#'mycmd' => 'search', |
&_do_view_msg (-view => '-error', -page => $form{mypage}, |
128 |
#'mycmd' => 'edit', |
error_message => &Resource ('Error:PasswordIsIncorrect')); |
129 |
'mymsg' => <<"EOD", |
return; |
130 |
�Ϥ���ޤ��ơ� |
} |
131 |
���줫�餤���������ߤޤ��͡� |
} |
132 |
LinkPage�⸫�Ƥ��������� |
my ($sec, $min, $hour, $day, $mon, $year, $weekday) = localtime(time); |
133 |
TestPage�Ϥɤ��Ǥ��礦���� |
my (@token) = ('0'..'9', 'A'..'Z', 'a'..'z'); |
134 |
�ɤ������������ |
my $salt1 = $token[(time | $$) % scalar(@token)]; |
135 |
http://www.hyuki.com/ |
my $salt2 = $token[($sec + $min*60 + $hour*60*60) % scalar(@token)]; |
136 |
[[����]] |
my $crypted = crypt($form{mynewpassword}, "$salt1$salt2"); |
137 |
EOD |
$database->meta (AdminPassword => $PageName{AdminSpecialPage} => $crypted); |
138 |
'mypage' => '<����>', |
|
139 |
'myword' => '��', |
&_do_view_msg (-view => '-wrote', -page => $form{mypage}); |
140 |
# '3C8C8B8FE98D5F3E' => '', |
} |
141 |
# 'TestPage' => '', |
|
142 |
); |
sub valid_password ($) { |
143 |
} |
my ($validpassword_crypt) = $database->meta (AdminPassword => $PageName{AdminSpecialPage}); |
144 |
&main; |
return crypt (shift, $validpassword_crypt) eq $validpassword_crypt ? 1 : 0; |
145 |
exit(0); |
} |
146 |
|
|
147 |
# �ᥤ�� |
sub do_write { |
148 |
sub main { |
if (&frozen_reject()) { |
149 |
&normalize_form; |
return; |
150 |
if ($dbmopen) { |
} |
151 |
if (!dbmopen(%database, $dbname, 0666)) { |
|
152 |
&print_error("(dbmopen) $dbname �����ޤ���"); |
if (not &is_editable($form{mypage})) { |
153 |
} |
&_do_view_msg (-view => '-error', -page => $form{mypage}, |
154 |
} else { |
error_message => &Resource ('Error:ThisPageIsUneditable')); |
155 |
if (!tie(%database, "YukiWikiDB", $dbname)) { |
return; |
156 |
&print_error("(tie error)"); |
} |
157 |
} |
|
158 |
} |
## Check confliction |
159 |
|
if ($form{myLastModified} ne $database->mtime ($form{mypage})) { |
160 |
# myspecial�б� |
&_do_view_msg (-view => '-conflict', -page => $form{mypage}); |
161 |
foreach (keys %form) { |
return; |
162 |
if (/^myspecial_(.*)/) { |
} |
163 |
$form{mycmd} = $1; |
|
164 |
last; |
if ($form{mymsg}) { |
165 |
} |
if ($form{mytouch} || !ref $database) { |
166 |
} |
$database{$form{mypage}} = $form{mymsg}; |
167 |
|
} else { |
168 |
if ($form{mycmd} eq 'read') { |
$database->STORE ($form{mypage} => $form{mymsg}, -touch => 0); |
169 |
&do_read; |
} |
170 |
} elsif ($form{mycmd} eq 'preview') { |
$database->meta (IsFrozen => $form{mypage} => 0 + $form{myfrozen}); |
171 |
&do_preview; |
my $fragment = ''; |
172 |
} elsif ($form{mycmd} eq 'write') { |
$fragment .= qq(;after_edit_cmd=@{[&encode($form{after_edit_cmd})]}) if $form{after_edit_cmd}; |
173 |
&do_write; |
if ($form{__comment_anchor_index}) { |
174 |
} elsif ($form{mycmd} eq 'edit') { |
$fragment .= qq(#anchor-$form{__comment_anchor_index}); |
175 |
&do_edit; |
} elsif ($form{__wikiform_anchor_index}) { |
176 |
} elsif ($form{mycmd} eq 'reedit') { |
$fragment .= qq(#wikiform-$form{__wikiform_anchor_index}); |
177 |
&do_reedit; |
} |
178 |
} elsif ($form{mycmd} eq 'search') { |
&_do_view_msg (-view => '-wrote', -page => $form{mypage}, -goto => $url_cgi.'?mycmd='.&encode($form{after_edit_cmd}||'read').';mypage='.&encode($form{mypage}).qq(;x-param=@{[time.[0..9]->[rand 10]]}$fragment)); |
179 |
&do_search; |
} else { |
180 |
} elsif ($form{mycmd} eq 'list') { |
delete $database{$form{mypage}}; |
181 |
&do_list; |
&_do_view_msg (-view => '-deleted', -page => $form{mypage}); |
182 |
} elsif ($form{mycmd} eq 'diff') { |
} |
183 |
&do_diff; |
} |
184 |
} else { |
|
185 |
$form{mypage} = $toppage; |
sub _compatible_options () { |
186 |
&do_read; |
(use_anchor_name => ($UA =~ m#Mozilla/[12]\.|Microsoft Internet Explorer# ? 1 : 0)); |
187 |
} |
} |
188 |
if ($dbmopen) { |
|
189 |
dbmclose(%database); |
sub get_search_result ($;%) { |
190 |
} else { |
my $word = lc shift; |
191 |
untie(%database); |
my %option = @_; |
192 |
} |
my @r; |
193 |
} |
foreach my $page (keys %database) { |
194 |
|
next if !$option{-match_myself} && ($page eq $word); |
195 |
# �ڡ�����ɽ�� |
my $content = lc $database{$page}; |
196 |
sub do_read { |
if (index (lc $page, $word) > -1) { |
197 |
my $page_name = $form{mypage}; |
my $c = $content =~ s/\Q$word\E//g; |
198 |
my $percent_name = &encode_percent($page_name); |
push @r, [$page, $c+20]; |
199 |
&print_header($page_name); |
} elsif (index ($word, lc $page) > -1) { |
200 |
print qq|<h1>$IconTag<a href="$thisurl?mycmd=search;myword=$percent_name">$page_name</a></h1>\n|; |
my $c = $content =~ s/\Q$word\E//g; |
201 |
&print_toolbar($page_name); |
push @r, [$page, $c+10]; |
202 |
print &convert_html(&get_page($page_name)); |
} elsif (my $c = $content =~ s/\Q$word\E//g) { |
203 |
&print_footer; |
push @r, [$page, $c]; |
204 |
} |
} |
205 |
|
} |
206 |
# �ڡ������Խ� |
#my $em = sub { my $s = shift; $s =~ s#(\Q$word\E)#<em>$1</em>#gi; $s }; |
207 |
sub do_edit { |
my $r = join "\n", map {qq(<li>[$_->[1]] <a href ="$url_cgi?@{[&encode($_->[0])]}" class="wiki">@{[&escape($_->[0])]}</a> <span class="wikipage-summary">@{[&escape(&get_subjectline($_->[0]))]}</span></li>)} sort {$b->[1] <=> $a->[1] || $a->[0] cmp $b->[0]} @r; |
208 |
if (not &is_editable($form{mypage})) { |
$r = qq|<ul class="search-result">$r</ul>| if $r; |
209 |
# �Խ��Բĥڡ�����ɽ���Τ� |
wantarray? ($r, scalar @r): $r; |
210 |
&do_read; |
} |
211 |
return; |
|
212 |
} |
sub do_random_jump { |
213 |
&editpage(&get_page($form{mypage})); |
my @list = keys %database; |
214 |
} |
my $name = &encode ($list[rand @list]); |
215 |
|
print "Location: $uri{wiki}?$name\n"; |
216 |
# �ڡ����κ��Խ� |
print "\n"; |
217 |
sub do_reedit { |
} |
218 |
if (not &is_editable($form{mypage})) { |
|
219 |
# �Խ��Բĥڡ�����ɽ���Τ� |
sub print_header ($;%) { |
220 |
&do_read; |
my ($page, %option) = @_; |
221 |
} else { |
my @head; |
222 |
&editpage($form{mymsg}); |
$option{o}->{-header}->{class} = &is_frozen($page) ? 'frozen' : ''; |
223 |
} |
$option{o}->{-header}->{class} .= " wiki-page-obsoleted" if $option{-magic} =~ /obsoleted="yes"/; |
224 |
} |
if ($option{-goto}) { |
225 |
|
if ($UA =~ m#Opera|MSIE 2\.#) { |
226 |
sub editpage { |
## WARNING: This code may output unsafe HTML document if |
227 |
my $page_msg = shift; |
## $option{-goto} is not clean. |
228 |
my $page_name = $form{mypage}; |
$option{-goto} =~ tr/;/&/ if $UA =~ m#Opera#; |
229 |
my $digest = &calc_message_digest($page_msg); |
print qq{Refresh: 0; url=$option{-goto}\n}; |
230 |
&print_header($page_name); |
push @head, qq(<meta http-equiv="refresh" content="0; url=$option{-goto}">); |
231 |
print qq|<h1>$IconTag${page_name}���Խ�</h1>\n|; |
} elsif ($UA =~ /Gecko/) { |
232 |
&print_toolbar($page_name); |
print qq{Refresh: 0; url="$option{-goto}"\n}; |
233 |
$page_msg = &escape($page_msg); |
push @head, qq(<meta http-equiv="refresh" content="0; url="@{[&escape($option{-goto})]}"" />); |
234 |
print <<"EOD"; |
} else { |
235 |
<form action="$thisurl" method="post"> |
$option{-goto} =~ tr/;/&/ if $UA =~ m#Mozilla/[1-4]\.#; |
236 |
<!--<input type="hidden" name="mycmd" value="preview">--> |
print qq{Refresh: 0; url="$option{-goto}"\n}; |
237 |
<input type="hidden" name="mypage" value="$page_name"> |
push @head, qq(<meta http-equiv="refresh" content="0; url="@{[&escape($option{-goto})]}"">); |
238 |
<input type="hidden" name="mydigest" value="$digest"> |
} |
239 |
<textarea cols="$cols" rows="$rows" name="mymsg" wrap="virtual">$page_msg</textarea><br> |
} |
240 |
<input type="submit" name="myspecial_preview" value="��ǧ"> |
print qq{Last-Modified: @{[scalar gmtime $option{-last_modified}]}\n} if $option{-last_modified}; |
241 |
<input type="submit" name="myspecial_write" value="��ǧ�����ѹ�"> |
if ($option{-expires} != -1) { |
242 |
</form> |
if (defined $option{-expires}) { ## TODO: Don't use asctime |
243 |
<hr> |
print qq{Expires: @{[scalar gmtime (time + $option{-expires})]}\n}; |
244 |
<h3>�ƥ����������Υ롼��</h3> |
} elsif ($option{-media}->{expires} != -1) { |
245 |
|
print qq{Expires: @{[scalar gmtime (time + $option{-media}->{expires})]}\n}; |
246 |
<p>�̾�����Ϥ���ʸ�������Τޤ��Ϥ���ޤ����� |
} |
247 |
�ʲ��Υ롼��˽��äƥƥ�����������Ԥ����Ȥ��Ǥ��ޤ���</p> |
} |
248 |
|
if ($option{-media}->{charset} && $UA =~ m#Mozilla/2#) { |
249 |
<ul> |
my $ct = qq{$option{-media}->{type}; charset=@{[&get_charset_name($kanjicode,compatible=>1)]}}; |
250 |
<li> |
print qq{Content-Type: $ct\n}; |
251 |
���Ԥ�����ζ��ڤ�Ȥʤ�ޤ��� |
$option{o}->{-header}->{meta_ct} = qq{<meta http-equiv="content-type" content="$ct">\n}; |
252 |
|
} elsif (!$option{-media}->{charset} || $UA =~ m#Infomosaic#) { |
253 |
<li> |
print qq{Content-Type: $option{-media}->{type}\n}; |
254 |
HTML�Υ����Ͻޤ��� |
} else { |
255 |
|
my $type = $option{-media}->{type}; |
256 |
<li> |
$type = 'application/xml' if $type eq 'application/rss+xml'; |
257 |
''��Ĵ''�Τ褦�˥��륯��������ĤǤϤ���ȡ���Ĵ�ˤʤ�ޤ��� |
print qq{Content-Type: $type; charset=@{[&get_charset_name($kanjicode)]}\n}; |
258 |
|
} |
259 |
<li> |
print <<"EOD"; ## TODO: |
260 |
'''���˶�Ĵ'''�Τ褦�˥��륯�����Ȼ��ĤǤϤ���ȡ����˶�Ĵ�ˤʤ�ޤ��� |
Content-Language: $lang |
261 |
|
Content-Style-Type: text/css |
262 |
<li> |
|
263 |
----�Τ褦�˥ޥ��ʥ�4�Ĥ�����ȡ���ʿ���ˤʤ�ޤ��� |
EOD |
264 |
|
$option{o}->{-header}->{links} = join "\n", (@head); |
265 |
<li> |
} |
266 |
*���Ƭ�˽��縫�Ф��ˤʤ�ޤ��� |
|
267 |
|
sub get_charset_name ($;%) { |
268 |
<li> |
my ($charset, %option) = (lc shift, @_); |
269 |
**���Ƭ�˽Ⱦ����Ф��ˤʤ�ޤ��� |
if ($charset =~ 'euc') { |
270 |
|
$charset = $option{compatible} ? 'x-euc-jp' : 'euc-jp'; |
271 |
<li> |
} elsif ($charset =~ 'sjis' || $charset =~ 'shift') { |
272 |
-���Ƭ�˽Ȳվ�ˤʤ�ޤ���- -- --- ��3��٥뤬����ޤ��� |
$charset = $option{compatible} ? 'x-sjis' : 'shift_jis'; |
273 |
|
} elsif ($charset =~ 'jis') { |
274 |
<li> |
$charset = 'iso-2022-jp'; |
275 |
:���Ƭ�˽��Ѹ�Ȳ���ʸ�����ޤ��� |
} |
276 |
|
$charset; |
277 |
<pre> |
} |
278 |
:�Ѹ�1:��������������ʸ1 |
|
279 |
:�Ѹ�2:��������������ʸ2 |
sub escape { |
280 |
:�Ѹ�3:��������������ʸ3 |
my $s = shift; |
281 |
</pre> |
$s =~ s|\x0D\x0A|\x0A|g; |
282 |
|
$s =~ s|&|&|g; |
283 |
<li> |
$s =~ s|<|<|g; |
284 |
http://www.hyuki.com/ �Τ褦��URL�ϼ�ưŪ�˥�ˤʤ�ޤ��� |
$s =~ s|>|>|g; |
285 |
|
$s =~ s|"|"|g; |
286 |
<li> |
return $s; |
287 |
YukiWiki�Τ褦����ʸ����ʸ��������ʸ�����ȡ� |
} |
288 |
YukiWiki�Υڡ���̾�ˤʤ�ޤ��� |
|
289 |
|
sub unescape { |
290 |
<li> |
my $s = shift; |
291 |
[[����]]�Τ褦����Ť��礫�ä�[[ ]]�Ǥ����ä�ʸ�����ȡ� |
# $s =~ s|\n|\r\n|g; |
292 |
YukiWiki�Υڡ���̾�ˤʤ�ޤ��� |
$s =~ s|<|<|g; |
293 |
�礫�ä�����ˤϥ��ڡ�����ޤ�ƤϤ����ޤ��� |
$s =~ s|>|>|g; |
294 |
���ܸ��Ȥ��ޤ��� |
$s =~ s|"|"|g; |
295 |
|
$s =~ s|&|&|g; |
296 |
<li> |
return $s; |
297 |
��Ƭ�����ڡ����ǻϤޤäƤ���ȡ� |
} |
298 |
��������������Ѥ߰����ޤ��� |
|
299 |
�ץ����������Ȥ��˻Ȥ��������Ǥ��� |
sub convert_format ($$$;%) { |
300 |
|
my ($content, $d => $t, %option) = @_; |
301 |
<li> |
&load_formatter ('format'); |
302 |
> ���Ƭ�˽ȡ� |
my $f = SuikaWiki::Plugin->format_converter ($d => $t); |
303 |
����ʸ���ޤ��� |
if (ref $f) { |
304 |
> �ο���¿���ȥ���ǥ�Ȥ������ʤ�ޤ���3��٥�ޤǡˡ� |
$option{content} = $content; |
305 |
|
$option{from} = $d; |
306 |
</ul> |
$option{to} = $t; |
307 |
EOD |
&$f ({}, bless (\%option, 'SuikaWiki::Plugin')); |
308 |
&print_footer; |
} elsif ($t =~ /HTML|xml/) { |
309 |
} |
length $content ? '<pre>'.&escape($content).'</pre>' : ''; |
310 |
|
} else { |
311 |
# �ڡ����θ��� |
$content; |
312 |
sub do_search { |
} |
313 |
if ($form{myword}) { |
} |
314 |
&print_header('�������'); |
|
315 |
print qq|<h1>$IconTag$form{myword}������</h1>\n|; |
sub text_to_html { |
316 |
&print_toolbar(); |
my ($txt, %option) = @_; |
317 |
print qq|<ul>\n|; |
my $toc = $option{-toc} || (ref $option{toc} ? $option{toc} : []); |
318 |
my $count = 0; |
my $tocnum = 0; |
319 |
foreach my $page_name (sort keys %database) { # sort����Τ�̵�Ť��� |
|
320 |
if ($database{$page_name} =~ /\Q$form{'myword'}\E/) { |
## Load constants |
321 |
my $encoded = &encode_percent($page_name); |
my %const; |
322 |
print qq|<li><a href="$thisurl?mycmd=read;mypage=$encoded">$page_name</a>\n|; |
if ($option{content_format} =~ /import="([^"]+)"/) { |
323 |
$count++; |
for (split /\s*,\s*/, $1) { |
324 |
} |
my $wp = $database{$_}; |
325 |
} |
if ($wp =~ m!^\#\?SuikaWikiConst/1.0!) { |
326 |
print qq|</ul>\n|; |
wiki::suikawikiconst::to_hash ($wp => \%const); |
327 |
if ($count > 0) { |
} |
328 |
print qq|<p><strong>$form{myword}</strong>��ޤ�ڡ����ϡ���˼���<strong>$count</strong> �ڡ����Ǥ���</p>\n|; |
} |
329 |
} else { |
} |
330 |
print qq|<p><strong>$form{myword}</strong>��ޤ�ڡ����ϸ��Ĥ���ޤ���</p>\n|; |
|
331 |
} |
$txt =~ s{__&&([^&]+)&&__}{defined $const{$1}?$const{$1}:qq(__&&$1&&__)}ge; |
332 |
} else { |
my (@txt) = split(/\n/, $txt); |
333 |
&print_header('ñ�측��'); |
my (@saved, @result); |
334 |
print qq|<h1>$IconTagñ�측��</h1>\n|; |
unshift(@saved, "</p>"); |
335 |
&print_toolbar(); |
push(@result, "<p>"); |
336 |
} |
foreach (@txt) { |
337 |
print <<"EOD"; |
chomp; |
338 |
<p> |
if (/^\*\*\*\*\*([^\x0D\x0A]*)/) { |
339 |
<form action="$thisurl" method="post"> |
push @$toc, [5, "i$tocnum" => ($1 || $tocnum)]; |
340 |
<input type="hidden" name="mycmd" value="search"> |
push(@result, splice(@saved), qq(<h6 @{[&id_and_name("i$tocnum")]}>) . &inline($1, const => \%const) . '</h6>'); |
341 |
<input type="text" name="myword" size="20" value="$form{myword}"> |
$tocnum++; |
342 |
<input type="submit" value="ñ�측��"> |
} elsif (/^\*\*\*\*([^\x0D\x0A]*)/) { |
343 |
</form> |
push @$toc, [4, "i$tocnum" => ($1 || $tocnum)]; |
344 |
</p> |
push(@result, splice(@saved), qq(<h5 @{[&id_and_name("i$tocnum")]}>) . &inline($1, const => \%const) . '</h5>'); |
345 |
EOD |
$tocnum++; |
346 |
&print_footer; |
} elsif (/^\*\*\*([^\x0D\x0A]*)/) { |
347 |
} |
push @$toc, [3, "i$tocnum" => ($1 || $tocnum)]; |
348 |
|
push(@result, splice(@saved), qq(<h4 @{[&id_and_name("i$tocnum")]}>) . &inline($1, const => \%const) . '</h4>'); |
349 |
# �ڡ����ΰ��� |
$tocnum++; |
350 |
sub do_list { |
} elsif (/^\*\*([^\x0D\x0A]*)/) { |
351 |
&print_header('�ڡ�������'); |
# if (/^\*\*(.*)/) { |
352 |
print qq|<h1>$IconTag �ڡ�������</h1>\n|; |
# Walrus mod (6) end |
353 |
&print_toolbar(); |
push @$toc, [2, "i$tocnum" => ($1 || $tocnum)]; |
354 |
print qq|<ul>\n|; |
push(@result, splice(@saved), qq(<h3 @{[&id_and_name("i$tocnum")]}>) . &inline($1, const => \%const) . '</h3>'); |
355 |
foreach my $page_name (sort keys %database) { # sort����Τ�̵�Ť��� |
$tocnum++; |
356 |
my $encoded = &encode_percent($page_name); |
} elsif (/^\*([^\x0D\x0A]*)/) { |
357 |
print qq|<li><a href="$thisurl?mycmd=read;mypage=$encoded">$page_name</a>\n| |
push @$toc, [1, "i$tocnum" => ($1 || $tocnum)]; |
358 |
} |
push(@result, splice(@saved), qq(<h2 @{[&id_and_name("i$tocnum")]}>) . &inline($1, const => \%const) . '</h2>'); |
359 |
print qq|</ul>\n|; |
$tocnum++; |
360 |
&print_footer; |
} elsif (/^(={1,6})(.*)/) { |
361 |
} |
&back_push('ol', length($1), \@saved, \@result); |
362 |
|
push(@result, '<li>' . &inline($2, const => \%const) . '</li>'); |
363 |
# �ץ�ӥ塼 |
} elsif (/^(-{1,6})(.*)/) { |
364 |
sub do_preview { |
&back_push('ul', length($1), \@saved, \@result); |
365 |
my $page_name = $form{mypage}; |
my ($pf, $l) = ('', $2); |
366 |
my $escapedmsg = &escape($form{mymsg}); |
if (!$main::_EMBEDED && $l =~ s/^\s*\[([0-9]+)\]//) { |
367 |
&print_header($page_name); |
my $num = 0+$1; |
368 |
print qq|<h1>$IconTag${page_name}�Υץ�ӥ塼</h1>\n|; |
$pf = qq(<a name="anchor-$num" id="anchor-$num" class="anchor">[$num]</a>); |
369 |
&print_toolbar($page_name); |
} |
370 |
# local $percent_name = &encode_percent($page_name); |
push(@result, '<li>' . $pf . &inline ($l, const => \%const) . '</li>'); |
371 |
print qq|<p>�ʲ��Υץ�ӥ塼���ǧ���ơ��褱��Хڡ��������Υܥ���ǹ������Ƥ���������</p>\n|; |
} elsif (/^:([^:]+):(.*)/) { |
372 |
if ($form{mymsg}) { |
&back_push('dl', 1, \@saved, \@result); |
373 |
print qq|<table width="100%" bgcolor="$preview_color" ><tr><td>\n|; |
push(@result, '<dt>' . &inline($1, const => \%const) . '</dt>', '<dd>' . &inline($2, const => \%const) . '</dd>'); |
374 |
# print &convert_html($escapedmsg); |
} elsif (/^(?!>>\d)(>{1,5})(.*)/) { |
375 |
print &convert_html($form{mymsg}); |
&back_push('blockquote', length($1), \@saved, \@result); |
376 |
print qq|</td></tr></table>\n|; |
push @result, "<p>"; |
377 |
} else { |
push(@result, &inline($2, const => \%const)); |
378 |
print qq|<p>�ʥڡ��������Ƥ϶��Ǥ�����������Ȥ��Υڡ�����<strong>���</strong>����ޤ�����</p>\n|; |
unshift @saved, "</p>"; |
379 |
} |
} elsif (/^\s*$/) { |
380 |
&print_preview_buttons($page_name, $escapedmsg, $form{mydigest}); |
push(@result, splice(@saved)); |
381 |
&print_footer; |
push(@result, "<p>"); |
382 |
} |
unshift(@saved, "</p>"); |
383 |
|
} elsif (/^(\s+.*)$/) { |
384 |
sub print_preview_buttons { |
&back_push('pre', 1, \@saved, \@result); |
385 |
my ($page_name, $escapedmsg, $digest) = @_; |
push(@result, &inline($1, const => \%const)); |
386 |
print <<"EOD"; |
} elsif (/^\,(.*?)[\x0D\x0A]*$/) { |
387 |
<form action="$thisurl" method="post"> |
&back_push('table', 1, \@saved, \@result); |
388 |
<textarea cols="$cols" rows="$rows" name="mymsg" wrap="virtual">$escapedmsg</textarea> |
####### |
389 |
<br /> |
# This part is taken from Mr. Ohzaki's Perl Memo and Makio Tsukamoto's WalWiki. |
390 |
<input type="hidden" name="mypage" value="$page_name"> |
# XXXXX |
391 |
<input type="hidden" name="mydigest" value="$digest"> |
my $tmp = "$1,"; |
392 |
<input type="submit" name="myspecial_preview" value="���٥ץ�ӥ塼"> |
my @value = map {/^"(.*)"$/ ? scalar($_ = $1, s/""/"/g, $_) : $_} ($tmp =~ /("[^"]*(?:""[^"]*)*"|[^,]*),/g); |
393 |
<input type="submit" name="myspecial_write" value="�ڡ����ι���"> |
my @align = map {(s/^\s+//) ? ((s/\s+$//) ? ' align="center"' : ' align="right"') : ''} @value; |
394 |
</form> |
my @colspan = map {($_ eq '==') ? 0 : 1} @value; |
395 |
EOD |
for (my $i = 0; $i < @value; $i++) { |
396 |
} |
if ($colspan[$i]) { |
397 |
|
while ($i + $colspan[$i] < @value and $value[$i + $colspan[$i]] eq '==') { |
398 |
# ���� |
$colspan[$i]++; |
399 |
sub do_write { |
} |
400 |
if (not &is_editable($form{mypage})) { |
$colspan[$i] = ($colspan[$i] > 1) ? sprintf(' colspan="%d"', $colspan[$i]) : ''; |
401 |
# �Խ��Բĥڡ�����ɽ���Τ� |
$value[$i] = sprintf('<td%s%s>%s</td>', $align[$i], $colspan[$i], &inline($value[$i], const => \%const)); |
402 |
&do_read; |
} else { |
403 |
return; |
$value[$i] = ''; |
404 |
} |
} |
405 |
|
} |
406 |
my $page_name = $form{mypage}; |
push(@result, join('', '<tr>', @value, '</tr>')); |
407 |
|
# XXXXX |
408 |
# digest��Ȥäơ������ξ��ͥ����å� |
####### |
409 |
my $original_digest = &calc_message_digest(&get_page($page_name)); |
} elsif (/^\[(INS|DEL|PRE)\[\s*$/) { |
410 |
if ($form{mydigest} ne $original_digest) { |
push @result, splice (@saved), '<'.lc($1).'>'; |
411 |
&print_header($page_name); |
unshift @saved, "</p>"; |
412 |
print qq|<h1>$IconTag${page_name}�ǡڹ����ξ��ۤ͡������ޤ���</h1>\n|; |
push @result, "<p>"; |
413 |
print <<"EOD"; |
} elsif (/^\](INS|DEL|PRE)\]\s*$/) { |
414 |
<p>���ʤ������Υڡ������Խ����Ƥ���֤ˡ� |
push @result, splice (@saved), '</'.lc($1).'>'; |
415 |
¾�οͤ�Ʊ���ڡ��������Ƥ��ޤä��褦�Ǥ��� |
} elsif (/^\[([0-9]+)\](.*)$/ && !$main::_EMBEDED) { |
416 |
</p><p> |
my $num = 0+$1; |
417 |
�ʲ��ˡ����ʤ����Խ������ƥ����Ȥ�����ޤ��Τǡ� |
push @result, qq(<a name="anchor-$num" id="anchor-$num" class="anchor">[$num]</a>); |
418 |
���ʤ����Խ����Ƥ������ʤ��褦�ˡ� |
push @result, &inline ($2, const => \%const); |
419 |
���ޤ��������Ģ�ʤɤ˥��ԡ����ڡ����Ȥ��Ƥ��������� |
} else { |
420 |
</p><p> |
push(@result, &inline($_, const => \%const)); |
421 |
���ԡ����ڡ����Ȥ��Ѥ�Ǥ��顢 |
} |
422 |
�ǿ������Ƥƺ����Խ���ľ���Ƥ��������� |
} |
423 |
�ǿ������Ƥ� |
push(@result, splice(@saved)); |
424 |
<a target="_blank" href="$thisurl?mycmd=read;mypage=$form{mypage}">$form{mypage}</a> |
|
425 |
�Ǹ��뤳�Ȥ��Ǥ��ޤ��� |
my $r = join("\n", @result); |
426 |
</p> |
$r =~ s#<p>\x0D?\x0A</p>##g; |
427 |
EOD |
$r =~ s#[\x0D\x0A]+</#</#g; |
428 |
# &print_toolbar($page_name); |
$r =~ s#<pre>\x0D?\x0A#<pre>#g; |
429 |
&print_preview_buttons($page_name, &escape($form{mymsg}), $form{mydigest}); |
$r; |
430 |
&print_footer; |
} |
431 |
return; |
|
432 |
} |
sub back_push { |
433 |
|
my ($tag, $level, $savedref, $resultref, $attr) = @_; |
434 |
# diff���� |
while (@$savedref > $level) { |
435 |
{ |
push(@$resultref, shift(@$savedref)); |
436 |
&opendiff; |
} |
437 |
my @msg1 = split(/\n/, &get_page($page_name)); |
if ($savedref->[0] ne "</$tag>") { |
438 |
my @msg2 = split(/\n/, $form{mymsg}); |
push(@$resultref, splice(@$savedref)); |
439 |
$msgrefA = \@msg1; |
} |
440 |
$msgrefB = \@msg2; |
while (@$savedref < $level) { |
441 |
&diff_check; |
unshift(@$savedref, "</$tag>"); |
442 |
$diffbase{$form{mypage}} = $diff_text; |
push(@$resultref, "<$tag$attr>"); |
443 |
$diff_text = ''; |
} |
444 |
&closediff; |
} |
445 |
} |
|
446 |
|
sub inline ($;%) { |
447 |
&print_header($page_name); |
my ($line, %option) = @_; |
448 |
&set_page($page_name, $form{mymsg}); |
$line = &escape($line); |
449 |
if ($form{mymsg}) { |
$line =~ s{$embed_command{form}}{&make_custom_form ($1, $2, $3, $4)}ge; |
450 |
print qq|<h1>$IconTag${page_name}�����ޤ���</h1>\n|; |
$line =~ s{\[(INS|DEL|SUP|SUB|VAR|CODE|KBD|SAMP|DFN)(?:\(([A-Za-z0-9\x20-]+)\))?\[(.+?)\]\]}{<@{[lc $1]}@{[$2 ? qq( class="$2") : '']}>$3</@{[lc $1]}>}g; |
451 |
&print_toolbar($page_name); |
$line =~ s:\[(WEAK)\[(.+?)\]\]:<span class="@{[lc $1]}">$2</span>:g; |
452 |
print &convert_html(&get_page($page_name)); |
$line =~ s:\[ABBR\[([^]]+)\] \[([^]]+)\]\]:<acronym title="$2">$1</acronym>:g; |
453 |
} else { |
$line =~ s:\[RUBYB\[([^]]+)\] \[([^]]+)\] \[([^]]+)\]\]:<span class="ruby"><ruby class="rb"><rb>$1</rb><rp>(</rp><rt>$2</rt><rp>)</rp></ruby><span class="rp"> (</span><span class="rt-below">$3</span><span class="rp">) </span></span>:g; |
454 |
print qq|<h1>$IconTag${page_name}�������ޤ���</h1>\n|; |
$line =~ s:\[RUBY\[([^]]+)\] \[([^]]+)\]\]:<ruby><rb>$1</rb><rp>(</rp><rt>$2</rt><rp>)</rp></ruby>:g; |
455 |
&print_toolbar($page_name); |
$line =~ s:\[RUBYB\[([^]]+)\] \[([^]]+)\]\]:<span class="ruby"><span class="rb">$1</span><span class="rp"> (</span><span class="rt-below">$2</span><span class="rp">) </span></span>:g; |
456 |
print qq|<p>${page_name}�������ޤ�����</p>\n|; |
$line =~ s|'''([^']+)'''|<strong>$1</strong>|g; |
457 |
} |
$line =~ s|''([^']+)''|<em>$1</em>|g; |
458 |
&print_footer; |
$line =~ s{ |
459 |
# �������줿�Τǥ��å����Ƥ����� |
(\[\[(\#\S+?)\]\]) |
460 |
if ($touchfile) { |
|\[\[([^[]+?)](?:>>([0-9]+))?] |
461 |
open(FILE, "> $touchfile"); |
|>>([0-9]+) |
462 |
print FILE "\n"; |
|<([A-Za-z0-9%]+:(?:(?!>).)+)> |
463 |
close(FILE); |
}{ |
464 |
} |
my ($l, $page,$anchor, $anum, $uri) = ($1, $3,$4, 0+$5, $6); |
465 |
} |
if ($l) { |
466 |
|
&embedded_to_html($1); |
467 |
# �ڡ������ѹ��� |
} elsif (defined $page) { |
468 |
sub do_diff { |
&make_wikilink ($page, anchor => 0+$anchor); |
469 |
if (not &is_editable($form{mypage})) { |
} elsif ($anum) { |
470 |
# �Խ��Բĥڡ�����ɽ���Τ� |
qq(<a href="#anchor-$anum" class="wiki-anchor">>>$anum</a>); |
471 |
&do_read; |
} elsif ($uri) { |
472 |
return; |
&make_urilink ($uri); |
473 |
} |
} |
474 |
&opendiff; |
}gex; |
475 |
&print_header($form{mypage} . '���ѹ���'); |
return $line; |
476 |
print qq|<h1>$IconTag <a href="$thisurl?mycmd=read&mypage=$form{mypage}">$form{mypage}</a>���ѹ���</h1>\n|; |
} |
477 |
&print_toolbar(); |
|
478 |
$_ = &escape($diffbase{$form{mypage}}); |
sub make_wikilink ($%) { |
479 |
print <<"EOD"; |
my ($ename, %option) = @_; |
480 |
<ul> |
my $name = &unescape ($ename); |
481 |
<li>�ɲä��줿�Ԥ�<ins>�Ŀ�</ins>�Ǥ��� |
$option{latest} = $option{latest} ? qq(mycmd=read;x-param=@{[time.[0..9]->[rand 10]]};mypage=) : ''; |
482 |
<li>������줿�Ԥ�<del>�ֿ�</del>�Ǥ��� |
if ($database{$name}) { |
483 |
<li><a href="$thisurl?mycmd=read;mypage=$form{mypage}">$form{mypage}</a>�عԤ��� |
my $subject = &escape (&get_subjectline ($name, delimiter => '')); |
484 |
</ul> |
if ($option{anchor}) { |
485 |
<hr /> |
return qq(<a title="$subject" href="$uri{wiki}?$option{latest}@{[&encode($name)]}#anchor-$option{anchor}" class="wiki">$ename>>$option{anchor}</a>); |
486 |
EOD |
} else { |
487 |
print qq|<pre>\n|; |
return qq(<a title="$subject" href="$uri{wiki}?$option{latest}@{[&encode($name)]}" class="wiki">$ename</a>); |
488 |
foreach (split(/\n/, $_)) { |
} |
489 |
if (/^\+(.*)/) { |
} else { |
490 |
print qq|<ins>$1</ins>\n|; |
return qq(<a title="@{[&Resource('JumpAndEditWikiPage',escape=>1)]}" href="$uri{wiki}?$option{latest}@{[&escape($name)]}" class="wiki not-exist">$ename<span class="mark">@{[&Resource('JumpAndEditWikiPageMark',escape=>1)]}</span></a>); |
491 |
} elsif (/^\-(.*)/) { |
} |
492 |
print qq|<del>$1</del>\n|; |
} |
493 |
} elsif (/^\=(.*)/) { |
|
494 |
print qq|$1\n|; |
sub make_urilink ($;%) { |
495 |
} else { |
require URI; |
496 |
print qq|??? $_\n|; |
my $uri = shift; |
497 |
} |
if ($uri =~ s/^IW://) { ## InterWiki (not URI) |
498 |
} |
$uri = &unescape ($uri); |
499 |
print qq|</pre>\n|; |
if ($uri =~ /^([^\x00-\x2F\x3A-\x40\x5B-\x60\x7B-\x7F]+|"(?:\\.|[^"\\])+"):([^\x00-\x2F\x3A-\x40\x5B-\x60\x7B-\x7F]+|"(?:\\.|[^"\\])+")$/) { |
500 |
&print_footer; |
my ($site, $name) = ($1, $2); |
501 |
&closediff; |
for ($site, $name) { |
502 |
} |
if (s/^"//) { s/"$//; s/\\(.)/$1/g } |
503 |
|
} |
504 |
sub opendiff { |
&init_InterWikiName () unless $interwiki{'[[]]'}; |
505 |
if ($dbmopen) { |
if ($interwiki{$site}) { |
506 |
if (!dbmopen(%diffbase, $diffdbname, 0666)) { |
&load_formatter ('interwiki'); |
507 |
&print_error("(dbmopen) $diffdbname �����ޤ���"); |
my $uri = &escape ($fmt{interwiki}->replace ($interwiki{$site} => {site => $site, name => $name})); |
508 |
} |
$site = &escape ($site); $name = &escape ($name); |
509 |
} else { |
qq(<<a href="$uri" class="out-of-wiki interwiki" title="$name ($site); URI: <$uri>"><span class="interwiki-site">$site:</span><span class="interwiki-name">$name</span></a>>); |
510 |
if (!tie(%diffbase, "YukiWikiDB", $diffdbname)) { |
} else { |
511 |
&print_error("(tie error)"); |
qq(<@{[&Resource('Error:UnknownInterWikiName=',escape=>1)]}@{[&escape ($site)]}>); |
512 |
} |
} |
513 |
} |
} else { |
514 |
} |
qq(<@{[&Resource('Error:InvalidInterWiki=',escape=>1)]}@{[&escape($uri)]}>); |
515 |
|
} |
516 |
sub closediff { |
} elsif ($uri =~ /^urn:/) { ## URN |
517 |
if ($dbmopen) { |
my $uri2 = &escape (URI->new ('/uri-res/N2L?'.&unescape ($uri), 'http')->canonical); |
518 |
dbmclose(%diffbase); |
qq(<<a href="$uri2" title="URI: <$uri> (via <$uri2>)" class="out-of-wiki urn">$uri</a>>); |
519 |
} else { |
} elsif ($uri =~ s/^MAIL://) { ## mail address (not URI) |
520 |
untie(%diffbase); |
my $uri2 = &escape (URI->new ('mailto:'.&unescape ($uri))->canonical); |
521 |
} |
qq(<<a href="$uri2" class="out-of-wiki mail">$uri</a>>); |
522 |
} |
} elsif ($uri =~ s/^IMG(?:\([^)]+\))?://) { ## image (not URI itself) |
523 |
|
my $uri2 = &escape (URI->new (&unescape ($uri))->canonical); |
524 |
# �ե����फ��ξ����Ϣ������ %form ������� |
qq(<img src="$uri2" alt="" title="URI: <$uri2>" class="out-of-wiki">); |
525 |
# &init_form('euc'); |
} else { ## misc. URI |
526 |
sub init_form { |
CGI::Carp::warningsToBrowser (0); |
527 |
my ($charcode) = @_; |
my $uri2 = &escape (URI->new (&unescape ($uri))->canonical); |
528 |
my $query; |
CGI::Carp::warningsToBrowser (1); |
529 |
if ($ENV{REQUEST_METHOD} =~ /^post$/i) { |
qq(<<a href="$uri2" title="URI: <$uri2>" class="out-of-wiki">$uri</a>>); |
530 |
read(STDIN, $query, $ENV{CONTENT_LENGTH}); |
} |
531 |
} else { |
} |
532 |
$query = $ENV{QUERY_STRING}; |
|
533 |
} |
{my $FormIndex = 0; |
534 |
my @assocarray = split(/[&;]/, $query); |
sub make_custom_form ($$$$) { |
535 |
foreach my $assoc (@assocarray) { |
my ($wfname, $definition, $template, $option) = @_; |
536 |
my ($property, $value) = split(/=/, $assoc); |
## $template and $option is currently not used in this procedure. |
537 |
$value =~ tr/+/ /; |
unless ($main::_EMBEDED) { |
538 |
$value =~ s/%([A-Fa-f0-9][A-Fa-f0-9])/pack("C", hex($1))/eg; |
$FormIndex++; |
539 |
&jcode::convert(\$value, $charcode); |
if (length $definition) { |
540 |
$form{$property} = $value; |
my $param = bless {}, 'SuikaWiki::Plugin'; |
541 |
} |
my $lastmodified = $database->mtime ($form{mypage}); |
542 |
} |
&load_formatter (qw/form_input form_option/); |
543 |
|
$definition = &unescape ($definition); |
544 |
# ���顼�ڡ�������Ϥ��� |
$definition =~ s/\\(.)/$1/g; |
545 |
sub print_error { |
$option = &unescape ($option); |
546 |
my ($msg) = @_; |
$option =~ s/\\(.)/$1/g; |
547 |
&print_header('Error'); |
$fmt{form_option}->replace ($option, $param); |
548 |
print "<h1>$IconTag$msg</h1></body></html>"; |
$param->{output}->{form} = 1 unless defined $param->{output}->{form}; |
549 |
exit(0); |
$definition .= ' %submit;' if $definition !~ /%submit/ && !$param->{output}->{nosubmit} && $param->{output}->{form}; |
550 |
} |
$param->{output}->{page} ||= $form{mypage}; |
551 |
|
$param->{form_disabled} = 1 if $database->meta (IsFrozen => $form{mypage}); |
552 |
sub escape { |
my $target_form = $param->{output}->{id}; |
553 |
my ($line) = shift; |
my $r = ''; |
554 |
$line =~ s|<|<|g; |
$r = <<EOH if $param->{output}->{form}; |
555 |
$line =~ s|>|>|g; |
<form method="post" action="$url_cgi" id="wikiform-$FormIndex" class="wikiform"> |
556 |
$line =~ s|"|"|g; |
<input type="hidden" name="mycmd" value="@{[$param->{form_disabled}?'read':'wikiform']}" /> |
557 |
# $line =~ s|\&|&|g; |
<input type="hidden" name="mypage" value="@{[&escape($param->{output}->{page})]}" /> |
558 |
return $line; |
<input type="hidden" name="myLastModified" value="$lastmodified" /> |
559 |
} |
<input type="hidden" name="mytouch" value="on" /> |
560 |
|
<input type="hidden" name="@{[$target_form? qq(wikiform_targetform" value="@{[&escape($target_form)]}) : qq(wikiform_index" value="$FormIndex)]}" /> |
561 |
sub inline { |
EOH |
562 |
my ($line) = shift; |
$r .= qq(<a name="wikiform-$FormIndex"></a>) if $UA =~ m#Mozilla/[12]\.#; |
563 |
$line = &escape($line); |
$r .= $fmt{form_input}->replace ($definition, $param); |
564 |
$line =~ s|'''([^']+?)'''|<strong>$1</strong>|g; |
$r .= "</form>\n" if $param->{output}->{form}; |
565 |
$line =~ s|''([^']+?)''|<em>$1</em>|g; |
$r; |
566 |
$line =~ s! |
} else { ## No input-interface WikiForm |
567 |
( |
qq(<a id="wikiform-$FormIndex" name="wikiform-$FormIndex"><!-- #form --></a>); |
568 |
(?:<(?:mailto|http|https|ftp|urn):[\x21-\x7E]*)> |
} |
569 |
#| (?:$WikiName) # LocalLinkLikeThis |
} else { |
570 |
| (?:$BracketName) # [[���ܸ���]] |
qq(<ins class="wiki-error">@{[&Resource('Error:WikiForm:EmbedIsNotSupported',escape=>1)]}</ins>); |
571 |
) |
} |
572 |
! |
}} |
573 |
&make_link($1) |
|
574 |
!gex; |
sub init_form { |
575 |
return $line; |
## TODO: Support multipart/form-data |
576 |
} |
my $query = ''; |
577 |
|
if (uc $main::ENV{REQUEST_METHOD} eq 'POST') { |
578 |
# �ڡ����Υ����ȥ뤫��ڡ��������Ƥ����� |
read STDIN, $query, $main::ENV{CONTENT_LENGTH}; |
579 |
sub get_page { |
} |
580 |
my $page_name = shift; |
$query .= ($query ? ';' : '') . $main::ENV{QUERY_STRING}; |
581 |
return $database{$page_name}; |
if ($main::ENV{REQUEST_METHOD} ne 'POST' && $main::ENV{QUERY_STRING} && $main::ENV{QUERY_STRING} !~ /[&;=]/) { |
582 |
} |
my $query = &decode($main::ENV{QUERY_STRING}); |
583 |
|
$query = &code_convert(\$query, $kanjicode); |
584 |
# �ڡ��������Ƥ�Ϳ���� |
$form{mypage} = $query; |
585 |
# &set_page($title, $txt) |
$form{mycmd} = $database{$form{mypage}} ? 'read' : 'edit'; |
586 |
sub set_page { |
} else { |
587 |
# �ڡ��������� |
for (split /[;&]/, $query) { |
588 |
my $title = $_[0]; |
if (my ($n, $v) = split /=/, $_, 2) { |
589 |
$database{$title} = $_[1]; |
for ($n, $v) {tr/+/ /; s/%([0-9A-Fa-f][0-9A-Fa-f])/pack 'C', hex $1/ge}; |
590 |
# ���ڡ����ʤ������� |
$form{$n} = $v; |
591 |
unless ($database{$title}) { |
} |
592 |
delete $database{$title}; |
} |
593 |
} |
unless (defined $form{mypage}) { |
594 |
# RecentChanges������ |
$form{mypage} = $form{epage}; |
595 |
my $delim = ' - '; |
$form{mypage} =~ s/([0-9A-F]{2})/ord hex $1/g; |
596 |
my @pages = split(/\n/, $database{$whatsnew}); |
} |
597 |
my $datestr = &get_current_datestr; |
} |
598 |
unshift(@pages, qq|-$datestr$delim$title|); |
$form{mypage} ||= $PageName{FrontPage}; |
599 |
# Ʊ��ڡ����ι����Ϻǿ��Τ�ΤΤߤˤ��� |
$form{mypage} =~ tr/\x00-\x1F\x7F//d; |
600 |
# ¸�ߤ��ʤ��ڡ����ϥ����åפ��롣 |
$form{mycmd} ||= 'read'; |
601 |
my %count; |
|
602 |
my @newpages; |
# mypreview_edit -> do_edit, with preview. |
603 |
foreach my $line (@pages) { |
# mypreview_adminedit -> do_adminedit, with preview. |
604 |
my ($prefix, $title) = split(/$delim/, $line); |
# mypreview_write -> do_write, without preview. |
605 |
$count{$title}++; |
foreach (keys %form) { |
606 |
if ($count{$title} == 1 and exists($database{$title})) { |
if (/^mypreview_(.*)$/) { |
607 |
push(@newpages, qq|$prefix - $title|); |
$form{mycmd} = $1; |
608 |
} |
$form{mypreview} = 1; |
609 |
} |
} |
610 |
# �����������˹��� |
} |
611 |
$database{$whatsnew} = join("\n", splice(@newpages, 0, $maxnew)); |
|
612 |
} |
# |
613 |
|
# $form{mycmd} is frozen here. |
614 |
# �ڡ����Υإå������ |
# |
615 |
sub print_header { |
|
616 |
my $title = shift; |
for (grep /^wikiform__/, keys %form) { |
617 |
print <<"EOD"; |
$form{$_} = &code_convert (\$form{$_}, $kanjicode); |
618 |
Content-type: text/html |
} |
619 |
|
$form{mymsg} = &code_convert(\$form{mymsg}, $kanjicode); |
620 |
<html><head> |
$form{myname} = &code_convert(\$form{myname}, $kanjicode); |
621 |
<title>$title</title> |
} |
622 |
<style type="text/css"> |
|
623 |
$style |
{my %SubjectLine; |
624 |
</style> |
sub get_subjectline { |
625 |
</head> |
my ($page, %option) = @_; |
626 |
<body> |
unless (defined $SubjectLine{$page}) { |
627 |
EOD |
if (not &is_editable($page)) { |
628 |
} |
$SubjectLine{$page} = ""; |
629 |
|
} else { |
630 |
# �ġ���С������ |
$SubjectLine{$page} = $database{$page}; |
631 |
sub print_toolbar { |
$SubjectLine{$page} =~ s!^\#\?[^\x0A\x0D]+[\x0A\x0D]*!!s; |
632 |
my $page_name = shift; |
$SubjectLine{$page} =~ s/\x0D?\x0A.*//s; |
633 |
my $percent_name = &encode_percent($page_name); |
} |
634 |
my $editlink = ''; |
} |
635 |
if ($page_name ne '' and &is_editable($page_name)) { |
if (length $SubjectLine{$page}) { |
636 |
$editlink = <<"EOD"; |
$option{delimiter} = defined $option{delimiter} ? $option{delimiter} : &Resource('Title-Summary Delimiter'); |
637 |
<a href="$thisurl?mycmd=edit;mypage=$percent_name">�Խ�</a> | |
$option{delimiter}.$SubjectLine{$page}.$option{tail}; |
638 |
<a href="$thisurl?mycmd=diff;mypage=$percent_name">��ʬ</a> | |
} else { |
639 |
EOD |
''; |
640 |
} |
} |
641 |
print <<"EOD"; |
}} |
642 |
<p> |
|
643 |
[ |
sub open_db { |
644 |
<a href="$thisurl?mycmd=read;mypage=$toppage">�ȥå�</a> | |
if ($modifier_dbtype eq 'dbmopen') { |
645 |
<a href="$thisurl?mycmd=list">����</a> | |
dbmopen(%database, $PathTo{WikiDataBase}, 0666) or die "(dbmopen) $PathTo{WikiDataBase}"; |
646 |
$editlink |
} elsif ($modifier_dbtype eq 'AnyDBM_File') { |
647 |
<a href="$thisurl?mycmd=search">ñ�측��</a> | |
eval q{use AnyDBM_File}; |
648 |
<a href="$thisurl?mycmd=read;mypage=$whatsnew">�ǽ�����</a> |
tie(%database, "AnyDBM_File", $PathTo{WikiDataBase}, O_RDWR|O_CREAT, 0666) or die ("(tie AnyDBM_File) $PathTo{WikiDataBase}"); |
649 |
] |
} elsif ($modifier_dbtype eq 'Yuki::YukiWikiDB') { |
650 |
</p> |
eval q{use Yuki::YukiWikiDB}; |
651 |
EOD |
tie(%database, "Yuki::YukiWikiDB", $PathTo{WikiDataBase}) or die ("(tie Yuki::YukiWikiDB) $PathTo{WikiDataBase}"); |
652 |
} |
} else { ## Yuki::YukiWikiDB || Yuki::YukiWikiDBMeta |
653 |
|
eval qq{use $modifier_dbtype}; |
654 |
# �ڡ����Υեå������ |
$database = tie(%database, $modifier_dbtype => $PathTo{WikiDataBase}, -lock => 2, -backup => $wiki::diff::UseDiff) or die ("(tie $modifier_dbtype) $PathTo{WikiDataBase}"); |
655 |
sub print_footer { |
} |
656 |
print <<"EOD"; |
} |
657 |
<address> |
|
658 |
<a href="http://www.hyuki.com/yukiwiki/">YukiWiki</a> 1.6.6 Copyright (C) 2000,2001 by <a href="http://www.hyuki.com/">Hiroshi Yuki.</a> |
sub close_db { |
659 |
+ <a href="$modifierlink">$modifier</a> ${version}. |
if ($modifier_dbtype eq 'dbmopen') { |
660 |
[<a href="/" title="���Υ����С��μ���">/</a> |
dbmclose(%database); |
661 |
<a href="/map" title="���Υ����С��ΰ���">�Ͽ�</a> |
} else { |
662 |
<a href="/search/" title="���Υ����С��θ���">����</a>] |
untie(%database); |
663 |
</address> |
} |
664 |
</body></html> |
} |
665 |
EOD |
|
666 |
} |
sub editform (@) { |
667 |
|
my %option = @_; |
668 |
# URL��ڡ�����̾���������� |
my $frozen = &is_frozen ($option{page}); |
669 |
sub make_link { |
$option{content} = $database{$option{page}} unless defined $option{content}; |
670 |
my $name = shift; |
$option{content} = $database{NewPageTemplate} unless length $option{content}; |
671 |
$name =~ s/^<(.*)>$/$1/; |
$option{last_modified} = $database->mtime ($option{page}) unless defined $option{last_modified}; |
672 |
$name =~ s/^\[\[(.*)\]\]$/$1/; |
my $f = ''; |
673 |
if ($name =~ /^(http|https|ftp).*?(\.png|\.jpeg|\.jpg)?$/) { |
my $magic = ''; |
674 |
if ($2) { |
$magic = $1 if $option{content} =~ m/^([^\x0A\x0D]+)/s; |
675 |
return qq|<a href="$name"><img border="0" src="$name" /></a>|; |
|
676 |
} else { |
my $selected = 'read'; |
677 |
return qq|<<a href="$name">$name</a>>|; |
if ($form{after_edit_cmd}) { |
678 |
} |
$selected = $form{after_edit_cmd}; |
679 |
} elsif ($name =~ /^mailto:(.*)/) { |
} elsif ($magic =~ /Const|Config|CSS/) { |
680 |
my $address = $1; |
$selected = 'edit'; |
681 |
return qq|<<a href="$name">$address</a>>|; |
} |
682 |
} elsif ($name =~ /^urn:[0-9A-Za-z_:-]+/) { |
my $afteredit = <<EOH; |
683 |
return qq|<<a href="/uri-res/N2L?${name}">$name</a>>|; |
<select name="after_edit_cmd"> |
684 |
} else { |
<option value="read" label="@{[&Resource('Edit:SaveAndView',escape=>1)]}"@{[$selected eq 'read' ? ' selected="selected"':'']}>@{[&Resource('Edit:SaveAndView',escape=>1)]}</option> |
685 |
my $name2 = $name; $name2 =~ tr/\x20/-/; |
<option value="edit" label="@{[&Resource('Edit:SaveAndEdit',escape=>1)]}"@{[$selected eq 'edit' ? ' selected="selected"':'']}>@{[&Resource('Edit:SaveAndEdit',escape=>1)]}</option> |
686 |
if ($database{$name2}) { |
</select> |
687 |
my $percent_name = &encode_percent($name2); |
EOH |
688 |
return qq|<a href="$thisurl?mycmd=read;mypage=$percent_name" class="wiki">$name</a>|; |
$f .= <<"EOD"; |
689 |
} elsif ($database{'[['.$name2.']]'}) { |
<form action="$uri{wiki}" method="post"> |
690 |
my $percent_name = &encode_percent('[['.$name2.']]'); |
@{[ $option{conflict} ? '' : qq(<label><input type="submit" name="mypreview_write" value="@{[&Resource('Edit:Save',escape=>1)]}" /><kbd>S</kbd></label>) ]} |
691 |
return qq|<a href="$thisurl?mycmd=read;mypage=$percent_name" class="wiki">$name</a>|; |
@{[ $option{admin} ? qq(<label>@{[&Resource('Edit:Password=',escape=>1)]}<input type="password" name="mypassword" value="" size="10" /></label>) : "" ]} [@{[&get_new_anchor_index($option{content})]}]<br /> |
692 |
} else { |
<input type="hidden" name="myLastModified" value="$option{last_modified}" /> |
693 |
my $percent_name = &encode_percent($name2); |
<input type="hidden" name="mypage" value="@{[&escape($form{mypage})]}" /> |
694 |
return qq|<a href="$thisurl?mycmd=edit;mypage=$percent_name" class="wiki newpage">$name?</a>|; |
<textarea cols="@{[&Resource('Edit:Form:Cols')+0||80]}" rows="@{[&Resource('Edit:Form:Rows')+0||20]}" name="mymsg" tabindex="1">@{[&escape($option{content})]}</textarea><br /> |
695 |
} |
@{[ |
696 |
} |
$option{admin} ? |
697 |
} |
qq( |
698 |
|
<label><input type="radio" name="myfrozen" value="1" @{[$frozen ? qq(checked="checked") : ""]} />@{[&Resource('Edit:Freeze',escape=>1)]}</label> |
699 |
# %xx �η����˥����ɤ��� |
<label><input type="radio" name="myfrozen" value="0" @{[$frozen ? "" : qq(checked="checked")]} />@{[&Resource('Edit:DontFreeze',escape=>1)]}</label><br />) |
700 |
# ����ϡ� |
: "" |
701 |
# http://www.hyuki.com/yukiwiki/yukiwiki.cgi?mycmd=read&mypage=%3C%8C%8B%8F%E9%8D_%3E |
]} |
702 |
# �Ȥ��������Τ���˻Ȥ��롣 |
@{[ |
703 |
# '<����>' �� '%3C%8C%8B%8F%E9%8D_%3E' |
$option{conflict} ? "" : |
704 |
sub encode_percent { |
qq( |
705 |
my $name = shift; |
<label><input type="checkbox" name="mytouch" value="on" checked="checked" />@{[&Resource('Edit:UpdateTimeStamp',escape=>1)]}</label><br /> |
706 |
my $encoded = ''; |
<label><input type="submit" name="mypreview_write" value="@{[&Resource('Edit:Save',escape=>1)]}" accesskey="S" /><kbd>S</kbd></label> |
707 |
foreach my $ch (split(//, $name)) { |
$afteredit |
708 |
if ($ch =~ /[A-Za-z0-9_]/) { |
) |
709 |
$encoded .= $ch; |
]} |
710 |
} else { |
</form> |
711 |
$encoded .= '%' . sprintf("%02X", ord($ch)); |
EOD |
712 |
} |
$f; |
713 |
} |
} |
714 |
return $encoded; |
|
715 |
} |
sub is_editable { |
716 |
|
my ($page) = @_; |
717 |
# �ƥ��������Τ�HTML���Ѵ����� |
$page =~ /[\x00-\x20\x7F]/ ? 0 : 1; |
718 |
sub convert_html { |
} |
719 |
my ($txt) = shift; |
|
720 |
my (@txt) = split(/\n/, $txt); |
sub decode { |
721 |
foreach (@txt) { |
my ($s) = @_; |
722 |
chomp; |
$s =~ tr/+/ /; |
723 |
if (/^\*\*(.*)/) { |
$s =~ s/%([A-Fa-f0-9][A-Fa-f0-9])/pack("C", hex($1))/eg; |
724 |
push(@result, splice(@saved), '<h3>' . &inline($1) . '</h3>'); |
return $s; |
725 |
} elsif (/^\*(.*)/) { |
} |
726 |
push(@result, splice(@saved), '<h2>' . &inline($1) . '</h2>'); |
|
727 |
} elsif (/^----/) { |
sub encode { |
728 |
push(@result, splice(@saved), '<hr>'); |
my $s = shift; |
729 |
} elsif (/^(-{1,3})(.*)/) { |
$s =~ s/([^0-9A-Za-z_-])/sprintf '%%%02X', ord $1/ge; |
730 |
&back_push('ul', length($1)); |
$s; |
731 |
push(@result, '<li>' . &inline($2) . '</li>'); |
} |
732 |
} elsif (/^:([^:]+):(.*)/) { |
|
733 |
&back_push('dl', 1); |
sub get_now { |
734 |
push(@result, '<dt>' . &inline($1) . '</dt>', '<dd>' . &inline($2) . '</dd>'); |
my ($sec, $min, $hour, $day, $mon, $year) = localtime(time); |
735 |
} elsif (/^(>{1,3})(.*)/) { |
$year += 1900; |
736 |
&back_push('blockquote', length($1)); |
$mon++; |
737 |
push(@result, &inline($2)); |
$mon = "0$mon" if $mon < 10; |
738 |
} elsif (/^\s*$/) { |
$day = "0$day" if $day < 10; |
739 |
push(@result, splice(@saved)); |
$hour = "0$hour" if $hour < 10; |
740 |
unshift(@saved, "</p>"); |
$min = "0$min" if $min < 10; |
741 |
push(@result, "<p>"); |
#$sec = "0$sec" if $sec < 10; |
742 |
} elsif (/^(\s+.*)$/) { |
return "$year-$mon-$day $hour:$min"; |
743 |
&back_push('pre', 1); |
} |
744 |
push(@result, &escape($1)); # Not &inline, but &escape |
|
745 |
} else { |
sub init_InterWikiName { |
746 |
push(@result, &inline($_)); |
my @content = split /\n/, $database{InterWikiName}; |
747 |
} |
for (@content) { |
748 |
} |
if (/^([^#]\S*)\s+(\S[^\x0A\x0D]+)/) { |
749 |
push(@result, splice(@saved)); |
$interwiki{$1} = $2; |
750 |
return join("\n", @result); |
} |
751 |
} |
} |
752 |
|
$interwiki{'[[]]'} = 1; ## dummy |
753 |
# &back_push($tag, $count) |
} |
754 |
# $tag�Υ�����$level��٥�ޤǵͤ�롣 |
|
755 |
sub back_push { |
sub frozen_reject { |
756 |
my ($tag, $level) = @_; |
my ($isfrozen) = $database->meta (IsFrozen => $form{mypage}); |
757 |
while (@saved > $level) { |
my ($willbefrozen) = $form{myfrozen}; |
758 |
push(@result, shift(@saved)); |
if (not $isfrozen and not $willbefrozen) { |
759 |
} |
# You need no check. |
760 |
if ($saved[0] ne "</$tag>") { |
return 0; |
761 |
push(@result, splice(@saved)); |
} elsif (valid_password($form{mypassword})) { |
762 |
} |
# You are admin. |
763 |
while (@saved < $level) { |
return 0; |
764 |
unshift(@saved, "</$tag>"); |
} else { |
765 |
push(@result, "<$tag>"); |
&_do_view_msg (-view => '-error', -page => $form{mypage}, |
766 |
} |
error_message => &Resource ('Error:PasswordIsIncorrect')); |
767 |
} |
exit; |
768 |
|
} |
769 |
# �Խ���ǽ�ڡ������� |
} |
770 |
sub is_editable { |
|
771 |
my ($pagename) = @_; |
sub is_frozen ($) { $database->meta (IsFrozen => $_[0]) ? 1 : 0 } |
772 |
foreach (@uneditable) { |
|
773 |
if ($pagename eq $_) { |
sub do_comment { |
774 |
return 0; |
my ($content) = $database{$form{mypage}}; |
775 |
} |
my $default_name; ## this code is not strict. |
776 |
} |
$default_name = $1 if $content =~ /default-name="([^"]+)"/; |
777 |
if (&is_valid_name($pagename)) { |
my $datestr = '[WEAK['.&get_now.']]'; |
778 |
return 1; |
my $namestr = $form{myname} || $default_name || &Resource('WikiForm:WikiComment:DefaultName'); |
779 |
} |
($namestr = '', $datestr = '') if $form{myname} eq 'nodate'; |
780 |
return 0; |
if ($namestr =~ /^(?:>>)?[0-9]/) { |
781 |
} |
$namestr = qq( ''$namestr'': ); |
782 |
|
} elsif (length $namestr) { |
783 |
# Valid��̾������ |
$namestr = qq( ''[[$namestr]]'': ); |
784 |
sub is_valid_name { |
} |
785 |
my ($pagename) = @_; |
my $anchor = &get_new_anchor_index ($content); |
786 |
if ($pagename =~ /^$WikiName$/) { |
my $i = 1; my $o = 0; |
787 |
return 1; |
$content =~ s{(\[\[\#r?comment\]\])}{ |
788 |
} elsif ($pagename =~ /^$BracketName$/) { |
my $embed = $1; |
789 |
return 1; |
if ($i == $form{comment_index}) { |
790 |
} else { |
if ($embed ne '[[#rcomment]]') { |
791 |
return 0; |
$embed = "- [$anchor] $datestr$namestr$form{mymsg}\n$embed"; $o = 1; |
792 |
} |
} else { |
793 |
} |
$embed .= "\n- [$anchor] $datestr$namestr$form{mymsg}"; $o = 1; |
794 |
|
} |
795 |
# �������ʸ��������� |
} |
796 |
sub get_current_datestr { |
$i++; $embed; |
797 |
my (@wdays) = ( "��", "��", "��", "��", "��", "��", "��" ); |
}ge; |
798 |
my ($sec, $min, $hour, $mday, $mon, $year, $wday) = localtime(time); |
unless ($o) { |
799 |
return sprintf("%4d-%02d-%02d (%s) %02d:%02d:%02d", |
$content = "#?SuikaWiki/0.9\n\n" unless $content; |
800 |
$year + 1900, $mon + 1, $mday, $wdays[$wday], $hour, $min, $sec); |
$content .= "\n" unless $content =~ /\n$/s; |
801 |
} |
$content .= "- [$anchor] $datestr$namestr$form{mymsg}\n"; |
802 |
|
} |
803 |
# URL?SomePage�䡢 |
$form{__comment_anchor_index} = $anchor; |
804 |
# URL?[[����]]�η������ä���硢(not yet) |
if ($form{mymsg} || $form{myname}) { |
805 |
# ����Ū��mycmd��read�ˤ���$form�����Ƥ����ꤹ�롣 |
$form{mymsg} = $content; |
806 |
sub normalize_form { |
$form{mytouch} = 'on'; |
807 |
foreach my $key (keys %form) { |
&do_write; |
808 |
if ($key =~ /^$WikiName$/) { |
} else { |
809 |
$form{mycmd} = 'read'; |
$form{mycmd} = 'read'; |
810 |
$form{mypage} = $1; |
&do_read; |
811 |
last; |
} |
812 |
} elsif ($key =~ /^$BracketName$/) { |
} |
813 |
$form{mycmd} = 'read'; |
|
814 |
$form{mypage} = $1; |
sub get_new_anchor_index ($) { |
815 |
last; |
my $content = shift; |
816 |
} |
my $anchor = 0; |
817 |
} |
$content =~ s/^(?:[-=]+\s*)?\[([0-9]+)\]/$anchor = $1 if $1 > $anchor; $&/mge; |
818 |
} |
$anchor + 1; |
819 |
|
} |
820 |
# �Ѵ��ƥ��Ȥ�Ԥʤ��Ȥ��Υ���ץ� |
|
821 |
sub print_sample { |
my $CommentIndex = 0; |
822 |
my $txt = &convert_html(<<"EOD"); |
sub embedded_to_html { |
823 |
*�縫�Ф�1 |
my ($embedded) = @_; |
824 |
**������1-1 |
if ($embedded eq '[[#comment]]' or $embedded eq '[[#rcomment]]') { |
825 |
-����1 |
unless ($main::_EMBEDED) { |
826 |
-����2 |
my $lastmodified = $database->mtime ($form{mypage}); |
827 |
-����3 |
return <<"EOD"; |
828 |
����1����1����1����1����1����1����1����1����1����1����1����1 |
<form action="$url_cgi" method="post" id="x-comment-@{[++$CommentIndex]}" class="comment"><p> |
829 |
����1����1����1����1����1����''��Ĵ''1����1����1����1����1����1 |
<input type="hidden" name="mycmd" value="comment" /> |
830 |
����1����1����1����1����1����1����1����1����1����1����1����1 |
<input type="hidden" name="mypage" value="$form{mypage}" /> |
831 |
|
<input type="hidden" name="myLastModified" value="$lastmodified" /> |
832 |
����2����2����2����2����2����2����2����2����2����2����2����2 |
<input type="hidden" name="mytouch" value="on" /> |
833 |
����2����2����2����2����2����2����2����2����2����2����2����2 |
<input type="hidden" name="comment_index" value="$CommentIndex" /> |
834 |
����2����2����2����2����2����2����2����2����2����2����2����2 |
@{[&Resource('WikiForm:WikiComment:Name=',escape=>1)]} |
835 |
**������1-2 |
<input type="text" name="myname" value="" size="10" class="comment-name" /> |
836 |
:�Ѹ�1:��������������ʸ1��''��Ĵñ��'' |
<input type="text" name="mymsg" value="" size="60" class="comment-msg" /> |
837 |
����1����1����1����1����1����1����1����1����1����1����1����1 |
<input type="submit" value="@{[&Resource('WikiForm:Add',escape=>1)]}" title="@{[&Resource('WikiForm:AddLong',escape=>1)]}" class="comment-submit" /> |
838 |
����1����1����1����1����1����1����1����1����1����1����1����1 |
</p></form> |
839 |
����1����1����1����1����1����1����1����1����1����1����1����1 |
EOD |
840 |
:�Ѹ�2:��������������ʸ2 |
} else { |
841 |
:�Ѹ�3:��������������ʸ3 |
return <<"EOD"; |
842 |
---- |
<del><form action="$url_cgi" method="get"> |
843 |
*�縫�Ф�2 |
<input type="hidden" name="mycmd" value="read" /> |
844 |
**������2-1 |
<input type="hidden" name="mypage" value="$form{mypage}" /> |
845 |
<http://suika.fam.cx/> |
@{[&Resource('WikiForm:WikiComment:Name=',escape=>1)]} |
846 |
**������2-2 |
<input type="text" name="myname" value="" size="10" disabled="disabled" /> |
847 |
|
<input type="text" name="mymsg" value="" size="60" disabled="disabled" /> |
848 |
[[����]] |
</form></del> |
849 |
|
EOD |
850 |
����1����1����1����1����1����1����1����1����1����1����1����1 |
} |
851 |
����1����1����1����'''��Ĵ'''1����1����1����1����1����1����1����1 |
} elsif ($embedded =~ /$embed_command{searched}/) { |
852 |
����1����1����1����'''''������Ĵ'''''1����1����1����1����1����1����1����1����1 |
return get_search_result ($1, -match_myself => 1); |
853 |
>����2����2����2����2����2����2����2����2����2����2����2����2 |
} elsif ($embedded =~ /^\[\[\#embed:(.+)\]\]$/) { |
854 |
>����2����2����2����2����2����2����2����2����2����2����2����2 |
my ($name, $r) = ($1, ''); |
855 |
>����2����2����2����2����2����2����2����2����2����2����2����2 |
if ($main::_EMBEDED != 1) { |
856 |
|
my ($content, $cf) = ($database{$name}, 'SuikaWiki/0.9'); |
857 |
��٥�0��٥�0��٥�0��٥�0��٥�0��٥�0 |
$cf = $1 if $content =~ s!^(?:[\#<]\?|/\*\s*)?([A-Z][A-Za-z0-9-]+/[0-9.]+(?:[^0-9.][^\x0D\x0A]*)?)[\x0D\x0A]+!!s; |
858 |
|
if ($cf =~ m!^(?:\#\?)?SuikaWiki/0.9(?:$|\s)!) { |
859 |
>��٥�1 |
$main::_EMBEDED = 1; |
860 |
>��٥�1 |
$r = &text_to_html ($content, content_format => $cf); |
861 |
>��٥�1 |
$main::_EMBEDED = 0; |
862 |
>>��٥�2 |
} elsif (length $content) { |
863 |
>>��٥�2 |
$r = "<pre>@{[&escape ($content)]}</pre>"; |
864 |
>>��٥�2 |
} else { |
865 |
>>>��٥�3 |
$r = &text_to_html ("[INS[\n[[$name]]: @{[&Resource('Embed:PageNotFound')]}\n]INS]\n", content_format => 'SuikaWiki/0.9'); |
866 |
-�Ϥ�1 |
} |
867 |
--�Ϥ�2 |
} else { ## nested #EMBED |
868 |
��������2 |
$r = &text_to_html ("[INS[\n[[$name]]: @{[&Resource('Embed:Nested',escape=>1)]}\n]INS]\n", content_format => 'SuikaWiki/0.9'); |
869 |
---�Ϥ�3 |
} |
870 |
--�Ϥ�2 |
return qq(<blockquote title="@{[&escape($name)]}" class="wiki-embed">$r<div class="cite-note">��<cite><a href="$url_cgi?@{[&encode($name)]}" class="wiki">@{[&escape($name)]}</a></cite>��</div></blockquote>); |
871 |
---�Ϥ�3 |
} elsif ($embedded =~ /^\[\[\#randomlink:(.+)\]\]$/) { |
872 |
--�Ϥ�2 |
return qq(<a href="$url_cgi?mycmd=RandomJump;x-param=@{[time.[0..9]->[rand 10]]}" class="wiki randomlink">$1</a>); |
873 |
---�Ϥ�3 |
} else { |
874 |
>>>��٥�3 |
return $embedded; |
875 |
>>>��٥�3 |
} |
876 |
>>>��٥�3 |
} |
877 |
EOD |
|
878 |
print $txt; |
sub load_formatter (@) { |
879 |
exit; |
for my $t (@_) { |
880 |
} |
unless ($fmt{$t}) { |
881 |
|
require Message::Util::Formatter; |
882 |
sub diff_check { |
$fmt{$t} = Message::Util::Formatter->new; |
883 |
traverse_sequences( |
for (@{$SuikaWiki::Plugin::List{'wiki'.$t}||[]}) { |
884 |
$msgrefA, $msgrefB, |
$_->load_formatter ($fmt{$t}, type => 'wiki'.$t); |
885 |
{ |
} |
886 |
MATCH => \&df_match, |
} |
887 |
DISCARD_A => \&df_delete, |
} |
888 |
DISCARD_B => \&df_add, |
} |
889 |
} |
|
890 |
); |
sub do_wikiform { |
891 |
&diff_flush; |
my $content = $database{$form{mypage}}; |
892 |
} |
my $anchor = &get_new_anchor_index ($content); |
893 |
|
&load_formatter (qw/form_template form_option/); |
894 |
sub diff_flush { |
my $write = 0; |
895 |
$diff_text .= join('', map { "-$_\n" } splice(@diff_deleted)); |
my $i = 1; |
896 |
$diff_text .= join('', map { "+$_\n" } splice(@diff_added)); |
$content =~ s{$embed_command{form}}{ |
897 |
} |
my ($embed, $wfname, $template, $option) = ($&, $1, $3, $4); |
898 |
|
if (($wfname && $wfname eq $form{wikiform_targetform}) |
899 |
sub df_match { |
|| $i == $form{wikiform_index}) { |
900 |
my ($a, $b) = @_; |
$template =~ s/\\(.)/$1/g; |
901 |
&diff_flush; |
$option =~ s/\\(.)/$1/g; |
902 |
$diff_text .= "=$msgrefA->[$a]\n"; |
my $param = bless {}, 'SuikaWiki::Plugin'; |
903 |
} |
$param->{page} = $form{mypage}; |
904 |
|
$param->{form_index} = $i; |
905 |
sub df_delete { |
$param->{form_name} = $wfname; |
906 |
my ($a, $b) = @_; |
$param->{anchor_index} = $anchor; |
907 |
push(@diff_deleted, $msgrefA->[$a]); |
$param->{argv} = \%form; |
908 |
} |
$param->{default_name} = $1 if $content =~ /default-name="([^"]+)"/; |
909 |
|
$param->{default_name} ||= &Resource('WikiForm:WikiComment:DefaultName'); |
910 |
sub df_add { |
$fmt{form_option}->replace ($option, $param); |
911 |
my ($a, $b) = @_; |
my $t = 1; |
912 |
push(@diff_added, $msgrefB->[$b]); |
for (@{$param->{require}||[]}) { |
913 |
} |
(undef $t, last) unless length $param->{argv}->{'wikiform__'.$_}; |
914 |
|
} |
915 |
sub calc_message_digest { # You have to use MD5... |
$t = $fmt{form_template}->replace ($template, $param) if $t; |
916 |
my $text = shift; |
if (length $t) { |
917 |
my @text = split(//, $text); |
if ($param->{output}->{reverse}) { |
918 |
my $len = length($text); |
$embed .= "\n" . $t; |
919 |
my $checksum = 0; |
} else { |
920 |
foreach (@text) { |
$embed = $t . "\n" . $embed; |
921 |
$checksum += ord($_); |
} |
922 |
$checksum = ($checksum * 2) % 65536 + (($checksum & 32768) ? 1 : 0); # 16bit rotate |
$write = 1; |
923 |
} |
$form{__comment_anchor_index} = $anchor |
924 |
return "$len:$checksum"; |
if $param->{anchor_index_}; ## $anchor is used! |
925 |
} |
} |
926 |
|
$form{__wikiform_anchor_index} = $i; |
927 |
# Definition of YukiWikiDB |
undef $form{wikiform_targetform}; ## make sure never to match |
928 |
package YukiWikiDB; |
undef $form{wikiform_index}; ## with WikiForm in rest of page |
929 |
|
} |
930 |
my $debug = 1; |
$i++; $embed; |
931 |
|
}ge; |
932 |
# Constructor |
unless ($write) { |
933 |
sub new { |
#$content = "#?SuikaWiki/0.9\n\n" unless $content; |
934 |
return shift->TIEHASH(@_); |
#$content .= "\n" unless $content =~ /\n$/s; |
935 |
} |
# |
936 |
|
} |
937 |
# tying |
if ($write) { |
938 |
sub TIEHASH { |
$form{mymsg} = $content; |
939 |
my ($class, $dbname) = @_; |
$form{mytouch} = 'on'; |
940 |
my $self = { |
&do_write; |
941 |
dir => $dbname, |
} else { |
942 |
keys => [], |
$form{mycmd} = 'read'; |
943 |
}; |
&do_read; |
944 |
if (not -d $self->{dir}) { |
} |
945 |
if (!mkdir($self->{dir}, 0777)) { |
} |
946 |
print "mkdir(" . $self->{dir} . ") fail\n" if ($debug); |
|
947 |
return undef; |
sub code_convert { |
948 |
} |
require Jcode; |
949 |
} |
my ($contentref, $code) = (shift, shift || $kanjicode); |
950 |
return bless($self, $class); |
if ($code =~ /euc/) { $code = 'euc' } |
951 |
} |
elsif ($code =~ /iso/) { $code = 'jis' } |
952 |
|
elsif ($code =~ /shi/) { $code = 'sjis' } |
953 |
# Store |
elsif ($code =~ /utf/) { $code = 'utf8' } |
954 |
sub STORE { |
$$contentref = Jcode->new ($contentref)->tr ("\xA3\xB0-\xA3\xB9\xA3\xC1-\xA3\xDA\xA3\xE1-\xA3\xFA\xA1\xF5\xA1\xA4\xA1\xA5\xA1\xA7\xA1\xA8\xA1\xA9\xA1\xAA\xA1\xAE\xA1\xB0\xA1\xB2\xA1\xBF\xA1\xC3\xA1\xCA\xA1\xCB\xA1\xCE\xA1\xCF\xA1\xD0\xA1\xD1\xA1\xDC\xA1\xF0\xA1\xF3\xA1\xF4\xA1\xF6\xA1\xF7\xA1\xE1\xA2\xAF\xA2\xB0\xA2\xB2\xA2\xB1\xA1\xE4\xA1\xE3\xA1\xC0\xA1\xA1" => q(0-9A-Za-z&,.:;?!`^_/|()[]{}+$%#*@='"~-><\ ))->$code; |
955 |
my ($self, $key, $val) = @_; |
return $$contentref; |
956 |
my $file = &make_filename($self, $key); |
} |
957 |
if (open(FILE,"> $file")) { |
|
958 |
binmode(FILE); |
sub _rfc3339_date ($) { |
959 |
print FILE $val; |
my @time = gmtime (shift); |
960 |
close(FILE); |
sprintf '%04d-%02d-%02dT%02d:%02d:%02d+00:00', $time[5]+1900,$time[4]+1,@time[3,2,1,0]; |
961 |
return $self->{$key} = $val; |
} |
962 |
} else { |
|
963 |
print "$file create error."; |
sub is_exist_page { $use_exists ? exists ($database{$_[0]}) : $database{$_[0]} } |
964 |
} |
sub __get_database ($) { $database{ $_[0] } } |
965 |
} |
|
966 |
|
my %_Resource; |
967 |
# Fetch |
sub Resource ($;%) { |
968 |
sub FETCH { |
my ($s, %o) = @_; |
969 |
my ($self, $key) = @_; |
unless (defined $_Resource{$s}) { |
970 |
my $file = &make_filename($self, $key); |
$_Resource{$_[0]} = &wiki::resource::get ($s, $_Resource{__option}); |
971 |
if (open(FILE, $file)) { |
} |
972 |
local $/; |
$o{escape} ? &escape ($_Resource{$s}) : $_Resource{$s}; |
973 |
$self->{$key} = <FILE>; |
} |
974 |
close(FILE); |
|
975 |
} |
package wiki::referer; |
976 |
return $self->{$key}; |
sub add ($$) { |
977 |
} |
my $page = shift; |
978 |
|
my $uri = shift; |
979 |
# Exists |
unless (ref $uri) { |
980 |
sub EXISTS { |
require URI; |
981 |
my ($self, $key) = @_; |
$uri = URI->new ($uri); |
982 |
my $file = &make_filename($self, $key); |
## Some schemes do not have query part. |
983 |
return -e($file); |
eval q{ $uri->query (undef) if $uri->query =~ /^[0-9]{6,8}$/ }; |
984 |
} |
$uri->fragment (undef); |
985 |
|
} |
986 |
# Delete |
$uri = $uri->canonical; |
987 |
sub DELETE { |
return unless $uri; |
988 |
my ($self, $key) = @_; |
for my $regex (&get_dont_record) { |
989 |
my $file = &make_filename($self, $key); |
return if $uri =~ /$regex/; |
990 |
unlink $file; |
} |
991 |
return delete $self->{$key}; |
my %list = get ($page); |
992 |
} |
$list{ $uri }++; |
993 |
|
set ($page, \%list); |
994 |
sub FIRSTKEY { |
} |
995 |
my ($self) = @_; |
sub get ($) { split /"/, $main::database->meta (Referer => $_[0]) } |
996 |
opendir(DIR, $self->{dir}) or die $self->{dir}; |
sub set ($%) { |
997 |
@{$self->{keys}} = grep /\.txt$/, readdir(DIR); |
my $page = shift; |
998 |
foreach my $name (@{$self->{keys}}) { |
my $list = shift; |
999 |
$name =~ s/\.txt$//; |
$main::database->meta (Referer => $page => join '"', %$list); |
1000 |
$name =~ s/[0-9A-F][0-9A-F]/pack("C", hex($&))/eg; |
} |
1001 |
} |
|
1002 |
return shift @{$self->{keys}}; |
sub get_dont_record () { |
1003 |
} |
map {s/\$/\\\$/g; s/\@/\\\@/g; $_} |
1004 |
|
grep !/^#/, |
1005 |
sub NEXTKEY { |
split /[\x0D\x0A]+/, $main::database{RefererDontRecord}; |
1006 |
my ($self) = @_; |
} |
1007 |
return shift @{$self->{keys}}; |
sub get_site_name () { |
1008 |
} |
my @lines = grep /[^#]/, split /[\x0D\x0A]+/, $main::database{RefererSiteName}; |
1009 |
|
my @item; |
1010 |
sub make_filename { |
for (@lines) { |
1011 |
my ($self, $key) = @_; |
next if /^#/; |
1012 |
my $enkey = ''; |
my ($uri, $name) = split /\s+/, $_, 2; |
1013 |
foreach my $ch (split(//, $key)) { |
$uri =~ s/\$/\\\$/g; $uri =~ s/\@/\\\@/g; $uri =~ s/\//\\\//g; |
1014 |
$enkey .= sprintf("%02X", ord($ch)); |
$name =~ s!([()/\\])!\\$1!g; $name =~ s/\$([0-9]+)/).__decode (\${$1}).q(/g; |
1015 |
} |
push @item, [$uri, qq(q($name))]; |
1016 |
return $self->{dir} . "/$enkey.txt"; |
} |
1017 |
} |
@item; |
1018 |
__END__ |
} |
1019 |
|
|
1020 |
=head1 NAME |
sub list_html ($) { |
1021 |
|
my $page = shift; |
1022 |
YukiWiki - ��ͳ�˥ڡ������ɲá�������Խ��Ǥ���Web�ڡ�������CGI |
my %list = get ($page); |
1023 |
|
my $r = ''; |
1024 |
Copyright (C) 2000,2001 by Hiroshi Yuki. |
my @name = get_site_name; |
1025 |
���� <hyuki@hyuki.com> |
for my $uri (sort keys %list) { |
1026 |
http://www.hyuki.com/ |
my $title; |
1027 |
http://www.hyuki.com/yukiwiki/ |
for my $item (@name) { |
1028 |
|
if ($uri =~ /$item->[0]/) { |
1029 |
=head1 SYNOPSIS |
$title = $uri; |
1030 |
|
eval qq{\$title =~ s/^.*$item->[0].*\$/$item->[1]/e} |
1031 |
http://www.hyuki.com/yukiwiki/yukiwiki.cgi |
or die $@ ;#. qq{\$title =~ s/^.*$item->[0].*\$/$item->[1]/e}; |
1032 |
|
last; |
1033 |
=head1 DESCRIPTION |
} |
1034 |
|
} |
1035 |
YukiWiki�ʷ�륦�������ˤϻ��üԤ���ͳ�˥ڡ������ɲá�������Խ��Ǥ��� |
my $euri = main::escape ($uri); |
1036 |
�ԻĤ�Web�ڡ���������CGI�Ǥ��� |
if ($title) { |
1037 |
Web��ư���Ǽ��ĤȤ���äȻ��Ƥ��ޤ����� |
$r .= qq(<li>[$list{$uri}] <a href="$euri" title="URI: <$euri>">@{[main::escape ($title)]}</a></li>\n); |
1038 |
Web�Ǽ��Ĥ�ñ�˥�å��������ɲä�������ʤΤ��Ф��ơ� |
} else { |
1039 |
YukiWiki�ϡ�Web�ڡ������Τ�ͳ���ѹ����뤳�Ȥ��Ǥ��ޤ��� |
$r .= qq(<li>[$list{$uri}] <<a href="$euri">$euri</a>></li>\n); |
1040 |
|
} |
1041 |
YukiWiki�ϡ�Cunningham & Cunningham��WikiWikiWeb�� |
} |
1042 |
���ͤͤˤ����ȼ��˺���ޤ����� |
$r ? qq(<ul>$r</ul>\n) : ''; |
1043 |
|
} |
1044 |
YukiWiki��Perl�ǽ줿CGI������ץȤȤ��Ƽ¸�����Ƥ��ޤ��Τǡ� |
|
1045 |
Perl��ư���Web�����Фʤ�����Ū�ưפ����֤Ǥ��ޤ��� |
sub __decode ($) { |
1046 |
|
my $s = shift; |
1047 |
���Ȥ�dbmopen���Ȥ���Ķ��ʤ�����֤Ǥ��ޤ�(Version 1.5.0�ʹߤʤ�dbmopen���Ȥ��ʤ��Ƥ����֤Ǥ��ޤ�)�� |
$s =~ tr/+/ /; |
1048 |
|
$s =~ s/%([0-9A-Fa-f][0-9A-Fa-f])/chr hex $1/ge; |
1049 |
|
main::code_convert (\$s); |
1050 |
YukiWiki�ϥե���եȤǤ��� |
} |
1051 |
����ͳ�ˤ��Ȥ����������� |
|
1052 |
|
package wiki::useragent; |
1053 |
=head1 ������ˡ |
our $UseLog; |
1054 |
|
|
1055 |
=head2 ���� |
sub add ($) { |
1056 |
|
my $s = shift; |
1057 |
YukiWiki�κǿ��Ǥϡ� |
return unless length $s; |
1058 |
http://www.hyuki.com/yukiwiki/ |
return unless $UseLog; |
1059 |
��������Ǥ��ޤ��� |
$s =~ s/([\x00-\x08\x0A-\x1F\x25\x7F-\xFF])/sprintf '%%%02X', unpack 'C', $1/ge; |
1060 |
|
my %ua; |
1061 |
=head2 �ե�������� |
for (split /\n/, &main::__get_database($main::PageName{UserAgentList})) { |
1062 |
|
if (/^-\[(\d+)\] (.+)$/) { |
1063 |
readme.txt �ɥ������ |
my ($t, $n) = ($1, $2); |
1064 |
yukiwiki.cgi YukiWiki���� |
$n =~ tr/\x0A\x0D//d; |
1065 |
yukiwiki.gif �����ʥ��顼�ǡ� |
$ua{$n} = $t; |
1066 |
yukimono.gif �����ʥ�Υ����ǡ� |
} |
1067 |
jcode.pl ���������ɥ饤�֥�� |
} |
1068 |
|
$ua{$s}++; |
1069 |
=head2 ���ȡ��� |
my $s = qq(#?SuikaWiki/0.9\n); |
1070 |
|
for (sort {$ua{$a} <=> $ua{$b}} keys %ua) { |
1071 |
=over 4 |
$s .= sprintf qq(-[%d] %s\n), $ua{$_}, $_; |
1072 |
|
} |
1073 |
=item 1. |
$main::database->STORE ($main::PageName{UserAgentList} => $s, -touch => 0); |
1074 |
|
} |
1075 |
���������֤�� |
|
1076 |
|
package wiki::suikawikiconst; |
1077 |
=item 2. |
|
1078 |
|
sub to_hash ($;$) { |
1079 |
yukiwiki.cgi�ΤϤ�������ˤ���������ǧ���ޤ��� |
my $page = shift; |
1080 |
�̾�ϲ��⤷�ʤ��Ƥ褤���� |
my $h = shift || {}; |
1081 |
�Ϥ����$touchfile��''�ˤ��������褤�Ǥ��礦�� |
my $val; |
1082 |
|
for my $line (split /\n/, $page) { |
1083 |
=item 3. |
$line =~ tr/\x0A\x0D//d; |
1084 |
|
if ($val && $line =~ s/^\s+//) { |
1085 |
yukiwiki.cgi��jcode.pl��Ʊ���Ȥ��������֤��ޤ��� |
$h->{$val} .= length $h->{$val} ? "\n" . $line : $line; |
1086 |
|
} elsif ($line =~ /^(.+):/) { |
1087 |
=item 4. |
$val = $1; $h->{$val} = ''; |
1088 |
|
} |
1089 |
������0��yukiwiki.db�Ȥ����ե���������֤��ޤ��� |
} |
1090 |
��Perl�����ƥ�ˤ�äƤ�yukiwiki.pag, yukiwiki.dir�� |
$h; |
1091 |
|
} |
1092 |
=item 5. |
|
1093 |
|
package wiki::dummy; |
1094 |
yukiwiki.cgi�˥֥饦�����饢���������ޤ��� |
sub mtime (@) {undef} |
1095 |
|
sub meta (@) {undef} |
1096 |
=back |
sub Yuki::YukiWikiDB2::meta (@) {undef} |
1097 |
|
|
1098 |
=head2 �ѡ��ߥå���� |
package SuikaWiki::Plugin; |
1099 |
|
our $plugin_directory; |
1100 |
�ե����� �ѡ��ߥå���� ž���⡼�� |
our %List; |
1101 |
yukiwiki.cgi 755 ASCII |
our %Index; |
1102 |
yukiwiki.gif 644 BINARY |
push @main::INC, $plugin_directory.'/../..'; |
1103 |
yukimono.gif 644 BINARY |
|
1104 |
jcode.pl 644 ASCII |
sub escape ($$) { main::escape ($_[1]) } |
1105 |
|
sub unescape ($$) { main::unescape ($_[1]) } |
1106 |
$dbmopen = 1; �ˤ������: |
sub encode ($$) { main::encode ($_[1]) } |
1107 |
yukiwiki.db 666 BINARY |
sub decode ($$) { main::decode ($_[1]) } |
1108 |
(yukiwiki.pag, yukiwiki.dir�ξ��⤢��� |
sub __get_datetime ($) { main::get_now () } |
1109 |
|
sub resource ($$;%) { shift; &main::Resource (@_) } |
1110 |
$dbmopen = 0; �ˤ������: (�����ȥǥ��쥯�ȥ��777�ˤ��Ƥ���) |
sub uri ($$) { $main::uri{$_[1]} } |
1111 |
. 777 (ž�����ʤ�) |
sub new_index ($$) { ++$Index{$_[1]} } |
1112 |
|
sub user_agent_names ($) { $main::UA } |
1113 |
=head1 �ǡ����ΥХå����å���ˡ |
sub magic_and_content ($$) { |
1114 |
|
my ($magic, $page) = ('', $_[1]); |
1115 |
$dbmopen = 1;�ξ��ϡ� |
$magic = $1 if $page =~ s!^((?:\#\?|/\*|<\?)[^\x02\x0A\x0D]+)[\x02\x0A\x0D]+!!s; |
1116 |
�ǡ����Ϥ��٤�yukiwiki.db(.dir, .pag)�����롣 |
($magic, $page); |
1117 |
�����Хå����åפ���Ф褤�� |
} |
1118 |
|
sub formatter ($$) { |
1119 |
$dbmopen = 0;�ξ��ϡ� |
&main::load_formatter ($_[1]); |
1120 |
yukiwiki�Ȥ����ǥ��쥯�ȥ꤬�Ǥ���Τǡ� |
$main::fmt{$_[1]}; |
1121 |
����ʲ���Хå����åפ���Ф褤�� |
} |
1122 |
|
sub format_converter ($$$) { |
1123 |
=head1 �������ڡ����κ���� |
&main::load_formatter ('format'); |
1124 |
|
$main::fmt{format}->{($_[1]=~/([A-Za-z0-9]\S+)/?$1:'SuikaWiki/0.9').'_to_'.$_[2]} |
1125 |
=over 4 |
|| $main::fmt{format}->{($_[1]=~/([A-Za-z0-9](?:(?!\/)\S)+)/?$1:'SuikaWiki').'_to_'.$_[2]}; |
1126 |
|
} |
1127 |
=item 1. |
|
1128 |
|
sub regist ($@) { |
1129 |
�ޤ���Ŭ���ʥڡ������㤨��FrontPage�ˤ����ӡ� |
my $pack = shift; |
1130 |
�ڡ����β��ˤ�����Խ��ץ�ɤ�ޤ��� |
for (@_) { |
1131 |
|
push @{$List{$_}}, $pack; |
1132 |
=item 2. |
} |
1133 |
|
} |
1134 |
����ȥƥ��������Ϥ��Ǥ�����֤ˤʤ�Τǡ� |
|
1135 |
������NewPage�Τ褦��ñ�� |
sub import_plugins () { |
1136 |
����ʸ����ʸ�����ߤ��Ƥ����ʸ����� |
opendir PDIR, $plugin_directory; |
1137 |
��ơ���¸�פ��ޤ��� |
my @plugin = grep {s/\.pm$//} readdir (PDIR); |
1138 |
|
closedir PDIR; |
1139 |
=item 3. |
for (@plugin) { |
1140 |
|
eval qq{ use SuikaWiki::Plugin::$_ } unless /[^A-Za-z0-9_]/; |
1141 |
��¸����ȡ�FrontPage�Υڡ���������ꡢ |
push @{$List{_all}}, qq(SuikaWiki::Plugin::$_); |
1142 |
���ʤ�����NewPage�Ȥ���ʸ����θ���� ? �Ȥ������ɽ������ޤ��� |
} |
1143 |
���� ? �Ϥ��Υڡ������ޤ�¸�ߤ��ʤ����Ȥ����Ǥ��� |
} |
1144 |
|
|
1145 |
=item 4. |
&import_plugins (); |
1146 |
|
|
1147 |
���� ? ��å�����ȿ������ڡ���NewPage���Ǥ��ޤ��Τǡ� |
package wiki::conneg; |
1148 |
���ʤ��ι�����ʸ�Ϥο������ڡ����˽���¸���ޤ��� |
|
1149 |
|
## BUG: this parser isn't strict. |
1150 |
=item 5. |
sub get_accept_lang (;$) { |
1151 |
|
my $alang = shift || $main::ENV{HTTP_ACCEPT_LANGUAGE}; |
1152 |
NewPage�ڡ������Ǥ����FrontPage�� ? �Ͼä��ơ���Ȥʤ�ޤ��� |
my %alang = (ja => 0.0002, en => 0.0001); |
1153 |
|
my $i = 0.1; |
1154 |
=back |
for (split /\s*,\s*/, $alang) { |
1155 |
|
tr/\x09\x0A\x0D\x20//d; |
1156 |
=head1 �ƥ����������Υ롼�� |
if (/((?:(?!;q=).)+)(?:;q="?([0-9.]+)"?)?/) { |
1157 |
|
my $l = lc $1; $l =~ tr/\x22\x5C//d; |
1158 |
=over 4 |
$alang{$l} = (defined $2 ? $2 : 1.000)*1000; |
1159 |
|
$alang{$l} += $i unless $alang{$l} == 0; |
1160 |
=item * |
$i -= 0.001; |
1161 |
|
} |
1162 |
Ϣ³����ʣ���Ԥϥե��뤵���ɽ������ޤ��� |
} |
1163 |
|
\%alang; |
1164 |
=item * |
} |
1165 |
|
|
1166 |
���Ԥ�����C<< <p> >>�ζ��ڤ�Ȥʤ�ޤ��� |
package wiki::resource; |
1167 |
|
|
1168 |
=item * |
sub get ($;\%) { |
1169 |
|
my ($resname, $option) = @_; |
1170 |
HTML�Υ����Ͻޤ��� |
$option->{accept_language} ||= &wiki::conneg::get_accept_lang (); |
1171 |
|
$option->{resource} ||= {}; |
1172 |
=item * |
my $v; |
1173 |
|
for my $lang (sort {$option->{accept_language}->{$b} <=> $option->{accept_language}->{$a}} grep {$option->{accept_language}->{$_}!=0} keys %{$option->{accept_language}}) { |
1174 |
B<''�ܡ����''>�Τ褦�˥��륯��������ĤǤϤ���ȡ� |
while (length $lang) { |
1175 |
�ܡ����C<< <b> >>�ˤʤ�ޤ��� |
unless ($option->{accept_language}->{defined $option->{accept_language}->{$lang} ? $lang : '*'} == 0) { |
1176 |
|
$option->{resource}->{$lang} ||= &wiki::suikawikiconst::to_hash ($main::database{'WikiResource:'.$lang}); |
1177 |
=item * |
$v = $option->{resource}->{$lang}->{$resname}; |
1178 |
|
last if defined $v; |
1179 |
B<'''������å�'''>�Τ褦�˥��륯�����Ȼ��ĤǤϤ���ȡ� |
} |
1180 |
������å�C<< <i> >>�ˤʤ�ޤ��� |
$lang =~ s/[^+-]*$//; $lang =~ s/[+-]$//; |
1181 |
|
} |
1182 |
=item * |
last if defined $v; |
1183 |
|
} |
1184 |
B<---->�Τ褦�˥ޥ��ʥ�4�Ĥ�����ȡ� |
defined $v ? $v : $resname; |
1185 |
��ʿ��C<< <hr> >>�ˤʤ�ޤ��� |
} |
1186 |
|
|
1187 |
=item * |
package main; |
1188 |
|
&main; |
1189 |
�Ԥ�B<*>�ǤϤ����ȡ� |
exit 0; |
1190 |
�縫�Ф�C<< <h2> >>�ˤʤ�ޤ��� |
|
1191 |
|
1; |
1192 |
=item * |
__END__ |
1193 |
|
=head1 NAME |
1194 |
�Ԥ�B<**>�ǤϤ����ȡ� |
|
1195 |
�����Ф�C<< <h3> >>�ˤʤ�ޤ��� |
wiki.cgi --- SuikaWiki: Yet yet another Wiki engine |
1196 |
|
|
1197 |
=item * |
=head1 SEE ALSO |
1198 |
|
|
1199 |
�Ԥ�ޥ��ʥ�-�ǤϤ����ȡ� |
<IW:SuikaWiki:SuikaWiki> |
1200 |
�վ��C<< <ul> >>�ˤʤ�ޤ��� |
|
1201 |
�ޥ��ʥ��ο���������ȥ�٥뤬������ޤ���3��٥�ޤǡ� |
=head1 AUTHORS |
1202 |
|
|
1203 |
-����1 |
Hiroshi Yuki <hyuki@hyuki.com> <http://www.hyuki.com/yukiwiki/> |
1204 |
--����1-1 |
|
1205 |
--����1-2 |
Makio Tsukamoto <http://digit.que.ne.jp/> |
1206 |
-����2 |
|
1207 |
-����3 |
Wakaba <w@suika.fam.cx> |
1208 |
--����3-1 |
|
1209 |
---����3-1-1 |
=head1 LICENSE |
1210 |
---����3-1-2 |
|
1211 |
--����3-2 |
Copyright (C) 2000-2003 AUTHORS |
1212 |
|
|
1213 |
=item * |
This program is free software; you can redistribute it and/or |
1214 |
|
modify it under the same terms as Perl itself. |
1215 |
�������Ȥ��ȡ� |
|
1216 |
�Ѹ�Ȳ���ʸ�Υꥹ��C<< <dl> >>���ޤ��� |
=cut |
|
|
|
|
:�Ѹ�1:��������������ʸ1 |
|
|
:�Ѹ�2:��������������ʸ2 |
|
|
:�Ѹ�3:��������������ʸ3 |
|
|
|
|
|
=item * |
|
|
|
|
|
��� |
|
|
|
|
|
=over 4 |
|
|
|
|
|
=item * |
|
|
|
|
|
LinkToSomePage��FrontPage�Τ褦�ˡ� |
|
|
��ñ��κǽ�ΰ�ʸ������ʸ���ˤ�����Τ� |
|
|
��İʾ�Ϣ³������Τ�YukiWiki�Υڡ���̾�Ȥʤꡢ |
|
|
���줬ʸ����˴ޤޤ��ȥ�ˤʤ�ޤ��� |
|
|
|
|
|
=item * |
|
|
|
|
|
http://www.hyuki.com/ �Τ褦��URL�ϼ�ưŪ�˥�ˤʤ�ޤ��� |
|
|
|
|
|
=item * |
|
|
|
|
|
��Ť��礫�ä�[[ ]]�Ǥ����ä�ʸ����⡢ |
|
|
YukiWiki�Υڡ���̾�ˤʤ�ޤ��� |
|
|
�礫�ä�����ˤϥ��ڡ�����ޤ�ƤϤ����ޤ��� |
|
|
���ܸ��Ȥ��ޤ��� |
|
|
|
|
|
=back |
|
|
|
|
|
=item * |
|
|
|
|
|
��Ƭ�����ڡ����䥿�֤ǻϤޤäƤ���ȡ� |
|
|
����������Ѥߤ�����C<< <pre> >>�Ȥ��ư����ޤ��� |
|
|
�ץ�������ɽ���ʤɤ˻Ȥ��������Ǥ��� |
|
|
|
|
|
|
|
|
=item * |
|
|
|
|
|
�Ԥ� > �ǤϤ����ȡ� |
|
|
����ʸC<< <blockquote> >>���ޤ��� |
|
|
>�ο���¿���ȥ���ǥ�Ȥ������ʤ�ޤ���3��٥�ޤǡˡ� |
|
|
|
|
|
>ʸ�� |
|
|
>ʸ�� |
|
|
>>����ʤ���� |
|
|
>ʸ�� |
|
|
|
|
|
=back |
|
|
|
|
|
=head1 �������� |
|
|
|
|
|
=over 4 |
|
|
|
|
|
=item * |
|
|
|
|
|
2001ǯ10��20����Version 1.6.6�� |
|
|
|
|
|
�����ξ����к��� |
|
|
���ڡ����δ�ñ�ʥ����å�������äƤ����� |
|
|
�������˥����å��������Ӥ��롣 |
|
|
�����Ľ��digest�Ȥ���ʸ����������ʬ���롣 |
|
|
�����MD5�ʤɤǤ����Ȥ�ä����������Τ�����ɡ� |
|
|
|
|
|
���ͻ���ɽ��������å������ʤɤϡֶ˰��פ���Υڡ����ͤˤ����� |
|
|
|
|
|
=item * |
|
|
|
|
|
2001ǯ10��17����Version 1.6.5�� |
|
|
|
|
|
�ץ�ӥ塼���̤ǡ������ܥ�������Ȥ������������ |
|
|
��å����������Ƥ�input���Ǥ�type="hidden"��Ȥä�������Τ���롣 |
|
|
����ˡ�textarea���Ǥ�Ȥ��� |
|
|
�ƥץ�ӥ塼�Ѥ�myspecial_��Ƴ�����Ǥ⤭�줤���к��ǤϤʤ��� |
|
|
|
|
|
=item * |
|
|
|
|
|
2001ǯ8��30����Version 1.6.4�� |
|
|
|
|
|
URL�ǥ����쥯�Ȥ˥ڡ���̾����ꤷ�Ƥ⡢ |
|
|
$WikiName��$BracketName�ʳ��Υڡ�������ʤ��褦�ˤ����� |
|
|
(is_valid_name��is_editable����)�� |
|
|
|
|
|
=item * |
|
|
|
|
|
2001ǯ8��30����Version 1.6.3�� |
|
|
|
|
|
RecentChanges���Խ������Խ��ԲĤȤ����� |
|
|
�Խ��Բĥڡ�����@uneditable�˥ڡ���̾������롣 |
|
|
|
|
|
=item * |
|
|
|
|
|
2001ǯ2��25����Version 1.6.1, 1.6.2�� |
|
|
|
|
|
��ʬ��ǽ�ΥХ������� |
|
|
do_preview��'>'�������ʤ��Х����� |
|
|
�ʥ桼������λ�Ŧ�ˡ� |
|
|
|
|
|
=item * |
|
|
|
|
|
2001ǯ2��22����Version 1.6.0�� |
|
|
��ʬ��ǽ����������� |
|
|
|
|
|
=item * |
|
|
|
|
|
2001ǯ2��19����Version 1.5.4�� |
|
|
�����ե�����ؤΥ�ϲ����ˤ��Ƥߤ��� |
|
|
|
|
|
=item * |
|
|
|
|
|
2001ǯ2��19����Version 1.5.3�� |
|
|
RecentChanges����˺�������ڡ���������Τ���� |
|
|
use strict;�ǰ��ä�������ʬ������(�����ǤϤʤ�)�� |
|
|
|
|
|
=item * |
|
|
|
|
|
2001ǯ2��16����Version 1.5.2�� |
|
|
textarea��ɽ������ӥץ�ӥ塼�������� < �� > �� < �� > ���Ѵ����� |
|
|
(do_preview, editpage, print_preview_buttons)�� |
|
|
|
|
|
=item * |
|
|
|
|
|
2000ǯ12��27����Version 1.5.1�� |
|
|
�ץ�ӥ塼���̤����������� |
|
|
|
|
|
=item * |
|
|
|
|
|
2000ǯ12��22����Version 1.5.0�� |
|
|
����Ū�ˤ����֤��ľ������ |
|
|
���������Ӻ�������褦�ˤ���(do_list)�� |
|
|
�������˳�ǧ���̤�Ф��褦�ˤ���(do_preview)�� |
|
|
�ƥ����Ȥν������Խ����̤����줿(do_edit, do_reedit)�� |
|
|
WhatsNew��RecentChanges��TopPage��FrontPage���ѹ������� |
|
|
|
|
|
=item * |
|
|
|
|
|
2000ǯ12��20����Version 1.1.0�� |
|
|
tie�����Ѥ��ơ�dbmopen���Ȥ��ʤ����Ǥ�ư���褦�˽����� |
|
|
���ѼԤ�1�ͤǤ���ֶ˰��פ��� |
|
|
���äƤ��������������ɤˤ��Ƥ��ޤ��� |
|
|
|
|
|
=item * |
|
|
|
|
|
2000ǯ9��5����Version 1.0.2�� |
|
|
<body color=...> �� <body bgcolor=...> |
|
|
���ѼԤ���λ�Ŧ�ˤ�롣���ա� |
|
|
|
|
|
=item * |
|
|
|
|
|
2000ǯ8��6����Version 1.0.1������� |
|
|
C MAGAZINE�ʥ��եȥХѥ֥�å��� |
|
|
2000ǯ10���Ϣ�ܵ������������ǡ� |
|
|
[[ ]] �κǸ夬��˾�פΤ褦�˥��ե�JIS�� |
|
|
0x5D�ˤʤ���β����Ԥʤä��� |
|
|
|
|
|
=item * |
|
|
|
|
|
2000ǯ8��5����Version 1.0.0������� |
|
|
|
|
|
=item * |
|
|
|
|
|
2000ǯ7��23����Version 0.82������� |
|
|
�Խ����Υ�ߥ��� |
|
|
<textarea>��°���ѹ��� |
|
|
|
|
|
=item * |
|
|
|
|
|
2000ǯ7��22����Version 0.81������� |
|
|
�������Ȥ߹��ࡣ |
|
|
|
|
|
=item * |
|
|
|
|
|
2000ǯ7��21����Version 0.80������� |
|
|
POD��CGI��˽��ࡣ |
|
|
|
|
|
=item * |
|
|
|
|
|
2000ǯ7��19����Version 0.70������� |
|
|
'''������å�'''�䡢--��---��>>��>>>�ʤɤ������ |
|
|
|
|
|
=item * |
|
|
|
|
|
2000ǯ7��18����Version 0.60������� |
|
|
*����*��''����''���ѹ� |
|
|
|
|
|
=item * |
|
|
|
|
|
2000ǯ7��17����Version 0.50������� |
|
|
|
|
|
=item * |
|
|
|
|
|
2000ǯ7��17��������ˤ��������ɲä��롣 |
|
|
|
|
|
=item * |
|
|
|
|
|
2000ǯ7��16�������������ɲá� |
|
|
|
|
|
=item * |
|
|
|
|
|
2000ǯ7��15���������� |
|
|
|
|
|
=back |
|
|
|
|
|
=head1 TODO |
|
|
|
|
|
- �ƥ�����ɽ���⡼�� |
|
|
- Charset�������� |
|
|
- textarea����Ĥ������б� |
|
|
- ��˥塼�αѸ�ɽ���յ� |
|
|
- �ץ�ӥ塼�Υܥ���ǡ�mymsg��input��value������Ƥ��뤬�����ԤΤޤ�value�ˤ���ƤϤ����ʤ��ΤǤϤʤ����� |
|
|
- �ֺ��Խ��פε�ǽ�ϥ֥饦���� back �ǽ�ʬ�ǤϤʤ������ץ�ӥ塼�Ϥ�äȥ���ץ�ˡ� |
|
|
- �ڡ��������ȥ��Wikiname�ˤ������ˤ�����褦�ˤ��롣 |
|
|
- InterWiki���ε�ǽ��URL���Ĥġ����ĥ��� |
|
|
|
|
|
=head1 ��� |
|
|
|
|
|
Copyright (C) 2000 by Hiroshi Yuki. |
|
|
���� <hyuki@hyuki.com> |
|
|
http://www.hyuki.com/ |
|
|
http://www.hyuki.com/yukiwiki/ |
|
|
|
|
|
���䡢�ո����Х����� hyuki@hyuki.com �˥�뤷�Ƥ��������� |
|
|
|
|
|
=head1 ���۾�� |
|
|
|
|
|
YukiWiki�ϡ� |
|
|
GNU General Public License�ˤƸ������ޤ��� |
|
|
|
|
|
YukiWiki�ϥե���եȤǤ��� |
|
|
����ͳ�ˤ��Ȥ����������� |
|
|
��ʬ���ߤ�YukiWiki������褦�˥���ץ�ˤ��Ƥ���ޤ��� |
|
|
|
|
|
=head1 �ռ� |
|
|
|
|
|
�ܲȤ�WikiWiki���ä�Cunningham & Cunningham, Inc.�� |
|
|
���դ��ޤ��� |
|
|
|
|
|
YukiWiki��ڤ���ǻȤäƤ������� |
|
|
�ͥåȾ�������˴��դ��ޤ��� |
|
|
|
|
|
YukiWiki�Υ�����ǥ����Ƥ������ä��������व�� |
|
|
http://city.hokkai.or.jp/~reina/ |
|
|
�˴��դ��ޤ��� |
|
|
|
|
|
tie��Ȥä��Ǥθ��ˤʤ륳���ɤ����äƤ������ä� |
|
|
�ֶ˰��פ���˴��դ��ޤ��� |
|
|
|
|
|
=head1 ���ȥ�� |
|
|
|
|
|
=over 4 |
|
|
|
|
|
=item * |
|
|
|
|
|
YukiWiki�ۡ���ڡ��� |
|
|
http://www.hyuki.com/yukiwiki/ |
|
|
|
|
|
=item * |
|
|
|
|
|
�ܲȤ�WikiWiki |
|
|
http://c2.com/cgi/wiki?WikiWikiWeb |
|
|
|
|
|
=item * |
|
|
|
|
|
�ܲȤ�WikiWiki�κ��(Cunningham & Cunningham, Inc.) |
|
|
http://c2.com/ |
|
|
|
|
|
=item * |
|
|
|
|
|
YukiWiki�Υ����ǥ�����Ƥ������ä��������व��Υڡ��� |
|
|
http://city.hokkai.or.jp/~reina/ |
|
|
|
|
|
=back |
|
|
|
|
|
=cut |
|