############################################################ # #

ファイルを添付するためのフォームを表示します。

#
# {{attach}}
# 
#

# 添付したファイルはフォームの上に一覧表示されます。 # 同じファイルを添付すると複数表示されてしまうのはご愛嬌です。 # nolistオプションをつけると一覧表示を行いません。 #

#
# {{attach nolist}}
# 
# ############################################################ package plugin::attach::Attach; use strict; #=========================================================== # コンストラクタ #=========================================================== sub new { my $class = shift; my $self = {}; return bless $self,$class; } #=========================================================== # プラグインの種別を返します #=========================================================== sub type { return "html"; } #=========================================================== # 添付フォームの表示 #=========================================================== sub paragraph { my $self = shift; my $wiki = shift; my $option = shift; my $cgi = $wiki->get_CGI; my $page = $cgi->param("page"); if(!defined($option) || $option ne "nolist"){ if(!defined($self->{$page})){ $self->{$page} = 1; } else { $self->{$page}++; } } else { $self->{$page} = undef; } my $buf = "
config('script_name')."\" method=\"post\" enctype=\"multipart/form-data\">\n". " \n". " \n". " escapeHTML($page)."\">\n". " \n"; if(defined($self->{$page})){ $buf .= " {$page}."\">\n"; } $buf .= "
\n"; return $buf; } 1;