📄 others.cgi
字号:
<tr>
<td class="b1">魅力</td>
<td>$n_6</td>
<td class="b1">运</td>
<td>$lp</td>
</tr>
</table>
<form action="$script" method="post">
<input type="button" value="TOPペ—ジへ" onclick="location='$scripto'">
<input type="hidden" name=mode value=log_in>
<input type="hidden" name=id value="$in{'id'}">
<input type="hidden" name=pass value="$in{'pass'}">
<input type="submit" value="ステ—タス画面へ">
</form>
EOM
&footer;
exit;
}
}
__SUB__
message => <<'__SUB__',
#--------------#
# メッセ—ジ #
#--------------#
sub message {
if($in{'mes'} eq "") { &error("メッセ—ジが记入されていません"); }
if($in{'mesid'} eq "") { &error("相手が指定されていません"); }
open(IN,"./charalog/$in{'id'}.cgi") or &error('ファイルを开けませんでした。');
@log_in = <IN>;
close(IN);
$hit=0;
foreach(@log_in){
($kid,$kpass,$ksite,$kurl,$kname,$ksex,$kchara,$kn_0,$kn_1,$kn_2,$kn_3,$kn_4,$kn_5,$kn_6,$ksyoku,$khp,$kmaxhp,$kex,$klv,$kgold,$klp,$ktotal,$kkati,$kwaza,$kitem,$kmons,$khost,$kdate,$kmori,$kdef,$ktac,$kkumite) = split(/<>/);
if($in{'id'} eq "$kid" and $in{'pass'} eq "$kpass") {
$hit=1; last;
}
}
if(!$hit) { &error("オ—プンエラ—、ID·パスワ—ドが正しくありません。"); }
if($in{'id'} ne "$kid" or $in{'pass'} ne "$kpass") {&error("オ—プンエラ—、ID·パスワ—ドが正しくありません。");}
&get_time;
# ファイルロック
if ($lockkey == 1) { &lock1; }
elsif ($lockkey == 2) { &lock2; }
open(IN,"$message_file") or &error('ファイルを开けませんでした。');
@mes_regist = <IN>;
close(IN);
open(IN,"$chara_file1") or &error('ファイルを开けませんでした。');
@MESSAGE = <IN>;
close(IN);
foreach(@MESSAGE) {
($did,$dpass,$dsite,$durl,$dname) = split(/<>/);
if($in{'mesid'} eq "$did") { last; }
}
$mes_max = @mes_regist;
if($mes_max > $max) { pop(@mes_regist); }
unshift(@mes_regist,"$in{'mesid'}<>$in{'id'}<>$in{'name'}<>$in{'mes'}<>$dname<>$gettime<>\n");
open(OUT,">$message_file") or &error('ファイルを开けませんでした。');
print OUT @mes_regist;
close(OUT);
# ロック解除
if (-e $lockfile) { unlink($lockfile); }
&header;
print <<"EOM";
<h1>$dnameさんへメッセ—ジを送りました。</h1>
<hr size=0>
<form action="$scriptmes" method="post">
<input type=hidden name=mode value=messe>
<input type=hidden name=id value="$kid">
<input type=hidden name=pass value="$kpass">
<input type=submit value="戾る">
</form>
EOM
&footer;
exit;
}
__SUB__
tensyoku => <<'__SUB__',
#--------#
# 转职 #
#--------#
sub tensyoku {
if($in{'syoku'} eq 'no') { &error("职业を选择してください。"); }
$syoku = $in{'syoku'};
$id = $in{'id'};
open(IN,"./charalog/$in{'id'}.cgi") or &error('ファイルを开けませんでした。');
@log_in = <IN>;
close(IN);
$hit=0;
foreach(@log_in){
($kid,$kpass,$ksite,$kurl,$kname,$ksex,$kchara,$kn_0,$kn_1,$kn_2,$kn_3,$kn_4,$kn_5,$kn_6,$ksyoku,$khp,$kmaxhp,$kex,$klv,$kgold,$klp,$ktotal,$kkati,$kwaza,$kitem,$kmons,$khost,$kdate,$kmori,$kdef,$ktac,$kkumite) = split(/<>/);
if($in{'id'} eq "$kid" and $in{'pass'} eq "$kpass") {
$hit=1; last;
}
}
if(!$hit) { &error("オ—プンエラ—、ID·パスワ—ドが正しくありません。"); }
&get_host;
$date = time();
# ファイルロック
if ($lockkey == 1) { &lock1; }
elsif ($lockkey == 2) { &lock2; }
open(IN,"./charalog/$in{'id'}.cgi") or &error('ファイルを开けませんでした。');
@tensyoku = <IN>;
close(IN);
open(IN,"$syoku_file");
@syokudate = <IN>;
close(IN);
($a,$b,$c,$d,$e,$f,$g) = split(/<>/,$syokudate[$in{'syoku'}]);
if(!$a) { $a = $kiso_nouryoku[0]; }
if(!$b) { $b = $kiso_nouryoku[1]; }
if(!$c) { $c = $kiso_nouryoku[2]; }
if(!$d) { $d = $kiso_nouryoku[3]; }
if(!$e) { $e = $kiso_nouryoku[4]; }
if(!$f) { $f = $kiso_nouryoku[5]; }
if(!$g) { $g = $kiso_nouryoku[6]; }
$lv = 1;
$ex = 0;
@ten_new = ();
foreach(@tensyoku) {
($tid,$tpass,$tsite,$turl,$tname,$tsex,$tchara,$tn_0,$tn_1,$tn_2,$tn_3,$tn_4,$tn_5,$tn_6,$tsyoku,$thp,$tmaxhp,$tex,$tlv,$tgold,$tlp,$ttotal,$tkati,$twaza,$titem,$tmons,$thost,$tdate,$tmori,$tdef,$ttac,$tkumite) = split(/<>/);
$tn_0 = int(rand($tn_0)) + 1;
$tn_1 = int(rand($tn_1)) + 1;
$tn_2 = int(rand($tn_2)) + 1;
$tn_3 = int(rand($tn_3)) + 1;
$tn_4 = int(rand($tn_4)) + 1;
$tn_5 = int(rand($tn_5)) + 1;
$tn_6 = int(rand($tn_6)) + 1;
$tlp = int(rand($tlp)) + 1;
if($tn_0 < 9) { $tn_0 = 9; }
if($tn_1 < 8) { $tn_1 = 8; }
if($tn_2 < 8) { $tn_2 = 8; }
if($tn_3 < 9) { $tn_3 = 9; }
if($tn_4 < 9) { $tn_4 = 9; }
if($tn_5 < 8) { $tn_5 = 8; }
if($tn_6 < 8) { $tn_6 = 8; }
if($id eq $tid) {
unshift(@ten_new,"$tid<>$tpass<>$tsite<>$turl<>$tname<>$tsex<>$tchara<>$tn_0<>$tn_1<>$tn_2<>$tn_3<>$tn_4<>$tn_5<>$tn_6<>$syoku<>$thp<>$tmaxhp<>$ex<>$lv<>$tgold<>$tlp<>$ttotal<>$tkati<>$twaza<>$titem<>$tmons<>$host<>$date<>$tmori<>$tdef<>0<>$tkumite<>\n");
}else{
push(@ten_new,"$_");
}
}
open(OUT,">./charalog/$in{'id'}.cgi") or &error('ファイルを开けませんでした。');
print OUT @ten_new;
close(IN);
&read_winner;
if($id eq $wid) {
open(OUT,">$winner_file");
print OUT "$wid<>$wpass<>$wsite<>$wurl<>$wname<>$wsex<>$wchara<>$tn_0<>$tn_1<>$tn_2<>$tn_3<>$tn_4<>$tn_5<>$tn_6<>$syoku<>$wmaxhp<>$wmaxhp<>$ex<>$lv<>$wgold<>$wlp<>$wtotal<>$wkati<>$wwaza<>$witem<>$wmons<>$host<>$date<>$wcount<>$lsite<>$lurl<>$lname<>$wmori<>$wdef<>$wtac<>$lid<>$wkumite<>\n";
close(OUT);
}
# ロック解除
if (-e $lockfile) { unlink($lockfile); }
&header;
print <<"EOM";
<h1>转职しました</h1><hr size=0>
<p>
<form action="$script" method="post">
<input type="button" value="TOPペ—ジへ" onclick="location='$scripto'">
<input type="hidden" name=id value="$in{'id'}">
<input type="hidden" name=pass value="$in{'pass'}">
<input type="hidden" name=mode value=log_in>
<input type="submit" value="ステ—タス画面へ">
</form>
EOM
&footer;
exit;
}
__SUB__
read_winner => <<'__SUB__',
#--------------------#
# チャンプ读み??み #
#--------------------#
sub read_winner {
open(IN,"$winner_file") or &error('ファイルを开けませんでした。');
@winner = <IN>;
close(IN);
($wid,$wpass,$wsite,$wurl,$wname,$wsex,$wchara,$wn_0,$wn_1,$wn_2,$wn_3,$wn_4,$wn_5,$wn_6,$wsyoku,$whp,$wmaxhp,$wex,$wlv,$wgold,$wlp,$wtotal,$wkati,$wwaza,$witem,$wmons,$whost,$wdate,$wcount,$lsite,$lurl,$lname,$wmori,$wdef,$wtac,$lid,$wkumite) = split(/<>/,$winner[0]);
}
__SUB__
footer => <<'__SUB__',
#------------------#
# HTMLのフッタ— #
#------------------#
sub footer {
print "<HR SIZE=0 WIDTH=\"100%\"><DIV align=right>\n";
print "$verg remodeling by <a href=\"http://www.gun-online.com/\" target=\"_top\">GUN</a><br>\n";
print "$ver by <a href=\"http://www.interq.or.jp/sun/cumro/\">D.Takamiya(CUMRO)</a><br>\n";
print "</DIV></body></html>\n";
}
__SUB__
header => <<'__SUB__',
#------------------#
# HTMLのヘッダ— #
#------------------#
sub header {
print "Cache-Control: no-cache\n";
print "Pragma: no-cache\n";
print "Content-type: text/html\n\n";
print <<"EOM";
<html>
<head>
<META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=Shift_JIS">
EOM
print <<"EOM";
<STYLE type="text/css">
<!--
body,tr,td,th { font-size: 10pt }
a:hover { color: $alink }
.b1 {background: #9ac;border-color: #ccf #669 #669 #ccf;color:#fff; border-style: solid; border-width: 1px;}
.b2 {background: #669;border-color: #99c #336 #336 #99c;color:#fff; border-style: solid; border-width: 1px; text-align: center}
.b3 {background: #fff;border-color: #ccf #669 #669 #ccf;}
.dmg { color: #FF0000; font-size: 18pt }
.clit { color: #0000FF; font-size: 18pt }
-->
</STYLE>
EOM
print "<title>$main_title</title></head>\n";
print <<"EOM";
<body background="$backgif" bgcolor="$bgcolor" text="$text" link="$link" vlink="$vlink" alink="$alink">
EOM
}
__SUB__
headernew => <<'__SUB__',
#------------------#
# HTMLのヘッダ— #
#------------------#
sub headernew {
print "Cache-Control: no-cache\n";
print "Pragma: no-cache\n";
print "Content-type: text/html\n\n";
print <<"EOM";
<html>
<head>
<META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=Shift_JIS">
EOM
print <<"EOM";
<STYLE type="text/css">
<!--
body,tr,td,th { font-size: 10pt }
a:hover { color: $alink }
.b1 {background: #9ac;border-color: #ccf #669 #669 #ccf;color:#fff; border-style: solid; border-width: 1px;}
.b2 {background: #669;border-color: #99c #336 #336 #99c;color:#fff; border-style: solid; border-width: 1px; text-align: center}
.b3 {background: #fff;border-color: #ccf #669 #669 #ccf;}
.dmg { color: #FF0000; font-size: 18pt }
.clit { color: #0000FF; font-size: 18pt }
-->
</STYLE>
EOM
print "<title>$main_title</title></head>\n";
print <<"EOM";
<body onUnload="alert('まず更新所に行って下さい')" background="$backgif" bgcolor="$bgcolor" text="$text" link="$link" vlink="$vlink" alink="$alink">
EOM
}
__SUB__
set_cookie => <<'__SUB__',
#------------------#
# クッキ—の发行 #
#------------------#
sub set_cookie {
# クッキ—は60日间有效
local($sec,$min,$hour,$mday,$mon,$year,$wday) = gmtime(time+60*24*60*60);
@month=('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');
$gmt = sprintf("%s, %02d-%s-%04d %02d:%02d:%02d GMT",
$week[$wday],$mday,$month[$mon],$year+1900,$hour,$min,$sec);
$cook="id<>$cookie_id\,pass<>$cookie_pass";
print "Set-Cookie: FFADV=$cook; expires=$gmt\n";
}
__SUB__
get_cookie => <<'__SUB__',
#------------------#
# クッキ—を取得 #
#------------------#
sub get_cookie {
@pairs = split(/;/, $ENV{'HTTP_COOKIE'});
foreach (@pairs) {
local($key,$val) = split(/=/);
$key =~ s/\s//g;
$GET{$key} = $val;
}
@pairs = split(/,/, $GET{'FFADV'});
foreach (@pairs) {
local($key,$val) = split(/<>/);
$COOK{$key} = $val;
}
$c_id = $COOK{'id'};
$c_pass = $COOK{'pass'};
}
__SUB__
get_time => <<'__SUB__',
#--------------#
# 时间を取得 #
#--------------#
sub get_time {
$ENV{'TZ'} = "JST-9";
($sec,$min,$hour,$mday,$mon,$year,$wday) = localtime(time);
@week = ('Sun','Mon','Tue','Wed','Thu','Fri','Sat');
# 日时のフォ—マット
$gettime = sprintf("%04d/%02d/%02d %02d:%02d",
$year+1900,$mon+1,$mday,$hour,$min);
}
__SUB__
);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -