#!/usr/local/bin/perl #============================================================================== # sha-mail diary Version 0.1 #============================================================================== #’Æü’Ëܒ¸ì’¥³’¡¼’¥É’Êђ´¹’¥â’¥¸’¥å’¡¼’¥ë require './jcode.pl'; require './mimew.pl'; $datad = 's-data'; $web = 'http://ftvjapan.ddo.jp/~funa/sha'; $newd = 's-new'; $prfile = 'pr.html'; $catef = 'cate.txt'; $userd = '/home/funa/sha/s-user'; $tbbsd = '/home/funa/public_html/sha/tbbs'; $cntd = '/home/funa/public_html/sha/cntdir'; $cated = '/home/funa/public_html/sha/s-cate'; $mailprog = '/usr/sbin/sendmail'; # mail system $admin = 'funa@cc.seikei.ac.jp'; $jsky = 'J-PHONE'; $imode = 'DoCoMo'; $ezweb ='UP.Browser'; $wwwc = 'WWWC'; $iria = 'Iria'; $ninja = 'Internet Ninja'; $iria = 'Iria'; $pockey = 'Pockey'; $ie = 'Mozilla'; $mmse = 'MMSE'; $pockey = 'Pockey'; $mmse = 'MMSE'; @scate = ("’̵","’¼Ì","’¥¢","’Ãå","’ÂÔ","’¥¤","’Àë","’¿Í","’À®","’ÊÑ","’ÃË","’½÷","’Ʊ","’¾"); &getcate(); if ($ENV{'REQUEST_METHOD'} eq "POST") { read(STDIN, $formdata, $ENV{'CONTENT_LENGTH'}); } else { $formdata = $ENV{'QUERY_STRING'}; } @pairs = split(/&/,$formdata); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; # $value =~ s//>/g; $value =~ s/\n//g; # $value =~ s/^M/
/g; $value =~ s/\,//g; &jcode'convert(*value,'sjis'); $FORM{$name} = $value; } $ADD = $FORM{'add'}; $CATE = $FORM{'cate'}; $KEYON = $FORM{'KEYON'}; $COMM = $FORM{'comm'}; $ACT = $FORM{'ACT'}; $ST = $FORM{'ST'}; $FILE = $FORM{'file'}; $USER = $FORM{'user'}; $B5 = $FORM{'B5'}; $B2 = $FORM{'B2'}; $B7 = $FORM{'B7'}; $agent = $ENV{'HTTP_USER_AGENT'}; $REA = $ENV{'REMOTE_ADDR'} ; if(($agent =~ /$wwwc/) || ($agent =~ /$pockey/) || ($agent =~ /$mmse/) || ($agent =~ /$iria/) || ($agent =~ /$ninja/ )){ exit; } if($REA =~ /210.224.177.59/){ print "(TT)/22PK=>9758PK\n"; exit; } &getcolor(); $title ="’¼Ì’¥á’¡¼’¥ëde’¥¦’¥¨’¥Ö"; print "Content-type: text/html\n\n"; print "$title\n"; #print "$title
\n";
print "

\n"; if(($agent =~ /$wwwc/) || ($agent =~ /$pockey/) || ($agent =~ /$mmse/) || ($agent =~ /$iria/) ){ exit; } #print "’¼Ì’¥á’¡¼’¥ëde’¥¦’¥¨’¥Ö
\n"; if ($ACT eq "DEL") { &delreq();} if ($ACT eq "DELDO") { &deldo();} if ($ACT eq "SHOW") { &show();} if ($ACT eq "NEW") { &new();} if ($ACT eq "RM") { &rm();} if ($ACT eq "RMDO") { &rmdo();} if ($ACT eq "TUHO") { &tuhoreq();} if ($ACT eq "TUHODO") { &tuhodo();} if ($ACT eq "NOAMAIL") { &noamailreq();} if ($ACT eq "NOAMAILDO") { &noamaildo();} if ($ACT eq "MAIL") { &mailreq();} if ($ACT eq "MAILDO") { &maildo();} if ($ACT eq "PAMAIL") { &pamail();} if ($ACT eq "PAMAILDO") { &pamaildo();} if ($ACT eq "CNTSHOW") { &cntshow();} if ($ACT eq "PGSHOW") { &pgshow();} if ($ACT eq "PGSHOW2") { &pgshow2();} if ($ACT eq "CATENEW") { &catenew($CATE);} if ($ACT eq "SHOWCATE") { &showcate();} if ($ACT eq "KEYSHOW") { &keyshow();} if ($ACT eq "KEYNEW") { &keynew($KEYON);} if ($ACT eq "USERS") { &users();} if ($ACT eq "USERLOOK") { &userlook($B2);} exit ; # print "ACT = $ACT\n"; # print "user = $USER\n"; # print "file = $FILE\n"; &error("WAHTS? ACTION $ACT"); # print "’¼Ì’¥á’¡¼’¥ëde’¥¦’¥¨’¥Ö\n"; &getpr(); print "\n"; exit ; ### END PROGRAM #### sub pgshow { # print "’¼Ì’¥á’¡¼’¥ëde’¥¦’¥¨’¥Ö\n"; # print "
\n";
	&getpr();
	print "’¥Ú’¡¼’¥¸’¿ô’½ç’¥é’¥ó’¥­’¥ó’¥°50\n";
	$FILE = "$datad";
	$next = $ST + 1;
	$total = 0;
#	$LS = `/bin/ls -1t $FILE | /usr/bin/head -$st | /usr/bin/tail -20 `;
	$LS = `/bin/ls -1t $FILE| /bin/sort -r `;
	$WC = `/bin/ls -1t $FILE | /usr/bin/wc -l`;
	@LIST = split(/\s+/, $LS) ;
	@aa = ();
	foreach $LIST (@LIST) {
		$cnt = `/bin/ls -1t $datad/$LIST/*.html | /usr/bin/wc -l`;
		$LIST =~ s/$datad//;
		$LIST =~ s/\///;
		$total = $total + $cnt;
		push (@aa , "$cnt $LIST");
#print "push $cnt , $LIST\n";
	}
	@sorted = sort{$b<=>$a}@aa;
	@top = splice(@sorted ,0,50);
	foreach $list (@top) {
#print "push list , $list\n";
		($cn, $book) = split(" ", $list);
		print "$book:$cn\n";
	}

       	print "
\n"; print "total: $total(Pages)\n"; $bbs = "’¥Ú’¡¼’¥¸’¿ô’¥é’¥ó’¥­’¥ó’¥°’¤Ë’¤Ä’¤¤’¤Æ"; print "’¥µ’¥Ý’¡¼’¥È’·Ç’¼¨’ÈĒ¤Ø($bbs)
\n"; print "’»ä’¤â’¼Ì’¥á’¡¼’¥ëde’¥¦’¥¨’¥Ö’¤ä’¤ê’¤¿’¤¤!\n"; print "Powerd by funa\n"; print "
\n"; $cntdir = 'cnt'; &getcnt; print "
"; print "\n"; print "\n"; exit ; } sub cntshow { # print "’¼Ì’¥á’¡¼’¥ëde’¥¦’¥¨’¥Ö\n"; # print "
\n";
	&getpr();
	print "’¥¢’¥¯’¥»’¥¹’½ç’¥é’¥ó’¥­’¥ó’¥°50\n";
	$FILE = "$cntd/*";
	$total = 0;
#	$LS = `/bin/ls -1t $FILE | /usr/bin/head -$st | /usr/bin/tail -20 `;
#	$LS = `/bin/ls -1t $FILE`;
	$LS = `/bin/ls -1t $FILE | /usr/bin/head -200 `;
	$WC = `/bin/ls -1t $FILE | /usr/bin/wc -l`;
	@LIST = split(/\s+/, $LS) ;
	@aa = ();
	foreach $LIST (@LIST) {
#print "push $cnt , $LIST\n"; 
		open (NOTE,"$LIST") || exit;
		$cnt = ;
		close(NOTE);
		$total = $total + $cnt;
		$LIST =~ s/$cntd//;
		$LIST =~ s/\///;
		push (@aa , "$cnt $LIST");

	}
	@sorted = sort{$b<=>$a}@aa;
	@top = splice(@sorted ,0,50);
	foreach $list (@top) {
#print "push list , $list\n";
		($cn, $book) = split(" ", $list);
		print "$book:$cn\n";
	}

       	print "
\n"; print "TOP200total: $total(PV)\n"; $bbs = "’¥¢’¥¯’¥»’¥¹’¿ô’¥é’¥ó’¥­’¥ó’¥°’¤Ë’¤Ä’¤¤’¤Æ"; print "’¥µ’¥Ý’¡¼’¥È’·Ç’¼¨’ÈĒ¤Ø($bbs)
\n"; print "’»ä’¤â’¼Ì’¥á’¡¼’¥ëde’¥¦’¥¨’¥Ö’¤ä’¤ê’¤¿’¤¤!\n"; print "Powerd by funa\n"; print "
\n"; $cntdir = 'cnt'; &getcnt; print "
"; print "\n"; print "\n"; exit ; } sub pgshow2 { # print "’¼Ì’¥á’¡¼’¥ëde’¥¦’¥¨’¥Ö\n"; # print "
\n";
	&getpr();
	print "’¥Ú’¡¼’¥¸’¿ô’¥é’¥ó’¥­’¥ó’¥°50\n";
	$FILE = "$datad/*/page.txt";
	$total = 0;
#	$LS = `/bin/ls -1t $FILE | /usr/bin/head -$st | /usr/bin/tail -20 `;
	$LS = `/bin/ls -1t $FILE`;
	$LS = `/bin/ls -1t $FILE | /usr/bin/head -200 `;
	$WC = `/bin/ls -1t $FILE | /usr/bin/wc -l`;
	@LIST = split(/\s+/, $LS) ;
	@aa = ();
	foreach $LIST (@LIST) {
#print "push $cnt , $LIST\n"; 
		open (NOTE,"$LIST") || exit;
		$cnt = ;
		close(NOTE);
		$total = $total + $cnt;
		$LIST =~ s/$datad//;
		$LIST =~ s/page.txt//;
		$LIST =~ s/\///g;
		push (@aa , "$cnt $LIST");

	}
	@sorted = sort{$b<=>$a}@aa;
	@top = splice(@sorted ,0,50);
	foreach $list (@top) {
#print "push list , $list\n";
		($cn, $book) = split(" ", $list);
		print "$book:$cn\n";
	}

       	print "
\n"; print "TOP200total: $total(pages)\n"; $bbs = "’¥Ú’¡¼’¥¸’¿ô’¥é’¥ó’¥­’¥ó’¥°’¤Ë’¤Ä’¤¤’¤Æ"; print "’¥µ’¥Ý’¡¼’¥È’·Ç’¼¨’ÈĒ¤Ø($bbs)
\n"; print "’»ä’¤â’¼Ì’¥á’¡¼’¥ëde’¥¦’¥¨’¥Ö’¤ä’¤ê’¤¿’¤¤!\n"; print "Powerd by funa\n"; print "
\n"; $cntdir = 'cnt'; &getcnt; print "
"; print "\n"; print "\n"; exit ; } sub pamaildo { $file = "$userd/$USER"; if (!open(NOTE,"$file")) { &error("NO user $USER"); } @DATA = ; close(NOTE); foreach $line (@DATA) { ($MAIL,$ID,$PASS,$HP,$CA,$KE) = split(/\,/,$line); $KE =~ s/\n//g; } $B1 = $MAIL; &checkb1(); open (MAIL, "|$mailprog $MAIL") || &error("mail program error"); print MAIL "Subject: SHA-MAIL-PASSWD\n\n"; print MAIL "YOUR DATA \n"; print MAIL "HP : $HP\n"; print MAIL "MAIL: $MAIL\n"; print MAIL "USER: $ID\n"; print MAIL "PASS: $PASS\n"; close (MAIL); print "’¥ª’¡¼’¥Ê’¡¼’¤Ë’¥á’¡¼’¥ë’¤·’¤Þ’¤·’¤¿’¡£\n"; &getpr(); print "’¼Ì’¥á’¡¼’¥ëde’¥¦’¥¨’¥Ö\n"; } sub pamail { print "
";
	print "
"; print "USER:
\n"; print "\n"; print "\n"; print "
"; print "
"; print "\n"; exit ; } sub maildo { $B1 = $ADD; &checkb1(); open (MAIL, "|$mailprog $ADD") || &error("mail program error"); print MAIL "Subject: URL-MAIL-SHA\n\n"; print MAIL "URL address is $web/$datad/$USER/$FILE\n"; print MAIL "COMMENT: $COMM\n"; print MAIL "’¤³’¤ì’¤Ï’¼Ì’¡¼’¥ëde’¥¦’¥¨’¥Ö’¤«’¤é’¤Î’¤ª’¤·’¤é’¤»’¤Ç’¤¹’¡£\n"; print MAIL "-----------\n"; print MAIL "http://ftvjapan.ddo.jp/~funa/sha/index.html <- ’¼Ì’¥á’¡¼’¥ëde’¥¦’¥¨’¥Ö\n"; close (MAIL); print "’ͧ’㒤˒¥á’¡¼’¥ë’¤·’¤Þ’¤·’¤¿’¡£\n"; getpr(); print "’¼Ì’¥á’¡¼’¥ëde’¥¦’¥¨’¥Ö\n"; } sub mailreq { $tmp ="$datad/$USER/$FILE"; open (NOTE,"$tmp") || exit; @PAGE = ; close(NOTE); foreach $line (@PAGE) { if (index( $line ,"TITLE:") ne -1) { $tit = $line; $tit =~ s/TITLE://; $tit =~ s/\n//; } } print "
";
	print "
"; print "USER:
$USER\n"; print "’¥á’¡¼’¥ë’¥¢’¥É’¥ì’¥¹:
\n"; # print "’¥á’¡¼’¥ë’¥¢’¥É’¥ì’¥¹:
\n"; print "’¥³’¥á’¥ó’¥È:
\n"; print "TITLE:$tit\n"; print "FILE:
$FILE\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "
"; print "
"; print "\n"; exit ; } sub tuhodo { if ($COMM eq "") { &error("riyu ga arimasenn");} $file = "$userd/$USER"; if (!open(NOTE,"$file")) { &error("NO user $USER"); } @DATA = ; close(NOTE); foreach $line (@DATA) { ($MAIL,$ID,$PASS,$HP,$CA,$KE) = split(/\,/,$line); $KE =~ s/\n//g; } open (MAIL, "|$mailprog $admin") || &error("mail program error"); print MAIL "Subject: TUHO-MAIL-SHA\n\n"; print MAIL "TUHO address is $web/$datad/$USER/$FILE\n"; print MAIL "RIYU: $COMM\n"; print MAIL "KAGI: $KE\n"; print MAIL "HP : $HP\n"; print MAIL "MAIL: $MAIL\n"; print MAIL "USER: $ID\n"; print MAIL "PASS: $PASS\n"; close (MAIL); print "’Ä̒Ê󒤷’¤Þ’¤·’¤¿’¡£\n"; getpr(); print "’¼Ì’¥á’¡¼’¥ëde’¥¦’¥¨’¥Ö\n"; } sub tuhoreq { $file = "$userd/$USER"; if (!open(NOTE,"$file")) { &error("NO user $USER"); } @DATA = ; close(NOTE); foreach $line (@DATA) { ($MAIL,$ID,$PASS,$HP,$CA,$KE) = split(/\,/,$line); $KE =~ s/\n//g; } if ($KE) { print "’¸°’¤Î’¤Ä’¤¤’¤Æ’¤¤’¤ë’¤â’¤Î’¤Ï’Ä̒Êó’¤Ç’¤­’¤Þ’¤»’¤ó\n";} else { $tmp ="$datad/$USER/$FILE"; open (NOTE,"$tmp") || exit; @PAGE = ; close(NOTE); foreach $line (@PAGE) { if (index( $line ,"TITLE:") ne -1) { $tit = $line; $tit =~ s/TITLE://; $tit =~ s/\n//; } } print "
";
	print "
"; print "USER:
$USER\n"; print "’Ä̒Êó’Íý’ͳ:
\n"; print "TITLE:$tit\n"; print "FILE:
$FILE\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "
"; } getpr(); print "’¼Ì’¥á’¡¼’¥ëde’¥¦’¥¨’¥Ö\n"; print "
"; print "\n"; exit ; } sub rmdo { &checkb5(); $file = "$userd/$USER"; if (!open(NOTE,"$file")) { &error("NO user $USER"); } @DATA = ; close(NOTE); foreach $line (@DATA) { ($MAIL,$ID,$PASS,$HP,$CA,$KE) = split(/\,/,$line); $KE =~ s/\n//g; } if ($B5 ne $PASS) { &error("BAD passwd user $USER"); } $file = "$userd/$USER"; unlink($file); $newfile ="$newd/$USER.html"; unlink($newfile); for ($i = 1;$i < $CATEMAX ; $i++) { $newfile ="$cated$i/$USER.html"; unlink($newfile); } $FILE = "$datad/$USER/img/*"; $LS = `/bin/ls -1t $FILE `; @LIST = split(/\s+/, $LS) ; foreach $line (@LIST) { unlink($line) ; } rmdir("$datad/$USER/img") ; $FILE = "$datad/$USER/*"; $LS = `/bin/ls -1t $FILE`; @LIST = split(/\s+/, $LS) ; foreach $line (@LIST) { unlink($line) ; } rmdir("$datad/$USER") || print "USER file IS error\n"; $cntdir = "cntdir/$USER"; unlink($cntdir) ; $cntdir = "tbbs/$USER.txt"; unlink($cntdir) ; $agent = $ENV{'HTTP_USER_AGENT'}; $REM = $ENV{'REMOTE_ADDR'}; ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); $start = ($mday * 86400) + ($hour * 3600) + ($min * 60) + $sec; if ($min < 10) { $min = "0$min"; } if ($hour < 10) { $hour = "0$hour"; } $date_now = "$hour\:$min\:$sec"; $now_year = $year + 1900 ; $now_mon = $mon +1; $now = "$now_year\-$now_mon\-$mday\:$date_now"; $add = "$pageaddr\-$REM\-$REA\:"; if (!open(NOTE,">>dellog")) { &error("dellog can not write"); } print NOTE "$USER $REM $now $agent\n"; close(NOTE); print "’Á´’¥Ç’¡¼’¥¿’ºï’½ü’¤·’¤Þ’¤·’¤¿’¡£\n"; getpr(); print "’¼Ì’¥á’¡¼’¥ëde’¥¦’¥¨’¥Ö\n"; $newfile ="$newd/$USER.html"; print "
\n"; exit; } sub rm { print "’ÅВϿ’ºï’½ü’¤ò’¤·’¤Þ’¤¹’¡£\n"; print "
"; print "USER:

\n"; print "PASS:
\n"; print "
\n"; print "\n"; print "
"; print "\n"; exit ; } sub new { # print "’¼Ì’¥á’¡¼’¥ëde’¥¦’¥¨’¥Ö\n"; # print "
\n";
	&getpr();
	print "NEW UPDATE\n";
	$FILE = 's-new/*.html';
	$tp = $ST*10;
	$next = $ST + 1;
	$st = $next*10;
	$LS = `/bin/ls -1t $FILE | /usr/bin/head -$st | /usr/bin/tail -10 `;
	$WC = `/bin/ls -1t $FILE | /usr/bin/wc -l`;
	@LIST = split(/\s+/, $LS) ;
	foreach $LIST (@LIST) {
		$tmp = $LIST;
		open (NOTE,"$tmp") || exit;
		@PAGE = ;
		close(NOTE);
		$tit = "NO TITLE";
		foreach $line (@PAGE) {
			if (index( $line ,"TITLE:") ne -1) {
				$tit = $line;
				$tit =~ s/TITLE://;
				$tit =~ s/\n//;
			}
			if (index( $line ,"DATE:") ne -1) {
				$dat = $line;
				$dat =~ s/DATE://;
				$dat =~ s/\n//;
			}
			if (index( $line ,"ID:") ne -1) {
				$USER = $line;
				$USER =~ s/ID://;
				$USER =~ s/\n//;
			}
			if (index( $line ,"FILE:") ne -1) {
				$FILE = $line;
				$FILE =~ s/FILE://;
				$FILE =~ s/\n//;
			}
			if (index( $line ,"DATA:") ne -1) {
				$data = $line;
				$data =~ s/DATA://;
				$data =~ s/\n//;
	       			($DMY1,$DMY2,$DMY3,$DMY4) = split(/\,/,$data);
				$KF ="";
				if ($DMY4 eq "1") {$KF="’¸°";}
			}
			if (index( $line ,"USER:") ne -1) {
				$user = $line;
				$user =~ s/USER://;
				$user =~ s/\n//;
			}
		}
   if ($DMY4 eq "1") {
	   $tit  =~ s///g;
       $tit =~ s/\"//g;
       $tit =~ s/$web\///;
       $tit =~ s/$datad\///;
       $tit =~ s/$USER\///g;
       $tit =~ s/$FILE//g;
       $tit =~ s/\/A//g;
       $tit =~ s/a href=//;
	   $dat = substr ($dat,0,5);
	print "
"; print "($scate[$DMY3])’¸°:$dat\n"; print ""; print ""; print ""; print "$user:
\n"; } else { print "($scate[$DMY3])$dat
$user : $tit
\n"; } # print "
"; } print "
\n"; if ($WC > $st ) { print "’¤µ’¤é’¤Ë’ÀΒ¤Ø
\n"; } $bbs = "’ºÇ’¿·’¹¹’¿·’¾ð’Êó’¤Ë’¤Ä’¤¤’¤Æ"; print "’¥µ’¥Ý’¡¼’¥È’·Ç’¼¨’ÈĒ¤Ø($bbs)
\n"; print "’»ä’¤â’¼Ì’¥á’¡¼’¥ëde’¥¦’¥¨’¥Ö’¤ä’¤ê’¤¿’¤¤!\n"; print "Powerd by funa\n"; print "
\n"; $cntdir = 'cnt'; &getcnt; print "
"; print "\n"; print "\n"; } sub show { # print "’¼Ì’¥á’¡¼’¥ëde’¥¦’¥¨’¥Ö\n"; # print "
\n";
	&getpr();
	print "DATE LIST\n";
       	print "
\n"; $cntdir = "cntdir/$USER"; &getcnt; print "
\n"; $file = "$userd/$USER"; if (!open(NOTE,"$file")) { &error("NO user $USER"); } @DATA = ; close(NOTE); foreach $line (@DATA) { ($MAIL,$ID,$PASS,$HP,$CA,$KE) = split(/\,/,$line); $KE =~ s/\n//g; } $KF = ""; if ($KE) {$KF ="’¸°";} $FILE = "$datad/$USER/2*.html"; $tp = $ST*10; $next = $ST + 1; $st = $next*10; $LS = `/bin/ls -1t $FILE| /bin/sort -r | /usr/bin/head -$st | /usr/bin/tail -10 `; $WC = `/bin/ls -1t $FILE | /usr/bin/wc -l`; $fcnt = $tp+1; @LIST = split(/\s+/, $LS) ; foreach $LIST (@LIST) { ($tmp1,$tmp2,$tmp) = split(/\//,$LIST); open (NOTE,"$LIST") || exit; $DATE = $tmp; $DATE =~ s/.html//ig; @PAGE = ; close(NOTE); $tit = "NO TITLE"; foreach $line (@PAGE) { if (index( $line ,"TITLE:") ne -1) { $tit = $line; $tit =~ s/TITLE://; $tit =~ s/\n//; } } if ($KF) { $tit =~ s/
//; $tit =~ s/>//; $yy = substr ($DATE,0,4); $mm = substr ($DATE,4,2); $dd = substr ($DATE,6,2); $dat = "$yy/$mm/$dd-$fcnt"; print "
"; print "’¸°:$dat\n"; print ""; print ""; print ""; print "$USER:
\n"; } else { print "$DATE$tit\n"; print "
\n"; } $fcnt++; } # $file = "$userd/$USER"; # if (!open(NOTE,"$file")) { &error("NO user $USER"); } # @DATA = ; # close(NOTE); # foreach $line (@DATA) { # ($MAIL,$ID,$PASS,$HP,$CA,$KE) = split(/\,/,$line); # $KE =~ s/\n//g; # } # print "
\n"; # $cntdir = "cntdir/$USER"; # &getcnt; print "
\n"; if ($WC > $st ) { print "’¤µ’¤é’¤Ë’ÀΒ¤Ø
\n"; } $bbs = "$USER’¤µ’¤ó’¤Î"; print "$bbs’¸Ä’¿Í’·Ç’¼¨’ÈĒ¤Ø
\n"; print "HP’¤Ø\n"; print "
\n"; print "’»ä’¤â’¼Ì’¥á’¡¼’¥ëde’¥¦’¥¨’¥Ö’¤ä’¤ê’¤¿’¤¤!\n"; print "Powerd by funa\n"; print "
\n"; print "
"; print "\n"; print "\n"; exit ; } sub delreq { $tmp ="$datad/$USER/$FILE"; open (NOTE,"$tmp") || exit; @PAGE = ; close(NOTE); foreach $line (@PAGE) { if (index( $line ,"TITLE:") ne -1) { $tit = $line; $tit =~ s/TITLE://; $tit =~ s/\n//; } } print "
";
	print "
"; print "USER:
$USER\n"; print "PASS:
\n"; print "TITLE:$tit\n"; print "FILE:
$FILE\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "
"; print "
"; print "\n"; exit ; } sub deldo { &checkb5(); $file = "$userd/$USER"; if (!open(NOTE,"$file")) { &error("NO user $USER"); } @DATA = ; close(NOTE); foreach $line (@DATA) { ($MAIL,$ID,$PASS,$HP,$CA,$KE) = split(/\,/,$line); $KE =~ s/\n//g; } if ($B5 ne $PASS) { &error("BAD passwd user $USER"); } $htmlfile ="$datad/$USER/$FILE"; $newfile ="$newd/$USER.html"; if (!open(NOTE,"$newfile")) { @DATA = ""; } @DATA = ; close(NOTE); foreach $line (@DATA) { if (index( $line ,"$FILE") ne -1) { unlink($newfile); } } $FILE =~ s/.html//ig; $imgfile1 ="$datad/$USER/img/$FILE.jpg"; $imgfile2 ="$datad/$USER/img/$FILE.png"; $imgfile3 ="$datad/$USER/img/$FILE.gif"; $imgfile4 ="$datad/$USER/img/s$FILE.png"; $imgfile5 ="$datad/$USER/img/o$FILE.*"; $imgfile6 ="$datad/$USER/img/$FILE.*"; unlink($htmlfile); unlink($imgfile1); unlink($imgfile2); unlink($imgfile3); unlink($imgfile4); unlink($imgfile5); unlink($imgfile6); print "’¤³’¤Î’¥Ú’¡¼’¥¸’¤ò’ºï’½ü’¤·’¤Þ’¤·’¤¿’¡£\n"; print "’¼Ì’¥á’¡¼’¥ëde’¥¦’¥¨’¥Ö\n"; print ""; print "\n"; } sub editp { &checkb2(); &checkb3(); &checkb4(); &editpro(); exit ; } sub updatep { &checkb2(); &checkb3(); &checkb4(); &checkb5(); &updatepro(); exit ; } sub checkb1 { if(($B1 eq '') || ($B1 !~ /[a-zA-Z0-9\-_+?\/\.]\@.*[a-z0-9\-_+?\/]\.[a-z0-9\-_]/)){ &error("mailadd is bad"); } } sub checkb2 { if(($B2 !~ /[a-z0-9]*[a-z0-9]/) || ($B2 eq '')){ &error("USERID is bad only a-z0-9"); } if ($B2 eq "") { &error("USER name is null"); } if (length($B2) > 20) { &error("USER name is too long"); } if (length($B2) < 3) { &error("USER name is too short"); } } sub checkb3 { if(($B3 !~ /[a-z0-9]*[a-z0-9]/) || ($B3 eq '')){ &error("PASSWD is bad only a-z0-9"); } if ($B3 eq "") { &error("passwd is null"); } if (length($B3) > 20) { &error("PASSWD is too long"); } if (length($B3) < 3) { &error("PASSWD is too short"); } } sub checkb4 { $file = "$userd/$B2"; if (!open(NOTE,"$file")) { &error("NO user $B2"); } @DATA = ; close(NOTE); foreach $line (@DATA) { ($MAIL,$ID,$PASS,$HP,$CA,$KE) = split(/\,/,$line); $KE =~ s/\n//g; } if ($B3 ne $PASS) { &error("BAD passwd user $B2"); } } sub checkb5 { if(($B5 !~ /[a-z0-9]*[a-z0-9]/) || ($B5 eq '')){ &error("NEW PASSWD is bad only a-z0-9"); } if ($B5 eq "") { &error("new passwd is null"); } if (length($B5) > 20) { &error("NEW PASSWD is too long"); } if (length($B5) < 3) { &error("NEW PASSWD is too short"); } } sub checkb7 { $file = "$userd/$B2"; if (!open(NOTE,"$file")) { &error("NO user $B2"); } @DATA = ; close(NOTE); foreach $line (@DATA) { ($MAIL,$ID,$PASS,$HP,$CA,$KE) = split(/\,/,$line); $KE =~ s/\n//g; } if ($B7 ne $KE) { &error("BAD KEY user $B2"); } # print "B7 = $B7 KE = $KE\n"; } sub updatepro { $file = "$userd/$B2"; if (!open(NOTE,">$file")) { &error("$file can not write"); } print NOTE $B1,",",$B2,",",$B5,",",$B4,"\n"; close(NOTE); print "’¥×’¥í’¥Õ’¥£’¡¼’¥ë’¤ò’¹¹’¿·’¤·’¤Þ’¤·’¤¿’¡£\n"; print "’¼Ì’¥á’¡¼’¥ëde’¥¦’¥¨’¥Ö\n"; } sub newreg { $file = "$userd/$B2"; if (-f $file) { &error("$B2 is user already used");} if (!open(NOTE,">$file")) { &error("$file can not write"); } print NOTE $B1,",",$B2,",",$B3,",",$B4,"\n"; close(NOTE); mkdir ("$datad/$B2",0777); mkdir ("$datad/$B2/img",0777); &mailtouser; print "’ÅВϿ’¤·’¤Þ’¤·’¤¿’¡£\n"; print "’¼Ì’¥á’¡¼’¥ëde’¥¦’¥¨’¥Ö\n"; } sub editpro { print "
";
	print "
"; print "USER:
$B2\n"; print "PASS:
\n"; print "MAIL:
\n"; print "WEB:
\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "
"; print "
"; print "\n"; exit ; } ### END PROGRAM #### sub error { $error = $_[0]; print "’£Å’£Ò’£Ò’£Ï’£Ò\n"; # print "B1= [$B1]\n"; # print "B2= [$B2]\n"; # print "B3= [$B3]\n"; # print "B4= [$B4]\n"; print "$error\n"; print ""; print "\n"; print "\n"; unlink($lockfile); exit ; } sub mailtouser { open (MAIL, "|$mailprog $B1") || &error("mail program error"); print MAIL "To: $B1\n"; print MAIL "Subject: SHA-MAIL\n\n"; print MAIL "Your Mailaddress is $B1\n"; print MAIL "USER: $B2\n"; print MAIL "PASS: $B3\n"; print MAIL "HOMEPAGE: $B4\n"; close (MAIL); } sub getcnt{ $lockfile = 'cnt.lock'; $try=0; while(!(symlink("$$", $lockfile))){ (++$try>5) && &error("file lock error"); sleep(1); } open(FILE,"$cntdir") || &error($cntdir); $cnt = ; close(FILE); $cnt = $cnt + 1; open(FILE,">$cntdir") || &error($cntdir); print FILE $cnt; close(FILE); unlink($lockfile); printf("cnt=%d
",$cnt); } sub getpr{ #srand($$); $fcm ="/home/funa/cm/cm.dat"; if (!open(NOTE,"$fcm")) { exit; } @DATA = ; close(NOTE); $i=0; foreach $line (@DATA) { ($url[$i],$mes1[$i],$mes2[$i]) = split(/\t/,$line); $mes2[$i] =~ s/\n//g; $i++; } $CMMAX = @DATA; $tmp = int(rand($CMMAX)); #$url[0]=""; #$mes1[0]="’²Æ’¤Þ’¤Ç’¤Ë’Èà’½÷GET!"; #$mes2[0]="’̵’ÎÁ20Pt’¥µ’¡¼’¥Ó’¥¹"; #$tmp = 0; # print "Content-type: text/html\n\n"; $agent = $ENV{'HTTP_USER_AGENT'}; if($agent =~ /$jsky/){ print "$mes1[$tmp]\n"; print "$mes2[$tmp]\n";
} elsif($agent =~ /$imode/){ print "$mes1[$tmp]\n"; print "$mes2[$tmp]\n"; } elsif($agent =~ /$ezweb/){ print "$mes1[$tmp]\n"; print "$mes2[$tmp]\n"; } else { print<<"_EOF_"; $mes1[$tmp] $mes2[$tmp] -----PR---- ’¹­’¹ð’Ê璽¸! _EOF_ } } sub catenew { $CATE = $_[0]; # print "’¼Ì’¥á’¡¼’¥ëde’¥¦’¥¨’¥Ö\n"; #P print "
\n";
	&getpr();
	print "($CATEG[$CATE]) NEW UPDATE\n";
	$FILE = "s-cate$CATE/*.html";
        if ($CATE eq "2") {
	print "’¥¢’¥À’¥ë’¥È’¤Ï’¥»’¥¯’¥·’¡¼’¼Ì’¥á’¡¼’¥ë’¤Ø’°Ü’¹Ô’¤·’¤Þ’¤·’¤¿\n";
	    exit;
	}
	$tp = $ST*10;
	$next = $ST + 1;
	$st = $next*10;
	$LS = `/bin/ls -1t $FILE | /usr/bin/head -$st | /usr/bin/tail -10 `;
	$WC = `/bin/ls -1t $FILE | /usr/bin/wc -l`;
	@LIST = split(/\s+/, $LS) ;
	foreach $LIST (@LIST) {
		$tmp = $LIST;
		open (NOTE,"$tmp") || exit;
		@PAGE = ;
		close(NOTE);
		$tit = "NO TITLE";
		foreach $line (@PAGE) {
			if (index( $line ,"TITLE:") ne -1) {
				$tit = $line;
				$tit =~ s/TITLE://;
				$tit =~ s/\n//;
			}
			if (index( $line ,"DATE:") ne -1) {
				$dat = $line;
				$dat =~ s/DATE://;
				$dat =~ s/\n//;
													}
			if (index( $line ,"FILE:") ne -1) {
				$FILE = $line;
				$FILE =~ s/FILE://;
				$FILE =~ s/\n//;
			}
			if (index( $line ,"ID:") ne -1) {
				$USER = $line;
				$USER =~ s/ID://;
				$USER =~ s/\n//;
			}
			if (index( $line ,"DATA:") ne -1) {
				$data = $line;
				$data =~ s/DATA://;
				$data =~ s/\n//;
	       			($DMY1,$DMY2,$DMY3,$DMY4) = split(/\,/,$data);
			}
			if (index( $line ,"USER:") ne -1) {
				$user = $line;
				$user =~ s/USER://;
				$user =~ s/\n//;
			}
		}
		if ($DMY4 eq "1") {
#20011220
#	   $tit  =~ s/$user//g;
	   $tit  =~ s///g;
       $tit =~ s/\"//g;
       $tit =~ s/$web\///;
       $tit =~ s/$datad\///;
       $tit =~ s/$FILE//g;
       $tit =~ s/$USER\///g;
       $tit =~ s/\/A//g;
       $tit =~ s/a href=//;
				$dat = substr ($dat,0,5);
	   $USER =~ s/>//;
#print "user : $user
\n"; print "
"; print "($scate[$CATE])’¸°:$dat\n"; print ""; print ""; print ""; print "$user:
\n"; } else { print "($scate[$CATE])$dat
$user:$tit\n"; print "
\n"; } $fcnt++; } print "
\n"; if ($WC > $st ) { print "’¤µ’¤é’¤Ë’ÀΒ¤Ø
\n"; } $bbs = "’¥«’¥Æ’¥´’¥ê’ºÇ’¿·’¹¹’¿·’¾ð’Êó’¤Ë’¤Ä’¤¤’¤Æ"; print "’¥µ’¥Ý’¡¼’¥È’·Ç’¼¨’ÈĒ¤Ø($bbs)
\n"; print "’»ä’¤â’¼Ì’¥á’¡¼’¥ëde’¥¦’¥¨’¥Ö’¤ä’¤ê’¤¿’¤¤!\n"; print "Powerd by funa\n"; print "
\n"; $cntdir = 'cnt'; &getcnt; print "
"; print "\n"; print "\n"; } sub getcolor { $title ="’¼Ì’¥á’¡¼’¥ëde’¥¦’¥¨’¥Ö"; $default_color = "#000000,#F5F5DC,#000099,#009900,#FF0000,#0000FF"; ($cfont, $cbody, $clink, $cname, $cnumb, $chead) = split(",", $default_color); if ($USER eq "") { return(0); } #print "Content-type: text/html\n\n"; #print "$title\n"; $file = "$tbbsd/$USER.txt"; if (!open(NOTE,"$file")) { return(0); } @DATA = ; close(NOTE); @configs = splice(@DATA, 0, 5); chop(@configs); # ($headline, $title) = split("\t", $configs[0]); # $comment = $configs[1]; # $back = $configs[2]; ($sdef, $cfont, $cbody, $clink, $cname, $cnumb, $chead, $bgimg, $shead, $pform) = split(",", $configs[3]); return(0); } sub getcate { $file = $catef; if (!open(NOTE,"$file")) { &error("NO file $file"); } @DATA = ; close(NOTE); $i = 0; foreach $line (@DATA) { ($CATEG[$i]) = $line; $CATEG[$i++] =~ s/\n//g; } $CATEMAX = $i; } sub showcate { # print "’¼Ì’¥á’¡¼’¥ëde’¥¦’¥¨’¥Ö\n"; #P print "
\n";
	&getpr();
	print "’¥«’¥Æ’¥´’¥ê’¥ê’¥¹’¥È\n";
    for ($i = 1;$i < $CATEMAX ; $i++) {
	    if ($i ne 2) {
		print "$CATEG[$i]\n";
	    } else {
	print "’¥¢’¥À’¥ë’¥È’¤Ï’¥»’¥¯’¥·’¡¼’¼Ì’¥á’¡¼’¥ë’¤Ø’°Ü’¹Ô’¤·’¤Þ’¤·’¤¿\n";
   	    }
	}
	print "
\n"; $bbs = "’¥«’¥Æ’¥´’¥ê’¥ê’¥¹’¥È’¤Ë’¤Ä’¤¤’¤Æ"; print "’¥µ’¥Ý’¡¼’¥È’·Ç’¼¨’ÈĒ¤Ø($bbs)
\n"; print "’»ä’¤â’¼Ì’¥á’¡¼’¥ëde’¥¦’¥¨’¥Ö’¤ä’¤ê’¤¿’¤¤!\n"; print "Powerd by funa\n"; print "
\n"; $cntdir = 'cnt'; &getcnt; print "
"; print "\n"; print "\n"; } sub keyshow { # print "’¼Ì’¥á’¡¼’¥ëde’¥¦’¥¨’¥Ö\n"; # print "
\n";
	&getpr();
	print "’¸°’ÉÕ $B2 ’¥ê’¥¹’¥È\n";
	&checkb7(); 

#	$file = "$userd/$USER";
#	if (!open(NOTE,"$file")) { &error("NO user $USER"); }
#		@DATA = ;
#	close(NOTE);
#	foreach $line (@DATA) {
#	       ($MAIL,$ID,$PASS,$HP,$CA,$KE) = split(/\,/,$line);
#	       $KE =~ s/\n//g;
#	}
##	if ($B5 ne $PASS) {
#		&error("BAD passwd user $USER");
#	}
    $USER = $B2;
	$FILE = "$datad/$USER/2*.html";
	$tp = $ST*10;
	$next = $ST + 1;
	$st = $next*10;
	$LS = `/bin/ls -1t $FILE | /bin/sort -r | /usr/bin/head -$st | /usr/bin/tail -10 `;
	$WC = `/bin/ls -1t $FILE | /usr/bin/wc -l`;
    $fcnt = $tp+1;
	@LIST = split(/\s+/, $LS) ;
	foreach $LIST (@LIST) {
	       ($tmp1,$tmp2,$tmp) = split(/\//,$LIST);
		open (NOTE,"$LIST") || exit;
		$DATE = $tmp;
		$DATE =~ s/.html//ig;
		@PAGE = ;
		close(NOTE);
		$tit = "NO TITLE";
		foreach $line (@PAGE) {
			if (index( $line ,"TITLE:") ne -1) {
				$tit = $line;
				$tit =~ s/TITLE://;
				$tit =~ s/\n//;
			}
		}
		print "$KF$DATE$tit\n";
		print "
\n"; } if ($WC > $st ) { print "
’¤µ’¤é’¤Ë’ÀΒ¤Ø\n"; } print "
\n"; $bbs = "$USER’¤µ’¤ó’¤Î"; print "$bbs’¸Ä’¿Í’·Ç’¼¨’ÈĒ¤Ø
\n"; print "’»ä’¤â’¼Ì’¥á’¡¼’¥ëde’¥¦’¥¨’¥Ö’¤ä’¤ê’¤¿’¤¤!\n"; print "Powerd by funa\n"; print "
\n"; $cntdir = "cntdir/$USER"; &getcnt; print "
"; print "\n"; print "\n"; } sub keynew { # $KEYON = $_[0]; # print "’¼Ì’¥á’¡¼’¥ëde’¥¦’¥¨’¥Ö\n"; # print "
\n";
	&getpr();
    $KF ="’¸°’¤Ê’¤· ’¿·’Ã咥꒥¹’¥È";
    if ($KEYON) {$KF ="’¸°’ÉÕ ’¿·’Ã咥꒥¹’¥È";}
	print "$KF\n";
	$FILE = 's-new/*.html';
	$tp = $ST*20;
	$next = $ST + 1;
    $lcnt = 0;
	$st = $next*20;
	$LS = `/bin/ls -1t $FILE |  /usr/bin/head -$st | /usr/bin/tail -20 `;
	$WC = `/bin/ls -1t $FILE | /usr/bin/wc -l`;
	@LIST = split(/\s+/, $LS) ;
	foreach $LIST (@LIST) {
		$tmp = $LIST;
		open (NOTE,"$tmp") || exit;
		@PAGE = ;
		close(NOTE);
		$tit = "NO TITLE";
		foreach $line (@PAGE) {
			if (index( $line ,"TITLE:") ne -1) {
				$tit = $line;
				$tit =~ s/TITLE://;
				$tit =~ s/\n//;
			}
			if (index( $line ,"DATE:") ne -1) {
				$dat = $line;
				$dat =~ s/DATE://;
				$dat =~ s/\n//;
			}
			if (index( $line ,"ID:") ne -1) {
				$USER = $line;
				$USER =~ s/ID://;
				$USER =~ s/\n//;
			}
			if (index( $line ,"FILE:") ne -1) {
				$FILE = $line;
				$FILE =~ s/FILE://;
				$FILE =~ s/\n//;
			}
			if (index( $line ,"DATA:") ne -1) {
				$data = $line;
				$data =~ s/DATA://;
				$data =~ s/\n//;
	       			($DMY1,$DMY2,$DMY3,$DMY4) = split(/\,/,$data);
				$KF ="";
				if ($DMY4 eq "1") {$KF="’¸°";}
			}
			if (index( $line ,"USER:") ne -1) {
				$user = $line;
				$user =~ s/USER://;
				$user =~ s/\n//;
			}
		}
   if ($DMY4 eq "1") {
	   if ($KEYON eq "0"){ next;}
	   $tit  =~ s///g;
       $tit =~ s/\"//g;
       $tit =~ s/$web\///;
       $tit =~ s/$datad\///;
       $tit =~ s/$USER\///g;
       $tit =~ s/$FILE//g;
       $tit =~ s/\/A//g;
       $tit =~ s/a href=//;
	   $dat = substr ($dat,0,5);
	print "
"; print "($scate[$DMY3])’¸°:$dat\n"; print ""; print ""; print ""; print "$user:
\n"; $lcnt++; } else { if ($KEYON eq "1"){ next;} print "($scate[$DMY3])$dat
$user : $tit
\n"; $lcnt++; } # print "
"; } print "
\n"; if ($WC > $st ) { print "’¤µ’¤é’¤Ë’ÀΒ¤Ø
\n"; } $bbs = "$KF’¤Ë’¤Ä’¤¤’¤Æ"; print "’¥µ’¥Ý’¡¼’¥È’·Ç’¼¨’ÈĒ¤Ø($bbs)
\n"; print "’»ä’¤â’¼Ì’¥á’¡¼’¥ëde’¥¦’¥¨’¥Ö’¤ä’¤ê’¤¿’¤¤!\n"; print "Powerd by funa\n"; print "
\n"; $cntdir = 'cnt'; &getcnt; print "
"; print "\n"; print "\n"; } sub users { &getpr(); print "’¥æ’¡¼’¥¶’¡¼ID’¸¡’º÷\n"; print "’¥æ’¡¼’¥¶’¡¼ID’¤Î’Ƭ1’ʸ’»ú’¤ò’Áª’Âò’¤·’¤Æ’¤¯’¤À’¤µ’¤¤’¡£\n"; print "
’¿ô’»ú\n"; @num = ("0","1","2","3","4","5","6","7","8","9"); @alphas = ("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"); @alphab = ("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"); $cn = 0; foreach $a (@num) { print "$a "; $cn++ ; if ($cn eq 5) { $cn = 0; print "\n";} } print "
’¥¢’¥ë’¥Õ’¥¡’¥Ù’¥Ã’¥È’¾®’ʸ’»ú\n"; $cn = 0; foreach $a (@alphas) { print "$a "; $cn++ ; if ($cn eq 5) { $cn = 0; print "\n";} } print "
’¥¢’¥ë’¥Õ’¥¡’¥Ù’¥Ã’¥È’Âç’ʸ’»ú\n"; $cn = 0; foreach $a (@alphab) { print "$a "; $cn++ ; if ($cn eq 5) { $cn = 0; print "\n";} } print "
\n"; $bbs = "’¥æ’¡¼’¥¶’¸¡’º÷"; print "’¥µ’¥Ý’¡¼’¥È’·Ç’¼¨’ÈĒ¤Ø($bbs)
\n"; print "’»ä’¤â’¼Ì’¥á’¡¼’¥ëde’¥¦’¥¨’¥Ö’¤ä’¤ê’¤¿’¤¤!\n"; print "Powerd by funa\n"; print "
\n"; $cntdir = 'cnt'; &getcnt; print ""; print "\n"; print "\n"; } sub userlook { $heada = $_[0]; # print "’¼Ì’¥á’¡¼’¥ëde’¥¦’¥¨’¥Ö\n"; # print "
\n";

	&getpr();
	print "USER ID search[$heada]\n";
	$FILE = "$userd/$heada*";
	$tp = $ST*20;
	$next = $ST + 1;
	$st = $next*20;
	$LS = `/bin/ls -1 $FILE | /usr/bin/head -$st | /usr/bin/tail -20 `;
	$WC = `/bin/ls -1t $FILE | /usr/bin/wc -l`;
	@LIST = split(/\s+/, $LS) ;
	foreach $LIST (@LIST) {
		$tmp = $LIST;
		$tmp =~ s/$userd\///;
       		print "$tmp\n";
#		print "
"; } print "
\n"; if ($WC > $st ) { print "’³’¤­’¤Ø
\n"; } $bbs = "’¥æ’¡¼’¥¶’¸¡’º÷"; print "’¥µ’¥Ý’¡¼’¥È’·Ç’¼¨’ÈĒ¤Ø($bbs)
\n"; print "’»ä’¤â’¼Ì’¥á’¡¼’¥ëde’¥¦’¥¨’¥Ö’¤ä’¤ê’¤¿’¤¤!\n"; print "Powerd by funa\n"; print "
\n"; $cntdir = 'cnt'; &getcnt; print "
"; print "\n"; print "\n"; } sub noamailreq { $tmp ="$datad/$USER/img/$FILE"; # print "tmp = $tmp\n"; open (NOTE,"$tmp") || exit; @PAGE = ; close(NOTE); foreach $line (@PAGE) { if (index( $line ,"TITLE:") ne -1) { $tit = $line; $tit =~ s/TITLE://; $tit =~ s/\n//; } } print "
";
	print "
"; print "USER:
$USER\n"; print "’¥á’¡¼’¥ë’¥¢’¥É’¥ì’¥¹:
\n"; print "’¥á’¡¼’¥ë’¥¢’¥É’¥ì’¥¹’¤Ï’Æ°’¤¯’¼Ì’¥á’¡¼’¥ë’ÂВ±þ’µ¡’¤«\n’¥Ñ\’¥½\’¥³’¥ó’¤Î’¥¢’¥É’¥ì’¥¹’¤Ë’¸Â’¤ê’¤Þ’¤¹\n"; print "TITLE:$tit\n"; print "’¥³’¥á’¥ó’¥È:
\n"; $FILE =~ s/.html$/.noa/; print "FILE:
$FILE\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "
"; print "
"; print "\n"; exit ; } sub noamaildo { $B1 = $ADD; &checkb1(); local $boundary = "-*-I-hack-noa-file---funa=sra*co*jp-" . time . "_" . $$; local $attach = ""; $oldDelim = $/; undef $/; $fname ="$datad/$USER/img/$FILE"; open (NOTE,"$fname") || &error("$fname error"); $attach_tmp = ; close(NOTE); $attach = &bodyencode($attach_tmp, "b64"); $attach .= &benflush("b64"); open (MAIL, "|$mailprog $ADD") || &error("mail program error"); print MAIL "MIME-Version: 1.0\n"; print MAIL "Content-Type: Multipart/Mixed; boundary=\"$boundary\"\n"; print MAIL "Content-Transfer-Encoding:Base64\n"; print MAIL "Subject: NOA-MAIL-SHA\n"; print MAIL "From: nobody\@ftvjapan.ddo.jp\n"; print MAIL "To: $ADD\n"; print MAIL "--$boundary\n"; print MAIL "Content-Type: text/plain; charset=\"ISO-2022-JP\"\n"; print MAIL "\n"; print MAIL "’¤³’¤ì’¤Ï’¼Ì’¡¼’¥ëde’¥¦’¥¨’¥Ö’¤«’¤é’¤Î’¤ª’¤·’¤é’¤»’¤Ç’¤¹’¡£\n"; print MAIL "’¥³’¥á’¥ó’¥È: $COMM\n"; print MAIL "-----------\n"; print MAIL "http://ftvjapan.ddo.jp/~funa/sha/index.html <- ’¼Ì’¥á’¡¼’¥ëde’¥¦’¥¨’¥Ö\n"; print MAIL "--$boundary\n"; print MAIL "Content-Type: application/octet-stream; name=\"$FILE\"\n"; print MAIL "Content-Transfer-Encoding: base64\n"; print MAIL "Content-Disposition: attachment; filename=\"$FILE\"\n"; print MAIL "\n"; print MAIL "$attach\n"; print MAIL "\n"; print MAIL "--$boundary" . "--\n"; close (MAIL); print "’ͧ’㒤˒¥á’¡¼’¥ë’¤·’¤Þ’¤·’¤¿’¡£\n"; # print "attach = $attach\n"; $/ = $oldDelim; &getpr(); print "’¼Ì’¥á’¡¼’¥ëde’¥¦’¥¨’¥Ö\n"; }