if ($fa eq 'play') { $lastplay = time }
if ($fa eq 'out') { $out = 1; $outdate = time }
少し離れて、
if ($fa eq "feed") { $lastfeed = time }
|
if ($fa eq 'play') { $lastplay = time; $playname = $name; }
if ($fa eq 'out') { $out = 1; $outdate = time; $outname = $name; }
少し離れて、
if ($fa eq "feed") { $lastfeed = time; $feedname = $name; }
|
$line = "$petname<>$godfather<>$birth<>$sex<>$dead<>$lastfeed<>$lastplay<>$lastvisit<>$good<>$bad<>$out<>$outdate<>$num<>$outname<>$playname<>$feedname";
|
($petname,$godfather,$birth,$sex,$dead,$lastfeed,$lastplay,$lastvisit,$good,$bad,$out,$outdate,$num,$outname,$playname,$feedname)
= split(/<>/,$line);
|
print "<tr>\n";
print "<td colspan=2>最後に餌を食べた日:$font2$date</font>\n";
&tablebottom;
|
print "<tr>\n";
print "<td colspan=2>最後に餌を食べた日:$font2$date</font></td>\n";
print "</tr>\n";
print "<tr>\n";
print "<td colspan=2>最後に餌をあげたのは:$font2$feednameさん</font></td>\n";
print "</tr>\n";
print "<tr>\n";
print "<td colspan=2>最後に散歩をしたのは:$font2$outnameさん</font></td>\n";
print "</tr>\n";
print "<tr>\n";
print "<td colspan=2>最後に遊んだのは:$font2$playnameさん</font>\n";
&tablebottom;
|
$outdate = 0;
$num++;
$outname = '○○';
$playname = '○○';
$feedname = '○○';
&openoutpetdata;
$gdate = time - $dayhour[$playtime + 1];
|
$out_msg = '外出中のようです'; # 外出中 |
# 外出中の処理
if ($out == 1 && (time - $outdate) < $dayhour[$comeback]) {
$out_msg = "$outnameさんと外出中のようです"; # 外出中
&petnow($gone_img,$out_msg);
$noaction = 1;
return;
} else {$out = 0;}
|
# 外出中の処理
if ($out == 1 && (time - $outdate) < $dayhour[$comeback]) {
if ($name eq $outname) {
$gone_img = '本人用の画像ファイル名';
$out_msg = "一緒に外出中です";
}
else {
$out_msg = "$outnameさんと外出中のようです"; # 外出中
}
&petnow($gone_img,$out_msg);
$noaction = 1;
return;
} else {$out = 0;}
|