1226 lines
36 KiB
Perl
1226 lines
36 KiB
Perl
#!/usr/local/bin/perl
|
||
# サーバーの環境に合わせて変更して下さい。
|
||
require './ore_config.cgi'; # ore_.plのパス
|
||
#-----------------------------------------------------------#
|
||
# 罪と罰++ 二律背反 #
|
||
# 管理者機能 #
|
||
# Copyright(C) 2001-2002 by Vivid Studio. BLANK BOARD #
|
||
# Vivid Studio.[ http://www17.big.or.jp/~obochan/vivid/ ] #
|
||
# BLANK BOARD [ http://pom.to/ ] #
|
||
#-----------------------------------------------------------#
|
||
$ver = 'v1.1'; # バージョン情報は書き換え不可
|
||
#--- [注意事項] --------------------------------------------#
|
||
# 1.このスクリプトは以下の利用規程に従って配布しています。 #
|
||
# http://www24.big.or.jp/~obo/game/ore_/gild/ #
|
||
#-----------------------------------------------------------#
|
||
# 以下処理 基本的にこれ以下はいじらないように。
|
||
|
||
&get_time; # 日時取得
|
||
&decode; # フォームデコード
|
||
&axs_check; # アクセスチェック
|
||
&usr_del if($mode eq 'usr_del'); # キャラ削除
|
||
&usr_regist if($mode eq 'usr_regist'); # キャラデータ変更
|
||
&usr_regist2 if($mode eq 'usr_regist2'); # キャラデータ変更2
|
||
&cdat_regist if($mode eq 'cdat_regist'); # 国データ変更
|
||
&cdat_regist2 if($mode eq 'cdat_regist2'); # 国データ変更2
|
||
&rd_usrdata if($mode eq 'rd_usrdata'); # $usrdata内ファイル全削除
|
||
&rd_backdata if($mode eq 'rd_backdata'); # $backdata内ファイル全削除
|
||
&cdata_reset if($mode eq 'cdata_reset'); # 国パラメータ初期化
|
||
&restore_all_usr if($mode eq 'restore_all_usr');# 全参加者ログ一括復旧(バックアップデータ差し替え)
|
||
&restore_person if($mode eq 'restore_person'); # 個別全参加者ログ復旧(バックアップデータ差し替え)
|
||
&restore_cdat if($mode eq 'restore_cdat'); # 国ログ復旧(バックアップデータ差し替え)
|
||
&usr_list; # キャラリスト表示
|
||
|
||
exit;
|
||
|
||
#-------------------------------------------------------------------------------
|
||
# キャラリスト表示
|
||
sub usr_list{
|
||
|
||
&admin_head;
|
||
|
||
if($comment){
|
||
print <<"EOM";
|
||
<table border="0" cellspacing="2" cellpadding="2" align="center">
|
||
<tr>
|
||
<th nowrap align="left">$comment</th>
|
||
</tr>
|
||
</table>
|
||
<br>
|
||
EOM
|
||
}
|
||
print <<EOM;
|
||
<form method="$method" action="$ore_admin" name="ore_admin">
|
||
<input type="hidden" name="administrator" value="$in{'administrator'}">
|
||
<input type="hidden" name="list_sort" value="$in{'list_sort'}">
|
||
<input type="hidden" name="list_view" value="$in{'list_view'}">
|
||
<input type="hidden" name="mode" value="usr_del">
|
||
|
||
<table width="100%" border="0" cellspacing="2" cellpadding="2">
|
||
<tr>
|
||
<th nowrap colspan=4>ソート</th>
|
||
<th nowrap colspan=7>データ\表\示</th>
|
||
</tr>
|
||
<tr>
|
||
<td nowrap><input class="button1" type="button" style="width:20px" value="無" onClick="location.href='$ore_admin?administrator=$in{'administrator'}'"></td>
|
||
<td nowrap><input class="button1" type="button" value="レベル" onClick="location.href='$ore_admin?administrator=$in{'administrator'}&list_sort=4&list_view=$in{'list_view'}'"></td>
|
||
<td nowrap><input class="button1" type="button" value="IPアドレス" onClick="location.href='$ore_admin?administrator=$in{'administrator'}&list_sort=15&list_view=$in{'list_view'}'"></td>
|
||
<td nowrap><input class="button1" type="button" value="最終更新" style="width:80px" onClick="location.href='$ore_admin?administrator=$in{'administrator'}&list_sort=18&list_view=$in{'list_view'}'"></td>
|
||
|
||
<td nowrap><input class="button1" type="button" value="全\表\示" style="width:80px"onClick="location.href='$ore_admin?administrator=$in{'administrator'}&list_sort=$in{'list_sort'}&list_view=-1'"></td>
|
||
<td nowrap><input class="button1" type="button" value="$cmp[0]" style="width:80px" onClick="location.href='$ore_admin?administrator=$in{'administrator'}&list_sort=$in{'list_sort'}&list_view=-5'"></td>
|
||
<td nowrap><input class="button1" type="button" value="$cmp[1]" style="width:80px" onClick="location.href='$ore_admin?administrator=$in{'administrator'}&list_sort=$in{'list_sort'}&list_view=1'"></td>
|
||
<td nowrap><input class="button1" type="button" value="$cmp[2]" style="width:80px" onClick="location.href='$ore_admin?administrator=$in{'administrator'}&list_sort=$in{'list_sort'}&list_view=2'"></td>
|
||
<td nowrap><input class="button1" type="button" value="$cmp[3]" style="width:80px" onClick="location.href='$ore_admin?administrator=$in{'administrator'}&list_sort=$in{'list_sort'}&list_view=3'"></td>
|
||
<td nowrap><input class="button1" type="button" value="$cmp[4]" style="width:80px" onClick="location.href='$ore_admin?administrator=$in{'administrator'}&list_sort=$in{'list_sort'}&list_view=4'"></td>
|
||
<td nowrap><input class="button1" type="button" value="$cmp[5]" style="width:80px" onClick="location.href='$ore_admin?administrator=$in{'administrator'}&list_sort=$in{'list_sort'}&list_view=5'"></td>
|
||
</tr>
|
||
</table>
|
||
<br>
|
||
EOM
|
||
|
||
if($in{'list_view'}){
|
||
|
||
print <<EOM;
|
||
<table width="100%" border="0" cellspacing="2" cellpadding="2">
|
||
<tr>
|
||
<th nowrap>削除</th>
|
||
<th nowrap>ログイン</th>
|
||
<th nowrap>編集</th>
|
||
<th nowrap>名前</th>
|
||
<th nowrap>I D</th>
|
||
<th nowrap>パスワード</th>
|
||
<th nowrap>性別</th>
|
||
<th nowrap>レベル</th>
|
||
<th nowrap>所属</th>
|
||
<th nowrap>HP</th>
|
||
<th nowrap>MP</th>
|
||
<th nowrap>UA</th>
|
||
<th nowrap>UD</th>
|
||
<th nowrap>LR</th>
|
||
<th nowrap>AG</th>
|
||
<th nowrap>所持金</th>
|
||
<th nowrap>階級</th>
|
||
<th nowrap>行動</th>
|
||
<th nowrap>最終ログイン</th>
|
||
<th nowrap>IPアドレス</th>
|
||
<th nowrap>ホスト名</th>
|
||
<th nowrap>ブラウザ</th>
|
||
</tr>
|
||
EOM
|
||
|
||
# 参加者データファイル一覧取得
|
||
&usrdata_read;
|
||
|
||
# 参加者データ一括読み込み
|
||
foreach (0 .. $#usrfile) {
|
||
open(IN,"$usrdata$usrfile[$_]") || &error("Can't open $usrfile[$_]");
|
||
@line = <IN>;
|
||
close(IN);
|
||
push(@dat,$line[0]);
|
||
push(@dat2,$line[1]);
|
||
}
|
||
|
||
local(@usr_data);
|
||
|
||
foreach (0 .. $#dat){
|
||
%DAT = '';
|
||
my @prats = split(/,/,$dat[$_]);
|
||
foreach (0 .. $#prats){
|
||
my ($key,$v) = split(/;/,$prats[$_]);
|
||
$DAT{$key} = $v;
|
||
}
|
||
|
||
my @y1 = split(/<>/,$dat2[$_]);
|
||
|
||
$in{'list_view'}=0 if($in{'list_view'}==-5);
|
||
|
||
if($in{'list_view'} eq $DAT{'camp'} || $in{'list_view'} eq -1){
|
||
$id = $DAT{'id'};
|
||
# ハッシュ読み込み
|
||
&hash_data;
|
||
|
||
push(@usr_data,"$nm<>$id<>$pw<>$sei<>$lv<>$camp<>$max_hp<>$max_mp<>$ua<>$ud<>$lr<>$gold<>$rank<>$sogo<>$y1[0]<>$y1[1]<>$y1[2]<>$y1[3]<>$la<>$ag<>$type<>");
|
||
}
|
||
}
|
||
|
||
@usr_data = @{&csvsort('<>',$in{'list_sort'},@usr_data)};
|
||
|
||
foreach(0 .. $#usr_data){
|
||
my @y2 = split(/<>/,$usr_data[$_]);
|
||
|
||
$y2_0 = (!$y2[13]) ? "$y2[0]" : "$y2[0] [$sogo_p[$y2[13]]]" ;
|
||
$y2[14] ="" if($y2[14] =~ /date/);
|
||
$y2[20] = "待機中" if(!$y2[20]);
|
||
print <<"EOM";
|
||
<tr>
|
||
<td nowrap><input type="checkbox" name="usr_del"value="$y2[1]"></td>
|
||
<td nowrap><input class="button1" type="button" value="ログイン" onClick="window.open('$script?id=$y2[1]&pw=$in{'administrator'}')"></td>
|
||
<td nowrap><input class="button1" type="button" value="編集" onClick="window.open('$ore_admin?id=$y2[1]&administrator=$in{'administrator'}&mode=usr_regist')"></td>
|
||
<td nowrap>$y2_0</td>
|
||
<td nowrap>$y2[1]</td>
|
||
<td nowrap>$y2[2]</td>
|
||
<td nowrap>$seibetu[$y2[3]]</td>
|
||
<td nowrap>$y2[4]</td>
|
||
<td nowrap>$cmp[$y2[5]]</td>
|
||
<td nowrap>$y2[6]</td>
|
||
<td nowrap>$y2[7]</td>
|
||
<td nowrap>$y2[8]</td>
|
||
<td nowrap>$y2[9]</td>
|
||
<td nowrap>$y2[10]</td>
|
||
<td nowrap>$y2[19]</td>
|
||
<td nowrap>$y2[11]</td>
|
||
<td nowrap>$cl[$y2[12]]</td>
|
||
<td nowrap>$y2[20]</td>
|
||
<td nowrap>$y2[14]</td>
|
||
<td nowrap>$y2[15]</td>
|
||
<td nowrap>$y2[16]</td>
|
||
<td nowrap>$y2[17]</td>
|
||
</tr>
|
||
EOM
|
||
}
|
||
}
|
||
print <<"EOM";
|
||
</table>
|
||
<br><br>
|
||
<table width="100%" border="0" cellspacing="2" cellpadding="2">
|
||
<tr>
|
||
<th nowrap>キャラ削除</th>
|
||
<td nowrap> </td>
|
||
<th nowrap>国データ編集</th>
|
||
|
||
<td nowrap> </td>
|
||
<th nowrap>国データリセット</th>
|
||
|
||
<td nowrap> </td>
|
||
<th nowrap colspan="2">Warning!! ディレクトリ/データ全削除</th>
|
||
</tr>
|
||
<tr>
|
||
<td nowrap align="center"><input class="button1" type="submit" value="キャラ削除" style="width:80px"></td>
|
||
<td nowrap> </td>
|
||
|
||
<td nowrap align="center"><input class="button1" type="button" value="国データ編集" style="width:80px" onClick="window.open('$ore_admin?administrator=$in{'administrator'}&mode=cdat_regist')"></td>
|
||
<td nowrap> </td>
|
||
|
||
<td nowrap align="center"><input class="button1" type="button" value="国データリセット" style="width:100px" onClick="location.href='$ore_admin?administrator=$in{'administrator'}&list_sort=$in{'list_sort'}&list_view=$in{'list_view'}&mode=cdata_reset'"></td>
|
||
<td nowrap> </td>
|
||
|
||
<td nowrap align="center"><input class="button1" type="button" value="キャラデータ一括削除" style="width:120px" onClick="location.href='$ore_admin?administrator=$in{'administrator'}&list_sort=$in{'list_sort'}&list_view=$in{'list_view'}&mode=rd_usrdata'"></td>
|
||
<td nowrap align="center"><input class="button1" type="button" value="バックアップ一括削除" style="width:120px" onClick="location.href='$ore_admin?administrator=$in{'administrator'}&list_sort=$in{'list_sort'}&list_view=$in{'list_view'}&mode=rd_backdata'"></td>
|
||
</tr>
|
||
</table>
|
||
</form>
|
||
|
||
<br>
|
||
|
||
<table width="100%" border="0" cellspacing="2" cellpadding="2">
|
||
<tr>
|
||
<th nowrap colspan="5">キャラログ個別復旧</th>
|
||
<td nowrap> </td>
|
||
<th nowrap colspan="3">全キャラログ復旧</th>
|
||
<td nowrap> </td>
|
||
<th nowrap colspan="3">国ログ復旧</th>
|
||
</tr>
|
||
<tr>
|
||
|
||
<form method="$method" action="$ore_admin" name="ore_admin">
|
||
<input type="hidden" name="administrator" value="$in{'administrator'}">
|
||
<input type="hidden" name="list_sort" value="$in{'list_sort'}">
|
||
<input type="hidden" name="list_view" value="$in{'list_view'}">
|
||
<input type="hidden" name="mode" value="restore_person">
|
||
|
||
<td nowrap>ID</td>
|
||
<td nowrap>
|
||
<select name="restore_usr" class="button1" type="button" style="width:110px">
|
||
EOM
|
||
foreach(1 .. $#usrfile){
|
||
print qq|<option value="$usrfile[$_]"|;
|
||
print qq|>$usrfile[$_]\n|;
|
||
}
|
||
print <<"EOM";
|
||
</select>
|
||
</td>
|
||
<td nowrap>日時</td>
|
||
<td nowrap>
|
||
<select name="restore_date" class="button1" type="button" style="width:130px">
|
||
EOM
|
||
foreach(0 .. $#week){
|
||
|
||
if(-e "$backdata$week[$_]\.cgi"){
|
||
my $bk_time = (stat("$backdata$week[$_]\.cgi"))[9];
|
||
my($sec,$min,$hour,$mday,$month,$year,$wday,$yday,$isdst) = localtime($bk_time);
|
||
$min = "0$min" if($min<10);
|
||
$sec = "0$sec" if($sec<10);
|
||
$month++;
|
||
my $date_bk = "$month/$mday($week[$wday]) $hour:$min:$sec";
|
||
|
||
print qq|<option value="$backdata$week[$_]\.cgi"|;
|
||
print qq|>$date_bk\n|;
|
||
}
|
||
}
|
||
print <<"EOM";
|
||
</select>
|
||
</td>
|
||
<td nowrap align="center"><input class="button1" type="submit" value="復 旧" style="width:60px"></td>
|
||
|
||
</form>
|
||
|
||
<td nowrap> </td>
|
||
|
||
<form method="$method" action="$ore_admin" name="ore_admin">
|
||
<input type="hidden" name="administrator" value="$in{'administrator'}">
|
||
<input type="hidden" name="list_sort" value="$in{'list_sort'}">
|
||
<input type="hidden" name="list_view" value="$in{'list_view'}">
|
||
<input type="hidden" name="mode" value="restore_all_usr">
|
||
|
||
<td nowrap>日時</td>
|
||
<td nowrap>
|
||
<select name="restore_date" class="button1" type="button" style="width:130px">
|
||
EOM
|
||
foreach(0 .. $#week){
|
||
|
||
if(-e "$backdata$week[$_]\.cgi"){
|
||
my $bk_time = (stat("$backdata$week[$_]\.cgi"))[9];
|
||
my($sec,$min,$hour,$mday,$month,$year,$wday,$yday,$isdst) = localtime($bk_time);
|
||
$min = "0$min" if($min<10);
|
||
$sec = "0$sec" if($sec<10);
|
||
$month++;
|
||
my $date_bk = "$month/$mday($week[$wday]) $hour:$min:$sec";
|
||
|
||
print qq|<option value="$backdata$week[$_]\.cgi"|;
|
||
print qq|>$date_bk\n|;
|
||
}
|
||
}
|
||
print <<"EOM";
|
||
</select>
|
||
</td>
|
||
<td nowrap align="center"><input class="button1" type="submit" value="復 旧" style="width:60px"></td>
|
||
|
||
</form>
|
||
|
||
<td nowrap> </td>
|
||
|
||
<form method="$method" action="$ore_admin" name="ore_admin">
|
||
<input type="hidden" name="administrator" value="$in{'administrator'}">
|
||
<input type="hidden" name="list_sort" value="$in{'list_sort'}">
|
||
<input type="hidden" name="list_view" value="$in{'list_view'}">
|
||
<input type="hidden" name="mode" value="restore_cdat">
|
||
|
||
<td nowrap>日時</td>
|
||
<td nowrap>
|
||
<select name="restore_date" class="button1" type="button" style="width:110px">
|
||
EOM
|
||
|
||
open (IN,"$histfile") || &error("Open error : $histfile");
|
||
my @hist_dat = <IN>;
|
||
close(IN) or die "Can't close : $!";
|
||
|
||
foreach(0 .. $#hist_dat){
|
||
my @y1 = split(/,/,$hist_dat[$_]);
|
||
$y1[42] =~ s/date;//g;
|
||
print qq|<option value="$_">$y1[42]\n|;
|
||
}
|
||
print <<"EOM";
|
||
</select>
|
||
</td>
|
||
<td nowrap align="center"><input class="button1" type="submit" value="復 旧" style="width:60px"></td>
|
||
|
||
</form>
|
||
|
||
</tr>
|
||
</table>
|
||
<br>
|
||
|
||
EOM
|
||
&admin_end;
|
||
exit;
|
||
}
|
||
|
||
# 個別参加者ログ復旧(バックアップデータ差し替え)
|
||
sub restore_person{
|
||
|
||
&error("パスワードが違います!") if($in{'administrator'} ne $admin_pass);
|
||
|
||
# ファイルロック(rename式)
|
||
$lock = &lock if $lock_check;
|
||
|
||
open(IN,"$in{'restore_date'}") || &error("Open Error : $in{'restore_date'}",1);
|
||
my @tdat = <IN>;
|
||
close(IN);
|
||
|
||
$in{'restore_usr'} =~ s/\.cgi//g;
|
||
|
||
foreach (0 .. $#tdat){
|
||
|
||
%R = '';
|
||
my @prats = split(/,/,$tdat[$_]);
|
||
foreach $prats (@prats){
|
||
my($y,$x) = split(/;/,$prats);
|
||
$R{$y} = $x;
|
||
|
||
if($in{'restore_usr'} eq $R{'id'}){
|
||
open (OUT,">$usrdata$R{'id'}\.cgi") || &error("open error:$usrdata$R{'id'}\.cgi",1);
|
||
print OUT $tdat[$_];
|
||
close(OUT) or die "Can't close : $!";
|
||
}
|
||
}
|
||
}
|
||
|
||
&unlock($lock) if $lock_check;
|
||
|
||
$comment ="$in{'restore_date'}から$usrdata$in{'restore_usr'}\.cgiを復旧完了";
|
||
|
||
}
|
||
|
||
# 全参加者ログ一括復旧(バックアップデータ差し替え)
|
||
sub restore_all_usr{
|
||
|
||
&error("パスワードが違います!") if($in{'administrator'} ne $admin_pass);
|
||
|
||
# ファイルロック(rename式)
|
||
$lock = &lock if $lock_check;
|
||
|
||
open(IN,"$in{'restore_date'}") || &error("Open Error : $in{'restore_date'}",1);
|
||
my @tdat = <IN>;
|
||
close(IN);
|
||
|
||
foreach (0 .. $#tdat){
|
||
|
||
%R = '';
|
||
my @prats = split(/,/,$tdat[$_]);
|
||
foreach $prats (@prats){
|
||
my($y,$x) = split(/;/,$prats);
|
||
$R{$y} = $x;
|
||
}
|
||
|
||
open (OUT,">$usrdata$R{'id'}\.cgi") || &error("open error:$usrdata$R{'id'}\.cgi",1);
|
||
print OUT $tdat[$_];
|
||
close(OUT) or die "Can't close : $!";
|
||
|
||
}
|
||
|
||
&unlock($lock) if $lock_check;
|
||
|
||
$comment ="$in{'restore_date'}に含まれる全キャラ復旧完了";
|
||
|
||
}
|
||
|
||
# 国ログ復旧(バックアップデータ差し替え)
|
||
sub restore_cdat{
|
||
|
||
# ファイルロック(rename式)
|
||
$lock = &lock if $lock_check;
|
||
|
||
open (IN,"$histfile") || &error("Open error : $histfile");
|
||
my @hist_dat = <IN>;
|
||
close(IN) or die "Can't close : $!";
|
||
|
||
foreach(0 .. $#hist_dat){
|
||
my @y1 = split(/,/,$hist_dat[$_]);
|
||
$y1[42] =~ s/date;//g;
|
||
print qq|<option value="$_">$y1[42]\n|;
|
||
}
|
||
|
||
&error("パスワードが違います!") if($in{'administrator'} ne $admin_pass);
|
||
|
||
open(IN,"$histfile") || &error("Open Error : $histfile",1);
|
||
my @hist_dat = <IN>;
|
||
close(IN);
|
||
|
||
open (OUT,">$cdatfile") || &error("open error:$cdatfile",1);
|
||
print OUT $hist_dat[$_];
|
||
close(OUT) or die "Can't close : $!";
|
||
|
||
&unlock($lock) if $lock_check;
|
||
|
||
$comment ="$cdatfile 復旧完了";
|
||
|
||
}
|
||
|
||
#-------------------------------------------------------------------------------
|
||
# 配列ソート処理
|
||
sub csvsort{
|
||
local $key=shift;
|
||
local $field=shift;
|
||
local @in=@_;
|
||
local @usr_data;
|
||
@usr_data=map{$_->[0]}sort{$a->[1]<=>$b->[1]}map{[$_,(split /$key/) [$field]]}@in;
|
||
return \@usr_data;
|
||
}
|
||
|
||
#-------------------------------------------------------------------------------
|
||
# 各種削除処理
|
||
|
||
# キャラ別削除
|
||
sub usr_del{
|
||
&error("パスワードが違います!") if($in{'administrator'} ne $admin_pass);
|
||
foreach(0 .. $#USR_DEL){
|
||
unlink("$usrdata$USR_DEL[$_]\.cgi") || &error("$usrdata$USR_DEL[$_]\.cgi が削除できません。");
|
||
$comment.="$usrdata$USR_DEL[$_]\.cgi 削除完了<br>";
|
||
}
|
||
}
|
||
# $usrdata内ファイル全削除
|
||
sub rd_usrdata{
|
||
&error("パスワードが違います!") if($in{'administrator'} ne $admin_pass);
|
||
|
||
&usrdata_read;
|
||
my $flag=0;
|
||
$comment ="$usrdata に含まれる全ファイル削除完了<hr>";
|
||
foreach(0 .. $#usrfile){
|
||
unlink("$usrdata$usrfile[$_]");
|
||
$comment .="[ $usrdata$usrfile[$_] ] ";
|
||
$flag++;
|
||
if($flag>=6){
|
||
$comment .="<br>";
|
||
$flag=0;
|
||
}
|
||
}
|
||
}
|
||
# $backdata内ファイル全削除
|
||
sub rd_backdata{
|
||
&error("パスワードが違います!") if($in{'administrator'} ne $admin_pass);
|
||
|
||
$comment ="$backdata に含まれる全ファイル削除完了<hr>";
|
||
my $flag=0;
|
||
foreach(0 .. $#week){
|
||
unlink("$backdata$week[$_]\.cgi");
|
||
$comment .="[ $backdata$week[$_]\.cgi ] ";
|
||
$flag++;
|
||
if($flag>=6){
|
||
$comment .="<br>";
|
||
$flag=0;
|
||
}
|
||
}
|
||
}
|
||
|
||
#-------------------------------------------------------------------------------
|
||
# 国データ初期化
|
||
sub cdata_reset{
|
||
&error("パスワードが違います!") if($in{'administrator'} ne $admin_pass);
|
||
|
||
$lock = &lock if $lock_check;
|
||
|
||
&cdata_open;
|
||
|
||
require './inc/ore_sub-main_reset.cgi';&reset_cdat;
|
||
|
||
&cdat_write;
|
||
|
||
&unlock($lock) if $lock_check;
|
||
|
||
$comment = "国データを初期化しました。<br>";
|
||
}
|
||
|
||
#-------------------------------------------------------------------------------
|
||
# キャラデータ変更
|
||
|
||
# 書き換え画面
|
||
sub usr_regist{
|
||
|
||
&admin_head;
|
||
&settei;
|
||
|
||
# 参加者データ一括読み込み
|
||
open(IN,"$usrdata$id\.cgi") || &error("Open Error : $usrdata$id\.cgi",1);
|
||
@dat = <IN>;
|
||
close(IN);
|
||
|
||
%DAT = '';
|
||
my @prats = split(/,/,$dat[0]);
|
||
foreach (0 .. $#prats){
|
||
my ($key,$v) = split(/;/,$prats[$_]);
|
||
$DAT{$key} = $v;
|
||
}
|
||
|
||
# ハッシュ読み込み
|
||
&hash_data;
|
||
|
||
print <<"EOM";
|
||
<form method="$method" action="$ore_admin" name="ore_admin">
|
||
<input type="hidden" name="administrator" value="$in{'administrator'}">
|
||
<input type="hidden" name="mode" value="usr_regist2">
|
||
<input type="hidden" name="id_old" value="$id">
|
||
|
||
<table border="0" cellspacing="2" cellpadding="2" align="center">
|
||
<tr>
|
||
<th nowrap colspan=2 align="center">データ変更</th>
|
||
</tr>
|
||
<tr>
|
||
<td nowrap><input class="button1" type="submit" value="書き換え"></td>
|
||
<td nowrap><input class="button1" type="reset" value="戻す"></td>
|
||
</tr>
|
||
</table>
|
||
|
||
<br><br>
|
||
|
||
<table border="0" cellspacing="2" cellpadding="2" align="center">
|
||
<tr>
|
||
<th nowrap>名前</th>
|
||
<th nowrap>I D</th>
|
||
<th nowrap>パスワード</th>
|
||
<th nowrap>性別</th>
|
||
<th nowrap>レベル</th>
|
||
<th nowrap>所属</th>
|
||
</tr>
|
||
<tr>
|
||
<td nowrap><input type="text" name="nm" value="$nm" style="width:100px"></td>
|
||
<td nowrap><input type="text" name="id" value="$id" style="width:100px"></td>
|
||
<td nowrap><input type="text" name="pw" value="$pw" style="width:80px"></td>
|
||
|
||
<td nowrap>
|
||
<select name="sei">
|
||
EOM
|
||
foreach(1 .. $#seibetu){
|
||
print "<option value=$_";
|
||
print " selected" if($sei==$_);
|
||
print ">$_:$seibetu[$_]\n";
|
||
}
|
||
print <<"EOM";
|
||
</select>
|
||
</td>
|
||
|
||
<td nowrap><input type="text" name="lv" value="$lv" style="width:30px"></td>
|
||
|
||
<td nowrap>
|
||
<select name="camp">
|
||
EOM
|
||
foreach(0 .. $#cmp){
|
||
print "<option value=$_";
|
||
print " selected" if($camp==$_);
|
||
print ">$_:$cmp[$_]\n";
|
||
}
|
||
print <<"EOM";
|
||
</select>
|
||
</td>
|
||
|
||
</tr>
|
||
</table>
|
||
|
||
<br>
|
||
|
||
<table border="0" cellspacing="2" cellpadding="2" align="center">
|
||
<tr>
|
||
<th nowrap>HP</th>
|
||
<th nowrap>MP</th>
|
||
<th nowrap>UA</th>
|
||
<th nowrap>UD</th>
|
||
<th nowrap>LR</th>
|
||
<th nowrap>AG</th>
|
||
<th nowrap>GOLD</th>
|
||
<th nowrap>階級</th>
|
||
<th nowrap>称号</th>
|
||
<th nowrap>討伐回数</th>
|
||
</tr>
|
||
<tr>
|
||
</td>
|
||
<td nowrap><input type="text" name="max_hp" value="$max_hp" style="width:40px"></td>
|
||
<td nowrap><input type="text" name="max_mp" value="$max_mp" style="width:40px"></td>
|
||
<td nowrap><input type="text" name="ua" value="$ua" style="width:30px"></td>
|
||
<td nowrap><input type="text" name="ud" value="$ud" style="width:30px"></td>
|
||
<td nowrap><input type="text" name="lr" value="$lr" style="width:30px"></td>
|
||
<td nowrap><input type="text" name="ag" value="$ag" style="width:30px"></td>
|
||
<td nowrap><input type="text" name="gold" value="$gold" style="width:80px"></td>
|
||
|
||
<td nowrap>
|
||
<select name="rank">
|
||
EOM
|
||
foreach(0 .. $#cl){
|
||
print "<option value=$_";
|
||
print " selected" if($rank==$_);
|
||
print ">$_:$cl[$_]\n";
|
||
}
|
||
print <<"EOM";
|
||
</select>
|
||
</td>
|
||
|
||
<td nowrap>
|
||
<select name="sogo">
|
||
EOM
|
||
foreach(0 .. $#sogo_p){
|
||
print "<option value=$_";
|
||
print " selected" if($sogo==$_);
|
||
print ">$_:$sogo_p[$_]\n";
|
||
}
|
||
print <<"EOM";
|
||
</select>
|
||
</td>
|
||
|
||
<td nowrap><input type="text" name="we" value="$we" style="width:30px"></td>
|
||
|
||
</tr>
|
||
</table>
|
||
|
||
<br>
|
||
|
||
<table border="0" cellspacing="2" cellpadding="2" align="center">
|
||
<tr>
|
||
<th nowrap colspan="2">武具</th>
|
||
<th nowrap colspan="2">防具</th>
|
||
<th nowrap colspan="2">道具</th>
|
||
</tr>
|
||
<tr>
|
||
|
||
<td nowrap>
|
||
<select name="dg_a">
|
||
EOM
|
||
foreach(0 .. $#dg_data){
|
||
print "<option value=$_";
|
||
print " selected" if($dg_a==$_);
|
||
print ">$_:$dg_data[$_][1]\n";
|
||
}
|
||
print <<"EOM";
|
||
</select>
|
||
</td>
|
||
<td nowrap>残り<input type="text" name="dg_cnt" value="$dg_cnt" style="width:30px"></td>
|
||
|
||
<td nowrap>
|
||
<select name="df_a">
|
||
EOM
|
||
foreach(0 .. $#df_data){
|
||
print "<option value=$_";
|
||
print " selected" if($df_a==$_);
|
||
print ">$_:$df_data[$_][1]\n";
|
||
}
|
||
print <<"EOM";
|
||
</select>
|
||
</td>
|
||
<td nowrap>残り<input type="text" name="df_cnt" value="$df_cnt" style="width:30px"></td>
|
||
|
||
<td nowrap>
|
||
<select name="di_a">
|
||
EOM
|
||
foreach(0 .. $#di_data){
|
||
print "<option value=$_";
|
||
print " selected" if($di_a==$_);
|
||
print ">$_:$di_data[$_][1]\n";
|
||
}
|
||
print <<"EOM";
|
||
</select>
|
||
</td>
|
||
<td nowrap>残り<input type="text" name="di_cnt" value="$di_cnt" style="width:30px"></td>
|
||
|
||
</tr>
|
||
</table>
|
||
|
||
<br>
|
||
|
||
<table border="0" cellspacing="2" cellpadding="2" align="center">
|
||
<tr>
|
||
<th nowrap>行動フラグリセット</th>
|
||
<th nowrap>行動セッション</th>
|
||
<th nowrap>行動判定</th>
|
||
<th nowrap>行動判定</th>
|
||
<th nowrap>戦闘判別</th>
|
||
<th nowrap>対戦者</th>
|
||
<th nowrap>拘束時間</th>
|
||
<th nowrap>対象国</th>
|
||
</tr>
|
||
<tr>
|
||
</td>
|
||
<td nowrap>エラー発生時 各値0 or 削除</td>
|
||
<td nowrap><input type="text" name="act_cnt" value="$act_cnt" style="width:30px"></td>
|
||
<td nowrap><input type="text" name="type" value="$type" style="width:60px"></td>
|
||
<td nowrap><input type="text" name="tm" value="$tm" style="width:30px"></td>
|
||
<td nowrap><input type="text" name="ck" value="$ck" style="width:30px"></td>
|
||
<td nowrap><input type="text" name="bt" value="$bt" style="width:30px"></td>
|
||
<td nowrap><input type="text" name="pr" value="$pr" style="width:50px"></td>
|
||
<td nowrap><input type="text" name="nation" value="$nation" style="width:30px"></td>
|
||
</tr>
|
||
</table>
|
||
|
||
<br>
|
||
|
||
<table border="0" cellspacing="2" cellpadding="2" align="center">
|
||
<tr>
|
||
<th nowrap>情報時に表\示\されるコメント(全角40字まで)</th>
|
||
</tr>
|
||
<tr>
|
||
</td>
|
||
<td nowrap><input type="text" name="info_mes" value="$info_mes" style="width:400px"></td>
|
||
</tr>
|
||
</table>
|
||
|
||
</form>
|
||
EOM
|
||
&admin_end;
|
||
exit;
|
||
}
|
||
|
||
# 書き換え処理&結果
|
||
sub usr_regist2{
|
||
|
||
&admin_head;
|
||
|
||
# ファイルロック(rename式)
|
||
$lock = &lock if $lock_check;
|
||
|
||
# 参加者データ一括読み込み
|
||
open(IN,"$usrdata$in{'id_old'}\.cgi") || &error("Open Error : $usrdata$in{'id_old'}\.cgi",1);
|
||
@dat = <IN>;
|
||
close(IN);
|
||
|
||
%DAT = '';
|
||
my @prats = split(/,/,$dat[0]);
|
||
foreach (0 .. $#prats){
|
||
my ($key,$v) = split(/;/,$prats[$_]);
|
||
$DAT{$key} = $v;
|
||
}
|
||
|
||
# ハッシュ読み込み
|
||
&hash_data;
|
||
|
||
$dat[0] = "la;$la,nm;$in{'nm'},pw;$in{'pw'},id;$in{'id'},sei;$in{'sei'},type;$in{'type'},age_time;$age_time,act_cnt;$in{'act_cnt'},hp;$hp,max_hp;$in{'max_hp'},lv;$in{'lv'},mp;$mp,max_mp;$in{'max_mp'},rank;$in{'rank'},ua;$in{'ua'},ud;$in{'ud'},lr;$in{'lr'},ag;$in{'ag'},ck;$in{'ck'},tm;$in{'tm'},bt;$in{'bt'},bst;$in{'bst'},exe;$exe,rank_exe;$rank_exe,sol;$sol,sol_lv;$sol_lv,nation;$in{'nation'},we;$in{'we'},camp;$in{'camp'},pr;$in{'pr'},tnm;$tnm,tid;$tid,thp;$thp,tlr;$tlr,tsol;$tsol,tsg;$tsg,tsol_lv;$tsol_lv,b_n;$b_n,b_v;$b_v,thp_max;$thp_max,tlv;$tlv,tdg_a;$tdg_a,tdf_a;$tdf_a,tua;$tua,tud;$tud,tmp;$tmp,tcp;$tcp,gold;$in{'gold'},roku;$roku,dg_a;$in{'dg_a'},dg_cnt;$in{'dg_cnt'},df_a;$in{'df_a'},df_cnt;$in{'df_cnt'},di_a;$in{'di_a'},di_cnt;$in{'di_cnt'},sogo;$in{'sogo'},mes;$mes,info_mes;$in{'info_mes'},\n";
|
||
|
||
open (OUT,">$usrdata$in{'id_old'}\.cgi") || &error("キャラデータが開けません[$in{'id_old'}]",1);
|
||
print OUT @dat;
|
||
close(OUT) or die "Can't close : $!";
|
||
|
||
if($in{'id_old'} ne $in{'id'}){rename("$usrdata$in{'id_old'}\.cgi","$usrdata$in{'id'}\.cgi") || &error("ファイル名をID名に変更できません。",1);}
|
||
|
||
# ファイルアンロック(rename式)
|
||
&unlock($lock) if $lock_check;
|
||
|
||
print <<"EOM";
|
||
<table border="0" cellspacing="2" cellpadding="2" align="center">
|
||
<tr>
|
||
<th nowrap colspan=2 align="center">以下のとおりにデータ変更しました。</th>
|
||
</tr>
|
||
</table>
|
||
|
||
<br><br>
|
||
|
||
<table border="0" cellspacing="2" cellpadding="2" align="center">
|
||
<tr>
|
||
<th nowrap>名前</th>
|
||
<th nowrap>I D</th>
|
||
<th nowrap>パスワード</th>
|
||
<th nowrap>性別</th>
|
||
<th nowrap>レベル</th>
|
||
<th nowrap>所属</th>
|
||
</tr>
|
||
<tr>
|
||
<td nowrap>$in{'nm'}</td>
|
||
<td nowrap>$in{'id'}</td>
|
||
<td nowrap>$in{'pw'}</td>
|
||
<td nowrap>$in{'sei'}</td>
|
||
<td nowrap>$in{'lv'}</td>
|
||
<td nowrap>$in{'camp'}</td>
|
||
</tr>
|
||
</table>
|
||
|
||
<br>
|
||
|
||
<table border="0" cellspacing="2" cellpadding="2" align="center">
|
||
<tr>
|
||
<th nowrap>HP</th>
|
||
<th nowrap>MP</th>
|
||
<th nowrap>UA</th>
|
||
<th nowrap>UD</th>
|
||
<th nowrap>LR</th>
|
||
<th nowrap>AG</th>
|
||
<th nowrap>GOLD</th>
|
||
<th nowrap>階級</th>
|
||
<th nowrap>称号</th>
|
||
<th nowrap>討伐回数</th>
|
||
</tr>
|
||
<tr>
|
||
<td nowrap>$in{'max_hp'}</td>
|
||
<td nowrap>$in{'max_mp'}</td>
|
||
<td nowrap>$in{'ua'}</td>
|
||
<td nowrap>$in{'ud'}</td>
|
||
<td nowrap>$in{'lr'}</td>
|
||
<td nowrap>$in{'ag'}</td>
|
||
<td nowrap>$in{'gold'}</td>
|
||
<td nowrap>$in{'rank'}</td>
|
||
<td nowrap>$in{'sogo'}</td>
|
||
<td nowrap>$in{'we'}</td>
|
||
</tr>
|
||
</table>
|
||
|
||
<br>
|
||
|
||
<table border="0" cellspacing="2" cellpadding="2" align="center">
|
||
<tr>
|
||
<th nowrap colspan="2">武具</th>
|
||
<th nowrap colspan="2">防具</th>
|
||
<th nowrap colspan="2">道具</th>
|
||
</tr>
|
||
<tr>
|
||
<td nowrap>$in{'dg_a'}</td>
|
||
<td nowrap>残り $in{'dg_cnt'}</td>
|
||
<td nowrap>$in{'df_a'}</td>
|
||
<td nowrap>残り $in{'df_cnt'}</td>
|
||
<td nowrap>$in{'di_a'}</td>
|
||
<td nowrap>残り $in{'di_cnt'}</td>
|
||
</tr>
|
||
</table>
|
||
|
||
<br>
|
||
|
||
<table border="0" cellspacing="2" cellpadding="2" align="center">
|
||
<tr>
|
||
<th nowrap>行動セッション</th>
|
||
<th nowrap>行動判定</th>
|
||
<th nowrap>行動判定</th>
|
||
<th nowrap>戦闘判別</th>
|
||
<th nowrap>対戦者</th>
|
||
<th nowrap>拘束時間</th>
|
||
<th nowrap>対象国</th>
|
||
</tr>
|
||
<tr>
|
||
<td nowrap>$in{'act_cnt'}</td>
|
||
<td nowrap>$in{'type'}</td>
|
||
<td nowrap>$in{'tm'}</td>
|
||
<td nowrap>$in{'ck'}</td>
|
||
<td nowrap>$in{'bt'}</td>
|
||
<td nowrap>$in{'pr'}</td>
|
||
<td nowrap>$in{'nation'}</td>
|
||
</tr>
|
||
</table>
|
||
|
||
<br>
|
||
|
||
<table border="0" cellspacing="2" cellpadding="2" align="center">
|
||
<tr>
|
||
<th nowrap>情報時に表\示\されるコメント(全角40字まで)</th>
|
||
</tr>
|
||
<tr>
|
||
</td>
|
||
<td nowrap>$info_mes</td>
|
||
</tr>
|
||
</table>
|
||
|
||
EOM
|
||
&admin_end;
|
||
exit;
|
||
}
|
||
|
||
#-------------------------------------------------------------------------------
|
||
# 国データ変更
|
||
|
||
# 書き換え画面
|
||
sub cdat_regist{
|
||
|
||
&admin_head;
|
||
&cdata_open;
|
||
|
||
$set -= $time;
|
||
|
||
print <<EOM;
|
||
<form method="$method" action="$ore_admin" name="ore_admin">
|
||
<input type="hidden" name="administrator" value="$in{'administrator'}">
|
||
<input type="hidden" name="mode" value="cdat_regist2">
|
||
<input type="hidden" name="id_old" value="$id">
|
||
|
||
<table border="0" cellspacing="2" cellpadding="2" align="center">
|
||
<tr>
|
||
<th nowrap colspan="2" align="center">データ変更</th>
|
||
<th nowrap rowspan="2" align="left" style="font-size:14px;line-height:18px">
|
||
・状態 >> 0:正常 1:亡国<br>
|
||
・各国定員 >>
|
||
EOM
|
||
|
||
($limit_mode) ? print "自動算出" : print "手動割り当て" ;
|
||
|
||
print <<EOM;
|
||
</th>
|
||
</tr>
|
||
<tr>
|
||
<td nowrap><input class="button1" type="submit" value="書き換え"></td>
|
||
<td nowrap><input class="button1" type="reset" value="戻す"></td>
|
||
</tr>
|
||
</table>
|
||
|
||
<br><br>
|
||
|
||
<table border="0" cellspacing="4" cellpadding="0" bgcolor="#444466" align="center">
|
||
<tr>
|
||
<td bgcolor="#000000" align="center" valign="top">
|
||
|
||
<table border=0 cellpadding=2 cellspacing=2 width=100% align=center>
|
||
<tr>
|
||
<td width="72">国名</td>
|
||
EOM
|
||
|
||
foreach(1 .. 5){
|
||
print qq|<td align="center" width="92">$cmp[$_]</td>\n|;
|
||
}
|
||
print <<EOM;
|
||
</tr><tr><td>状態</td>
|
||
<td><input type="text" name="ce1" value="$ce1" style="width:60px"></td>
|
||
<td><input type="text" name="ce2" value="$ce2" style="width:60px"></td>
|
||
<td><input type="text" name="ce3" value="$ce3" style="width:60px"></td>
|
||
<td><input type="text" name="ce4" value="$ce4" style="width:60px"></td>
|
||
<td><input type="text" name="ce5" value="$ce5" style="width:60px"></td>
|
||
</tr>
|
||
<tr>
|
||
<td>総国力</td>
|
||
<td><input type="text" name="cn1" value="$cn1" style="width:60px"></td>
|
||
<td><input type="text" name="cn2" value="$cn2" style="width:60px"></td>
|
||
<td><input type="text" name="cn3" value="$cn3" style="width:60px"></td>
|
||
<td><input type="text" name="cn4" value="$cn4" style="width:60px"></td>
|
||
<td><input type="text" name="cn5" value="$cn5" style="width:60px"></td>
|
||
</tr>
|
||
<tr>
|
||
<td>国家\予\算</td>
|
||
<td><input type="text" name="cg1" value="$cg1" style="width:60px"></td>
|
||
<td><input type="text" name="cg2" value="$cg2" style="width:60px"></td>
|
||
<td><input type="text" name="cg3" value="$cg3" style="width:60px"></td>
|
||
<td><input type="text" name="cg4" value="$cg4" style="width:60px"></td>
|
||
<td><input type="text" name="cg5" value="$cg5" style="width:60px"></td>
|
||
</tr>
|
||
<tr>
|
||
<td>総兵糧</td>
|
||
<td><input type="text" name="cf1" value="$cf1" style="width:60px"></td>
|
||
<td><input type="text" name="cf2" value="$cf2" style="width:60px"></td>
|
||
<td><input type="text" name="cf3" value="$cf3" style="width:60px"></td>
|
||
<td><input type="text" name="cf4" value="$cf4" style="width:60px"></td>
|
||
<td><input type="text" name="cf5" value="$cf5" style="width:60px"></td>
|
||
</tr>
|
||
<tr>
|
||
<td>総兵士数</td>
|
||
<td><input type="text" name="cs1" value="$cs1" style="width:60px"></td>
|
||
<td><input type="text" name="cs2" value="$cs2" style="width:60px"></td>
|
||
<td><input type="text" name="cs3" value="$cs3" style="width:60px"></td>
|
||
<td><input type="text" name="cs4" value="$cs4" style="width:60px"></td>
|
||
<td><input type="text" name="cs5" value="$cs5" style="width:60px"></td>
|
||
</tr>
|
||
<tr>
|
||
<td bgcolor=#CCCCFF>所属人数</td>
|
||
<td align=center>$c1/<input type="text" name="c1a" value="$c1a" style="width:30px"></td>
|
||
<td align=center>$c2/<input type="text" name="c2a" value="$c2a" style="width:30px"></td>
|
||
<td align=center>$c3/<input type="text" name="c3a" value="$c3a" style="width:30px"></td>
|
||
<td align=center>$c4/<input type="text" name="c4a" value="$c4a" style="width:30px"></td>
|
||
<td align=center>$c5/<input type="text" name="c5a" value="$c5a" style="width:30px"></td>
|
||
</tr>
|
||
</table>
|
||
統一期限:あと<input type="text" name="set" value="$set" style="width:60px">秒
|
||
|
||
現在<input type="text" name="goal_no" value="$goal_no" style="width:20px">期
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</form>
|
||
EOM
|
||
&admin_end;
|
||
exit;
|
||
}
|
||
|
||
# 書き換え処理
|
||
sub cdat_regist2{
|
||
|
||
&admin_head;
|
||
|
||
# ファイルロック(rename式)
|
||
$lock = &lock if $lock_check;
|
||
|
||
&cdata_open;
|
||
|
||
$cn1=$in{'cn1'};# 国1の国力
|
||
$cg1=$in{'cg1'};# 国1の財政
|
||
$cf1=$in{'cf1'};# 国1の蓄米
|
||
$cs1=$in{'cs1'};# 国1の予備兵
|
||
$ce1=$in{'ce1'};# 国1の現状
|
||
$c1a=$in{'c1a'};# 国1の定員数
|
||
$cn2=$in{'cn2'};
|
||
$cg2=$in{'cg2'};
|
||
$cf2=$in{'cf2'};
|
||
$cs2=$in{'cs2'};
|
||
$ce2=$in{'ce2'};
|
||
$c2a=$in{'c2a'};
|
||
$cn3=$in{'cn3'};
|
||
$cg3=$in{'cg3'};
|
||
$cf3=$in{'cf3'};
|
||
$cs3=$in{'cs3'};
|
||
$ce3=$in{'ce3'};
|
||
$c3a=$in{'c3a'};
|
||
$cn4=$in{'cn4'};
|
||
$cg4=$in{'cg4'};
|
||
$cf4=$in{'cf4'};
|
||
$cs4=$in{'cs4'};
|
||
$ce4=$in{'ce4'};
|
||
$c4a=$in{'c4a'};
|
||
$cn5=$in{'cn5'};
|
||
$cg5=$in{'cg5'};
|
||
$cf5=$in{'cf5'};
|
||
$cs5=$in{'cs5'};
|
||
$ce5=$in{'ce5'};
|
||
$c5a=$in{'c5a'};
|
||
|
||
$goal_no=$in{'goal_no'};
|
||
$set=$in{'set'}+$time;
|
||
|
||
&cdat_write;
|
||
|
||
# ファイルアンロック(rename式)
|
||
&unlock($lock) if $lock_check;
|
||
|
||
print <<EOM;
|
||
<table border="0" cellspacing="2" cellpadding="2" align="center">
|
||
<tr>
|
||
<th nowrap colspan=2 align="center">以下のとおりにデータ変更しました。</th>
|
||
</tr>
|
||
</table>
|
||
|
||
<br><br>
|
||
<div align="center" style="font-size:14px;color:#222244">
|
||
・状態 >> 0:正常 1:亡国<br>
|
||
・各国定員 >>
|
||
EOM
|
||
|
||
($limit_mode) ? print "自動算出" : print "手動割り当て" ;
|
||
|
||
print <<EOM;
|
||
</div>
|
||
<br><br>
|
||
|
||
<table border="0" cellspacing="4" cellpadding="0" bgcolor="#444466" align="center">
|
||
<tr>
|
||
<td bgcolor="#000000" align="center" valign="top">
|
||
|
||
<table border=0 cellpadding=2 cellspacing=2 width=100% align=center>
|
||
<tr>
|
||
<td width="72">国名</td>
|
||
EOM
|
||
|
||
foreach(1 .. 5){
|
||
print qq|<td align="center" width="92">$cmp[$_]</td>\n|;
|
||
}
|
||
print <<EOM;
|
||
</tr>
|
||
<tr>
|
||
<td>状態</td>
|
||
<td align=center>$in{'ce1'}</td>
|
||
<td align=center>$in{'ce2'}</td>
|
||
<td align=center>$in{'ce3'}</td>
|
||
<td align=center>$in{'ce4'}</td>
|
||
<td align=center>$in{'ce5'}</td>
|
||
</tr>
|
||
<tr>
|
||
<td>総国力</td>
|
||
<td>$in{'cn1'}</td>
|
||
<td>$in{'cn2'}</td>
|
||
<td>$in{'cn3'}</td>
|
||
<td>$in{'cn4'}</td>
|
||
<td>$in{'cn5'}</td>
|
||
</tr>
|
||
<tr>
|
||
<td>国家\予\算</td>
|
||
<td>$in{'cg1'}</td>
|
||
<td>$in{'cg2'}</td>
|
||
<td>$in{'cg3'}</td>
|
||
<td>$in{'cg4'}</td>
|
||
<td>$in{'cg5'}</td>
|
||
</tr>
|
||
<tr>
|
||
<td>総兵糧</td>
|
||
<td>$in{'cf1'}</td>
|
||
<td>$in{'cf2'}</td>
|
||
<td>$in{'cf3'}</td>
|
||
<td>$in{'cf4'}</td>
|
||
<td>$in{'cf5'}</td>
|
||
</tr>
|
||
<tr>
|
||
<td>総兵士数</td>
|
||
<td>$in{'cs1'}</td>
|
||
<td>$in{'cs2'}</td>
|
||
<td>$in{'cs3'}</td>
|
||
<td>$in{'cs4'}</td>
|
||
<td>$in{'cs5'}</td>
|
||
</tr>
|
||
<tr>
|
||
<td>所属人数</td>
|
||
<td align=center>$c1/$in{'c1a'}</td>
|
||
<td align=center>$c2/$in{'c2a'}</td>
|
||
<td align=center>$c3/$in{'c3a'}</td>
|
||
<td align=center>$c4/$in{'c4a'}</td>
|
||
<td align=center>$c5/$in{'c5a'}</td>
|
||
</tr>
|
||
</table>
|
||
|
||
統一期限:あと $in{'set'} 秒
|
||
|
||
現在 $in{'goal_no'} 期
|
||
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</form>
|
||
EOM
|
||
&admin_end;
|
||
exit;
|
||
}
|
||
|
||
#-------------------------------------------------------------------------------
|
||
# テンプレート
|
||
|
||
# ヘッダー
|
||
sub admin_head{
|
||
|
||
&error("パスワードが違います!") if($in{'administrator'} ne $admin_pass);
|
||
|
||
$in{'list_sort'} = 3 if(!$in{'list_sort'});
|
||
|
||
&content_type;
|
||
|
||
print <<"EOM";
|
||
|
||
<html>
|
||
<head>
|
||
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
|
||
<title>$titleh</title>
|
||
<style type="text/css">
|
||
<!--
|
||
.button1{
|
||
font-family: "MS Pゴシック", "Osaka"; font-size: 12px; font-weight: 400; color: #ddddee;
|
||
border: 2px #aaaabb ridge; cursor: hand; background-color: #666699;
|
||
width:50px;
|
||
}
|
||
body { font-size: 12px; color: #aaaab9; background-color: #ddddff; cursor: crosshair}
|
||
table { background-color: #666699;}
|
||
td { font-size: 14px; color: #222244; background-color: #eeeeff; cursor: crosshair}
|
||
th { font-size: 12px; color: #eeeeff; background-color: #222244; font-weight:400}
|
||
|
||
-->
|
||
</style>
|
||
</head>
|
||
|
||
<body bgcolor="#000000" text="#999999" link="#333399" vlink="#333399" alink="#333399">
|
||
EOM
|
||
}
|
||
|
||
# フッター
|
||
sub admin_end{
|
||
print <<"EOM";
|
||
<br><br><br>
|
||
<table border="0" cellspacing="2" cellpadding="2" bgcolor="#9999CC" align="center">
|
||
<tr>
|
||
<td valign="middle" align="center" nowrap style="color:ddddee;font-size:14px;background-color:#333399">
|
||
罪と罰++ 二律背反 管理者機\能\ $ver の使い方
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td bgcolor="#DDDDEE" valign="middle" align="left" nowrap style="line-height:20px; font-size:12px">
|
||
>> 各処理に詳細なエラー処理は行なっていません。データ書き換え等は慎重に行なってください。<br>
|
||
>> 各キャラの<b>[ログイン]</b>ボタンをクリックすると、そのキャラにログインできます。<br>
|
||
>> 各キャラの<b>[ 編集 ]</b>ボタンをクリックすると、キャラデータ編集画面に移動します。<br>
|
||
・キャラデータのIDを変更するとキャラデータファイル名も変更されます。<br>
|
||
>> 各キャラの左端<b>[ 削除 ]</b>チェックボックスにチェックを入れ、下メニューの<b>[キャラ削除]</b>ボタンをクリックすると選択したキャラが削除されます。<br>
|
||
>> 下メニューの<b>[国データ編集]</b>ボタンをクリックすると現在の国データを編集できます。<br>
|
||
・定員人数の指定はore_config.cgiの<b>[\$limit_mode]</b>値が優先されます。<br>
|
||
>> 下メニューの<b>[国データ初期化]</b>ボタンをクリックすると現在の国データが初期化されます。<br>
|
||
>> CGI実行にユーザー権限がないサーバではキャラデータファイルとバックアップファイルが削除できない場合は、この管理者機\能\から削除を行ってください。<br>
|
||
・下メニューの<b>[キャラデータ一括削除]</b>をクリックすると全キャラデータを一括削除します。<br>
|
||
・下メニューの<b>[バックアップ一括削除]</b>をクリックすると全バックアップデータを一括削除します。<br>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td bgcolor="#DDDDEE" valign="middle" align="center" nowrap style="font-size:12px">
|
||
罪と罰++ 二律背反 管理者機\能\ $ver <a href="http://pom.to/" target="_blank">BLANK BOARD[ねっと遊園地♪]</a> <a href="http://www17.big.or.jp/~obochan/vivid/" target="_blank">Vivid Studio.</a>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</body>
|
||
</html>
|
||
EOM
|
||
} |