#/usr/bin/perl #use CGI::Carp qw(fatalsToBrowser); #------------------------------------------ # FFXI Member Registration System # Version 0.52β2 (04/09/30) # script by seno 2002-2004 # webmaster@senobeya.com # 著作権表示は消すなとかしょうもないことは # 言わないのですヨ。好きにしてよし! #------------------------------------------ #壁紙画像サンプルは #フリー素材集 壁紙工房 Giggurat/Information #http://www.chaldea.ne.jp/atelier/ #のものを使用させていただいております。 #BBSPainterは #ば科学的愛情(http://www.geocities.co.jp/SiliconValley-SanJose/8609/) #のJAVAアプレットです。 # #各種サブルーチンファイル #keitai.pl 携帯対応ルーチン #master.pl マスターモード #table.pl 表出力ルーチン #設定類(0.5より各種の設定はsetup.cgiに移動しました) $ENV{'TZ'} = "JST-9"; # $lockdir=""; とすることで、ファイルロックをしません。 # ただしデータ消滅の危険度は飛躍的に高くなります。 # バックアップを取るなどの対応をしてください。 $lockdir="lock"; #バージョン番号。いじらないでネ。改造した場合は適当にどうぞ。 $version="Version 0.52β2"; #このスクリプトのなまえ。ファイル名を変更したときはここも変更してください。 $script="guildmember.cgi"; $script2="admin.cgi"; #設定ファイル読み出し require "setup.cgi"; #日本語らいぶらり require './jcode.pl'; $color[0]=$color0; $color[1]=$color1; $color[2]=$color2; $color[3]=$color3; $color[4]=$color4; $color[5]=$color5; $color[6]=$color6; $color[7]=$color7; $color[8]=$color8; $color[9]=$color9; $color[10]=$color10; #スキルランク $skillrank[0] ='D B-B B+A-A+B+B-_ _ B-B D D D _ C C+C-_ _ _ _ _ _ _ _ _ _ _ '; #戦 $skillrank[1] ='A+_ _ _ _ _ _ _ _ _ C+B _ _ E A-B+_ E _ _ _ _ _ _ _ _ _ _ _ '; #モ $skillrank[2] ='_ _ _ _ _ _ _ _ _ _ B+C+_ _ E _ E D _ A-A+C+C _ _ _ _ _ _ _ '; #白 $skillrank[3] ='_ D _ _ _ _ E _ _ _ C+B-_ _ D _ E _ _ _ _ E C+A+A-_ _ _ _ _ '; #黒 $skillrank[4] ='_ B B _ _ _ _ _ _ _ D _ D _ F _ D F E E C-B+A+C+E _ _ _ _ _ '; #赤 $skillrank[5] ='E A-D _ _ _ _ _ _ _ E _ C-C+D _ A+F A-_ _ _ _ _ _ _ _ _ _ _ '; #シ $skillrank[6] ='_ C-A+B _ _ _ E _ _ A-A-_ _ _ _ C A+C B+C D _ _ _ _ _ _ _ _ '; #ナ $skillrank[7] ='_ C B-A-B-B-A+_ _ _ C-_ _ E _ _ C _ E _ _ _ C B+A-_ _ _ _ _ '; #暗 $skillrank[8] ='_ B-D _ B-_ _ _ _ _ E _ A-A-C-_ E _ _ _ _ _ _ _ _ _ _ _ _ _ '; #狩 $skillrank[9] ='_ B-C-_ _ _ _ _ _ _ D C+_ _ E _ D _ E _ _ _ _ _ _ C C C _ _ '; #吟 $skillrank[10]='_ C+E _ A-_ B-_ _ _ D _ _ _ _ _ C E C-_ _ _ _ _ _ _ _ _ _ _ '; #獣 $skillrank[11]='_ E C-_ _ _ _ A+_ _ E B-_ _ _ _ C-_ C-_ _ _ _ _ _ _ _ _ _ _ '; #竜 $skillrank[12]='_ E _ _ _ _ _ _ _ _ C+B _ _ _ _ E _ _ _ _ _ _ _ _ _ _ _ _ A-'; #召 $skillrank[13]='E C+C _ _ _ _ _ A-C-E _ E C A-_ A-_ A-_ _ _ _ _ _ _ _ _ A-_ '; #忍 $skillrank[14]='_ E C+_ _ _ _ B-_ A+E _ C+_ C-_ B+_ A-_ _ _ _ _ _ _ _ _ _ _ '; #侍 #ミッション名(英語未対応) @pmlist=('','命の洗礼','楼閣の下に','母なる石','西への誘い','忘却の町','隔たれし信仰','とこしえに響く歌','誓いの雄叫び','龍王の導き','主のなき都','2つの道-瑠璃色の川','流転','累家の末流','ルーヴランスという者','2つの道-をとめの記憶','をかしき祖国','をかしき再会','をかしき旅立ち','戦慄き','神を名乗りて','よりしろ','猛き者たちよ','礼拝の意味','そしりを受けつつも','鍔音やむことなく','願わくば闇よ','みっつの道-汝の罪は','南方の伝説','名捨て人ふたり','なにゆえにその子は','永いお別れ','みっつの道-楽園を求めるは','螺旋','烙印ありて','礼賛者','羅針の示すもの','みっつの道-群れ立つ使者は','結び目','向かい風','迎え火','歌うは誰がため','ゐぬる場所','望むはあらゆる答え','畏れよ、我を','鎖と絆','闇に炎','眦決して'); @jmlist=('','新たなる世界','海賊の巣窟ノーグ','カザム族長','ウガレピ寺院','古代石碑巡礼','流砂洞を越えて','神託の間','デルクフの塔再び','ロ・メーヴ','聖地ジ・タ〜滅びの神殿','神々の間','ミスラとクリスタル','神の扉トゥー・リア','アーク・ガーディアン','閉ざされし門','宿星の座','1万年の夢の終わりに'); @smlist=('-','オークの斥候を倒せ','コウモリ退治','子供の救助','救助訓練','ダボイ調査報告','他国を回れ','ダボイ潜入計画','クリスタルの泉','ジュノ大使館へ赴任','魔晶石を奪え','廃墟フェ・イン','闇の王を討て!','ローテ王妃の遺言','龍王の眠る場所','教皇の威信','獣人兵器の秘密','成人の儀','聖剣探索','厚き壁','光の継承者','全ミッション終了'); @bmlist=('-','ツェールン鉱山からの報告','彼の名はシド','終わらぬ戦い','クリスタルライン','涸れ谷の怪物','バストゥークを離れて','四銃士','忘れられた鉱山にて','ジュノへ','魔晶石を奪え','闇、再び','ザルカバードに眠る真実','語り部現る!?','海賊たちの唄','完成品のイメージ','それぞれの行方','流砂の鎖','その記憶を紡ぐ者','最後の幻想','双刃の邂逅','全ミッション終了'); @wmlist=('-','ホルトト遺跡の大実験','カーディアンの心 ','平和のために','白き書','試験の行方','三大強国','それぞれの正義','星読み','新たなる旅立ち','魔晶石を奪え','最後の護符','最果てにて君を待つ闇','満月の泉','聖者の招待','第6の院','蘇る神々','ヴェイン','王と道化師','死者の人形','月詠み','全ミッション終了'); #keyword read if(!open(IN,"$keyfile")){$key_avail=0;} @keyword=; close IN; # # MAIN ROUTINEs # &form_read; $agent=$ENV{'HTTP_USER_AGENT'}; if( $agent =~ /J-PHONE/){ $ktai="on"; @user_agent = split(/\//,$ENV{'HTTP_USER_AGENT'}); if ($user_agent[1] >= 3) { $method="post"; } else { $method="get"; } } elsif( $agent =~ /DoCoMo/){ $ktai="on"; $method="post"; } elsif( $agent =~ /UP.Browser/){ #仮対応 $ktai="on"; $method="post"; } else { $brawser="PC"; # $method="post enctype='multipart/form-data' "; $method="post"; } if($function eq "rss"){ &rss_write; &header; &list; } if($ktai eq "on"){&keitai;} if($function eq $button[0]){ &set_cookie; &login; } elsif($function eq 'regist_word' && $key_avail == 1){ &set_cookie; ®ist_word; } elsif($function eq "new"){ &set_cookie; &header; &new_regist; } elsif($function eq $button[1]){ &set_cookie; &write_diary; } elsif($function eq "editdiary"){ &set_cookie; &edit_diary; } elsif($function eq "resdiary"){ &get_cookie; &res_diary; } elsif($function eq "faq"){ &header; &faq; } elsif($function eq "prof"){ &get_cookie; &c_check; $topic="Profile:$name -$topic"; &header; if($c_match){ &prof;} } elsif($function eq "master"){ &header; require("master.pl"); &master; } else { &get_cookie; &c_check; &header; &list; } &footer; # # SUB ROUTINE # # #単語登録 # sub regist_word{ if(!open(IN,"$datafile")){&header; &error_message('datafile error/system','data file access failed.');} @all=; close IN; $match=""; foreach $i(@all){ ($r_no,$r_name,$r_pass,$r_dummy)=split(/\t/,$i); if($r_name eq $name && $pass eq $r_pass){ $match=$i; } } if($match eq ""){&header; &error_message('id/pass error','access failed.');} if($mode ne "regist"){ &header; print <<"EOM";
キーワード追加

ワード追加(確認なしで激しく追加)
キーワード
ふりがな
説明
Go Top
進行状況

新規日記および日記修正時にキーワードに自動リンク

キーワードページにはヒストリが追加されます。
レスには非対応というかわざと対応してない。

今後の予\定
キーワード内容追加
ヒストリ件数制御

キーワードリスト
EOM foreach $i(@keyword){ ($km,$kno)=split(/\t/,$i); print "$km
"; } } else { #ワード登録 $maxno=$#keyword+2; push(@keyword,"$title\t$maxno\t\n"); if(!open(OUT,">$keyfile")){&header; &error_message('datafile error/system','data file access failed.');} print OUT @keyword; close OUT; $htmlfile="$keydir$maxno.html"; if(!open(OUT,">$htmlfile")){&header; &error_message('datafile error/system','data file access failed.');} print OUT << "EOM"; $guild_name Keyword-[ $title ]
$guild_name Keyword
$title ($comment)

$body

・このキーワードが使われた日記

Script by senobeya.com
FF11 Member Registraion System $version
EOM close OUT; chmod 0666,$htmlfile; &reload_header; print "
キーワード登録完了
"; print "新規キーワード[ $title ]を追加しました。自動的にトップページに戻ります
"; } } # #登録ユーザーログイン # sub login { if(!open(IN,"$datafile")){&header; &error_message('datafile error/system','data file access failed.');} @all=; close IN; $match=""; foreach $i(@all){ ($r_no,$r_name,$r_pass,$r_dummy)=split(/\t/,$i); if($r_name eq $name && $pass eq $r_pass){ $match=$i; } } if($match eq ""){&header; &error_message('id/pass error','access failed.');} if ($mode ne "modify"){ &login_enter; } else { &login_modify; } } # #新規登録 # sub new_regist{ if(($g_pass ne $reg_pass && $reg_mode==0)){&error_message('illegal login','password is not correct.');} if($mode eq "regist"){ &new_regist_regist; } else { &new_regist_normal; } } # #リスト表示 # sub list{ if(!open(IN,"$datafile")){&error_message('datafile error578','data file access failed.');} @all=; close IN; if($sort ne "" && $limit != 8){ &sort_table; } print "
"; $vmode="Mode: $modelist[$limit]"; if($limit==1){ if($level==1){ $vmode="$vmode / Level"; } else { $vmode="$vmode / Job"; } } print ""; &make_salt; print ""; print <<"EOM";
$guild_name Member List$vmode
$menux[3]$menux[1] / "; print "$menux[2] / "; for($j=0;$j<$#menu+1;$j++){ if($tablelevel[$j] eq ""){ $tablelevel[$j]=$level; } print "$menu[$j] "; } if($bbspage){print " / $menux[0]";} print "
Login : name pass EOM if(!$diaryallow){ print ""; } if($key_avail){ print ""; } print <<"EOM";
EOM if($reg_mode==0){print "";} print ""; print "

"; if(!open(IN,"message.tbl")){$osirase="no"} else { $osirase=; $osirase =~ s/\n//g; $osirase =~ s/\r//g; $osirasebody=; close IN; if($osirase ne "no" && $osirase ne ""){ print "
$osirase
$osirasebody
"; } } $members=$#all+1; if($language ne "English"){ print "\n"; } else { print "
現在の登録メンバー数:$members
\n"; } print "
Now Registed member:$members people"; if($level==1){ print ""; for($i=0;$i<$#color+1;$i++){ $ls=$i*10; $le=$i*10+9; print ""; } print ""; } else { print ""; } print "
 Lv$ls-$le   
 main job    support job 
"; require('table.pl'); $call=$tablelist[$limit]; if($c_match){&$call;} else { print 'No cookie or not match password.
Login first."';} print <<"EOM";
EOM } # #使い方表示 # sub faq { if($language ne "English"){ if($reg_mode == 0){ $message="あらかじめ設定されているマスターパスワードを下のフォームに入力し、"; } print <<"EOM";
使い方
メンバーの新規登録
 メンバーの新規登録には$message新規登録ボタンを押します。
 新規登録モードに入りますので、次に新規メンバーの名前、パスワード他のデータを入れる画面が出てくるので、  必要事項を入力してください。
 ここで入れるパスワードは、そのメンバー専用のパスワードとなります。

メンバーのデータ修正
 メンバーは登録したnameとパスワードを入れることでそのデータを随時修正することができます。
 必要なデータを入力して、修正ボタンを押してください。

メンバーの削除
 マスターモードを用いて行います。

閲覧方法
タイトル右上に表\示モードが出ています。

表\のモード
Simple:表\示内容を制限したもので表\示します。
Job /Job:ジョブ情報の表\示。メイン・サポートのジョブの背景色が変わります
Job /Level:ジョブ情報の表\示。レベルによって色分けされた背景色となります
Production:生産スキルに関する情報を表\示します
Status:その他さまざまな情報を表\示します
Full:一覧性の高い表\で登録内容を表\示します。
Full2:プロフィールを除く登録内容を表\示します。
Profile:プロフィールと日記の閲覧モードです

プロフィールと日記
名前をクリックするとプロフィールを閲覧することができます。日記アイコン()が出ている場合は、その人の日記も閲覧できます。
UPアイコン()が出ている場合は24時間以内に日記が更新された事を示します。
EOM if($diaryres ==1){print "日記の下にコメントをつけることが可能\になっています。
";} print "
[登録システム入り口][使い方][ホームページへ戻る]
"; } else { print "English version is not available.
"; } } # #汎用サブルーチン。使いまわし&パクり。そしてだんだんと汎用でなくなってくるという様子 # sub form_read { #if ($ENV{'REQUEST_METHOD'} eq "POST") { @upfiles = (); if ($ENV{'REQUEST_METHOD'} eq "POST" && $ENV{'CONTENT_TYPE'} =~ m#^multipart/form-data#) { $buffer1 = ""; $qs = ""; $buffer2 = $ENV{'CONTENT_LENGTH'}; binmode(STDIN); while ($buffer2) { $buffer2 -= sysread(STDIN, $buffer1, $buffer2); $qs .= $buffer1; } $delimita = $1 if $qs =~ /^([^\r\n]*)/; foreach (split(/$delimita/,$qs)){ if ($_ =~ / name=\"(\w*)\"\r\n/){ $key = $1; } elsif ($_ =~ / name=\"(\w*)\"; filename=\"(.+)\"\r\n/i){ ($key,$upfile)=($1,$2); $upct = $1 if $_ =~ /Content-Type: ?(.*)\r\n/i; }else{ next; } $value = (split(/\r\n\r\n/,$_,2))[1]; $value =~ s/\r\n$//g; if ($key =~ /^upfile[1-9]*/ && $upfile ne ""){ push(@upfiles, $upfile); $upfile{$upfile} = $value; $upct{$upfile} = lc($upct); if($key eq "upfile"){ $in{'upfile'}=$value; $in{'upfilename'}=$upfile; $in{'upct'}=lc($upct); } } else { &jcode::convert(\$value,'sjis'); $value =~ s//>/g; $value =~ s/\t//g; $value =~ s/\r\n/
/g; $value =~ s/\n/
/g; $value =~ s/\r/
/g; # $value =~ s/\,//g; # $value =~ s/'/’/g; $FORM{$key} = $value; } } } else { #$buffer = $ENV{'QUERY_STRING'}; if($ENV{'REQUEST_METHOD'} eq 'GET' || $ENV{'REQUEST_METHOD'} eq 'HEAD') { $buffer = $ENV{'QUERY_STRING'}; } elsif ($ENV{'REQUEST_METHOD'} eq 'POST') { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); } @pairs = split(/&/,$buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; &jcode'convert(*value,'sjis'); $value =~ s//>/g; $value =~ s/\n//g; $value =~ s/\t//g; $value =~ s/\r/
/g; # $value =~ s/\,//g; $FORM{$name} = $value; } } $no=$FORM{'no'}; $name=$FORM{'name'}; $name2=$FORM{'name2'}; $pass=$FORM{'pass'}; $g_pass=$FORM{'g_pass'}; $function=$FORM{'function'}; $mode=$FORM{'mode'}; $all=$FORM{'all'}; $anon=$FORM{'anon'}; $race=$FORM{'race'}; $relm=$FORM{'relm'}; $mainjob=$FORM{'mainjob'}; $supportjob=$FORM{'supportjob'}; $lev[0]=$FORM{'lev0'}; $lev[1]=$FORM{'lev1'}; $lev[2]=$FORM{'lev2'}; $lev[3]=$FORM{'lev3'}; $lev[4]=$FORM{'lev4'}; $lev[5]=$FORM{'lev5'}; $lev[6]=$FORM{'lev6'}; $lev[7]=$FORM{'lev7'}; $lev[8]=$FORM{'lev8'}; $lev[9]=$FORM{'lev9'}; $lev[10]=$FORM{'lev10'}; $lev[11]=$FORM{'lev11'}; $lev[12]=$FORM{'lev12'}; $lev[13]=$FORM{'lev13'}; $lev[14]=$FORM{'lev14'}; $lev[15]=$FORM{'lev15'}; $lev[16]=$FORM{'lev16'}; $prod[0]="$FORM{'prod0'}"; $prod[1]="$FORM{'prod1'}"; $prod[2]="$FORM{'prod2'}"; $prod[3]="$FORM{'prod3'}"; $prod[4]="$FORM{'prod4'}"; $prod[5]="$FORM{'prod5'}"; $prod[6]="$FORM{'prod6'}"; $prod[7]="$FORM{'prod7'}"; $prod[8]="$FORM{'prod8'}"; $prod[9]="$FORM{'prod9'}"; #&conv_zenkaku; for ($j=0;$j<10;$j++){ $prod_r[$j]=$FORM{"prod_r$j"}; } $etc[1]=join(",", @prod_r); for ($j=0;$j<$#skilllist+1;$j++){ $skill[$j]=$FORM{"skill$j"}; } $etc[2]=join(",", @skill); for ($j=0;$j<12;$j++){ $mission[$j]=$FORM{"mission$j"}; } $prod[15]=join(",", @mission); #進行度フラグに転用 $ietc=$FORM{'ietc'}; $etc1=$FORM{'etc1'}; $mrank=$FORM{'mrank'}; $prof=$FORM{'prof'}; $handle=$FORM{'handle'}; $polhn=$FORM{'polhn'}; $mail=$FORM{'mail'}; $home=$FORM{'home'}; $comment2=$FORM{'comment2'}; $point=$FORM{'point'}; $class=$FORM{'class'}; $comment=$FORM{'comment'}; $sort=$FORM{'sort'}; $level=$FORM{'level'}; $limit=$FORM{'limit'}; $body=$FORM{'body'}; $body2=$FORM{'body2'}; $title=$FORM{'title'}; $page=$FORM{'page'}; $ktai=$FORM{'ktai'}; $etc[0]=$FORM{'ftype'}; if($page eq ""){$page=1;} if($level eq "" ){$level=$level_mode;} if($limit eq ""){$limit=$limit_table;} $ln=$FORM{'ln'}; if($ln ne ""){$language=$ln;} ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); @wday_array = ('日','月','火','水','木','金','土'); $mon++; $year=$year-100; if($year<10){ $year="0$year"; } if($mon<10){ $mon="0$mon"; } if($mday<10){ $mday="0$mday"; } if($hour<10){ $hour="0$hour"; } if($min<10){ $min="0$min"; } $timenow="$year/$mon/$mday/$hour$min"; $today = "$mon/$mday"; $today2= "$year/$mon/$mday $hour:$min"; } ################# #-- 以下スキル表示機能で追加した部分 # ============================================================================= # # スキルキャップ計算 # ============================================================================= # # スキルキャップを計算する # 引数0 ジョブ # 引数1 スキル # 引数2 レベル # $skill_rank <- スキルランク # $skill_cap <- スキルキャップ # add by Pensil # 2003.03.02 Modified by Hally sub expr_skillcap { # ランクをチェック $skill_rank = substr( $skillrank[$_[0]], ($_[1]) * 2, 1 ); $skill_detail = substr( $skillrank[$_[0]], ($_[1]) * 2, 2 ); if ($skill_rank eq "_") { $skill_cap = 0; } else { # -50 if ($_[2] < 51) { if ($skill_rank eq "A") { $skill_cap = ($_[2] - 1) * 3.0 + 6; } if ($skill_rank eq "B") { $skill_cap = ($_[2] - 1) * 2.9 + 5; } if ($skill_rank eq "C") { $skill_cap = ($_[2] - 1) * 2.8 + 5; } if ($skill_rank eq "D") { $skill_cap = ($_[2] - 1) * 2.7 + 4; } if ($skill_rank eq "E") { $skill_cap = ($_[2] - 1) * 2.5 + 4; } if ($skill_rank eq "F") { $skill_cap = ($_[2] - 1) * 2.3 + 4; } # -60 } elsif ($_[2] < 61) { if ($skill_rank eq "A") { $skill_cap = ($_[2] - 50) * 5.0 + 153; } if ($skill_rank eq "B") { $skill_cap = ($_[2] - 50) * 4.9 + 147; } if ($skill_rank eq "C") { $skill_cap = ($_[2] - 50) * 4.8 + 142; } if ($skill_rank eq "D") { $skill_cap = ($_[2] - 50) * 4.7 + 136; } if ($skill_rank eq "E") { $skill_cap = ($_[2] - 50) * 4.5 + 126; } if ($skill_rank eq "F") { $skill_cap = ($_[2] - 50) * 4.3 + 116; } # -70 } elsif ($_[2] < 71) { if ($skill_detail eq "A+") { $skill_cap = ($_[2] - 60) * 4.85 + 203; } if ($skill_detail eq "A-") { $skill_cap = ($_[2] - 60) * 4.10 + 203; } if ($skill_detail eq "B+") { $skill_cap = ($_[2] - 60) * 3.70 + 196; } if ($skill_detail eq "B ") { $skill_cap = ($_[2] - 60) * 3.23 + 196; } if ($skill_detail eq "B-") { $skill_cap = ($_[2] - 60) * 2.70 + 196; } if ($skill_detail eq "C+") { $skill_cap = ($_[2] - 60) * 2.50 + 190; } if ($skill_detail eq "C ") { $skill_cap = ($_[2] - 60) * 2.25 + 190; } if ($skill_detail eq "C-") { $skill_cap = ($_[2] - 60) * 2.00 + 190; } if ($skill_rank eq "D" ) { $skill_cap = ($_[2] - 60) * 1.85 + 183; } if ($skill_rank eq "E" ) { $skill_cap = ($_[2] - 60) * 1.95 + 171; } if ($skill_rank eq "F" ) { $skill_cap = ($_[2] - 60) * 2.00 + 159; } # -75 } elsif ($_[2] < 76) { if ($skill_detail eq "A+") { $skill_cap = ($_[2] - 70) * 5.00 + 251; } if ($skill_detail eq "A-") { $skill_cap = ($_[2] - 70) * 5.00 + 244; } if ($skill_detail eq "B+") { $skill_cap = ($_[2] - 70) * 4.60 + 233; } if ($skill_detail eq "B ") { $skill_cap = ($_[2] - 70) * 4.40 + 228; } if ($skill_detail eq "B-") { $skill_cap = ($_[2] - 70) * 3.40 + 223; } if ($skill_detail eq "C+") { $skill_cap = ($_[2] - 70) * 3.00 + 215; } if ($skill_detail eq "C ") { $skill_cap = ($_[2] - 70) * 2.60 + 212; } if ($skill_detail eq "C-") { $skill_cap = ($_[2] - 70) * 2.00 + 210; } if ($skill_rank eq "D" ) { $skill_cap = ($_[2] - 70) * 1.85 + 201; } if ($skill_rank eq "E" ) { $skill_cap = ($_[2] - 70) * 1.99 + 190; } if ($skill_rank eq "F" ) { $skill_cap = ($_[2] - 70) * 2.00 + 179; } } $skill_cap = int($skill_cap); } $_ = $skill_cap; #print "($_[0],$_[1],$_[2],$skill_rank,$skill_detail,$skill_cap)"; } #必要経験値を計算する # 引数0 レベル # add by Pensil sub expr_needexp { local($lv) = @_; if ($lv < 1) { $_ = 0; } elsif ($lv < 8) { $_ = $lv * 250 + 250; } elsif ($lv < 23) { $_ = $lv * 200 + 600; } elsif ($lv < 51) { $_ = $lv * 100 + 2800; } elsif ($lv == 51 ) { $_ = 10000; } elsif ($lv == 52 ) { $_ = 11000; } elsif ($lv == 53 ) { $_ = 13000; } elsif ($lv == 54 ) { $_ = 16000; } elsif ($lv < 61 ) { $_ = 20000; } else { $_ = ($lv - 61) * 1000 + 30000; } } #これまでの獲得経験値を計算する # 引数0 レベル # add by Pensil sub expr_exp { $lv = $_[0]; if ($lv < 2) { $_ = 0; } else { $lv = $lv -1; if ($lv < 8) { $_ = 125.0 * ($lv * $lv + $lv * 3); } elsif ($lv < 23) { $_ = 100.0 * $lv * $lv + 700.0 * $lv - 1050.0; } elsif ($lv < 51) { $_ = 50.0 * $lv * $lv + 2850.0 * $lv - 24150.0; } elsif ($lv == 51 ) { $_ = 253350.0; } elsif ($lv == 52 ) { $_ = 264350.0; } elsif ($lv == 53 ) { $_ = 277350.0; } elsif ($lv == 54 ) { $_ = 293350.0; } elsif ($lv < 61 ) { $_ = 20000.0 * $lv - 786650.0; } else { $_ = 500.0 * $lv * $lv - 30500.0 * $lv + 443350.0; } } } sub writehist { local($histtype,$histdata) = @_; @outhist = (); push(@outhist, "$histtype\t$timenow\t$ENV{REMOTE_ADDR}\t$histdata"); if(!open(OUT,">>$historyfile")){&header; &error_message('datafile error726','history file access failed.');} print OUT @outhist; close OUT; } #-- スキル表示機能で追加した部分ここまで ################# sub header { print "Content-type: text/html\n\n"; print "$topic\n"; if($language ne "English"){ print ''; } else { print ''; } print '\n"; if($bgimg eq ""){ print "\n\n"; } else { print "\n\n"; } } sub reload_header { print "Content-type: text/html\n\n"; print "$topic\n"; if($language ne "English"){ print ''; } else { print ''; } print ""; print '"; print "\n\n"; } sub reload_header2 { print "Content-type: text/html\n\n"; print "$topic\n"; if($language ne "English"){ print ''; } else { print ''; } print ""; print '"; print "\n\n"; } sub footer { print "
"; if($language ne "English"){ print "
Script by senobeya.com
\n"; } else { print "\n"; } print "
FF11 Member Registraion System $version
\n"; if($iconurl ne ""){ print "
Icon by $iconhp
\n"; } print "
Copyright (C) 2002-2004 SQUARE ENIX CO., LTD. All Rights Reserved.
\n"; print ""; } sub error_message { print "

$_[0]

\n"; print "

$_[1]

\n"; if($language ne "English"){ print "ブラウザの[戻る]ボタンを押して前の画面に移動してください.

\n"; } else { print "Push [back]button to move former page.

\n"; } &footer; exit; } sub get_cookie { @pairs = split(/\;/,$ENV{'HTTP_COOKIE'}); foreach $pair (@pairs) { local($name, $value) = split(/\=/, $pair); $name =~ s/ //g; $DUMMY{$name} = $value; } @pairs = split(/\,/,$DUMMY{'BODD'}); foreach $pair (@pairs) { local($name, $value) = split(/\:/, $pair); $COOKIE{$name} = $value; } $c_name = $COOKIE{'name'}; $c_pass = $COOKIE{'pass'}; } sub set_cookie { ($secg,$ming,$hourg,$mdayg,$mong,$yearg,$wdayg,$ydayg,$isdstg) = gmtime(time + 60*24*60*60); $yearg += 1900; if ($secg < 10) { $secg = "0$secg"; } if ($ming < 10) { $ming = "0$ming"; } if ($hourg < 10) { $hourg = "0$hourg"; } if ($mdayg < 10) { $mdayg = "0$mdayg"; } $mong = ('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep', 'Oct','Nov','Dec') [$mong]; $youbi = ('Sunday','Monday','Tuesday','Wednesday','Thursday', 'Friday','Saturday') [$wdayg]; $date_gmt = "$youbi, $mdayg\-$mong\-$yearg $hourg:$ming:$secg GMT"; $ENV{'TZ'} = "JST-9"; ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); @wday_array = ('日','月','火','水','木','金','土'); $mon++; $year=$year-100; if($year<10){ $year="0$year"; } if($mon<10){ $mon="0$mon"; } if($mday<10){ $mday="0$mday"; } if($hour<10){ $hour="0$hour"; } if($min<10){ $min="0$min"; } $timenow="$year/$mon/$mday/$hour$min"; $rsstime="20$year-$mon-$mday"."T$hour:$min:00+09:00"; $cook="name\:$name\,pass\:$pass"; print "Set-Cookie: BODD=$cook; expires=$date_gmt\n"; } sub sort_table { $sort=$sort/1; @temp=(); foreach $i (@all){ ($t[0],$t[1],$t[2],$t[3],$t[4],$t[5],$t[6],$t[7],$t[8],$t[9],$t[10],$t[11],$t[12],$t[13],$t[14],$t[15],$t[16],$t[17],$t[18],$t[19],$t[20],$t[21],$t[22],$t[23],$t[24],$t[25],$t[26],$t[27],$t[28],$t[29],$t[30],$t[31],$t[32],$t[33],$t[34],$t[35],$t[36],$t[37],$t[38],$t[39],$t[40],$t[41],$t[42],$t[43],$t[44],$t[45],$t[46],$t[47],$t[48],$t[49],$t[50],$t[51],$t[52],$t[53])=split(/\t/,$i); #for($j=38;$j<$job_max+38;$j++){ # if($t[$j]<10){$t[$j]="0$t[$j]";} #} #for($j=22;$j<$prod_max+22;$j++){ # if($t[$j]<10){$t[$j]="0$t[$j]";} #} for($j=38;$j<$job_max+38;$j++){ $t[$j]=sprintf("%3d",$t[$j]); } for($j=22;$j<$prod_max+22;$j++){ $t[$j]=sprintf("%3d",$t[$j]); } $t_temp=$t[0]; $t[0]=$t[$sort]; $t[$sort]=$t_temp; push(@temp,"$t[0]\t$t[1]\t$t[2]\t$t[3]\t$t[4]\t$t[5]\t$t[6]\t$t[7]\t$t[8]\t$t[9]\t$t[10]\t$t[11]\t$t[12]\t$t[13]\t$t[14]\t$t[15]\t$t[16]\t$t[17]\t$t[18]\t$t[19]\t$t[20]\t$t[21]\t$t[22]\t$t[23]\t$t[24]\t$t[25]\t$t[26]\t$t[27]\t$t[28]\t$t[29]\t$t[30]\t$t[31]\t$t[32]\t$t[33]\t$t[34]\t$t[35]\t$t[36]\t$t[37]\t$t[38]\t$t[39]\t$t[40]\t$t[41]\t$t[42]\t$t[43]\t$t[44]\t$t[45]\t$t[46]\t$t[47]\t$t[48]\t$t[49]\t$t[50]\t$t[51]\t$t[52]\t$t[53]\t\n"); } @temp=sort(@temp); if($mode eq "r"){ @temp=reverse(@temp); } @all=(); foreach $i (@temp){ ($t[0],$t[1],$t[2],$t[3],$t[4],$t[5],$t[6],$t[7],$t[8],$t[9],$t[10],$t[11],$t[12],$t[13],$t[14],$t[15],$t[16],$t[17],$t[18],$t[19],$t[20],$t[21],$t[22],$t[23],$t[24],$t[25],$t[26],$t[27],$t[28],$t[29],$t[30],$t[31],$t[32],$t[33],$t[34],$t[35],$t[36],$t[37],$t[38],$t[39],$t[40],$t[41],$t[42],$t[43],$t[44],$t[45],$t[46],$t[47],$t[48],$t[49],$t[50],$t[51],$t[52],$t[53])=split(/\t/,$i); $t_temp=$t[0]; $t[0]=$t[$sort]; $t[$sort]=$t_temp; for($j=38;$j<$job_max+38;$j++){ $t[$j]=$t[$j]/1; } for($j=22;$j<$prod_max+22;$j++){ $t[$j]=$t[$j]/1; } push(@all,"$t[0]\t$t[1]\t$t[2]\t$t[3]\t$t[4]\t$t[5]\t$t[6]\t$t[7]\t$t[8]\t$t[9]\t$t[10]\t$t[11]\t$t[12]\t$t[13]\t$t[14]\t$t[15]\t$t[16]\t$t[17]\t$t[18]\t$t[19]\t$t[20]\t$t[21]\t$t[22]\t$t[23]\t$t[24]\t$t[25]\t$t[26]\t$t[27]\t$t[28]\t$t[29]\t$t[30]\t$t[31]\t$t[32]\t$t[33]\t$t[34]\t$t[35]\t$t[36]\t$t[37]\t$t[38]\t$t[39]\t$t[40]\t$t[41]\t$t[42]\t$t[43]\t$t[44]\t$t[45]\t$t[46]\t$t[47]\t$t[48]\t$t[49]\t$t[50]\t$t[51]\t$t[52]\t$t[53]\t\n"); } } sub new_regist_regist { if(!open(IN,"$datafile")){&error_message('datafile error1791','data file access failed.');} @all=; close IN; if( !($pass =~ /^[A-Za-z0-9_]+$/) ){ if($language ne "English"){ &error_message('そのパスワードは登録に利用できません。','パスワードは半角英数字で登録してください。'); } else { &error_message('That password is unsuitable.','Password must use a-z and 0-9 letters.'); } } if( !($name =~ /^[A-Za-z0-9_]+$/) ){ if($language ne "English"){ &error_message('その名前は使えません。','名前は半角英数字で登録してください。'); } else { &error_message('That name is unsuitable.','Name must use a-z and 0-9 letters.'); } } if($language ne "English"){ if($mainjob == $supportjob){&error_message('main/job error','メインとサポートは同一のジョブにはできません');} } else { if($mainjob == $supportjob){&error_message('main/job error',"Support job can not set as main's one.");} } $min_no=0; foreach $i (@all){ ($r_no,$r_user,$dummy)=split(/\t/,$i); if($r_user eq $name){&error_message('already registed',"'$name' has already registed.");} } $no=$#all+2; if($no<10){$no="0$no";} if($no<100){$no="0$no";} push(@all,"$no\t$name\t$pass\t$anon\t$race\t$relm\t$mainjob\t$supportjob\t$prof\t$handle\t$polhn\t$mail\t$home\t$comment2\t$point\t$class\t$timenow\t$comment\t$mrank\t$etc[0]\t$etc[1]\t$etc[2]\t$prod[0]\t$prod[1]\t$prod[2]\t$prod[3]\t$prod[4]\t$prod[5]\t$prod[6]\t$prod[7]\t$prod[8]\t$prod[9]\t$prod[10]\t$prod[11]\t$prod[12]\t$prod[13]\t$prod[14]\t$prod[15]\t$lev[0]\t$lev[1]\t$lev[2]\t$lev[3]\t$lev[4]\t$lev[5]\t$lev[6]\t$lev[7]\t$lev[8]\t$lev[9]\t$lev[10]\t$lev[11]\t$lev[12]\t$lev[13]\t$lev[14]\t$lev[15]\t\n"); &dirlock; if(!open(OUT,">$datafile")){&error_message('datafile error1819','data file access failed.');} print OUT @all; close OUT; rmdir($lockdir); if($language ne "English"){ print "新規メンバー'$name'($no)の登録を完了しました。"; print "


[登録システム入り口][使い方][ホームページへ戻る]
"; } else { print "New Member '$name'($no) is registed."; print "
[Entrance][usage][Back to Homepage]
"; } } sub new_regist_normal { if($language ne "English"){ print "
新規メンバー登録
\n新規メンバーを登録します。必要事項を入力してください。\n"; } else { print "
New Member Regist
\nFor registration, fill your information.\n"; } print <<"EOM"; EOM if($class_edit){ print "\n"; } else { print ""; } print <<"EOM"; EOM print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; for($i=0;$i<$job_max;$i++){ print "\n"; } for($i=0;$i<$prod_max;$i++){ print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; $comment2 =~ s/
/\r/g; print "\n"; if($language ne "English"){ print "\n
$field[0]
$field[1]
$field[2]
$field[3]
$field[4]
$field[5] ($field[18])
$field[6]
$field[7]
$field[8]
$joblist[$i]
$prodlist[$i]"; print "
$field[9]
$field[10]
$field[11]

$field[12]
$field[13]
$field[14]
$field[15]
$field[16]
$field[17]
"; print "
[登録システム入り口][使い方][ホームページへ戻る]
"; } else { print "\n"; print "
[Entrance][Usage][Back to homepage]
"; } } sub login_enter { # $match =~ s/'/\\'/g; $match =~ s/"/"/g; ($no,$name,$pass,$anon,$race,$relm,$mainjob,$supportjob,$prof,$handle,$polhn,$mail,$home,$comment2,$point,$class,$time,$comment,$mrank,$etc[0],$etc[1],$etc[2],$prod[0],$prod[1],$prod[2],$prod[3],$prod[4],$prod[5],$prod[6],$prod[7],$prod[8],$prod[9],$prod[10],$prod[11],$prod[12],$prod[13],$prod[14],$prod[15],$lev[0],$lev[1],$lev[2],$lev[3],$lev[4],$lev[5],$lev[6],$lev[7],$lev[8],$lev[9],$lev[10],$lev[11],$lev[12],$lev[13],$lev[14],$lev[15])=split(/\t/,$match); &header; @prod_r = split(/,/,$etc[1]); if($language ne "English"){ print "
登録データ修正
"; print "MemberList Top
"; print "No. $no : '$name' さんのデータを修正します。
\n"; } else { print "
Modify Registed information
"; print "MemberList Top
"; print "Modyfying No. $no : '$name' information.
\n"; } print "\n"; if($class_edit){ print "\n"; } else { print "\n"; } print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; for($i=0;$i<$job_max;$i++){ print "\n"; } for($i=0;$i<$prod_max;$i++){ print "\n"; } ####ミッション進行度フラグ #pm,jm,sm,bm,wm,ds,db,dw,dj,df,dx @mission = split(/,/,$prod[15]); print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; ####ミッション進行度ここまで ############## #-- 以下スキル表示機能で追加した部分 @skill = split(/,/,$etc[2]); if ($skill_visible) { if($language ne "English"){ print "
$field[0]
$field[3]
$field[4]
$field[5] ($field[18])
$field[6]
$field[7]
$field[8]
$joblist[$i]
$prodlist[$i]\n"; print "
プロマシア "; print "
ジラート"; print "
サンドリア"; print "
バストゥーク"; print "
ウインダス"; print "
デュナミスーサンドリア"; print "
デュナミスーバストゥーク"; print "
デュナミスーウインダス"; print "
デュナミスージュノ"; print "
デュナミスーボスディン"; print "
デュナミスーザルカバード"; print "
※各スキルの入力は任意です。記録を希望されるときだけご利用ください
"; } else { print "\n"; print "\n"; } #-- スキル表示機能で追加した部分ここまで ############## print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; $comment2 =~ s/
/\r/g; print "\n"; print "\n"; print "\n"; if(!$diaryallow){ print ""; print ""; if($language ne "English"){ print "\n"; } else { print "\n"; } if($oekaki ==1){ if($language ne "English"){ $temp='お絵描き日記'; } else { $temp='Paint Diary'; } print "\n"; } } if($language ne "English"){ print "\n"; print "\n"; } else { print "\n"; print "\n"; } print "
This 'Skill Information Form' is optional.
"; } for($i=0;$i<15;$i++){ print "\n"; } print ""; for($i=0;$i<15;$i++){ print "\n"; } print "
$skilllist[$i]
\n"; for($i=15;$i<$#skilllist+1;$i++){ print "\n"; } print ""; for($i=15;$i<$#skilllist+1;$i++){ print "\n"; } print "
$skilllist[$i]
$field[9]
$field[10]
$field[11]

$field[12]
$field[13]
$field[14]
$field[15]
$field[16]
$field[17]

新しい日記を書く
Write New Diary
"; print ""; print "
日記を修正・削除する記事番号
Modify or Delete ArticleArticle Number
\n"; } sub login_modify{ if($language ne "English"){ if($mainjob == $supportjob){&error_message('main/job error','メインとサポートは同一のジョブにはできません');} } else { if($mainjob == $supportjob){&error_message('main/job error',"Support job can not set as main's one.");} } &dirlock; if(!open(IN,"$datafile")){&error_message('datafile error2034','data file access failed.');} @all=; close IN; @out=(); foreach $i(@all){ ($r_no,$r_name,$r_pass,$r_dummy)=split(/\t/,$i); if($r_name eq $name && $pass eq $r_pass){ push(@out,"$r_no\t$name\t$pass\t$anon\t$race\t$relm\t$mainjob\t$supportjob\t$prof\t$handle\t$polhn\t$mail\t$home\t$comment2\t$point\t$class\t$timenow\t$comment\t$mrank\t$etc[0]\t$etc[1]\t$etc[2]\t$prod[0]\t$prod[1]\t$prod[2]\t$prod[3]\t$prod[4]\t$prod[5]\t$prod[6]\t$prod[7]\t$prod[8]\t$prod[9]\t$prod[10]\t$prod[11]\t$prod[12]\t$prod[13]\t$prod[14]\t$prod[15]\t$lev[0]\t$lev[1]\t$lev[2]\t$lev[3]\t$lev[4]\t$lev[5]\t$lev[6]\t$lev[7]\t$lev[8]\t$lev[9]\t$lev[10]\t$lev[11]\t$lev[12]\t$lev[13]\t$lev[14]\t$lev[15]\t\n"); } else { push(@out,$i); } } if(!open(OUT,">$datafile")){&header; &error_message('datafile error2048','data file access failed.');} print OUT @out; close OUT; rmdir($lockdir); &reload_header; if($language ne "English"){ print "
修正終了
"; print "修正を行いました。自動的にトップページへ戻ります。
"; } else { print "
Information modified
"; print "Automatically move top page.
"; } } sub prof { print "
"; print ""; &make_salt; print ""; print <<"EOM";
$guild_name Member ListProfile : $name
$menux[3]$menux[1] / "; print "$menux[2] / "; print "$menux[4] / "; if($bbspage){print " $menux[0]";} print "
Login : name pass EOM if(!$diaryallow){print "";} if($key_avail){ print ""; } print <<"EOM";
EOM if($reg_mode==0){print "";} print ""; print "

"; if(!open(IN,"$datafile")){&error_message('datafile error2098','data file access failed.');} @all=; close IN; $match=""; foreach $i(@all){ ($r_no,$r_name,$r_pass,$r_dummy)=split(/\t/,$i); if($r_name eq $name){ $match=$i; } } if($match eq ""){&header; &error_message('id/pass error','access failed.');} ($no,$name,$pass,$anon,$race,$relm,$mainjob,$supportjob,$prof,$handle,$polhn,$mail,$home,$comment2,$point,$class,$time,$comment,$mrank,$etc[0],$etc[1],$etc[2],$prod[0],$prod[1],$prod[2],$prod[3],$prod[4],$prod[5],$prod[6],$prod[7],$prod[8],$prod[9],$prod[10],$prod[11],$prod[12],$prod[13],$prod[14],$prod[15],$lev[0],$lev[1],$lev[2],$lev[3],$lev[4],$lev[5],$lev[6],$lev[7],$lev[8],$lev[9],$lev[10],$lev[11],$lev[12],$lev[13],$lev[14],$lev[15])=split(/\t/,$match); @prod_r = split(/,/,$etc[1]); if($anon ne "on"){ if($class_edit==0){ $class =~ s/<//g; } if($job_max>$prod_max){ $maxcell=$job_max; } else { $maxcell=$prod_max; } print ""; for ($j=0;$j<$maxcell;$j++){ $jn=$j+38; if($j<$job_max){ print ""; } else { print ""; } } print ""; for ($j=0;$j<$maxcell;$j++){ $jn=$j+22; if($j<$prod_max){ print ""; } elsif ($j == $prod_max) { print ""; } } print ""; print ""; if($name eq $c_name){$bgn=" bgcolor=$mydata";} else {$bgn=" bgcolor=$otherdata";} if($class eq ""){$class=" ";} if($point eq ""){$point=0;} print ""; if(($anon ne "on") || ($anon_mode != 1 )){ if($lev[$mainjob]<10){ $main_level="0$lev[$mainjob]"; } else { $main_level=$lev[$mainjob]; } if($supportjob <99){ $mod_level=int($lev[$mainjob]/2); if($mod_level==0){$mod_level=1;} if($mod_level>$lev[$supportjob]){$mod_level=$lev[$supportjob];} if($mod_level<10){ $mod_level="0$mod_level"; } print ""; } else { print ""; } $totalexp = 0; for ($j=0;$j<$maxcell;$j++){ $bg=""; if($j<$job_max){ $totalexp += expr_exp($lev[$j]); if($level ==1){ $bg=" bgcolor=$color[int($lev[$j]/10)]"; } else { if($j == $mainjob){$bg=" bgcolor=$maincolor";} if($j == $supportjob){$bg=" bgcolor=$supportcolor";} } print "$lev[$j]"; } else { print ""; } } } else { for ($j=0;$j<$maxcell+1;$j++){ print""; } } $date=substr($time,0,8); print ""; if(($anon ne "on") || ($anon_mode != 1 )){ for ($j=0;$j<$maxcell;$j++){ if($j<$prod_max){ $bg=" bgcolor=$color[$prod_r[$j]]"; print "$prod[$j]"; } elsif ($j == $prod_max) { print ""; } } } else { for ($j=0;$j<$maxcell+1;$j++){ print""; } } print ""; print ""; print "
$index[0]$index[1]$index[2]$index[3]$index[4]$index[5]$index[6]$index[7]$joblist[$j]
$prodlist[$j]Main NextTotal Exp.
$index[9]
$no$class$name"; if($iconuse eq "yes"){ print ""; } else { print "$racelist[$race]"; } print "$relmlist[$relm]$point$mrank$joblist[$mainjob]$main_level/$joblist[$supportjob]$mod_level$joblist[$mainjob]$main_level -
".expr_needexp($lev[$mainjob])." ".$totalexp." -
$comment
"; ################# #-- 以下、スキル表示機能で追加した部分 if ($skill_visible) { @skill = split(/,/,$etc[2]); for ($j=0;$j<$#skilllist+1;$j++){ $skillmax[$j] = -1; for ($k=0;$k<$job_max;$k++){ if (int($lev[$k]) > 0) { $askill = expr_skillcap($k, $j, $lev[$k]); if ($askill > $skillmax[$j]) { $skillmax[$j] = $askill; $skillmaxjob[$j] = $k; } } } } if ($FORM{'skilldetail'} eq "") { print ""; for ($j=0;$j<$#skilllist+1;$j++){ print ""; } print ""; print ""; for ($j=0;$j<$#skilllist+1;$j++){ if ($skillmax[$j] > int($skill[$j])) { print ""; } else { print ""; } } print ""; print ""; for ($j=0;$j<$#skilllist+1;$j++){ print ""; } print ""; print ""; for ($j=0;$j<$#skilllist+1;$j++){ print ""; } if($language ne "English"){ print "
$skilllist[$j]
Now$skill[$j]$skill[$j]
Cap"; print $skillmax[$j]; print "
Job"; print $joblist[$skillmaxjob[$j]]; print "
ジョブごとの詳細キャップを表\示する。
"; } else { print "
Show skill limit detail
";} } elsif ($FORM{'skilldetail'} eq "true") { print ""; for ($j=0;$j<$#skilllist+1;$j++){ print ""; } print ""; print ""; for ($j=0;$j<$#skilllist+1;$j++){ if ($skillmax[$j] > int($skill[$j])) { print ""; } else { print ""; } } print ""; for ($k=0;$k<$job_max;$k++){ if (int($lev[$k]) > 0) { print ""; for ($j=0;$j<$#skilllist+1;$j++){ if ($skillmaxjob[$j] == $k) { print ""; } print ""; } } if($language ne "English"){ print "
$skilllist[$j]
Now$skill[$j]$skill[$j]
$joblist[$k]"; } else { print ""; } $skillcap = expr_skillcap($k, $j, $lev[$k]); if ($skillcap > 0) { if ($skillcap > int($skill[$j])) { print $skillcap; } else { print "$skillcap"; } } print "
詳細キャップ表\示をやめる。  スキルランクを表\示する。
"; } else { print "Exit detail info  Show skill rank
"; } } elsif ($FORM{'skilldetail'} eq "rank") { print ""; for ($j=0;$j<$#skilllist+1;$j++){ print ""; } print ""; print ""; for ($j=0;$j<$#skilllist+1;$j++){ if ($skillmax[$j] > int($skill[$j])) { print ""; } else { print ""; } } print ""; for ($k=0;$k<$job_max;$k++){ if (int($lev[$k]) > 0) { print ""; for ($j=0;$j<$#skilllist+1;$j++){ $skillrank = substr($skillrank[$k],$j * 2, 2); print ""; } print ""; } } if($language ne "English"){ print "
$skilllist[$j]
Now$skill[$j]$skill[$j]
$joblist[$k]"; if ($skillrank eq "_ ") { print "\ "; } else { print "$skillrank"; } print "
ランク表\示をやめる。
"; } else { print "Exit rank info
"; } } } #-- スキル表示機能で追加した部分ここまで ################# } if($prof ne "off"){ if($language ne "English"){ print ""; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "
$name さんのプロフィール
ハンドル$handle
POLハンドル$polhn
e-mail$mail
ホームページ$home
コメント$comment2
"; } else { print ""; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "
$name 's profile
Handlename$handle
POL Handlename$polhn
e-mail$mail
Homepage$home
Comment$comment2
"; } &show_diary; } else { if($language ne "English"){ print "
$name さんのプロフィールは非公開となっています。
"; } else { print "
$name 's profile is closed.
"; } } } sub write_images{ $fnt=""; $imgno="1"; foreach $upfilename (@upfiles){ $shortupfilename = $1 if $upfilename =~ /[\\|\/]?([0-9a-zA-Z_\.]+)$/; if($language ne "English"){ if( length($upfile{$upfilename}) > $maxsize){&header;&error_message("ファイルサイズが大きすぎます。","");} } else { if( length($upfile{$upfilename}) > $maxsize){&header;&error_message("Too mach file size.","");} } ($filename,$fileexst) = ($1,$2) if $shortupfilename =~ /(.*)\.(\w+)$/; $fileexst=lc($fileexst); $a1=0; foreach(@permitup){ if ($_ eq $fileexst){$a1=1;last;} } if($language ne "English"){ if(!($a1)) {&header;&error_message("拡張子 $fileexst はアップが許可されていません($in{'upct'})。","");} } else { if(!($a1)) {&header;&error_message("extension $fileexst is not allowed to upload($in{'upct'}).","");} } open(IMGOUT,">$imgdir$name$maxno\_$imgno.$fileexst"); binmode(IMGOUT); print IMGOUT $upfile{$upfilename}; close(IMGOUT); push(@fnt,"$name$maxno\_$imgno.$fileexst"); $imgexist=1; $imgno++; } $fnt=join(",", @fnt); } sub write_diary{ $diaryfile="$diarydir$name.$diaryletter"; $imgexist=0; if(!open(IN,"$datafile")){&header; &error_message('datafile error2249','data file access failed.');} @all=; close IN; $match=""; foreach $i(@all){ ($r_no,$r_name,$r_pass,$r_dummy)=split(/\t/,$i); if($r_name eq $name && $pass eq $r_pass){ $match=$i; } } if($match eq ""){&header; &error_message('id/pass error','access failed.');} if ($mode eq "write"){ if($language ne "English"){ if($body eq ""){&header;&error_message('本文がありません','');} } else { if($body eq ""){&header;&error_message('Message is blank.','');} } if (!open(DB,"$diaryfile")) { @lines=(); } @lines = ; close(DB); ($maxno,$dummy1,$dummy2,$dummy3)=split(/\t/,$lines[0]); $maxno++; &write_images; #キーワード対応、新規日記 if($key_avail){ &jcode'convert(*body,'euc'); $count=1; $mcount=0; foreach $i(@keyword){ ($km,$keyno)=split(/\t/,$i); # print $count. "$km
"; &jcode'convert(*km,'euc'); $body =~ s/$km/$km<\/a>/g; if($& eq $km){$mes='';&update_keyword;} $count++; } &jcode'convert(*body,'sjis'); } #キーワード対応ここまで追加 @lines=reverse(@lines); push(@lines,"$maxno\t$today2\t$title\t$body\t$fnt\t\t\n"); @lines=reverse(@lines); @out=(); $count=0; foreach $i(@lines){ if($count<$diarymax){ push(@out,$i); $count++; } } if (!open(OUT,">$diaryfile")) {&header; &error_message('filesystem error','access failed.');} print OUT @out; close(OUT); chmod 0666,$diaryfile; if(!open(IN,"$datafile")){&error_message('datafile error2315','data file access failed.');} @all=; close IN; @out=(); foreach $i(@all){ ($no,$r_name,$pass,$anon,$race,$relm,$mainjob,$supportjob,$prof,$handle,$polhn,$mail,$home,$comment2,$point,$class,$time,$comment,$mrank,$etc[0],$etc[1],$etc[2],$prod[0],$prod[1],$prod[2],$prod[3],$prod[4],$prod[5],$prod[6],$prod[7],$prod[8],$prod[9],$prod[10],$prod[11],$prod[12],$prod[13],$prod[14],$prod[15],$lev[0],$lev[1],$lev[2],$lev[3],$lev[4],$lev[5],$lev[6],$lev[7],$lev[8],$lev[9],$lev[10],$lev[11],$lev[12],$lev[13],$lev[14],$lev[15])=split(/\t/,$i); if($r_name eq $name){ push(@out,"$no\t$r_name\t$pass\t$anon\t$race\t$relm\t$mainjob\t$supportjob\t$prof\t$handle\t$polhn\t$mail\t$home\t$comment2\t$point\t$class\t$timenow\t$comment\t$mrank\t$etc[0]\t$etc[1]\t$etc[2]\t$prod[0]\t$prod[1]\t$prod[2]\t$prod[3]\t$prod[4]\t$prod[5]\t$prod[6]\t$prod[7]\t$prod[8]\t$prod[9]\t$prod[10]\t$prod[11]\t$prod[12]\t$prod[13]\t$prod[14]\t$prod[15]\t$lev[0]\t$lev[1]\t$lev[2]\t$lev[3]\t$lev[4]\t$lev[5]\t$lev[6]\t$lev[7]\t$lev[8]\t$lev[9]\t$lev[10]\t$lev[11]\t$lev[12]\t$lev[13]\t$lev[14]\t$lev[15]\t\n"); } else { push(@out,$i); } } if(!open(OUT,">$datafile")){&header; &error_message('datafile error2329','data file access failed.');} print OUT @out; close OUT; ################################ #RSS用履歴ファイル作成 if($rss_avail){ if(!open(IN,"$historyfile")){&header; &error_message('datafile error2329','data file access failed.');} @all=; close IN; push(@all,"DWRITE\t$name\t$title\t$rsstime\t$maxno\t$body\t\n"); @output=(); @all=reverse(@all); $count=0; foreach $i(@all){ if($count<20){ push(@output,$i); } $count++; } @output=reverse(@output); if(!open(OUT,">$historyfile")){&header; &error_message('datafile error1872','data file access failed.');} print OUT @output; close OUT; &rss_write; } ############################### &reload_header; if($language ne "English"){ print "
書き込み終了
"; print "日記を書き込みました。自動的にトップページに戻ります
"; } else { print "
Writing finished.
"; print "Writing diray is done. Go back to top page.
"; } } elsif ($mode eq "oekaki"){ &header; if($language ne "English"){ print "
日記を書き込みます
"; } else { print "
Diary Writing Mode
"; } print "
Go Top
"; print <<"EOM";
BBS Painter by ば科学的愛情
EOM } else { &header; if($language ne "English"){ print "
日記を書き込みます
"; } else { print "
Diary Writing Mode
"; } print "Go Top
"; print "
\ntitle

body

"; if($language ne "English"){ if($imgallow == 1){ for ($i=1; $i <= $imgmax; $i++){ print "画像$i
"; } } } else { if($imgallow == 1){ for ($i=1; $i <= $imgmax; $i++){ print "Image$i
"; } } } print"
"; } } sub show_diary { $diaryfile="$diarydir$name.$diaryletter"; if($diarybg ne ""){$dbg=" bgcolor=$diarybg";} if (!open(DB,"$diaryfile")) { if($language ne "English"){ print "
$name さんの日記はありません。
"; } else { print "
$name 's diray doesn't exist.
"; } } else { @lines = ; close(DB); if($language ne "English"){ print "
$name さんの日記。($showmax件表\示)

"; } else { print "
$name 's diary($showmax articles)

"; } print ""; $min=($page-1)*$showmax-1; $max=$page*$showmax; $count=0; foreach $i (@lines){ ($rno,$today2,$title,$body,$imgexist,$res)=split(/\t/,$i); if( ($mode eq "" && $count>$min && $count<$max )|| ($mode ne "" && $mode == $rno) ){ if(($name eq $c_name) && ($pass eq $c_pass)){ if($language ne "English"){ print ""; } else { print ""; } } else { print ""; } $body =~ s/(https?|ftp|gopher|telnet|whois|news)\:([\w|\:\!\#\$\%\=\&\-\^\`\\\|\@\~\[\{\]\}\;\+\*\,\.\?\/]+)/$1\:$2<\/a>/ig; print "
"; if($imgexist ne ""){ print "
$title (open) [修正・削除]$today2($rno)
$title (open) [edit/delete]$today2($rno)
$title(open)$today2($rno)
"; @imgfiles = split(/,/,$imgexist); foreach $imgfile(@imgfiles){ print "クリックで拡大
"; } print "
$body

"; } else { print "$body
"; } if($res ne ""){ print "$res
"; } if($diaryres){ if($language ne "English"){ print "名前"; } else { print "Name"; } } print ""; } $count++; } if($mode eq ""){ if($page>1){ $flag++; $bpage=$page-1; if($language ne "English"){ $before="
前のページ"; } else { $before="former page"; } } if($count>$max){ $flag++; $page++; if($language ne "English"){ $after="次のページ"; } else { $after="next page"; } } if($flag){ print " "; print "$before "; print "$after"; } } print ""; } } sub res_diary{ if($language ne "English"){ if($body eq ""){&header;&error_message('本文がありません','');} if($name eq ""){&header;&error_message('名前がありません','');} } else { if($body eq ""){&header;&error_message('no text','');} if($name eq ""){&header;&error_message('no name','');} } if( $body =~ /
/) { $body="
$body
"; } $diaryfile="$diarydir$name2.$diaryletter"; &dirlock; if (!open(DB,"$diaryfile")) { &header; if($language ne "English"){ print "
$name さんの日記はありません。
"; } else { print "
$name's diary is not exist.
"; } } else { @lines = ; close(DB); foreach $i(@lines){ ($r_no,$r_today,$r_title,$r_body,$r_img,$r_res)=split(/\t/,$i); if($no !=$r_no){ push(@out,$i); } else { $r_res =~ s/\n//g; $r_res.="$name > $body ($today2)
"; $r_body =~ s/\n//g; #旧バージョン対策 push(@out,"$r_no\t$r_today\t$r_title\t$r_body\t$r_img\t$r_res\t\n"); } } if (!open(OUT,">$diaryfile")) {&header; &error_message('filesystem error','access failed.');} print OUT @out; close(OUT); if(!open(IN,"$datafile")){&error_message('datafile error2480','data file access failed.');} @all=; close IN; @out=(); foreach $i(@all){ ($no,$r_name,$pass,$anon,$race,$relm,$mainjob,$supportjob,$prof,$handle,$polhn,$mail,$home,$comment2,$point,$class,$time,$comment,$mrank,$etc[0],$etc[1],$etc[2],$prod[0],$prod[1],$prod[2],$prod[3],$prod[4],$prod[5],$prod[6],$prod[7],$prod[8],$prod[9],$prod[10],$prod[11],$prod[12],$prod[13],$prod[14],$prod[15],$lev[0],$lev[1],$lev[2],$lev[3],$lev[4],$lev[5],$lev[6],$lev[7],$lev[8],$lev[9],$lev[10],$lev[11],$lev[12],$lev[13],$lev[14],$lev[15])=split(/\t/,$i); if($r_name eq $name2){ push(@out,"$no\t$r_name\t$pass\t$anon\t$race\t$relm\t$mainjob\t$supportjob\t$prof\t$handle\t$polhn\t$mail\t$home\t$comment2\t$point\t$class\t$timenow\t$comment\t$mrank\t$etc[0]\t$etc[1]\t$etc[2]\t$prod[0]\t$prod[1]\t$prod[2]\t$prod[3]\t$prod[4]\t$prod[5]\t$prod[6]\t$prod[7]\t$prod[8]\t$prod[9]\t$prod[10]\t$prod[11]\t$prod[12]\t$prod[13]\t$prod[14]\t$prod[15]\t$lev[0]\t$lev[1]\t$lev[2]\t$lev[3]\t$lev[4]\t$lev[5]\t$lev[6]\t$lev[7]\t$lev[8]\t$lev[9]\t$lev[10]\t$lev[11]\t$lev[12]\t$lev[13]\t$lev[14]\t$lev[15]\t\n"); } else { push(@out,$i); } } if(!open(OUT,">$datafile")){&header; &error_message('datafile error2494','data file access failed.');} print OUT @out; close OUT; rmdir($lockdir); &reload_header2; if($language ne "English"){ print "
書き込み終了
"; print "自動的に戻ります
"; } else { print "
Writing finished.
"; print "Automatically back former page.
"; } } } sub edit_diary{ $diaryfile="$diarydir$name.$diaryletter"; if(!open(IN,"$datafile")){&header; &error_message('datafile error2511','data file access failed.');} @all=; close IN; $match=""; foreach $i(@all){ ($r_no,$r_name,$r_pass,$r_dummy)=split(/\t/,$i); if($r_name eq $name && $pass eq $r_pass){ $match=$i; } } if($match eq ""){&header; &error_message('id/pass error','access failed.');} if ($mode eq "del"){ &dirlock; if (!open(DB,"$diaryfile")) { &header; print "
$name さんの日記はありません。
"; rmdir($lockdir); } else { @lines = ; close(DB); foreach $i(@lines){ ($r_no,$r_today,$r_title,$r_body,$r_imgexist,$r_res)=split(/\t/,$i); if($no !=$r_no){ push(@out,$i); } else { unlink("$imgdir$r_imgexist"); } } if (!open(OUT,">$diaryfile")) {&header; &error_message('filesystem error','access failed.');} print OUT @out; close(OUT); if(!open(IN,"$datafile")){&error_message('datafile error2549','data file access failed.');} @all=; close IN; @out=(); foreach $i(@all){ ($no,$r_name,$pass,$anon,$race,$relm,$mainjob,$supportjob,$prof,$handle,$polhn,$mail,$home,$comment2,$point,$class,$time,$comment,$mrank,$etc[0],$etc[1],$etc[2],$prod[0],$prod[1],$prod[2],$prod[3],$prod[4],$prod[5],$prod[6],$prod[7],$prod[8],$prod[9],$prod[10],$prod[11],$prod[12],$prod[13],$prod[14],$prod[15],$lev[0],$lev[1],$lev[2],$lev[3],$lev[4],$lev[5],$lev[6],$lev[7],$lev[8],$lev[9],$lev[10],$lev[11],$lev[12],$lev[13],$lev[14],$lev[15])=split(/\t/,$i); if($r_name eq $name){ push(@out,"$no\t$r_name\t$pass\t$anon\t$race\t$relm\t$mainjob\t$supportjob\t$prof\t$handle\t$polhn\t$mail\t$home\t$comment2\t$point\t$class\t$timenow\t$comment\t$mrank\t$etc[0]\t$etc[1]\t$etc[2]\t$prod[0]\t$prod[1]\t$prod[2]\t$prod[3]\t$prod[4]\t$prod[5]\t$prod[6]\t$prod[7]\t$prod[8]\t$prod[9]\t$prod[10]\t$prod[11]\t$prod[12]\t$prod[13]\t$prod[14]\t$prod[15]\t$lev[0]\t$lev[1]\t$lev[2]\t$lev[3]\t$lev[4]\t$lev[5]\t$lev[6]\t$lev[7]\t$lev[8]\t$lev[9]\t$lev[10]\t$lev[11]\t$lev[12]\t$lev[13]\t$lev[14]\t$lev[15]\t\n"); } else { push(@out,$i); } } if(!open(OUT,">$datafile")){&header; &error_message('datafile error2563','data file access failed.');} print OUT @out; close OUT; rmdir($lockdir); &reload_header; print "
削除終了
"; print "記事No.$noを削除しました。自動的にトップページに戻ります
"; if(-z $diaryfile){ print "日記が全て削除されました。
"; unlink($diaryfile); } } } elsif ($mode eq "modify"){ if (!open(DB,"$diaryfile")) { &header; print "
$name さんの日記はありません。
"; rmdir($lockdir); } else { @lines = ; close(DB); $imgexist=0; if ($in{'upfile'} ne ""){ $in{'upfilename'} = $1 if $in{'upfilename'} =~ /[\\|\/]?([0-9a-zA-Z_\.]+)$/; if( length($in{'upfile'}) > $maxsize){&header;&error_message("ファイルサイズが大きすぎます。","");} ($filename,$fileexst) = ($1,$2) if $in{'upfilename'} =~ /(.*)\.(\w+)$/; $fileexst=lc($fileexst); $a1=0; foreach(@permitup){ if ($_ eq $fileexst){$a1=1;last;} } if(!($a1)) {&header;&error_message("拡張子 $fileexst はアップが許可されていません($in{'upct'})。","");} $newname = "$name$no.$fileexst"; if (-e "$imgdir$newname") { $fileno = 2; while (-e "$imgdir$name${no}_$fileno.$fileexst") { $fileno++; } $newname = "$name${no}_$fileno.$fileexst"; } open(IMGOUT,">$imgdir$newname"); binmode(IMGOUT); print IMGOUT $in{'upfile'}; close(IMGOUT); $imgexist=1; } #キーワード対応(修正) if($key_avail){ &jcode'convert(*body,'euc'); $count=1; $mcount=0; foreach $i(@keyword){ ($km,$keyno)=split(/\t/,$i); # print $count. "$km
"; &jcode'convert(*km,'euc'); $body =~ s/$km/$km<\/a>/g; if($& eq $km){$maxno=$no;$mes='(update)';&update_keyword;} $count++; } &jcode'convert(*body,'sjis'); } #キーワード対応(ここまで) foreach $i(@lines){ ($r_no,$r_today,$r_title,$r_body,$r_imgexist,$r_res)=split(/\t/,$i); if($no==$r_no){ $body =~ s/\n//g; $body2 =~ s/\n//g; $deleteimg = $FORM{'deleteimg'}; @imgexists_n = (); @imgexists = split(/,/,$r_imgexist); foreach $imgfile (@imgexists) { if ($deleteimg eq $imgfile && $comment eq "delete") { unlink("$imgdir$deleteimg"); } else { push(@imgexists_n, $imgfile); } } if ($imgexist) { push(@imgexists_n, $newname); } $r_imgexist = join(",", @imgexists_n); push(@out,"$no\t$today2\t$title\t$body\t$r_imgexist\t$body2\t\n"); } else { push(@out,$i); } } if (!open(OUT,">$diaryfile")) {&header; &error_message('filesystem error','access failed.');} print OUT @out; close(OUT); rmdir($lockdir); &reload_header; print "
修正終了
"; print "日記を修正しました。自動的にトップページに戻ります
"; } } else { &header; if (!open(DB,"$diaryfile")) { print "
$name さんの日記はありません。
"; } else { @lines = ; close(DB); foreach $i (@lines){ ($r_no,$r_today,$r_title,$r_body,$r_imgexist,$r_res)=split(/\t/,$i); if($no==$r_no){ $hit=$i;} } if($hit eq ""){&header; &error_message('no such number','access failed.');} ($r_no,$r_today,$r_title,$r_body,$r_imgexist,$r_res)=split(/\t/,$hit); print "
日記の修正・削除を行います
"; print "
Go Top
"; $r_body =~ s/
/\n/g; $r_body =~ s/<//g; $r_body =~ s/]*>//g; $r_body =~ s/<\/a>//g; print "
\n 記事No. $no
title

body

res
"; $r_res =~ s/
/\n/g; $r_res =~ s/<//g; $r_res =~ s/]*>//g; $r_res =~ s/<\/a>//g; print "
"; foreach $imgexist (split(/,/,$r_imgexist)) { print "クリックで拡大選択
"; } if($r_imgexist ne ""){print "選択した画像の消去
";} print "画像を追加

"; print " "; } } } sub dirlock { if($lockdir eq ""){return;} if((-M $lockdir)>0.001){ #1分半ほどlockdirが存在している場合は強制的に削除 rmdir($lockdir); } for ($i = 0; $i <= 20; $i++) { if (mkdir($lockdir, 0755)) { last; } else { sleep(1); } } $SIG{'TERM'} = $SIG{'PIPE'} = $SIG{'HUP'} = "sigexit"; if($i == 20){&error_message('busy','now busy, please access later.');} } sub sigexit { rmdir($lockdir); exit(1); } sub keitai { &make_salt; require('keitai.pl'); &header_i; print "$guild_name List
"; if($function eq "$button[0]"){ &login_i; } elsif($function eq "prof"){ &prof_i; } elsif($function eq "$button[1]"){ if(!$diaryallow){ &write_diary_i; } } elsif($function eq "new"){ &new_regist_i; } elsif($function eq "diary"){ &diary_i; } elsif($function eq "resdiary"){ &res_diary_i; &diary_i; } else { &list_i; } &footer_i; exit; } sub make_salt{ srand(); $xx = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" . "abcdefghijklmnopqrstuvwxyz" . "0123456789."; $salt = substr($xx, int(rand(63)), 1); $salt .= substr($xx, int(rand(63)), 1); $salt .= substr($xx, int(rand(63)), 1); $salt .= substr($xx, int(rand(63)), 1); } sub conv_zenkaku{ for($j=0;$j<17;$j++){ @lev[$j]=~ s/0/0/g; @lev[$j]=~ s/1/1/g; @lev[$j]=~ s/2/2/g; @lev[$j]=~ s/3/3/g; @lev[$j]=~ s/4/4/g; @lev[$j]=~ s/5/5/g; @lev[$j]=~ s/6/6/g; @lev[$j]=~ s/7/7/g; @lev[$j]=~ s/8/8/g; @lev[$j]=~ s/9/9/g; } for($j=0;$j<10;$j++){ @prod[$j]=~ s/0/0/g; @prod[$j]=~ s/1/1/g; @prod[$j]=~ s/2/2/g; @prod[$j]=~ s/3/3/g; @prod[$j]=~ s/4/4/g; @prod[$j]=~ s/5/5/g; @prod[$j]=~ s/6/6/g; @prod[$j]=~ s/7/7/g; @prod[$j]=~ s/8/8/g; @prod[$j]=~ s/9/9/g; } } sub rss_write { if(!open(IN,"$historyfile")){&header; &error_message('datafile error2449','data file access failed.');} @list=; close IN; @list=reverse(@list); $items=""; $item=""; foreach $i(@list){ ($dummy,$rname,$rtitle,$rtime,$rmaxno,$rbody)=split(/\t/,$i); $rbody =~ s/
/\n/g; $rbody =~ s/&/&/g; $rbody =~ s/"/"/g; $rbody =~ s/'/'/g; $rbody =~ s/&lt;/</g; $rbody =~ s/&gt;/>/g; $items .=" \n"; $item .="\n$topic : $rname さんの日記[$rmaxno]更新\n $site$script?function=prof&name=$rname&no=$rmaxno\n $rtitle $rbody\n $rtime\n\n"; } if(!open(OUT,">$rdfname")){&header; &error_message('datafile error2422','data file access failed.');} print OUT <<"EOM"; $topic $site$script $rsstime $topic $items $item EOM close OUT; chmod 0666,$rdfname; } sub update_keyword{ $htmlfile="$keydir$keyno\.html"; if(!open(IN,$htmlfile)){&header; &error_message('datafile error2626','data file access failed.');} @html=; close IN; @outhtml=(); foreach $i(@html){ if($i =~ /