# #マスターモード(削除機能とパスワード閲覧) # #0.699 (09/05/16) sub master{ print "master mode
"; if($language ne "English"){ print "
[登録システム入り口][使い方][ホームページへ戻る]
"; print "[各種設定][ソ\ート][バックアップ][お知らせ変更]
"; } else { print "
[ListPageTop][Usage][BacktoHome]
"; print "[Config][Sort][Backup][Info change]
"; } if(($gpass ne $master_pass)){ &error_message('illegal login','password is not correct.'); } if ($mode eq "delete" && $anon eq "on"){ if($language ne "English"){ print "$name さんを削除します。データはすべて抹消されます。
"; } else { print "$name 's data will be delted.
"; } if(!open(IN,"$datafile")){ &error_message('datafile error193','data file access failed.'); } @all=; close IN; @out=(); foreach $i (@all){ ($r_no,$r_name,$dummy)=split(/\t/,$i); if($name ne $r_name){ push(@out,$i); } } if(!open(OUT,">$datafile")){ &error_message('datafile error204','data file access failed.'); } print OUT @out; close OUT; if($language ne "English"){ print "$name さんのデータは削除されました。
"; print "
"; } else { print "$name 's data is deleted.
"; print "
"; } } elsif ($mode eq "edit") { if(!open(IN,"$datafile")){ &header; &error_message('datafile error214','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],$lev[16],$lev[17],$lev[18],$lev[19])=split(/\t/,$match); @prod_r = split(/,/,$etc[1]); if($language ne "English"){ print "'$name'($no) さんのデータを修正します。"; } else { print "modifying $name'($no) 's data"; } print "
"; print ""; print "\n"; print "\n"; print ""; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; for($i=0;$i<$job_max;$i++){ print "\n"; } 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 ""; print "\n"; # 戦慄!モグ祭りの夜 print ""; print "\n"; # シャントット帝国の陰謀 print ""; print "\n"; # アルタナミッション print ""; print "\n"; # カンパニエ叙勲 print ""; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; for($k=5;$k<15;$k++){ print "\n"; } #assault @assault=split( //,$mission[16]); print "\n"; print ""; print "\n"; for($j=1;$j<$#aslist+1;$j++){ print "\n"; ####ミッション進行度ここまで ############## #-- 以下スキル表示機能で追加した部分 # @skill = split(/,/,$etc[2]); ($tempskill,$tempws)=split( /\//,$etc[2]); @skill = split( /\,/, $tempskill ); @ws = split( //, $tempws ); if ($skill_visible) { print ""; print ""; } for ($i=0;$i<=$#mwslist;$i++){ ( $wskill, $wname, $wtype, $wjob, $wcond ) = split( /,/, $mwslist[ $i ] ); print ""; if( $ws[ $i ] ){ # 既に習得済みのものは、条件チェックせずに表示させる print "\n"; } else { print "\n"; } } #-- スキル表示機能で追加した部分ここまで ############## require("equip.pl"); &def_equip_list(); @elist = split(/\,/, $prod[10]); print "\n"; #めりぽはこのへんに。 print ""; #カスタムフィールド @custom=split(/,/,$prod[11]); print ""; print ""; for ($i=1;$i<$#custom_field+1;$i++){ print ""; } print ""; 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"; print "\n"; print "\n
$field[0]
$field[1]
$field[2]
no
$field[3]
$field[4]
$field[5] ($field[18])
$field[6]

$field[7]
$field[8]
$joblist[$i]

$prodlist[$i]\n"; print "
$mlist[19]
$mlist[20]
$mlist[21]
$mlist[18]
$mlist[22]
$mlist[15]"; print "
$mlist[0]"; print "
$mlist[1]"; print "
$mlist[2]"; print "
$mlist[3]"; print "
$mlist[4]"; print "
$mlist[$k]"; print "
$aslist[0]"; print "
$mlist[17]
$aslist[$j]"; print "
-
"; for($i=0;$i<15;$i++){ print ""; } print ""; for($i=0;$i<15;$i++){ print "\n"; } print "
$skilllist[$i]
"; for($i=15;$i<$#skilllist+1;$i++){ print ""; } print ""; for($i=15;$i<$#skilllist+1;$i++){ print "\n"; } print "
$skilllist[$i]
$wname
-
"; # 武器リストのフォーム表示ループ for ( $e=0; $e<=3; $e++ ){ # 武器リストを取得 @templist = @{$equipdeflist[$e]}; # 取得済みの武器リストを取得 @equips = split( //, $elist[$e] ); $itemnum = $#templist+1; print "\n"; print ""; for( $i=0; $i<$itemnum; $i++ ){ if( $i != 0 ){ print ""; } $fstr = $equiplistname[$e] . '_' . $i ; print "\n"; } print "\n"; } # 防具リストのフォーム表示ループ for ( $e=4; $e<=10; $e++ ){ @templist = @{$equipdeflist[$e]}; @equipset = split( /\//, $elist[$e] ); @setname = split( /\,/, $templist[0] ); print "\n"; for( $i = 0; $i<$#templist; $i++ ){ @equips = split( //, $equipset[$i] ); @templist2 = split( /\,/, $templist[$i+1]); $itemnum = $#templist2+1; if( $e == 10 ){ ($jobnumber,$eqname) = split( /\//, $setname[$i] ); print ""; } else{ print ""; } for( $j=0; $j<=$#templist2;$j++){ ($eqslot, $eqname) = split( /\//, $templist2[$j] ); $fstr = $equiplistname[$e] . '_' . $i . '_' . $j; if( $j != 0 ){ print ""; } print "\n"; } } print "\n"; } print "
$equiplist[$e]
$equiplist[$e]
$templist[$i]"; } else{ print ""; } print "
 
$equiplist[$e]
$joblist[$jobnumber]/$eqname
$setname[$i]
$eqname ($equipslot[$eqslot])"; } else{ print ""; } print "
 
$custom_field[0]

$custom_field[$i]

$field[9]
$field[10]
$field[11]

$field[12]
$field[13]
$field[14]
$field[15]
$field[16]
$field[17]
Profile Photo Exists:[$prod[14]]
photo mode
"; } elsif ($mode eq "modify") { &dirlock; if(!open(IN,"$datafile")){ &header; &error_message('datafile error332','data file access failed.'); } @all=; close IN; if($mainjob == $supportjob){ &header; &error_message('main/job error','メインとサポートは同一のジョブにはできません'); } if( !($pass =~ /^[A-Za-z0-9_]+$/) ){ &error_message('そのパスワードは登録に利用できません。','パスワードは半角英数字で登録してください。'); } if( !($name2 =~ /^[A-Za-z0-9_]+$/) ){ &error_message('その名前は使えません。','名前は半角英数字で登録してください。'); } $prod[11]=join(",", @custom); @out=(); foreach $i(@all){ ($r_no,$r_name,$dummy1,$dummy2,$dummy3,$dummy4,$dummy5,$dummy6,$dummy7,$dummy8,$dummy9,$dummy10,$dummy11,$dummy12,$dummy13,$dummy14,$r_time)=split(/\t/,$i); if($r_name eq $name){ push(@out,"$no\t$name2\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$r_time\t$comment\t$mrank\t$etc[0]\t$etc[1]\t$etc2skill/$etc2ws\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$lev[16]\t$lev[17]\t$lev[18]\t$lev[19]\t\n"); } else { push(@out,$i); } } if(!open(OUT,">$datafile")){&header; &error_message('datafile error353','data file access failed.');} print OUT @out; close OUT; rmdir($lockdir); if($language ne "English"){ print "
'$name'さんのデータを修正しました
"; print "
"; } else { print "
modified '$name' 's data
"; print "
"; } } elsif($mode eq "backup"){ if(!open(IN,"$datafile")){ &error_message('datafile error364','data file access failed.'); } @all=; close IN; if(!open(OUT,">$name")){ &error_message('datafile error368','data file access failed.'); } print OUT @all; close OUT; if($language ne "English"){ print "バックアップファイル'$name'を作成しました。データ破損の場合はこのファイルを'$datafile'に上書きしてください。
"; print "
"; } else { print "BackupFile:'$name'
"; print "
"; } } elsif($mode eq "sort"){ &dirlock; if(!open(IN,"$datafile")){&error_message('datafile error380','data file access failed.');} @all=; close IN; @all=sort(@all); @out=(); $count=1; foreach $i (@all){ @temp=split(/\t/,$i); $c=$count; if($c<10){$c="0$c";} if($c<100){$c="0$c";} $value="$c"; for($j=1;$j<$#temp+1;$j++){ $value="$value\t$temp[$j]"; } push (@out,"$value"); $count++; } if(!open(OUT,">$datafile")){ &error_message('datafile error406','data file access failed.'); } print OUT @out; close OUT; rmdir($lockdir); if($language ne "English"){ print "Noを元にソ\ート、Noを振りなおしました。デフォルトでNo順で表\示されるようになります。
"; print "
"; } else { print "Sort by No. New NO. set.
"; print "
"; } } elsif($mode eq "sort2"){ &dirlock; if(!open(IN,"$datafile")){ &error_message('datafile error419','data file access failed.'); } @all=; close IN; @all=sort(@all); if(!open(OUT,">$datafile")){ &error_message('datafile error425','data file access failed.'); } print OUT @all; close OUT; rmdir($lockdir); if($language ne "English"){ print "Noを元にソ\ートしました。
"; print "
"; } else { print "Sort by No.
"; print "
"; } } elsif($mode eq "list"){ &master_list; } elsif($mode eq "message"){ $body =~ s/<//g; $name =~ s/<//g; if(!open(OUT,">message.tbl")){ &error_message('message datafile error437','data file access failed.'); } print OUT "$name\n$body\n"; close OUT; if($language ne "English"){ print "お知らせを書き換えました。
"; print "
"; } else { print "Information changed
"; print "
"; } } elsif($mode eq "header"){ $body =~ s/<//g; if(!open(OUT,">header.html")){ &error_message('message datafile error460','data file access failed.'); } print OUT "$body\n"; close OUT; if($language ne "English"){ print "ヘッダーを書き換えました。
"; print "
"; } else { print "Header changed
"; print "
"; } } else { #ここにリストがあったお print "
"; if(!open(IN,"message.tbl")){ $osirase="no"; } else { $osirase=; $osirase =~ s/\n//g; $osirase =~ s/\r//g; $osirasebody=; close IN; } $osirasebody =~ s/
/\n/g; if(!open(IN,"header.html")){ $header="no"; } else { $headerbody=; close IN; } $headerbody =~ s/
/\n/g; if($language ne "English"){ print <<"EOM";
設定ファイルを書き換えます
表\示項目のカスタマイズ

カスタムフィールド項目の編集・一括入力
EOM if($#custom_field != -1){ print "
"; } else { print "カスタムフィールド利用前に下のバージョンアップ処理をしてください。
"; } print <<"EOM";
バージョンアップ処理

バージョンアップ時には下のボタンを押してください。
(0.63→0.699)

(アルタナ/アトルガン対応拡張自動処理/0.60a3からのデータコンバート含む(0.5X&0.6X→0.699))

setup.cgiアルタナ/アトルガン対応拡張'強制'処理(0.5X→0.699)上ボタンでうまくいかない場合はこちらをお試しください。
バージョン0.5扱いにして強制的に修正を行います。

メンテナンス
名前のないメンバーデータが追加された場合や、バージョンアップを行った場合はこの処理を行ってください。
並べ替え
No順にソ\ート、Noを振りなおして、その順で書き込みます。

No順にソ\ート、Noを振りなおしません。

データのバックアップ
ファイル名は'bk$year$mon$mday.cgi'になります。バックアップボタンを押してください。

お知らせの表\示
お知らせの文章を入れてください。タグも使えますが、タグの閉じ方が悪いと表\示がおかしくなることがあります。
お知らせのタイトル(なしで表\示しません)

お知らせの文章

画面上部へ表\示したいhtmlを追加してください。
タグも使えますが、タグの閉じ方が悪いと表\示がおかしくなることがあります。
画面上部追加内容(BRタグが行末に自動追加されます)

EOM print "
[登録システム入り口][使い方][ホームページへ戻る]
"; } else { print <<"EOM";
Change Memberlist Configuration
Customize

CustomField customize or input
EOM if($#custom_field != -1){ print "
"; } else { print "Push version up button before using CustomField function.
"; } print <<"EOM"; Version UP0.5X&0.60X ->0.61
set version 0.5 mode (0.5X&0.60X -> 0.61)

Maintenance
Blank User deleting function, and modifying Aht urgan new job data.
Sort by No. and New No. set

Sort by No.

Backup list data
Filename : 'bk$year$mon$mday.cgi'

Information
Input message(you can use HTML tag for this message)
Information title

Information message

header html( you can use HTML tag for header HTML)

header html

EOM print "
[List Top][Usage][back to home]
"; } } } sub master_list{ if(!open(IN,"$datafile")){ &error_message('datafile error446','data file access failed.'); } @all=; close IN; if($sort ne ""){ &sort_table; } print ""; print ""; $count=0; foreach $i(@all){ ($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],$lev[16],$lev[17],$lev[18],$lev[19])=split(/\t/,$i); if($count==$c_max){ print "
noclassnamepasstimeedit

"; $count=0; } print ""; print ""; $count++; } print "
noclassnamepasstimeedit
$no$class$name$pass
$timecheck
"; print "
"; } 1;