#! $|=1; ############################################################################# #本CGI由StarWay修改成會員登錄的CGI,!希望大家用的愉快! #我的E-mail: starways@pchome.com.tw #我的網頁: http://home.pchome.com.tw/soho/starways #我的網頁名稱:StarWay Home # 你可以使用本程式,但必須保留所有網站之連結 ! # #你可以任意修改本程式,但要求保留以上之訊息 ! # ############################################################################# $gbhead = 'guest.htm'; #留言格式檔 $gbdata = 'guest.txt'; #留言資料檔 $cgiurl = 'admin.cgi'; #留言讀取程式 $show = 20; #設定每頁筆數 $pass = '98201079'; #設定板主密碼 ############################################################################# &parse_get; open (MSGS, $gbdata); @MSGSDATA=; close (MSGS); $i=0; $j=1; $temp=1; $flag=0; foreach $line (@MSGSDATA) { if ($line =~ //) { $i++; } } $page=($i%$show); if ($page != 0 || $i == 0){ $page=int($i/$show)+1; } else { $page=($i/$show); } if ($cici eq ""){ $min=1; $max=$show; $cici=1; } if ($cici ne ""){ $min=(($cici-1)*$show)+1; $max=$cici*$show; } print "Content-type: text/html\n\n"; open (FILE, $gbhead);@lines=;close (FILE); foreach $head (@lines) { if ($head=~ //){ print "
\n"; print "
\n"; print "
登錄人數:$i"; print "【目前在第$cici 頁】 共分成 $page
\n"; } else { print "$head"; } } print "\n"; print "\n"; print "
【StarWay Home - 會員資料】
\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; foreach $line (@MSGSDATA) { ($cnt,$msg,$name,$sex,$place,$color,$www,$url,$email,$time)=split(/∥/,$line); chop($line); $cnt=~ s///g; $msg=~s/
/
\n/g; if ($temp>=$min && $temp <=$max) { print "\n"; if ($email){ print "\n";} if ($email eq ""){ print "\n"} print "\n"; print "\n"; print "\n"; if ($www){ print "\n";} if ($www eq ""){ print "\n";} print "\n"; $flag=1; } $temp++; } if ($flag == 0){ print "
姓名姓別來自E-mail個人網頁個人簡介
$name$name$sex$place$email$www$msg
本頁尚未有登錄哦!!"; print "
";} print ""; print "
\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "請輸入管理者密碼\n"; print "\n"; print "
\n"; print "\n"; print ""; sub parse_get { $buff = "$ENV{'QUERY_STRING'}"; ($cici,$yaci)=split(/∥/,$buff); } print "\n"; print "\n"; print "
【會員務必要有E-mail,此E-mail當作會員通知用!!】
\n"; print "\n"; print "\n"; print "

© 2000 StarWay Home Corporation. All rights reserved

\n"; #!$|=1; ############################################################################# #本CGI由StarWay修改成會員登錄的CGI,!希望大家用的愉快! #我的E-mail: starways@pchome.com.tw #我的網頁: http://home.pchome.com.tw/soho/starways #我的網頁名稱:StarWay Home # 你可以使用本程式,但必須保留所有網站之連結 ! # #你可以任意修改本程式,但要求保留以上之訊息 ! # ############################################################################# $filename = 'guest.txt'; #留言資料檔 $pass = '98201079'; #設定板主密碼 $linkurl = 'admin.cgi'; #留言讀取程式 &parse_form; if ($FORM{'password'} ne "$pass") { print "Content-type: text/html\n\n"; print "密碼錯誤!\n"; print " \n"; print "


密 碼 錯 誤!
"; print "若您非管理員請勿執行刪除工作
"; print "回上頁重新輸入
\n"; print "\n";exit;} if ($FORM{'mode'} eq "look") { $FORM{'page'}="$FORM{'page'}∥$pass"; } if ($FORM{'mode'} eq "talk" || $FORM{'mode'} eq "del" ) { $FORM{'msg1'}="$FORM{'msg1'}"; open (FILE,"$filename") || die "Can't Open $filename: $!\n"; @LINES=;close(FILE);$SIZE=@LINES; open (FILE,">$filename") || die "Can't Open $filename: $!\n"; for ($i=0;$i<=$SIZE;$i++) { $_=$LINES[$i]; for ($j=$FORM{'min'};$j<=$FORM{'max'};$j++) { if ($_ =~ //) { if ($FORM{'mode'} eq "del") { $_=""; } if ($FORM{'mode'} eq "talk") { ($cnt,$msg,$name,$url,$www,$email,$time)=split(/∥/,$_); $msg="$msg$FORM{'msg1'}"; $_="$cnt∥$msg∥$name∥$sex∥$url∥$www∥$email∥$time"; } } } if ($_ ne "") { print FILE $_; } } close (FILE); } print "Location: $linkurl?$FORM{'page'}\n\n"; sub parse_form { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $FORM{$name} = $value; } } #!$|=1; ############################################################################# #本CGI由StarWay修改成會員登錄的CGI,!希望大家用的愉快! #我的E-mail: starways@pchome.com.tw #我的網頁: http://home.pchome.com.tw/soho/starways #我的網頁名稱:StarWay Home # 你可以使用本程式,但必須保留所有網站之連結 ! # #你可以任意修改本程式,但要求保留以上之訊息 ! # ############################################################################# $gbhead = 'guest.htm'; #留言格式檔 $gbdata = 'guest.txt'; #留言資料檔 $cgiurl = 'guest.cgi'; #留言讀取程式 $admin = 'admin.cgi'; $show = 20; #設定每頁筆數 $pass = '98201079'; #設定板主密碼 ############################################################################# &parse_get; open (MSGS, $gbdata); @MSGSDATA=; close (MSGS); $i=0; $j=1; $temp=1; $flag=0; foreach $line (@MSGSDATA) { if ($line =~ //) { $i++; } } $page=($i%$show); if ($page != 0 || $i == 0){ $page=int($i/$show)+1; } else { $page=($i/$show); } if ($cici eq ""){ $min=1; $max=$show; $cici=1; } if ($cici ne ""){ $min=(($cici-1)*$show)+1; $max=$cici*$show; } print "Content-type: text/html\n\n"; open (FILE, $gbhead);@lines=;close (FILE); foreach $head (@lines) { if ($head=~ //){ print ""; print "
\n"; print "
\n"; print "
會員登錄人數:$i"; print "目前在第$cici共分成 $page管理區
\n"; } else { print "$head"; }} print "\n"; print "\n"; print "
【StarWay Home - 會員資料】
\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; foreach $line (@MSGSDATA) { ($cnt,$msg,$name,$sex,$place,$color,$www,$url,$email,$time)=split(/∥/,$line); chop($line); $msg=~s/
/
\n/g; if ($temp>=$min && $temp <=$max) { if ($email){ print "\n";} if ($email eq ""){ print "\n";} print "\n"; print "\n"; print "\n"; if ($www){ print "\n";} if ($www eq ""){ print "\n";} print "\n"; $flag=1; } $temp++; } if ($flag == 0){ print ""; print "
姓名性別來自E-mail首頁會員的自我介紹
$name
$name$sex$place$email$www無個人首頁$msg
本頁尚未有登錄哦!!
\n"; print ""; print "";} sub parse_get { $buff = "$ENV{'QUERY_STRING'}"; ($cici,$yaci)=split(/∥/,$buff); } print "\n"; print "\n"; print "
【會員務必要有E-mail,此E-mail當作會員通知用!!】
\n"; print "\n"; print "\n"; print "

© 2000 StarWay Home Corporation. All rights reserved

\n";