#! /usr/bin/perl # # dmb.cgi # 超多機能スレッド式メッセージボード # # 1.055 : 3/16/08 : スレッドサーチでの日にち表示を修正 # 1.054 : 2/18/08 : 携帯モード書き込み→PC削除の場合のエラーを修正 # 1.053 : 2/16/08 : 変更字にIP情報が冗長になるのを修正 # 1.052 : 1/28/08 : メッセージを古い順に表示するオプションを追加 # 1.051 : 1/22/08 : メッセージのパスワード未設定の処理を修正 # 1.050 : 12/2/07 : 縮小画像自動作成機能を追加。携帯画像ファイルサイズ制限機能を追加。 # 1.049 : 11/22/07 : 携帯モードでのID#への自動リンク、PCページへのリンクを追加 # 1.048 : 11/21/07 : 携帯モードの番号の指定を修正、及びMessage#のリンクを追加 # 1.047 : 10/21/07 : 携帯モードにperlコードを挿入できるオプションを追加 # 1.046 : 10/4/07 : 入力フォームを若干修正 # 1.045 : 9/5/07 : CAPTCHA画像をjpeg, gifで出力するオプションを追加 # 1.044 : 6/11/07 : ページ毎のソートを修正 # 1.043 : 5/11/07 : サーチの日付のデフォルトを修正 # 1.042 : 4/15/07 : リカバーのタイムスタンプを修正 # 1.041 : 4/8/07 : 200件以前の返事削除変更リンクを修正、個人最終書き込みの日付を修正 # 1.040 : 4/7/07 : 200件以前の日付検索を修正 # 1.039 : 3/29/07 : 名前のメールリンクをメールフォームにするオプションを追加 # 1.038 : 2/10/07 : デフォルトでCAPTCHAをオフに修正 # 1.037 : 1/22/07 : スレッド更新、recover modeを修正 # 1.036 : 1/18/07 : 200件以前のbody_insertを修正 # 1.035 : 1/9/07 : zipファイル作成を修正 # 1.034 : 1/8/07 : ファイルロックのバグを修正 # 1.033 : 1/6/07 : mode=read時にスレッドデータを触らないように修正 # 1.032 : 1/3/07 : 携帯モードにnoidexを追加 # 1.031 : 12/29/06 : robot用noindexを日数表示に追加 # 1.030 : 12/20/06 : 無効なスレッドIDを指定したときの処理を修正 # 1.029 : 12/19/06 : 検索結果表示を修正 # 1.028 : 12/17/06 : BODY内挿入に「
内挿入文 our $topdisp1 = ''; our $topdisp2 = ''; our $bottomdisp1 = ''; #携帯モードリストページにperlコードを挿入 1:on 0:off our $top_mob_perl_insert1 = ''; our $top_mob_perl_insert2 = ''; sub top_mob_insert_perl1 {}; sub top_mob_insert_perl2 {}; our $th_title_col_bgcolor = '#dddddd'; our $th_col_odd_bgcolor = '#dddddd'; our $th_col_even_bgcolor = '#eeeeee'; our $to_prevpage = '更に最近のスレッド'; our $to_nextpage = '更に古いスレッド'; our $to_toppage = '最新スレッド'; our $mbmailtitle = "へメール送信"; our $mbmail_logo = ""; our $mbmail_style = ''; our $mbmail_color = 'black'; our $mbmail_size = '+1'; our $mbmail_face = ''; our $mbmail_sel = 0; # 0:デフォルト、1:テキスト、2:ロゴ、3:スタイルシート our $mbmail_loc=1; # 0:左、1:中、2:右 # Background設定 # 1:画像を使う 0:カラー番号を使う our $thbgimage_en = 0; our $thbgimagefile = "sample.jpg"; our $thbgcolor="#ffffff"; # 修正リンク 1:on, 0:off our $th_edit_en = 1; # 削除リンク 1:on, 0:off our $th_delete_en = 1; # 管理用リンク 1:on, 0:off our $thadmin_en = 1; # トップへのリンク 1:on, 0:off our $thtoplink_en = 1; our $thtoplink_title = ('トップへ','Top')[$lang]; our $thtoplink = '../index.html'; # 携帯モードへのリンク 1:on, 0:off our $thmob_en = 1; our $thmoblink_title = ('携帯モード','Mobile mode')[$lang]; # PCモードへのリンク 1:on, 0:off our $pcmode_link_en = 1; our $pcmode_link = 'PCモードへ'; # SSI mode時の表示が最新スレッド 1:最新 0:$ssiid指定のスレッド our $ssi_latest = 1; # SSI mode ID our $ssiid = 1; # ID display our $iddisp_en = 0; #会員専用書き込み 1:on 0:off our $member_only = 0; #
〜内に挿入できる構文 1:on, 0:off our $th_head_insert_en = 0; our $th_head_insert = ''; #スタイルシート 1:on 0:off our $th_style_sheet_en = 0; our $th_style_sheet = ' A:link {text-decoration: none} A:visited {text-decoration: none} A:active {text-decoration: none} '; #セキュリティイメージ our $captcha_en = 0; our $capimage_width = 230; our $capimage_height = 80; our $scramble_en = 1; our $cap_text_num = 4; #文字数 our $cap_expire = 60; #有効期限(分) our $capimage_sel = 0; # 0:png, 1:jpg, 2:gif # セキュリティイメージデータディレクトリ our $capdatadir = 'capdata'; # ttffontファイルを絶対パスで。 "Document and Setting"のようなパス内のspace禁止 our $ttffont = "c:/windows/fonts/cour.ttf"; # ttfrontのポイントサイズ our $ttffont_ptsize = 30; #### mb setting ### our $mbdir = "."; our $mbdata = "$mbdir/logdata.dat"; our $mbdellog="$mbdir/mbdel.log"; our $cookiename = "mb_cookie"; our $cookiename2 = "read_cookie"; our $lockfile = "$mbdir/lockfile.txt"; our $mbtitle = ("メッセージボード","Message Board")[$lang]; our $mblogo = "$mbdir/mboard.gif"; our $logo_style = ''; our $logo_color = 'black'; our $logo_size = '+1'; our $logo_face = ''; our $logo_sel = 0; # 0:デフォルト、1:テキスト、2:ロゴ、3:スタイルシート our $logo_loc=1; # 0:左、1:中、2:右 our $mbwrtitle = ("書き込み","Post Message")[$lang]; our $mbwr_logo = ""; our $mbwr_style = ''; our $mbwr_color = 'black'; our $mbwr_size = '+1'; our $mbwr_face = ''; our $mbwr_sel = 0; # 0:デフォルト、1:テキスト、2:ロゴ、3:スタイルシート our $mbwr_loc=0; # 0:左、1:中、2:右 our $mbrestitle = ("返事","Reply Message")[$lang]; our $mbres_logo = ""; our $mbres_style = ''; our $mbres_color = 'black'; our $mbres_size = '+1'; our $mbres_face = ''; our $mbres_sel = 0; # 0:デフォルト、1:テキスト、2:ロゴ、3:スタイルシート our $mbres_loc=0; # 0:左、1:中、2:右 our $mbsumtitle = ("書き込み統計","Statistics")[$lang]; our $mbsum_logo = ""; our $mbsum_style = ''; our $mbsum_color = 'black'; our $mbsum_size = '+1'; our $mbsum_face = ''; our $mbsum_sel = 0; # 0:デフォルト、1:テキスト、2:ロゴ、3:スタイルシート our $mbsum_loc=1; # 0:左、1:中、2:右 our $mbarctitle = ("アーカイブ作成","Archive")[$lang]; our $mbarc_logo = ""; our $mbarc_style = ''; our $mbarc_color = 'black'; our $mbarc_size = '+1'; our $mbarc_face = ''; our $mbarc_sel = 0; # 0:デフォルト、1:テキスト、2:ロゴ、3:スタイルシート our $mbarc_loc=1; # 0:左、1:中、2:右 our $mblinktitle = ("リンク抜粋","Link")[$lang]; our $mblink_logo = ""; our $mblink_style = ''; our $mblink_color = 'black'; our $mblink_size = '+1'; our $mblink_face = ''; our $mblink_sel = 0; # 0:デフォルト、1:テキスト、2:ロゴ、3:スタイルシート our $mblink_loc=1; # 0:左、1:中、2:右 our $mbsrctitle = ("サーチ","Search")[$lang]; our $mbsrc_logo = ""; our $mbsrc_style = ''; our $mbsrc_color = 'black'; our $mbsrc_size = '+1'; our $mbsrc_face = ''; our $mbsrc_sel = 0; # 0:デフォルト、1:テキスト、2:ロゴ、3:スタイルシート our $mbsrc_loc=1; # 0:左、1:中、2:右 our $mbdeltitle = ("削除","Delete Message")[$lang]; our $mbdel_logo = ""; our $mbdel_style = ''; our $mbdel_color = 'black'; our $mbdel_size = '+1'; our $mbdel_face = ''; our $mbdel_sel = 0; # 0:デフォルト、1:テキスト、2:ロゴ、3:スタイルシート our $mbdel_loc=1; # 0:左、1:中、2:右 our $mbedititle = ("変更","Delete Message")[$lang]; our $mbedit_logo = ""; our $mbedit_style = ''; our $mbedit_color = 'black'; our $mbedit_size = '+1'; our $mbedit_face = ''; our $mbedit_sel = 0; # 0:デフォルト、1:テキスト、2:ロゴ、3:スタイルシート our $mbedit_loc=0; # 0:左、1:中、2:右 # Background設定 # 1:画像を使う 0:カラー番号を使う our $bgimage_en = 0; our $bgimagefile = "$mbdir/sample.jpg"; our $bgcolor="#ffffff"; # 統計の「ピッタリ賞」でキリ番として扱われるメッセージナンバーの設定。 our @period=(1,100,111,200,222,300,333,400,444,500,555,600,666,700,777,800,888,900,999,1000,1111,1234,2000,2222,2345,3000,3333,3456,4000,4321,4444,4567,5000,5555,5678,6000,6666,6789,7000,7777,8000,8888,9000,9999,10000,11111,20000,22222,30000,33333); # 統計 1:有効 0:無効 our $summary_en = 1; # アーカイブ 1:有効 0:無効 our $archive_en = 1; # リンク 1:有効 0:無効 our $link_en = 1; # タイトル 1:有効 0:無効 our $title_en = 1; # 画像リスト 1:有効 0:無効 our $imlist_en = 1; # サーチ 1:有効 0:無効 our $search_en = 1; # 携帯モード 1:有効 0:無効 our $imode_en = 1; # 削除機能 1:有効 0:無効 our $delete_en = 1; # 変更機能 1:有効 0:無効 our $modify_en = 1; # 表示順 1:新しい順 0:古い順 our $disp_order = 1; # 名前のメールリンク 2:mailtoでリンク 1:メールフォーム 0:リンク無し our $mailform_en = 1; # mail command our $mail_cmd = '/usr/sbin/sendmail -t'; #タグ使用 1:可 0:不可 our $tag_use = 0; #削除変更元記事保存 1:有効 0:無効 our $dellog_save = 1; #200件以前の過去記事保存 1:有効 0:無効 our $pastlog_save = 1; #携帯モードでの画像表示 1:有効 0:無効 our $imode_image = 0; #携帯モーででの画像表示サイズ our $imode_image_x = 100; our $imode_image_y = 100; #タグ使用可の時にhttp://からのオートリンク 1:on 0:off our $autolink_when_tag_is_on = 0; #http://の適用 1:行頭のみ 0:どこでも our $autolink_head_only = 0; # セットアップ表示 1:表示 0:非表示 our $setup_en = 1; # 自動リンククリック時 1:同じウィンドウ 0:別ウィンドウ our $link_samewin_en = 1; # トップへのリンク 1:表示 0:非表示 our $top_link_en = 1; our $top_link_title = ('トップへ','Top')[$lang]; our $top_link = '../index.html'; # スレッドへのリンク 1:表示 0:非表示 our $th_link_en = 1; our $th_link_title = ('ディスカッションへ','To Discussion')[$lang]; # 書き込みタイトルのサイズ、色、フォント our $post_title_color = '#00aa00'; our $post_title_size = '+2'; our $post_title_face = ''; # 名前の色 our $post_name_color = '#0000ee'; # 返信引用記事の色 our $quate_color = '#804040'; # 記事本文の色 our $text_color = 'black'; # 投稿者個人色設定 1:on 0:off our $user_name_color_en = 0; our $user_title_color_en = 0; our $user_text_color_en = 0; # 記事本文の表示幅 ブラウザ全体の% our $body_width = 100; # 名前欄のメールアドレス表示 1:on 0:off our $maildisp_en = 0; # 名前欄の敬称 1:on 0:off our $namesan_en = 0; our $namesan = ('さん','-san')[$lang]; # 返信コメントでの敬称 1:on 0:off our $ressan_en = 0; our $ressan = ('さん','-san')[$lang]; # SSIモード設定 # SSIモードを使用するHTMLファイルから見たこのスクリプトへの相対パス、 # 又はhttp://からのフルパス our $httpcgibin = "http://localhost/cgi-bin"; # 続き表示リンクの文字列 our $gotomb = ('続きはこちら.....','See more')[$lang]; # SSIモードの表示ライン数のデフォルト our $ssiline = 7; # SSIモードの表示件数 # $ssikenが2以上の場合は$ssilineは無効 our $ssiken = 1; # SSIモードで画像表示 0:off 1:on our $ssiimage_en = 0; #画像サイズ our $ssiimage_w = 100; our $ssiimage_h = 100; # サポートされていない画像やファイルの場合のアイコン使用 1:有効 0:無効 our $attach_icon_en = 0; our $attach_icon = ''; # アップロード禁止な拡張子 our $prohibit_en = 1; our $prohibit_extention = "cgi pl php php3"; # 半角スペースで区切る # Use localtime? our $localtime_en = 0; # If not using localtime, 時間設定 GMTからのオフセット 日本:+9 our $offset = 9; # Summary で使われる棒グラフの棒 our $gif="$mbdir/bar.gif"; # ファイルアップ機能 0:無し 1:有り our $image_en = 1; # アップファイル格納ディレクトリ our $imagedir = "$mbdir"; # 画像クリック時のウィンドウ 0:別ウィンドウ 1:同じウィンドウ our $image_samewin_en = 0; # 縮小表示時のサイズ our $max_width = 150; our $max_height = 150; #縮小画像自動作成 1:on 0:off our $thumb_gen_en = 1; our $thumb_dir = 'mbthumb'; #携帯モード画像ファイルサイズ制限 (KB) our $mob_image_size = 25; #携帯モード画像フォーマット 0:jpg 1:gif 2:png our $mob_image_format = 1; #最大ファイルアップサイズ(kB) our $maxmb = 100; #スタイルシート 1:on 0:off our $style_sheet_en = 0; our $style_sheet = ' A:link {text-decoration: none} A:visited {text-decoration: none} A:active {text-decoration: none} '; #〜内に挿入できる構文 1:on, 0:off our $head_insert_en = 0; our $head_insert = ''; #メッセージボード上部に表示させる文 1:on, 0:off our $body_insert1_en = 0; our $body_insert1 = ''; our $body_insert2_en = 0; our $body_insert2 = ''; our $body_insert3_en = 0; our $body_insert3 = ''; our $body_insert4_en = 0; our $body_insert4 = ''; our $body_insert5_en = 0; our $body_insert5 = ''; our $body_insert6_en = 0; our $body_insert6 = ''; #携帯モードにperlコードを挿入 1:on 0:off our $mob_perl_insert1 = ''; our $mob_perl_insert2 = ''; sub mob_insert_perl1 {}; sub mob_insert_perl2 {}; #トップからのSSI表示による更新時間のための予備のアップデートファイル # 1: on, 0: off our $update1_file_en = 0; our $update2_file_en = 0; our $update1_file = "$mbdir/update1.log"; our $update2_file = "$mbdir/update2.log"; #スパム防止のためのキーワード our $ticket = 'qualified'; ######################################################################### if (-e "$mbsetupfile"){ require "$mbsetupfile"; } my $url_pattern = 'https?:\/\/[\w\.\~\/\?\&\+\=\:\@\%\;\#\$\%\-]*'; my $tag_pattern = '[\w\s\"\'\\\+\=\/\;\:\%\(\)#\?\.\~\-\!]*'; my $mail_pattern = '(^[\w\.\-]+\@[\w\.\-]+\.[a-zA-Z]{2,4}$|^$)'; my $color_pattern = '\w\#'; if ($maxmb < 100) {$maxmb = 100;} my $maxmb2 = $maxmb + 20; # Margin for text up size $CGI::POST_MAX = $maxmb2 * 1024; my $q = new CGI; my $cgierror = $q->cgi_error; &error($cgierror) if ($cgierror); my %in = $q->Vars; %in = &postprocess(%in); if ($script eq 'dmbssi.cgi'){ $script = 'dmb.cgi'; $in{mode} = 'ssi'; } elsif ($script eq 'dmbmob.cgi'){ $script = 'dmb.cgi'; $in{mode} = 'mobile'; } if (defined $in{mode} and $in{mode} eq 'ssi'){ if ($in{line} eq ''){ $in{line} = $ssiline; } if ($in{id} eq ''){ if ($ssi_latest){ my @tmp = split /,/, &get_latest_thread; $in{id} = $tmp[0]; } else { $in{id} = $ssiid; } } } my $id = $in{id}; my $idmbsetupfile = "$id-$mbsetupfile"; if (-e "$idmbsetupfile"){ require "$idmbsetupfile"; } if ($in{mode} ne 'thwrite' and $in{mode} ne 'thiwrite' and $in{mode} ne 'setup' and $in{mode} ne 'admin'){ my ($body,$path,$ext) = fileparse($mbdata, '\.\w+'); $path = '.' if ($path eq ''); $mbdata = "$path$id-$body$ext"; ($body,$path,$ext) = fileparse($mbdellog, '\.\w+'); $path = '.' if ($path eq ''); $mbdellog = "$path$id-$body$ext"; $rejectlink = "$id-$rejectlink"; } #if ($in{mode} !~ /viewthread/ and # $in{mode} ne 'setup' and # $in{mode} ne 'admin'){ # my ($body,$path,$ext) = fileparse($lockfile, '\.\w+'); # $path = '.' if ($path eq ''); # $lockfile = "$path$id-$body$ext"; #} my @thline = split ',', &get_one_thread; my $thtitle = $thline[6]; my $thread_sofar = $thline[9]; my $mbread = "$script?mode=read&id=$id"; my $mbreadt = "$script?mode=title&id=$id"; my $mbwrite = "$script?mode=write&id=$id"; my $mbres = "$script?mode=res&id=$id"; my $mbpast = "$script?mode=past&id=$id"; my $mbwrform = "$script?mode=wrform&id=$id"; my $mblink = "$script?mode=link&id=$id"; my $mbdel1 = "$script?mode=delete&id=$id"; my $mbdel2 = "$script?mode=del2&id=$id"; my $mbdel3 = "$script?mode=del3&id=$id"; my $mbsum = "$script?mode=summary&id=$id"; my $mbsearch = "$script?mode=search&id=$id"; my $mbschform = "$script?mode=schform&id=$id"; my $mbarchform = "$script?mode=archform&id=$id"; my $mbarch = "$script?mode=archive&id=$id"; my $mbsumfm = "$script?mode=sumform&id=$id"; my $mbsumpsfm = "$script?mode=sumpsnl&id=$id"; my $mbiread = "$script?mode=iread&id=$id"; my $mbiwrite = "$script?mode=iwrite&id=$id"; my $mbiwrform = "$script?mode=iwrform&id=$id"; my $mbires = "$script?mode=iresform&id=$id"; my $mbsetup = "$script?mode=setup&id=$id"; my $mbedit = "$script?mode=edit&id=$id"; my $mbnamedef = "$script?mode=namedef&id=$id"; my $mbnamedefwr = "$script?mode=namedefwr&id=$id"; my $mbprint = "$script?mode=print&id=$id"; my $mbssi = "$script?mode=ssi&id=$id"; if (! -e "$admindat"){ if ($in{mode} eq 'adminpwd'){ &wradminpwd; } else { &setadminpwd; } } my $member_pwd; if ($member_only){ if (! -e "$groupdat"){ if ($in{mode} eq 'grwradminpwd'){ &wradminpwd($groupdat); } else { &setadminpwd($groupdat); } } open(FILE,"< $groupdat") or &error("$groupdatが開けません。"); $member_pwd =\n"; &htmltail; } #sub cookie_encode { # my $a = shift; # $a =~ s/([\W])/sprintf("%%%02X", ord($1))/eg; # return $a; #} sub cookie_path_fix { my $a = shift; $a =~ s/path\s*=\s*[^;]*;//i; return $a; } #sub cookie_decode { # my $a = shift; # $a =~ s/%([A-Fa-f0-9][A-Fa-f0-9])/pack("C", hex($1))/eg; # return $a; #} sub display_one_title { my $line = shift; my $t = ($in{mode} eq 'imlist') ? $in{mode} : shift; my ($number,$datecode,$name,$mail,$host,$date,$subject,$main,$encpwd,$imagefile,$user_name_color,$user_title_color,$user_text_color)=split(/,/,$line); my ($each_name_color,$each_title_color,$each_text_color) = &replace_color($user_name_color,$user_title_color,$user_text_color); if ($t ne 'imlist' or ($t eq 'imlist' and $imagefile ne '' and -e "$imagedir/$imagefile")) { print "
| Message#${number} ";
if ($lang == 0){
if ($darray[0] < 1900){
my $dy;
$dy = $darray[0]+1900;
$date =~ s/^\d?\d\d([^\d]..*)$/$dy$1/;
}
}
$one_message .= "$date "; $one_message .= "From: "; if ($mail){ if ($mailform_en == 2){ $one_message .= "$name"; } elsif ($mailform_en == 1){ $one_message .= "$name"; } else { $one_message .= "$name"; } } else { $one_message .= "$name"; } if ($namesan_en){ $one_message .= "$namesan"; } if ($mail && $maildisp_en){ $one_message .= " ($mail)" } $one_message .= " | ";
$one_message .= ""; unless (($in{mode} eq 'past' and $noreplink) or ($in{mode} eq 'print' and $noreplink) or $in{mode} eq 'del2' or $in{mode} eq 'archive'){ if ($in{mode} ne 'delete'){ $one_message .= ""; $one_message .= (('返事','reply')[$lang]); $one_message .= " \n"; } if ($delete_en or $in{mode} eq 'delete') { $one_message .= " "; $one_message .= (('削除','delete')[$lang]); $one_message .= " \n"; } if ($modify_en or $in{mode} ne 'delete') { $one_message .= ""; $one_message .= (('変更','edit')[$lang]); $one_message .= " \n"; } } $one_message .= " |
| "; # my $disp_subject = &subject_text($subject); # $one_message .= "$disp_subject"; # $one_message .= " |
| "; chomp($imagefile); if ($image_en && $imagefile ne '' && -e "$imagedir/$imagefile"){ my ($actual_width, $actual_height); ($imagefile,$actual_width,$actual_height) = &get_image_size("$imagefile",$max_width,$max_height); my $newwin; if ($image_samewin_en){ $newwin = ''; } else { $newwin = 'target="_blank"'; } $imagefile = basename($imagefile) if ($in{mode} eq 'archive'); $one_message .= ""; $one_message .= &image_tag($imagefile,$actual_width,$actual_height); $one_message .= ""; } $one_message .= " | "; $one_message .= "";
$one_message .= "";
foreach (@mainarry){
$_ = &replace_link($_,$number);
$_ = &replace_tag($_);
if(/^\>.*$/){
$one_message .= "$_";
} else {
$one_message .= "$_";
}
$one_message .= " "; } $one_message .= ""; $one_message .= " |
| \n"; if ($in{mode} eq 'archive'){ return($head_message); } else { print $head_message; } } sub lockfile { open(LOCKFILE,"> $lockfile"); flock LOCKFILE, 2; } sub unlockfile { no strict; close (LOCKFILE) if (defined LOCKFILE); close (TMPFILE) if (defined TMPFILE); # Do not delete in Unix system. # The lock file can be deleted even it is locked by flock in unix system. # Leave it all time. # unlink "$lockfile" if (-e "$lockfile"); unlink "tmp.$$" if (-e "tmp.$$"); } sub htmltail { print ©right; print " |
" if ($body_insert4_en == 0); print "$body_insert4" if ($body_insert4_en == 1); } print "
" if ($body_insert5_en == 0); print "$body_insert5" if ($body_insert5_en == 1); } sub disptail { print "
\n"; &input_forms2(%cookie); &wrticket; &display_after_write; &write_comment; print ""; print "\n"; print "\n"; &htmltail; } sub input_forms { my %COOKIE; my @pairs = split /,/, $q->cookie($cookiename); foreach my $pair (@pairs) { my ($name, $value) = split(/:/, $pair); # $COOKIE{$name} = &cookie_decode($value); $COOKIE{$name} = $value; } my ($titleprint,$name_color_input,$title_color_input,$contents_color_input,$name, $mail,$subject) = @_; if ($in{mode} eq 'wrform' or $in{mode} eq 'res'){ ($name, $mail) = ($COOKIE{name},$COOKIE{email}); ($name_color_input,$title_color_input,$contents_color_input) = &user_color_input("$COOKIE{user_name_color}","$COOKIE{user_title_color}","$COOKIE{user_text_color}"); } # if ($in{mode} eq 'res'){ # $subject = "Re:" . $subject; # } print "
\n"; &htmltail; } ############################################################################# # Message edit Form mode #################################################### ############################################################################# sub mbedit { my @alldata = &getmbdata; my @resdata = grep(/^$in{resnum},/,@alldata); my ($resnumber,$rescode,$resname,$resmail,$reshost,$resdate,$ressubject,$resmain,$resencpwd,$resimagefile,$user_name_color,$user_title_color,$user_text_color)=split(/,/,$resdata[0]); &htmlhead($mbedititle); my $titleprint=&titleprint("$thtitle $mbedititle","$mbedit_logo","$mbedit_style","$mbedit_color","$mbedit_size","$mbedit_face","$mbedit_sel","$mbedit_loc"); my ($name_color_input, $title_color_input, $contents_color_input) = &user_color_input("$user_name_color","$user_title_color","$user_text_color"); my %cookie = &input_forms($titleprint, $name_color_input, $title_color_input, $contents_color_input,$resname,$resmail,$ressubject); @resdata=split(/<[bB][rR]>/,$resmain); foreach (@resdata){ print "$_\n"; } print "";
if ($image_en == 1){
if ($resimagefile ne ''){
print qq//;
print (('添付(画像)ファイルはそのまま','No image change')[$lang]);
print "
\n";
print qq//;
print (('添付(画像)ファイルを削除','Delete image')[$lang]);
print "
\n";
print qq//;
print (('添付(画像)ファイルを差し替え','Replace image')[$lang]);
print "
\n";
print (('差し替え添付(画像)ファイル(ファイル名は半角英数、アンダースコア、ドット、ハイフンのみ)','New image file')[$lang]);
print "\n";
} else {
print qq//;
print (('アップファイル(ファイル名は半角英数、アンダースコア、ドット、ハイフンのみ)','Uploading file')[$lang]);
print "\n";
}
print "
\n";
}
if ($delete_en == 1 || $modify_en == 1){
print (('削除修正用個人パスワード(半角英数で)','Your password')[$lang]);
print "
\n";
print "
\n"; } &display_after_write; &write_comment; print ""; print "\n"; print "\n"; print "\n"; &htmltail; } ############################################################################# # Delete display mode ####################################################### # $delete_en = 0 の場合は直接$mbdel1をタイプして実行してください。 # 管理人のみ削除できることになります。 ############################################################################# sub mbdel1 { my @alldata = &getmbdata; @alldata = reverse(@alldata); my @findata = split(/,/,$alldata[0]); my $line = 200; my $finline; if ($#alldata < $line){ $finline=$#alldata; } else { $finline=$line-1; } my $titleprint=&titleprint("$thtitle $mbdeltitle","$mbdel_logo","$mbdel_style","$mbdel_color","$mbdel_size","$mbdel_face","$mbdel_sel","$mbdel_loc"); &htmlhead($mbdeltitle); print "$titleprint\n"; my @day_before = &get_before_data(@alldata); &disphead(0,$thtitle,@day_before); print "
","Delete the above message $withimage.
If OK, click the Delete button")[$lang]);
print "