home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Internet 1996 World Exposition
/
park.org.s3.amazonaws.com.7z
/
park.org.s3.amazonaws.com
/
cgi-bin
/
Japan
/
Theme.0105
/
theme_add_mail.pl
< prev
next >
Wrap
Perl Script
|
2017-09-21
|
2KB
|
88 lines
#!/usr/local/bin/perl
# theme_add_mail.pl
# Comments construction program in Japan theme pavilion
# kawauso@acs.dnp.co.jp
# 95/12/27
#
# THIS CODE INCLUDES THESE LIBRARIES
#
# cgi-lib.pl Copyright 1994 Steven E. Brenner
#
require 'cgi-lib.pl';
&ReadParse(*in);
print "Content-type: text/html\n\n";
print "<html><head>\n";
print "<title>result</title>";
print "</head><body bgcolor=\"#ffffff\">\n";
#
# Ñßí╝ÑδÑóÑ╔Ñ∞Ñ╣ñ≥─╔╡¡ñ╣ñδÑ╒ÑíÑñÑδñ╬░╠├╓ñ≥╞└ñδ
#
########
#### www.mediagalxy.co.jpÑ╞Ñ╣Ñ╚═╤ ═╫╜±ñ¡╩╤ñ¿
########
$am_filename = "$ENV{'PATH_INFO'}";
$am_filename =~ s/\///g;
$am_mail_file = "/stage/htdocs/Japan/Theme/logs/theme_$am_filename.lst";
$am_lock = "/stage/htdocs/Japan/Theme/logs/theme_$am_filename.lock";
#
# Ñ│ÑßÑ≤Ñ╚ñ¼╢⌡ñ╩ñΘ╜¬╬╗
#
if (!$in{'address'}) {
&err("Sorry, your comment seems contains no data.\n");
}
#
# ñ└ñ∞ñ½ñ¼╜±ñ¡╣■ñ≤ñ╟ñññδ┤╓ñ╧┬╘ñ─
# ñóñ▐ñΩ┬╘ñ─ñ╩ñΘ╜¬╬╗
#
for($count = 0; -f "$am_lock"; $count++) {
sleep(1);
&err("Sorry, another person is writing now.") if ($count > 5);
}
#
# ÑφÑ├Ñ»Ñ╒ÑíÑñÑδñ╚─╔╡¡ñ╣ñδÑ╒ÑíÑñÑδñ≥│½ñ»
#
open (LOCK, ">$am_lock") || &err("$ac_lock Can not open lock file");
open (FILE, ">>$am_mail_file") || &err("Can not open list file");
#
# ─╔╡¡Ñ╒ÑíÑñÑδñ╦╜±ñ¡▓├ñ¿ñδ
#
print FILE "$in{'address'}\n";
close(FILE);
close(LOCK);
unlink "$am_lock";
#
# ┼╨╧┐╜¬╬╗▓Φ╠╠
#
print "<center><h3><p>ñóñΩñ¼ñ╚ñªñ┤ñ╢ñññ▐ñ╣íú\n";
print "<br>ñóñ╩ñ┐ñ╬Ñßí╝ÑδÑóÑ╔Ñ∞Ñ╣ñ≥";
print "ÑΩÑ╣Ñ╚ñ╦─╔▓├ñ╖ñ▐ñ╖ñ┐íú</p>\n";
print "<p>Thank you!<br>Your mail address has added to list.";
print "</a></p></h3></center>\n";
print "</body><hr><address>theme pavilion \@IWE'96 JAPAN</address></html>\n";
exit;
#
# Ñ¿ÑΘí╝ñ╬╛∞╣τ
#
sub err{
local($msg) = @_;
print "<p>$msg</p>\n";
close FILE;
close TMP;
unlink "$am_lock";
print "</BODY></HTML>\n";
exit;
}